shexSpec / shex

ShEx language issues, including new features for e.g. ShEx2.1
24 stars 8 forks source link

Allow SPARQL code in shape map's node selectors #93

Open labra opened 5 years ago

labra commented 5 years ago

In order to validate RDF behind SPARQL endpoints, several ShEx implementation have extended node selectors in shape maps with SPARQL queries.

This allows, for example to use the following syntax:

SPARQL ' ' 'SELECT * WHERE {
 ?x rdfs:subClassOf*/rdf:type :Person .
?x :birthPlace :Spain 
}'''@<SpaniardShape>

to check all nodes that are instances of :Person and whose :birthPlace is :Spain to conform with <SpaniardShape>.

At this moment, both Shex.js and SHalclEX support this feature and with the recent adoption of ShEx in wikidata this feature is being used a lot.