shex-test
Version:
Shape Expressions library tests.
35 lines (31 loc) • 933 B
text/turtle
PREFIX sx: <http://www.w3.org/ns/shex#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
<http://a.example/S1> a sx:ShapeDecl ; sx:shapeExpr [ a sx:Shape ;
sx:closed true ;
sx:expression [
a sx:TripleConstraint ;
sx:predicate <http://a.example/p1> ;
sx:valueExpr <http://a.example/List0PlusDot>
] ] .
<http://a.example/List0PlusDot> a sx:ShapeDecl ; sx:shapeExpr [ a sx:ShapeOr ;
sx:shapeExprs (
[ a sx:NodeConstraint ; sx:values ( () ) ]
[ a sx:Shape ; sx:closed true ;
sx:expression [
a sx:EachOf ;
sx:expressions (
[ a sx:TripleConstraint ;
sx:predicate rdf:first
]
[ a sx:TripleConstraint ;
sx:predicate rdf:rest ;
sx:valueExpr <http://a.example/List0PlusDot>
]
)
]
]
) ] .
[] a sx:Schema ;
sx:shapes (
<http://a.example/S1>
<http://a.example/List0PlusDot>) .