shexSpec / shape-map

ShapeMap structure and language specification
MIT License
1 stars 3 forks source link

Express validation pipeline in ShapeMaps #25

Open ericprud opened 2 years ago

ericprud commented 2 years ago

The ShEx defn starts with a fixed ShapeMap. Query ShapeMaps allow one to assign node by triple pattern { FOCUS a foo:bar} or { _ my:predicate FOCUS } but some use cases require more complex selection criteria. While fixed ShapeMaps are meant to be trivially constructed by processing pipelines, it might be nice to express that validation shapes are selected by nodes that conformed in another validation step.

The SPARQL extension is used in wikidata (#22) It could make sense to include a ShEx extension as well, especially since most ShapeMap implementations can do ShEx validation.

However, we could also imply such validation pipelines with a syntax like:

{FOCUS a foo:Bar}@<FilterShape>@<ReportShape>

. The grammar would allow for n shapeLabels after a nodeSelectof:

[2 ] shapeAssociation ::= nodeSelector shapeLabel+

. The addtion of e.g. ! could be used to swap the sense from selecting conformant nodes to non-conformant nodes (#23).