Fork me on GitHub

ShapePath Online Evaluator

stolen from Kazuki Hamasaki's JSONPath Evaluator

A ShapePath is a series of steps that select ShExJ attributes, types, axes, or the wildcard * which selects any child.

ShapePathDescription
/step separator, e.g. /shapes/
@<http://a.example/S1>shortcut for /shapes/*[id=<http://a.example/S1>]
p<http://a.example/p2>shortcut for /thisShapeExpr::Shape/expression/thisTripleExpr::TripleConstraint[predicate=<http://a.example/p2>]
[]predicate, e.g. [id=<http://a.example/S1>]

See: grammar, tests

Schema

{ "type": "Schema", "shapes": [ { "type": "ShapeDecl", "id": "http://a.example/S2", "shapeExpr": { "type": "Shape" } }, { "type": "ShapeDecl", "id": "http://a.example/S1", "shapeExpr": { "type": "ShapeAnd", "shapeExprs": [ { "type": "Shape", "expression": { "type": "EachOf", "expressions": [ { "type": "TripleConstraint", "predicate": "http://a.example/p1" }, { "type": "TripleConstraint", "predicate": "http://a.example/p2" } ] } }, { "type": "NodeConstraint", "nodeKind": "iri" }, { "type": "Shape", "expression": { "type": "EachOf", "expressions": [ { "type": "TripleConstraint", "predicate": "http://a.example/p3" }, { "type": "TripleConstraint", "predicate": "http://a.example/p1" } ] } } ] } }, { "type": "ShapeDecl", "id": "http://a.example/S4", "shapeExpr": { "type": "Shape" } } ] }

Evaluation Results

Data

PREFIX : <http://a.example/> :n1 :p1 1; :p2 2 ; :p3 3 .

Query Results