-
Notifications
You must be signed in to change notification settings - Fork 0
/
teitalks.odd
437 lines (396 loc) · 15.5 KB
/
teitalks.odd
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
<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:s="http://www.ascc.net/xml/schematron"
xmlns:rng="http://relaxng.org/ns/structure/1.0"
xml:lang="en" n="tei-oucs">
<teiHeader>
<fileDesc>
<titleStmt>
<title>TEI Talks</title>
<author>Sebastian Rahtz</author>
</titleStmt>
<publicationStmt>
<p> </p>
</publicationStmt>
<sourceDesc>
<p>authored from scratch</p>
</sourceDesc>
</fileDesc>
</teiHeader>
<text>
<body>
<div>
<head>Changes</head>
<specGrp xml:id="p5">
<elementSpec ident="TEI" mode="change">
<content>
<s:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
<s:pattern name="Metadata">
<s:rule context="tei:fileDesc">
<s:assert test="tei:titleStmt/tei:author[not(.='')]">You have not provided an author
name</s:assert>
<s:assert test="tei:titleStmt/tei:title[not(.='')]">You have not provided a title for
the document</s:assert>
<s:assert test="tei:editionStmt/tei:edition/tei:date[not(.='')]">You have not provided a
date for the document</s:assert>
</s:rule>
<s:rule context="tei:revisionDesc">
<s:assert test="tei:change/tei:date[contains(.,'$LastChangedDate:')]">You must
have a Subversion $LastChangedDate:
$ field in a revision statement</s:assert>
</s:rule>
</s:pattern>
<s:pattern name="Alt tags">
<s:rule context="tei:figure">
<s:report test="not(tei:figDesc or tei:head)"> You should
provide information in a figure from which
I can construct an alt attribute in HTML </s:report>
</s:rule>
</s:pattern>
<s:pattern name="Tables">
<s:rule context="tei:table">
<s:report test="not(tei:head)">A table should have a
caption, using a head element</s:report>
<s:assert test="not(parent::tei:body)">Do not use tables to lay out the document body</s:assert>
</s:rule>
</s:pattern>
</content>
</elementSpec>
</specGrp>
</div>
<div>
<head>Deletions</head>
<specGrp xml:id="delete">
<elementSpec ident="add" module="core" mode="delete"/>
<elementSpec ident="alt" module="linking" mode="delete"/>
<elementSpec ident="altGrp" module="linking" mode="delete"/>
<elementSpec ident="altIdent" mode="delete"/>
<elementSpec ident="analytic" mode="delete"/>
<elementSpec ident="appInfo" mode="delete"/>
<elementSpec ident="application" mode="delete"/>
<elementSpec ident="argument" module="textstructure" mode="delete"/>
<elementSpec ident="attDef" mode="delete" module="tagdocs"/>
<elementSpec ident="attList" mode="delete" module="tagdocs"/>
<elementSpec ident="attRef" mode="delete" module="tagdocs"/>
<elementSpec ident="biblFull" mode="delete" module="core"/>
<elementSpec ident="biblStruct" mode="delete" module="core"/>
<elementSpec ident="binaryObject" mode="delete" module="core"/>
<elementSpec ident="byline" module="textstructure" mode="delete"/>
<elementSpec ident="cRefPattern" mode="delete"/>
<elementSpec ident="catDesc" mode="delete"/>
<elementSpec ident="catRef" mode="delete"/>
<elementSpec ident="category" mode="delete"/>
<elementSpec ident="choice" module="core" mode="delete"/>
<elementSpec ident="classCode" mode="delete"/>
<elementSpec ident="classDecl" mode="delete"/>
<elementSpec ident="closer" module="textstructure" mode="delete"/>
<elementSpec ident="corr" module="core" mode="delete"/>
<elementSpec ident="correction" mode="delete"/>
<elementSpec ident="creation" mode="delete"/>
<elementSpec ident="dateRange" module="core" mode="delete"/>
<elementSpec ident="dateline" module="textstructure" mode="delete"/>
<elementSpec ident="del" module="core" mode="delete"/>
<elementSpec ident="distinct" module="core" mode="delete"/>
<elementSpec ident="div1" module="textstructure" mode="delete"/>
<elementSpec ident="div2" module="textstructure" mode="delete"/>
<elementSpec ident="div3" module="textstructure" mode="delete"/>
<elementSpec ident="div4" module="textstructure" mode="delete"/>
<elementSpec ident="div5" module="textstructure" mode="delete"/>
<elementSpec ident="div6" module="textstructure" mode="delete"/>
<elementSpec ident="div7" module="textstructure" mode="delete"/>
<elementSpec ident="editorialDecl" mode="delete"/>
<elementSpec ident="epigraph" module="textstructure" mode="delete"/>
<elementSpec ident="equiv" mode="delete"/>
<elementSpec ident="expan" module="core" mode="delete"/>
<elementSpec ident="extent" mode="delete"/>
<elementSpec ident="floatingText" mode="delete"/>
<elementSpec ident="formula" module="figures" mode="delete"/>
<elementSpec ident="funder" mode="delete"/>
<elementSpec ident="gap" module="core" mode="delete"/>
<elementSpec ident="geoDecl" mode="delete"/>
<elementSpec ident="gloss" mode="delete" module="core"/>
<elementSpec ident="group" module="textstructure" mode="delete"/>
<elementSpec ident="handNote" mode="delete"/>
<elementSpec ident="headItem" module="core" mode="delete"/>
<elementSpec ident="headLabel" module="core" mode="delete"/>
<elementSpec ident="hyphenation" mode="delete"/>
<elementSpec ident="imprimatur" module="textstructure" mode="delete"/>
<elementSpec ident="index" module="core" mode="delete"/>
<elementSpec ident="interpretation" mode="delete"/>
<elementSpec ident="join" module="linking" mode="delete"/>
<elementSpec ident="joinGrp" module="linking" mode="delete"/>
<elementSpec ident="l" module="core" mode="delete"/>
<elementSpec ident="langUsage" mode="delete"/>
<elementSpec ident="language" mode="delete"/>
<elementSpec ident="lg" module="core" mode="delete"/>
<elementSpec ident="link" module="linking" mode="delete"/>
<elementSpec ident="linkGrp" module="linking" mode="delete"/>
<elementSpec ident="measure" module="core" mode="delete"/>
<elementSpec ident="measureGrp" mode="delete"/>
<elementSpec ident="meeting" module="core" mode="delete"/>
<elementSpec ident="mentioned" module="core" mode="delete"/>
<elementSpec ident="milestone" module="core" mode="delete"/>
<elementSpec ident="namespace" mode="delete"/>
<elementSpec ident="normalization" mode="delete"/>
<elementSpec ident="num" module="core" mode="delete"/>
<elementSpec ident="opener" module="textstructure" mode="delete"/>
<elementSpec ident="orig" module="core" mode="delete"/>
<elementSpec ident="pb" module="core" mode="delete"/>
<elementSpec ident="phr" module="analysis" mode="delete"/>
<elementSpec ident="postBox" module="core" mode="delete"/>
<elementSpec ident="postCode" module="core" mode="delete"/>
<elementSpec ident="postscript" mode="delete"/>
<elementSpec ident="refState" mode="delete"/>
<elementSpec ident="refsDecl" mode="delete"/>
<elementSpec ident="reg" module="core" mode="delete"/>
<elementSpec ident="relatedItem" mode="delete"/>
<elementSpec ident="rendition" mode="delete"/>
<elementSpec ident="rs" module="core" mode="delete"/>
<elementSpec ident="said" mode="delete"/>
<elementSpec ident="salute" module="textstructure" mode="delete"/>
<elementSpec ident="samplingDecl" mode="delete"/>
<elementSpec ident="segmentation" mode="delete"/>
<elementSpec ident="sic" module="core" mode="delete"/>
<elementSpec ident="signed" module="textstructure" mode="delete"/>
<elementSpec ident="sp" module="core" mode="delete"/>
<elementSpec ident="speaker" module="core" mode="delete"/>
<elementSpec ident="stage" module="core" mode="delete"/>
<elementSpec ident="stdVals" mode="delete"/>
<elementSpec ident="street" module="core" mode="delete"/>
<elementSpec ident="tagUsage" mode="delete"/>
<elementSpec ident="tagsDecl" mode="delete"/>
<elementSpec ident="taxonomy" mode="delete"/>
<elementSpec ident="teiCorpus" mode="delete"/>
<elementSpec ident="time" module="core" mode="delete"/>
<elementSpec ident="timeRange" module="core" mode="delete"/>
<elementSpec ident="timeline" module="linking" mode="delete"/>
<elementSpec ident="trailer" mode="delete"/>
<elementSpec ident="unclear" module="core" mode="delete"/>
<elementSpec ident="when" module="linking" mode="delete"/>
<classSpec predeclare="true" module="tei" type="atts"
mode="delete" ident="att.declaring"/>
<classSpec predeclare="true" module="linking" type="atts" ident="att.global.linking"
mode="change">
<attList>
<attDef ident="corresp" mode="delete"/>
<attDef ident="synch" mode="delete"/>
<attDef ident="sameAs" mode="delete"/>
<attDef ident="copyOf" mode="delete"/>
<attDef ident="next" mode="delete"/>
<attDef ident="prev" mode="delete"/>
<attDef ident="exclude" mode="delete"/>
<attDef ident="select" mode="delete"/>
</attList>
</classSpec>
<elementSpec ident="email" module="core" mode="change">
<classes>
<memberOf key="model.addressLike"/>
<memberOf key="model.addrPart"/>
</classes>
</elementSpec>
<elementSpec ident="table" module="figures" mode="change">
<attList>
<attDef ident="preamble" mode="add">
<datatype key="data.text"/>
</attDef>
</attList>
</elementSpec>
</specGrp>
</div>
<div>
<head>Dealing with examples</head>
<specGrp xml:id="egxml">
<moduleRef url="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/relaxng.rng"/>
<elementSpec ident="egXML" mode="change" module="tagdocs"
ns="http://www.tei-c.org/ns/Examples">
<content>
<rng:zeroOrMore>
<rng:group>
<rng:choice>
<rng:text/>
<rng:ref name="egXML"/>
<rng:ref name="macro.anyXML"/>
</rng:choice>
</rng:group>
</rng:zeroOrMore>
</content>
</elementSpec>
<macroSpec ident="macro.anyThing" mode="add">
<content>
<?NameList?>
</content>
</macroSpec>
<macroSpec ident="macro.schemaPattern" mode="change" module="tagdocs">
<content>
<group xmlns="http://relaxng.org/ns/structure/1.0">
<choice>
<text/>
<oneOrMore>
<choice>
<ref name="pattern"/>
<ref name="define"/>
</choice>
</oneOrMore>
</choice>
</group>
</content>
</macroSpec>
<macroSpec ident="anySchematron" mode="add">
<content>
<element xmlns="http://relaxng.org/ns/structure/1.0">
<nsName ns="http://www.ascc.net/xml/schematron"/>
<zeroOrMore>
<choice>
<attribute>
<anyName/>
</attribute>
<ref name="anySchematron"/>
<text/>
</choice>
</zeroOrMore>
</element>
</content>
</macroSpec>
<macroSpec ident="anyISOSchematron" mode="add">
<content>
<element xmlns="http://relaxng.org/ns/structure/1.0">
<nsName ns="http://purl.oclc.org/dsdl/schematron"/>
<zeroOrMore>
<choice>
<attribute>
<anyName/>
</attribute>
<ref name="anyISOSchematron"/>
<text/>
</choice>
</zeroOrMore>
</element>
</content>
</macroSpec>
<elementSpec ident="constraint" mode="change" module="tagdocs">
<content>
<zeroOrMore xmlns="http://relaxng.org/ns/structure/1.0">
<choice>
<text/>
<ref name="anySchematron"/>
<ref name="anyISOSchematron"/>
</choice>
</zeroOrMore>
</content>
</elementSpec>
<!-- The goal here is to permit *any* element from the extension
namespace The problem is that we can't do this via
<elementSpec>, as it requires a name be specified on ident=,
and separates content declaration from attribute declaration
(maybe we could put the attribute declaration inside
elementSpec/content/, but it's not how it is intended to
work). So instead, we just define a macro which will resolve
the RELAX NG declarations we want-->
<macroSpec ident="anyAlien" mode="add">
<content>
<element xmlns="http://relaxng.org/ns/structure/1.0">
<nsName ns="http://www.example.org/ns/nonTEI"/>
<zeroOrMore>
<attribute>
<anyName/>
<data type="token"/>
</attribute>
</zeroOrMore>
<zeroOrMore>
<choice>
<text/>
<ref name="anyTEI"/>
<ref name="anyAlien"/>
</choice>
</zeroOrMore>
</element>
</content>
</macroSpec>
</specGrp>
</div>
<div>
<head>XInclude</head>
<specGrp xml:id="xinclude">
<elementSpec xmlns:rng="http://relaxng.org/ns/structure/1.0" ident="include"
ns="http://www.w3.org/2001/XInclude" mode="add">
<desc>The W3C XInclude element</desc>
<classes>
<memberOf key="model.global"/>
</classes>
<content>
<rng:optional>
<rng:ref name="fallback"/>
</rng:optional>
</content>
<attList>
<attDef ident="href">
<desc>pointer to the resource being included</desc>
<datatype>
<rng:text/>
</datatype>
</attDef>
<attDef ident="parse" usage="opt">
<defaultVal>xml</defaultVal>
<valList type="closed">
<valItem ident="xml"/>
<valItem ident="text"/>
</valList>
</attDef>
<attDef ident="xpointer" usage="opt">
<datatype>
<rng:text/>
</datatype>
</attDef>
<attDef ident="encoding" usage="opt">
<datatype>
<rng:text/>
</datatype>
</attDef>
<attDef ident="accept" usage="opt">
<datatype>
<rng:text/>
</datatype>
</attDef>
<attDef ident="accept-charset" usage="opt">
<datatype>
<rng:text/>
</datatype>
</attDef>
<attDef ident="accept-language" usage="opt">
<datatype>
<rng:text/>
</datatype>
</attDef>
</attList>
</elementSpec>
<elementSpec xmlns:rng="http://relaxng.org/ns/structure/1.0" ident="fallback"
ns="http://www.w3.org/2001/XInclude" mode="add">
<desc>Wrapper for fallback elements if an XInclude fails</desc>
<content>
<rng:text/>
</content>
</elementSpec>
</specGrp>
</div>
<div>
<head>Schema</head>
<schemaSpec ident="teitalks" start="TEI" prefix="tei_">
<moduleRef key="tei"/>
<moduleRef key="header"/>
<moduleRef key="core"/>
<moduleRef key="textstructure"/>
<moduleRef key="namesdates" include="persName forename surname affiliation"/>
<moduleRef key="linking"/>
<moduleRef key="tagdocs"/>
<moduleRef key="figures"/>
<specGrpRef target="#p5"/>
<specGrpRef target="#egxml"/>
<specGrpRef target="#changes"/>
<specGrpRef target="#delete"/>
<specGrpRef target="#xinclude"/>
</schemaSpec>
</div>
</body>
</text>
</TEI>