-
Notifications
You must be signed in to change notification settings - Fork 2
/
bookHtml016.html
201 lines (195 loc) · 51.1 KB
/
bookHtml016.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="hevea 2.23">
<link rel="stylesheet" type="text/css" href="book.css"><link rel="stylesheet" type="text/css" href="bookHtml.css">
<title>ShEx in ShEx</title>
</head>
<body>
<a href="bookHtml015.html"><img src="previous_motif.gif" alt="Previous"></a>
<a href="index.html"><img src="contents_motif.gif" alt="Up"></a>
<a href="bookHtml017.html"><img src="next_motif.gif" alt="Next"></a>
<hr>
<header>
<a href="http://book.validatingrdf.com">Validating RDF data</a>
<img src="cover.jpg"></img>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-112019120-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-112019120-1');
</script>
</header>
<h1 class="chapter" id="sec220">Appendix C ShEx in ShEx</h1>
<p>
<a id="AnnexShExInShEx"></a>
<a id="appc"></a></p><p>In this annex we include the full code of a ShEx schema that validates ShEx schemas represented in RDF syntax (ShExR).
This code has been adapted from the ShEx
specification [<a href="bookHtml018.html#ShExSpec">81</a>].<sup><a id="text62" href="#note62">1</a></sup> </p><table class="lstframe c014"><tr><td class="lstlisting"><span class="c011"> </span><span class="c011"><span class="c003">PREFIX</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">: </span><span class="c011"><span class="c008"><span class="c011"><http://www.w3.org/2001/XMLSchema#></span></span></span><span class="c011">
</span><span class="c011"><span class="c003">PREFIX</span></span><span class="c011"> </span><span class="c011"><span class="c004">rdf</span></span><span class="c011">: </span><span class="c011"><span class="c008"><span class="c011"><http://www.w3.org/1999/02/22-rdf-syntax-ns#></span></span></span><span class="c011">
</span><span class="c011"><span class="c003">BASE</span></span><span class="c011"> </span><span class="c011"><span class="c008"><span class="c011"><http://www.w3.org/ns/shex#></span></span></span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c003">start</span></span><span class="c011">=</span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><Schema></span></span></span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><Schema></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c004">Schema</span></span><span class="c011">] ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">startActs</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><SemActList1Plus></span></span></span><span class="c011">? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">start</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><shapeExpr></span></span></span><span class="c011">?;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">shapes</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><shapeExpr></span></span></span><span class="c011">*</span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><shapeExpr></span></span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><ShapeOr></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><ShapeAnd></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><ShapeNot></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><NodeConstraint></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><Shape></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><ShapeExternal></span></span></span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><ShapeOr></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">ShapeOr</span></span><span class="c011">] ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">shapeExprs</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><shapeExprList2Plus></span></span></span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><ShapeAnd></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">ShapeAnd</span></span><span class="c011">] ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">shapeExprs</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><shapeExprList2Plus></span></span></span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><ShapeNot></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">ShapeNot</span></span><span class="c011">] ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">shapeExpr</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><shapeExpr></span></span></span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><NodeConstraint></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">NodeConstraint</span></span><span class="c011">] ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">nodeKind</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">iri</span></span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">bnode</span></span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">literal</span></span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">nonliteral</span></span><span class="c011">]?;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">datatype</span></span><span class="c011"> </span><span class="c011"><span class="c003">IRI</span></span><span class="c011"> ? ;</span><span class="c011">
</span><span class="c011"> &</span><span class="c011"><span class="c008"><span class="c011"><xsFacets></span></span></span><span class="c011"> ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">values</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><valueSetValueList1Plus></span></span></span><span class="c011">?</span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><Shape></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">Shape</span></span><span class="c011">] ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">closed</span></span><span class="c011"> [</span><span class="c011"><span class="c003">true</span></span><span class="c011"> </span><span class="c011"><span class="c003">false</span></span><span class="c011">]? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">extra</span></span><span class="c011"> </span><span class="c011"><span class="c003">IRI</span></span><span class="c011">* ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">expression</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><tripleExpression></span></span></span><span class="c011">? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">semActs</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><SemActList1Plus></span></span></span><span class="c011">? ;</span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><ShapeExternal></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">ShapeExternal</span></span><span class="c011">] }</span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><SemAct></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">SemAct</span></span><span class="c011">] ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">name</span></span><span class="c011"> </span><span class="c011"><span class="c003">IRI</span></span><span class="c011"> ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">code</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">string</span></span><span class="c011">?</span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><Annotation></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">Annotation</span></span><span class="c011">] ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">predicate</span></span><span class="c011"> </span><span class="c011"><span class="c003">IRI</span></span><span class="c011"> ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">object</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><objectValue></span></span></span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><facet_holder></span></span></span><span class="c011"> { </span><span class="c011"><span class="c008"><span class="c011"># holds labeled productions</span></span></span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c006">$</span></span><span class="c011"><span class="c008"><span class="c011"><xsFacets></span></span></span><span class="c011"> ( &</span><span class="c011"><span class="c008"><span class="c011"><stringFacet></span></span></span><span class="c011"> | &</span><span class="c011"><span class="c008"><span class="c011"><numericFacet></span></span></span><span class="c011"> )* ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c006">$</span></span><span class="c011"><span class="c008"><span class="c011"><stringFacet></span></span></span><span class="c011"> (</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">length</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">integer</span></span><span class="c011">
</span><span class="c011"> | </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">minlength</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">integer</span></span><span class="c011">
</span><span class="c011"> | </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">maxlength</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">integer</span></span><span class="c011">
</span><span class="c011"> | </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">pattern</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">string</span></span><span class="c011"> ; </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">flags</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">string</span></span><span class="c011">?</span><span class="c011">
</span><span class="c011"> );</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c006">$</span></span><span class="c011"><span class="c008"><span class="c011"><numericFacet></span></span></span><span class="c011"> (</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">mininclusive</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><numericLiteral></span></span></span><span class="c011">
</span><span class="c011"> | </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">minexclusive</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><numericLiteral></span></span></span><span class="c011">
</span><span class="c011"> | </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">maxinclusive</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><numericLiteral></span></span></span><span class="c011">
</span><span class="c011"> | </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">maxexclusive</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><numericLiteral></span></span></span><span class="c011">
</span><span class="c011"> | </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">totaldigits</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">integer</span></span><span class="c011">
</span><span class="c011"> | </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c003">fractiondigits</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">integer</span></span><span class="c011">
</span><span class="c011"> )</span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><numericLiteral></span></span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">integer</span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">decimal</span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">double</span></span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><valueSetValue></span></span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><objectValue></span></span></span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><IriStem></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><IriStemRange></span></span></span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><LiteralStem></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><LiteralStemRange></span></span></span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><LanguageStem></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><LanguageStemRange></span></span></span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><objectValue></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">IRI</span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c003">LITERAL</span></span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><IriStem></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">IriStem</span></span><span class="c011">]; </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">stem</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">anyUri</span></span><span class="c011"> }</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><IriStemRange></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> {</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">IriStemRange</span></span><span class="c011">];</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">stem</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">anyUri</span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><Wildcard></span></span></span><span class="c011">;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">exclusion</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><objectValue></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><IriStem></span></span></span><span class="c011">*</span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><LiteralStem></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">LiteralStem</span></span><span class="c011">]; </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">stem</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">string</span></span><span class="c011"> }</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><LiteralStemRange></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> {</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">LiteralStemRange</span></span><span class="c011">];</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">stem</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">string</span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><Wildcard></span></span></span><span class="c011">;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">exclusion</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><objectValue></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><LiteralStem></span></span></span><span class="c011">*</span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><LanguageStem></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">LanguageStem</span></span><span class="c011">]; </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">stem</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">string</span></span><span class="c011"> }</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><LanguageStemRange></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> {</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">LanguageStemRange</span></span><span class="c011">];</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">stem</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">string</span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><Wildcard></span></span></span><span class="c011">;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">exclusion</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><objectValue></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><LanguageStem></span></span></span><span class="c011">*</span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><Wildcard></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">BNODE</span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> {</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">Wildcard</span></span><span class="c011">]</span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><tripleExpression></span></span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><TripleConstraint></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><OneOf></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><EachOf></span></span></span><span class="c011">
</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><OneOf></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">OneOf</span></span><span class="c011">] ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">min</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">integer</span></span><span class="c011">? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">max</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">integer</span></span><span class="c011">? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">expressions</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><tripleExpressionList2Plus></span></span></span><span class="c011"> ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">semActs</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><SemActList1Plus></span></span></span><span class="c011">? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">annotation</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><Annotation></span></span></span><span class="c011">*</span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><EachOf></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">EachOf</span></span><span class="c011">] ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">min</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">integer</span></span><span class="c011">? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">max</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">integer</span></span><span class="c011">? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">expressions</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><tripleExpressionList2Plus></span></span></span><span class="c011"> ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">semActs</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><SemActList1Plus></span></span></span><span class="c011">? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">annotation</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><Annotation></span></span></span><span class="c011">*</span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><tripleExpressionList2Plus></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> {</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">first</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><tripleExpression></span></span></span><span class="c011"> ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">rest</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><tripleExpressionList1Plus></span></span></span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><tripleExpressionList1Plus></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> {</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">first</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><tripleExpression></span></span></span><span class="c011"> ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">rest</span></span><span class="c011"> [</span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">nil</span></span><span class="c011">] </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><tripleExpressionList1Plus></span></span></span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><TripleConstraint></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> { </span><span class="c011"><span class="c003">a</span></span><span class="c011"> [</span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">TripleConstraint</span></span><span class="c011">] ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">inverse</span></span><span class="c011"> [</span><span class="c011"><span class="c003">true</span></span><span class="c011"> </span><span class="c011"><span class="c003">false</span></span><span class="c011">]? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">negated</span></span><span class="c011"> [</span><span class="c011"><span class="c003">true</span></span><span class="c011"> </span><span class="c011"><span class="c003">false</span></span><span class="c011">]? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">min</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">integer</span></span><span class="c011">? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">max</span></span><span class="c011"> </span><span class="c011"><span class="c004">xsd</span></span><span class="c011">:</span><span class="c011"><span class="c006">integer</span></span><span class="c011">? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">predicate</span></span><span class="c011"> </span><span class="c011"><span class="c003">IRI</span></span><span class="c011"> ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">valueExpr</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><shapeExpr></span></span></span><span class="c011">? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">semActs</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><SemActList1Plus></span></span></span><span class="c011">? ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">sx</span></span><span class="c011">:</span><span class="c011"><span class="c006">annotation</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><Annotation></span></span></span><span class="c011">*</span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><SemActList1Plus></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> {</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">first</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><SemAct></span></span></span><span class="c011"> ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">rest</span></span><span class="c011"> [</span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">nil</span></span><span class="c011">] </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><SemActList1Plus></span></span></span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><shapeExprList2Plus></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> {</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">first</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><shapeExpr></span></span></span><span class="c011"> ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">rest</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><shapeExprList1Plus></span></span></span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><shapeExprList1Plus></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> {</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">first</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><shapeExpr></span></span></span><span class="c011"> ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">rest</span></span><span class="c011"> [</span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">nil</span></span><span class="c011">] </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><shapeExprList1Plus></span></span></span><span class="c011">
</span><span class="c011">}</span><span class="c011">
</span><span class="c011"><span class="c008"><span class="c011"><valueSetValueList1Plus></span></span></span><span class="c011"> </span><span class="c011"><span class="c003">CLOSED</span></span><span class="c011"> {</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">first</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><valueSetValue></span></span></span><span class="c011"> ;</span><span class="c011">
</span><span class="c011"> </span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">rest</span></span><span class="c011"> [</span><span class="c011"><span class="c004">rdf</span></span><span class="c011">:</span><span class="c011"><span class="c006">nil</span></span><span class="c011">] </span><span class="c011"><span class="c003">OR</span></span><span class="c011"> </span><span class="c011"><span class="c006">@</span></span><span class="c011"><span class="c008"><span class="c011"><valueSetValueList1Plus></span></span></span><span class="c011">
</span><span class="c011">}</span></td></tr>
</table>
<hr class="footnoterule"><dl class="thefootnotes"><dt class="dt-thefootnotes">
<a id="note62" href="#text62">1</a></dt><dd class="dd-thefootnotes"><div class="footnotetext">See: http://shex.io/shex-semantics/#shexr</div></dd></dl>
<footer>
<iframe src="https://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fbook.validatingrdf.com%2F&width=100&layout=standard&action=like&size=small&show_faces=true&share=true&height=80&appId=8170400788" width="100" height="80" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
<a class="twitter-share-button" text="Validating RDF data book" href="https://twitter.com/intent/tweet?text=Validating%20RDF%20data%20book&?via=jelabra&hastags=shex,shacl,validatingrdfbook" data-size="large">Tweet</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5a51d2b6b0d22f0a"></script>
</footer>
<hr>
<a href="bookHtml015.html"><img src="previous_motif.gif" alt="Previous"></a>
<a href="index.html"><img src="contents_motif.gif" alt="Up"></a>
<a href="bookHtml017.html"><img src="next_motif.gif" alt="Next"></a>
</body>
</html>