Skip to content

Conversation

ajnelson-nist
Copy link
Member

No description provided.

pySHACL 0.20.0, recently released, includes support for incorporating
ill-typedness of literals in review of SHACL Datatype Constraints.  For
unknown reasons, this is now causing some `xsd:decimal` literals to be
flggged as non-conformant.

This is being discussed further in pySHACL PR 157.

References:
* RDFLib/pySHACL#157

Signed-off-by: Alex Nelson <[email protected]>
@ajnelson-nist ajnelson-nist mentioned this pull request Sep 20, 2022
2 tasks
JSON-LD has a default conversion of non-integer literals to
`xsd:double`, per Section B.1.3 of the JSON-LD 1.1 specification.

What does not appear to be explained in the specification---at least, in
that section---is what to do when there is an `@type` annotation
accompanying a non-string `@value`.  RDFLib, at least as of 6.2.0, does
not use the `@type` annotation.  This makes the pySHACL output look
quite mysterious.

This patch converts the `@value` to a string so `@type` will be
respected.

A follow-on patch will regenerate Make-managed files.

References:
* https://w3c.github.io/json-ld-syntax/#conversion-of-native-data-types

Signed-off-by: Alex Nelson <[email protected]>
@ajnelson-nist ajnelson-nist self-assigned this Sep 20, 2022
@ajnelson-nist ajnelson-nist marked this pull request as ready for review September 20, 2022 17:05
@ajnelson-nist ajnelson-nist merged commit 04f6678 into master Sep 20, 2022
@ajnelson-nist ajnelson-nist deleted the refresh_reviews_with_pyshacl_0_20_0 branch September 20, 2022 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant