Fix checksum encoding issue. Proposal: do not use explicit hexBinary-type declaration in submitted records #351
Labels
No labels
bug
config
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
orinoco/shacl-vue#351
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).