ULB-Darmstadt / shacl-form

HTML5 web component for editing/viewing RDF data that conform to SHACL shapes
https://ulb-darmstadt.github.io/shacl-form/
MIT License
24 stars 4 forks source link

Resolving sh:or binding to an existing graph #18

Closed renevoorburg closed 1 month ago

renevoorburg commented 1 month ago

A shape contains a construct like:

mdtosh:hasPartShape
    a sh:NodeShape ;
    sh:path mdto:hasPart ;
    sh:or (
        [ sh:nodeKind sh:IRI ]
        [ sh:class mdto:Informationobject ]
    ) .

This approach works when creating forms (as far as I have tested it), but results in an error like "couldn't resolve sh:or for value" when trying to bind to an existing graph. The error message refers to the object of the triple ( eg. <http://example.com/external_uri> for ex:example mdto:hasPart <http://example.com/external_uri> .).

This is indeed in line with the documentation on how sh:or is resolved but perhaps for constructs like exemplified here, it could resolve to the sh:IRI as a fallback?

s-tittel commented 1 month ago

Good idea, thanks for the feedback. Please check v1.4.7, that should work now.

renevoorburg commented 1 month ago

Works nicely. Thank you.