Newer
Older
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
<?xml version="1.0"?>
<html xmlns:xi="http://www.w3.org/2001/XInclude">
<head>
<style type="text/css">
.text {color: teal}
.tag {color: maroon}
.navig {color: olive}
</style>
<title>14. Documenting Schemas (samples)</title>
</head>
<body>
<h2>14. Documenting Schemas (samples)</h2>
<div>
<h3>Sample 1</h3>
<pre>
<p>[<a href="examples/documentation/text.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author"><span class="tag">
<xs:annotation><span class="tag">
<xs:documentation xml:lang="en"><span class="text">
The author of a book.</span>
</xs:documentation></span><span class="tag">
<xs:documentation xml:lang="fr"><span class="text">
Designe l'auteur d'un livre.</span>
</xs:documentation></span>
</xs:annotation></span>
</xs:element></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 2</h3>
<pre>
<p>[<a href="examples/documentation/xhtml.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author"><span class="tag">
<xs:annotation><span class="tag">
<xs:documentation xml:lang="en"><span class="tag">
<p id="author" xmlns="http://www.w3.org/1999/xhtml"><span class="text">
This element describes the</span><span class="tag">
<em><span class="text">
author</span>
</em></span><span class="text">
of a</span><span class="tag">
<a href="#book"><span class="text">
book</span>
</a></span>
</p></span><span class="text">
.</span>
</xs:documentation></span>
</xs:annotation></span>
</xs:element></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 3</h3>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="text">
</span>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<svg xmlns="http://www.w3.org/2000/svg"><span class="tag">
<title><span class="text">
An author</span>
</title></span><span class="tag">
<ellipse style="stroke:#000000; fill:#e3e000;
stroke-width:2pt;"id="head" cx="280" cy="250" rx="110" ry="130"/></span><span class="tag">
<ellipse style="stroke:none; fill:#7f7f7f; " id="leftEye"
cx="240"cy="225" rx="18" ry="18"/></span><span class="tag">
<ellipse style="stroke:none; fill:#7f7f7f; " id="rightEye"
cx="320"cy="225" rx="18" ry="18"/></span><span class="tag">
<path style="fill:none;stroke:#7F7F7F; stroke-width:5pt;"
id="mouth"d="M 222 280 A 58 48 0 0 0 338 280"/></span>
</svg></span>
<span xmlns:exsl="http://exslt.org/common" class="text">
</span>
</pre>
<hr/>
</div>
<div>
<h3>Sample 4</h3>
<pre>
<p>[<a href="examples/documentation/svg.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author"><span class="tag">
<xs:annotation><span class="tag">
<xs:documentation><span class="tag">
<svg xmlns="http://www.w3.org/2000/svg"><span class="tag">
<title><span class="text">
An author</span>
</title></span><span class="tag">
<ellipse style="stroke:#000000; fill:#e3e000;
stroke-width:2pt;" id="head" cx="280" cy="250" rx="110"
ry="130"/></span><span class="tag">
<ellipse style="stroke:none; fill:#7f7f7f; " id="leftEye"
cx="240"cy="225" rx="18" ry="18"/></span><span class="tag">
<ellipse style="stroke:none; fill:#7f7f7f; " id="rightEye"
cx="320"cy="225" rx="18" ry="18"/></span><span class="tag">
<path style="fill:none;stroke:#7F7F7F; stroke-width:5pt;"
id="mouth"d="M 222 280 A 58 48 0 0 0 338 280"/></span>
</svg></span>
</xs:documentation></span>
</xs:annotation></span>
</xs:element></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 5</h3>
<pre>
<p>[<a href="examples/documentation/dc.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author"><span class="tag">
<xs:annotation><span class="tag">
<xs:appinfo xmlns:dc="http://purl.org/dc/elements/1.1/"><span class="tag">
<dc:creator><span class="text">
Eric van der Vlist (mailto:vdv@dyomedea.com)</span>
</dc:creator></span><span class="tag">
<dc:date><span class="text">
2002-02-01</span>
</dc:date></span><span class="tag">
<dc:subject><span class="text">
author,person,book</span>
</dc:subject></span><span class="tag">
<dc:description><span class="text">
This element describes the author of a book.</span>
</dc:description></span>
</xs:appinfo></span>
</xs:annotation></span>
</xs:element></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 6</h3>
<pre>
<p>[<a href="examples/XMLSchema.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:simpleType name="string" id="string"><span class="tag">
<xs:annotation><span class="tag">
<xs:appinfo><span class="tag">
<hfp:hasFacet name="length"/></span><span class="tag">
<hfp:hasFacet name="minLength"/></span><span class="tag">
<hfp:hasFacet name="maxLength"/></span><span class="tag">
<hfp:hasFacet name="pattern"/></span><span class="tag">
<hfp:hasFacet name="enumeration"/></span><span class="tag">
<hfp:hasFacet name="whiteSpace"/></span><span class="tag">
<hfp:hasProperty name="ordered" value="false"/></span><span class="tag">
<hfp:hasProperty name="bounded" value="false"/></span><span class="tag">
<hfp:hasProperty name="cardinality" value="countably
infinite"/></span><span class="tag">
<hfp:hasProperty name="numeric" value="false"/></span>
</xs:appinfo></span><span class="tag">
<xs:documentation
source="http://www.w3.org/TR/xmlschema-2/#string"/></span>
</xs:annotation></span><span class="tag">
<xs:restriction base="xs:anySimpleType"><span class="tag">
<xs:whiteSpace value="preserve" id="string.preserve"/></span>
</xs:restriction></span>
</xs:simpleType></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 7</h3>
<pre>
<p>[<a href="examples/documentation/saf.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author"><span class="tag">
<xs:annotation><span class="tag">
<xs:appinfo source="saf:meta-data-item"
xmlns:sql="http://www.extensibility.com/saf/spec/safsample/sql-map.saf"
><span class="tag">
<sql:select><span class="text">
select</span><span class="tag">
<sql:elem><span class="text">
name</span>
</sql:elem></span><span class="text">
,</span><span class="tag">
<sql:elem><span class="text">
birthdate</span>
</sql:elem></span><span class="text">
,</span><span class="tag">
<sql:attr><span class="text">
deathdate</span>
</sql:attr></span><span class="text">
from tbl_author</span>
</sql:select></span>
</xs:appinfo></span>
</xs:annotation></span>
</xs:element></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 8</h3>
<pre>
<p>[<a href="examples/documentation/schematron.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author"><span class="tag">
<xs:annotation><span class="tag">
<xs:appinfo xmlns:sch="http://www.ascc.net/xml/schematron"><span class="tag">
<sch:pattern name="Born before dead"><span class="tag">
<sch:rule context="author"><span class="tag">
<sch:assert test="not(dead) or (dead > born)"
diagnostics="bornAfterDead"><span class="text">
An author should die after her or his death.</span>
</sch:assert></span><span class="tag">
<sch:diagnostics><span class="tag">
<sch:diagnostic id="bornAfterDead"><span class="text">
Error, this author is born after her or his birth!
Author=</span><span class="tag">
<sch:value-of select="name"/></span><span class="text">
Birth =</span><span class="tag">
<sch:value-of select="born"/></span><span class="text">
Death =</span><span class="tag">
<sch:value-of select="dead"/></span>
</sch:diagnostic></span>
</sch:diagnostics></span>
</sch:rule></span>
</sch:pattern></span>
</xs:appinfo></span>
</xs:annotation></span>
</xs:element></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 9</h3>
<pre>
<p>[<a href="examples/documentation/xslt.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="book" type="book"><span class="tag">
<xs:annotation><span class="tag">
<xs:appinfo xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><span class="tag">
<xsl:template match="book"><span class="tag">
<xsl:apply-templates select="title"/></span><span class="tag">
<xsl:apply-templates select="isbn"/></span><span class="tag">
<p><span class="text">
Authors:</span>
</p></span><span class="tag">
<ul><span class="tag">
<xsl:apply-templates select="author"/></span>
</ul></span><span class="tag">
<p><span class="text">
Characters:</span>
</p></span><span class="tag">
<ul><span class="tag">
<xsl:apply-templates select="character"/></span>
</ul></span>
</xsl:template></span>
</xs:appinfo></span>
</xs:annotation></span>
</xs:element></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 10</h3>
<pre>
<p>[<a href="examples/documentation/rddl.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author"><span class="tag">
<xs:annotation><span class="tag">
<xs:appinfo xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:rddl="http://www.rddl.org/"><span class="tag">
<rddl:resource id="author-transform"
xlink:arcrole="http://www.w3.org/1999/xhtml"
xlink:role="http://www.w3.org/1999/XSL/Transform"
xlink:title="Author template"
xlink:href="library.xslt#author"><span class="tag">
<div class="resource"><span class="tag">
<h4><span class="text">
XSLT Transformation</span>
</h4></span><span class="tag">
<p><span class="text">
This</span><span class="tag">
<a href="library.xslt#author"><span class="text">
template</span>
</a></span><span class="text">
displays the description of an author.</span>
</p></span>
</div></span>
</rddl:resource></span><span class="tag">
<rddl:resource id="CSS" xlink:title="CSS Stylesheet"
xlink:role="http://www.isi.edu/in-notes/iana/assignments/media-types/text/css"
xlink:href="author.css"><span class="tag">
<div class="resource"><span class="tag">
<h4><span class="text">
CSS Stylesheet</span>
</h4></span><span class="tag">
<p><span class="text">
A</span><span class="tag">
<a href="author.css"><span class="text">
CSS stylesheet</span>
</a></span><span class="text">
defining the styles which may be used to display an
author.</span>
</p></span>
</div></span>
</rddl:resource></span>
</xs:appinfo></span>
</xs:annotation></span>
</xs:element></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 11</h3>
<pre>
<p>[<a href="examples/documentation/att.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author" doc:doc="This element
describes the author of a book."
xmlns:doc="http://dyomedea.com/ns/doc"/></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 12</h3>
<pre>
<p>[<a href="examples/documentation/saf-att.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author" sql:table="TBL_AUTHOR"
xmlns:sql="http://www.extensibility.com/saf/spec/safsample/sql-map.saf"
/></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 13</h3>
<pre>
<p>[<a href="examples/documentation/xlink.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author"
xlink:arcrole="http://www.w3.org/1999/xhtml"
xlink:role="http://www.w3.org/1999/XSL/Transform"
xlink:title="Author template" xlink:href="library.xslt#author"
xmlns:xlink="http://www.w3.org/1999/xlink"/></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 14</h3>
<pre>
<p>[<a href="examples/documentation/rddl-concise.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author"><span class="tag">
<xs:annotation><span class="tag">
<xs:appinfo
xlink:arcrole="http://www.w3.org/1999/XSL/Transform"
xlink:role="http://www.w3.org/1999/XSL/Transform"
xlink:title="Author template" xlink:href="library.xslt#author"
xmlns:xlink="http://www.w3.org/1999/xlink"><span class="tag">
<div class="resource"><span class="tag">
<h4><span class="text">
XSLT Transformation</span>
</h4></span><span class="tag">
<p><span class="text">
This</span><span class="tag">
<a href="library.xslt#author"><span class="text">
template</span>
</a></span><span class="text">
displays the description of an author.</span>
</p></span>
</div></span>
</xs:appinfo></span><span class="tag">
<xs:appinfo title="CSS Stylesheet"
role="http://www.isi.edu/in-notes/iana/assignments/media-types/text/css"
href="author.css"><span class="tag">
<div class="resource"><span class="tag">
<h4><span class="text">
CSS Stylesheet</span>
</h4></span><span class="tag">
<p><span class="text">
A</span><span class="tag">
<a href="author.css"><span class="text">
CSS stylesheet</span>
</a></span><span class="text">
defining the styles which may be used to display an
author.</span>
</p></span>
</div></span>
</xs:appinfo></span>
</xs:annotation></span>
</xs:element></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 15</h3>
<pre>
<p>[<a href="examples/documentation/comment.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author">
<!-- This element describes the author of a book. -->
</xs:element></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 16</h3>
<pre>
<p>[<a href="examples/documentation/text.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author"><span class="tag">
<xs:annotation><span class="tag">
<xs:documentation xml:lang="en"><span class="text">
The author of a book.</span>
</xs:documentation></span><span class="tag">
<xs:documentation xml:lang="fr"><span class="text">
Designe l'auteur d'un livre.</span>
</xs:documentation></span>
</xs:annotation></span>
</xs:element></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 17</h3>
<pre>
<p>[<a href="examples/documentation/att.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author" doc:doc="This element
describes the author of a book."
xmlns:doc="http://dyomedea.com/ns/doc"/></span>
</pre>
</pre>
<hr/>
</div>
<div>
<h3>Sample 18</h3>
<pre>
<p>[<a href="examples/documentation/comment.xsd" title="download" target="download">download</a>]</p>
<pre>
<span xmlns:exsl="http://exslt.org/common" class="tag">
<xs:element name="author" type="author">
<!-- This element describes the author of a book. -->
</xs:element></span>
</pre>
</pre>
<hr/>
</div>
</body>
</html>