Open labra opened 4 years ago
This isssue will be reviewed in the ShEx CG meeting on January 8th: https://github.com/shexSpec/shex/blob/master/meetings/2020/20200108-agenda.md
I think the easiest path forward is to have a normative behavior with regard to a pair of resolvers (prefixes+base) for the shape label and node/triplePattern respectively. We could then have a non-normative section that says the the resolvers are SHOULD come from the loaded schema and data, but exactly how is application-dependent (iirc, XPath does something similar, but I'm not finding evidence of that).
If we want to be normative throughout, we have to specify lots of details like what happens if you load two docs into your graph and they conflict on prefix or base. Or even if a single doc re-assigns a prefix or base after it has been used to resolve some terms (turtle allows that).
At this moment shapemap implementations allow qualified names without prefix declarations and inherit the alias from the ShEx schemas or RDF data. For example, a shapemap like:
is accepted whenever the RDF data contains a prefix declaration for
foo
and the ShEx schema contains a prefix declaration forbar
.This behaviour works well in practice and has been implemented by Shex.js and SHaclEX, but is hasn't been docomented yet in the shape map spec.
Apart from that, users may want to define their own prefix declarations in their shapemaps. So a shape map could be:
and would try to check node
<http://example.org/foo/Node>
with the shape<http://example.org/bar/Shape>