# kitchenSink.shex - Issue schema using most ShEx features.
BASE
PREFIX e:
PREFIX ex:
PREFIX UserShape:
PREFIX :
PREFIX foaf:
PREFIX xsd:
PREFIX rdfs:
%ex:foo{ initializer for ignored extension %}
start = @ # Issue validation starts with
{ a [ex:Issue]?; # An has:
ex:state [ex:state~ - ex:state_resolved]// # a state starting with "state-"
rdfs:label "State"// rdfs:description "the sit";
ex:reportedBy IRI @UserShape:; # reported by a .
ex:reportedOn xsd:dateTime; # reported some date/time.
( # optionally
ex:reproducedBy
NONLITERAL @:EmployeeShape; # reproduced by someone
ex:reproducedOn xsd:dateTime # at some data/time.
)? %ex:foo{ asdfasdf %};
ex:related @* # n related issues.
}
UserShape: { # A has:
( # a name which is either
foaf:name xsd:string # a FOAF name
| # or
foaf:givenName xsd:string+; # one or more givenNames
foaf:familyName xsd:string); # and one familyName.
foaf:mbox IRI /^mailto:/; # one FOAF mbox.
ex:id BNODE @_:IDshape
}
:EmployeeShape { # An has:
foaf:givenName xsd:string+; # at least one givenName.
foaf:familyName xsd:string; # one familyName.
foaf:phone IRI*; # any number of phone numbers.
foaf:mbox IRI? # maybe one FOAF mbox.
}
BASE <../>
#VIRTUAL
_:IDshape {
$_:IDshapeE (
ex:code LITERAL;
ex:system IRI;
ex:literal ["a" "b"^^ex:c "c"@en "d"@en-fr]{2,3};
ex:misc BNODE %ex:foo{ ignored %} %ex:bar{ also ignored %}
| (^ex:ref [true false];
^ex:miscRef .);
ex:issues @e:S1*;
ex:seeAlso @ # interjection!
e:S1*;
ex:says @ # interjection2!
:EmployeeShape*; )
}
ex:FooID CLOSED # &_:IDshape
EXTRA ex:code ex:system {
&_:IDshapeE
}