Fix checksum encoding issue: do not use explicit hexBinary-type declaration in submitted records #27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently the RDFlib-LinkML code in dumpthings renders the
notationindlidentifiers:Checksumwith explicit type declaration as python encoded string representation of the represented binary content, i.e.,"41"^^xsd:hexBinarybecomes"b'A'". This happens only if the explicit type declaration,^^xsd:hexBinaryis provided.This underlying issue seems to be that range of
notationisHexBinary, which defines its uri to bexsd:hexBinary. AFAICS the rdf-linkml code does get confused with anxsd:hexBinaryURI, but an instance of a genericHexBinary-class. It uses the URI-registered reader to read the content, yielding a byte-string, but the genericHexBinary-instance methods to emit the content of the byte-string ---which isstr--- resulting in something likeb'A'.This can be fixed by:
HexBinaryin thenotation-range, but usingxsd:hexBinaryinstead.HexBinary-instances in the python code generators^^xsd:hexBinary-type delcaration in the TTL record.Proposed solution: 3: To quickly fix the checksum encoding issue, the explicit hexBinary-type declaration should be removed from the checksum in the submitted TTL-record (this would drop the format check because checksum would be treated as string, but it can be done without re-releasing schemas or adding schema specific code to linkml libraries).
was moved here: orinoco/shacl-vue#351