fix: use custom type URI for HexBinary #552

Merged
mih merged 3 commits from flat into main 2026-06-24 19:19:01 +00:00
mih commented 2026-06-24 12:55:39 +00:00 (Migrated from github.com)

As diagnosed in orinoco/dump-things-server#226 and other issues, the HexBinary type setup using uri: xsd:hexBinary has both prevented proper validation, and caused data corruption due to issues with the rdflib validator.

While it is preferrable to have something as globally understood as

skos:notation "1234567890abcdef"^^xsd:hexBinary

the value is diminished if actual implementations produce

skos:notation "b'\\x124Vx\\x90\\xab\\xcd\\xef'"^^xsd:hexBinary

instead.

Given that we use custom type URIs in most (if not all) other places, and combine that with exact_mappings to support inference, it appears to be acceptable to adopt this pattern also in this case.

As diagnosed in https://hub.psychoinformatics.de/orinoco/dump-things-server/issues/226 and other issues, the `HexBinary` type setup using `uri: xsd:hexBinary` has both prevented proper validation, and caused data corruption due to issues with the rdflib validator. While it is preferrable to have something as globally understood as ``` skos:notation "1234567890abcdef"^^xsd:hexBinary ``` the value is diminished if actual implementations produce ``` skos:notation "b'\\x124Vx\\x90\\xab\\xcd\\xef'"^^xsd:hexBinary ``` instead. Given that we use custom type URIs in most (if not all) other places, and combine that with `exact_mappings` to support inference, it appears to be acceptable to adopt this pattern also in this case.
Sign in to join this conversation.
No description provided.