-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathParlaMint-TEI.rng
605 lines (571 loc) · 16.4 KB
/
ParlaMint-TEI.rng
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
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
<?xml version="1.0" encoding="UTF-8"?>
<grammar ns="http://www.tei-c.org/ns/1.0"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<a:documentation>RelaxNG XML schema for ParlaMint corpora: schema
for "plain text" corpus component file.</a:documentation>
<include href="ParlaMint.rng"/>
<start>
<a:documentation>Root element of a ParlaMint component file.</a:documentation>
<element name="TEI">
<a:documentation>Obligatory @xml:id.</a:documentation>
<ref name="id.att"/>
<a:documentation>Obligatory @xml:lang.</a:documentation>
<attribute name="xml:lang">
<ref name="lang.val"/>
</attribute>
<a:documentation>Obligatory @ana determining what scope this document has.</a:documentation>
<attribute name="ana">
<ref name="anyURIs"/>
</attribute>
<a:documentation>Optional @corresp for MTed corpora.</a:documentation>
<ref name="corresp.att"/>
<ref name="teiHeader"/>
<ref name="text-body"/>
</element>
</start>
<!-- METADATA -->
<define name="teiHeader">
<a:documentation>Metadata of the component.</a:documentation>
<element name="teiHeader">
<ref name="global.atts"/>
<ref name="fileDesc"/>
<ref name="encodingDesc"/>
<ref name="profileDesc"/>
<optional>
<ref name="revisionDesc"/>
</optional>
</element>
</define>
<define name="fileDesc">
<element name="fileDesc">
<a:documentation>File description.</a:documentation>
<ref name="global.atts"/>
<ref name="titleStmt"/>
<ref name="editionStmt"/>
<ref name="extent"/>
<ref name="publicationStmt"/>
<ref name="sourceDesc"/>
</element>
</define>
<define name="titleStmt">
<a:documentation>Title statement.</a:documentation>
<element name="titleStmt">
<oneOrMore>
<ref name="title-header"/>
</oneOrMore>
<oneOrMore>
<ref name="meeting"/>
</oneOrMore>
<zeroOrMore>
<ref name="respStmt"/>
</zeroOrMore>
<zeroOrMore>
<ref name="funder"/>
</zeroOrMore>
</element>
</define>
<define name="respStmt">
<a:documentation>Responsibility statement.</a:documentation>
<element name="respStmt">
<oneOrMore>
<oneOrMore>
<element name="persName">
<ref name="global.atts"/>
<ref name="ref.att"/>
<ref name="normalized-space.string"/>
</element>
</oneOrMore>
<oneOrMore>
<element name="resp">
<ref name="lang.att"/>
<ref name="normalized-space.string"/>
</element>
</oneOrMore>
</oneOrMore>
</element>
</define>
<define name="editionStmt">
<a:documentation>Edition statement.</a:documentation>
<element name="editionStmt">
<element name="edition">
<ref name="normalized-space.string"/>
</element>
</element>
</define>
<define name="extent">
<a:documentation>Extent of the document.</a:documentation>
<element name="extent">
<oneOrMore>
<element name="measure">
<attribute name="unit">
<!--data type="NCName"/-->
<choice>
<value>speeches</value>
<value>words</value>
<value>tokens</value>
</choice>
</attribute>
<attribute name="quantity">
<data type="integer"/>
</attribute>
<ref name="lang.att"/>
<text/>
</element>
</oneOrMore>
</element>
</define>
<define name="publicationStmt">
<a:documentation>Publications statement.</a:documentation>
<element name="publicationStmt">
<ref name="publisher"/>
<ref name="idno"/>
<element name="availability">
<attribute name="status">
<value>free</value>
</attribute>
<element name="licence">
<!--data type="anyURI"/-->
<a:documentation>Fixed licence CC BY.</a:documentation>
<value>http://creativecommons.org/licenses/by/4.0/</value>
</element>
<ref name="paras"/>
</element>
<ref name="date-simple"/>
</element>
</define>
<define name="sourceDesc">
<a:documentation>Source description.</a:documentation>
<element name="sourceDesc">
<oneOrMore>
<element name="bibl">
<oneOrMore>
<ref name="title"/>
</oneOrMore>
<zeroOrMore>
<element name="edition">
<ref name="lang.att"/>
<ref name="normalized-space.string"/>
</element>
</zeroOrMore>
<optional>
<ref name="publisher"/>
</optional>
<oneOrMore>
<ref name="idno"/>
</oneOrMore>
<zeroOrMore>
<ref name="date"/>
</zeroOrMore>
</element>
</oneOrMore>
<optional>
<element name="recordingStmt">
<oneOrMore>
<element name="recording">
<attribute name="type">
<choice>
<value>audio</value>
<value>video</value>
</choice>
</attribute>
<optional>
<attribute name="dur">
<data type="duration"/>
</attribute>
</optional>
<oneOrMore>
<ref name="media"/>
</oneOrMore>
<zeroOrMore>
<ref name="respStmt"/>
</zeroOrMore>
<optional>
<ref name="time"/>
</optional>
<optional>
<element name="equipment">
<ref name="abs"/>
</element>
</optional>
</element>
</oneOrMore>
</element>
</optional>
</element>
</define>
<define name="encodingDesc">
<a:documentation>Encoding description.</a:documentation>
<element name="encodingDesc">
<ref name="global.atts"/>
<element name="projectDesc">
<ref name="paras"/>
</element>
<ref name="tagsDecl"/>
</element>
</define>
<define name="profileDesc">
<a:documentation>Profile description.</a:documentation>
<element name="profileDesc">
<ref name="global.atts"/>
<ref name="settingDesc"/>
</element>
</define>
<define name="revisionDesc">
<a:documentation>Revision description.</a:documentation>
<element name="revisionDesc">
<ref name="global.atts"/>
<oneOrMore>
<element name="change">
<attribute name="when">
<data type="date"/>
</attribute>
<mixed>
<zeroOrMore>
<ref name="name-header"/>
</zeroOrMore>
</mixed>
</element>
</oneOrMore>
</element>
</define>
<define name="tagsDecl">
<a:documentation>Tags declaration.</a:documentation>
<element name="tagsDecl">
<element name="namespace">
<attribute name="name">
<data type="anyURI"/>
</attribute>
<oneOrMore>
<element name="tagUsage">
<attribute name="gi">
<data type="Name"/>
</attribute>
<attribute name="occurs">
<data type="nonNegativeInteger"/>
</attribute>
<text/>
</element>
</oneOrMore>
</element>
</element>
</define>
<define name="settingDesc">
<a:documentation>Setting description.</a:documentation>
<element name="settingDesc">
<element name="setting">
<oneOrMore>
<ref name="name-header"/>
</oneOrMore>
<ref name="date"/>
</element>
</element>
</define>
<define name="title-header">
<a:documentation>A title in the teiHeader. Must have a @type.</a:documentation>
<element name="title">
<ref name="lang.att"/>
<a:documentation>@type is here obligatory:</a:documentation>
<attribute name="type">
<choice>
<value>main</value>
<value>sub</value>
</choice>
</attribute>
<ref name="normalized-space.string"/>
</element>
</define>
<define name="title">
<a:documentation>A title in the text.</a:documentation>
<element name="title">
<ref name="lang.att"/>
<optional>
<a:documentation>@type is optional:</a:documentation>
<attribute name="type">
<choice>
<value>main</value>
<value>sub</value>
</choice>
</attribute>
</optional>
<ref name="normalized-space.string"/>
</element>
</define>
<define name="meeting">
<a:documentation>A "meeting" (e.g. session) of the parliament.</a:documentation>
<element name="meeting">
<ref name="global.atts"/>
<ref name="ana.att"/>
<text/>
</element>
</define>
<define name="publisher">
<a:documentation>Publisher of the corpus.</a:documentation>
<element name="publisher">
<ref name="lang.att"/>
<choice>
<group>
<oneOrMore>
<element name="orgName">
<ref name="lang.att"/>
<ref name="normalized-space.string"/>
</element>
</oneOrMore>
<optional>
<ref name="ref"/>
</optional>
</group>
<text/>
</choice>
</element>
</define>
<define name="funder">
<a:documentation>Funder of the corpus compilation.</a:documentation>
<element name="funder">
<oneOrMore>
<element name="orgName">
<ref name="lang.att"/>
<ref name="normalized-space.string"/>
</element>
</oneOrMore>
<optional>
<ref name="ref"/>
</optional>
</element>
</define>
<define name="name-header">
<a:documentation>A name as it appears in the teiHeader (rather than in the
transcription).</a:documentation>
<element name="name">
<optional>
<attribute name="type">
<data type="Name"/>
</attribute>
</optional>
<optional>
<attribute name="key">
<data type="Name"/>
</attribute>
</optional>
<ref name="lang.att"/>
<ref name="normalized-space.string"/>
</element>
</define>
<define name="abs">
<a:documentation>A series of anonymous blocks. Anonymous blocks are only used in the
teiHeader.</a:documentation>
<oneOrMore>
<element name="ab">
<ref name="global.atts"/>
<ref name="normalized-space.string"/>
</element>
</oneOrMore>
</define>
<a:documentation>Start of definitions for text</a:documentation>
<define name="text-body">
<a:documentation>The definition of the text and body elements.</a:documentation>
<element name="text">
<ref name="global.atts"/>
<ref name="ana.att"/>
<element name="body">
<oneOrMore>
<ref name="div"/>
</oneOrMore>
</element>
</element>
</define>
<define name="div">
<a:documentation>The definition of the div element.</a:documentation>
<element name="div">
<ref name="global.atts"/>
<choice>
<a:documentation>A standard div with utterances.</a:documentation>
<group>
<attribute name="type">
<value>debateSection</value>
</attribute>
<zeroOrMore>
<ref name="head"/>
</zeroOrMore>
<a:documentation>We want at least one u in the debateSection.</a:documentation>
<zeroOrMore>
<choice>
<ref name="comment"/>
<ref name="pb"/>
</choice>
</zeroOrMore>
<ref name="u"/>
<zeroOrMore>
<choice>
<ref name="comment"/>
<ref name="pb"/>
<ref name="u"/>
</choice>
</zeroOrMore>
</group>
<a:documentation>A div with transcriber comments only.</a:documentation>
<group>
<attribute name="type">
<value>commentSection</value>
</attribute>
<zeroOrMore>
<ref name="head"/>
</zeroOrMore>
<oneOrMore>
<choice>
<ref name="comment"/>
<ref name="pb"/>
</choice>
</oneOrMore>
</group>
</choice>
</element>
</define>
<define name="u">
<a:documentation>One speech (i.e. 'utterance').</a:documentation>
<element name="u">
<ref name="global.atts"/>
<a:documentation>Attributes to link split utterances.</a:documentation>
<optional>
<attribute name="prev">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="next">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<ref name="who.att"/>
</optional>
<a:documentation>Utterance has obligatory @ana, for the role of the speaker.</a:documentation>
<ref name="ana.att"/>
<optional>
<attribute name="source">
<ref name="anyURIs"/>
</attribute>
</optional>
<oneOrMore>
<choice>
<ref name="seg"/>
<ref name="comment"/>
<ref name="pb"/>
</choice>
</oneOrMore>
</element>
</define>
<define name="seg">
<a:documentation>A segment (i.e paragraph) inside a speech.</a:documentation>
<element name="seg">
<ref name="global.atts"/>
<oneOrMore>
<choice>
<ref name="comment"/>
<ref name="pb"/>
<text/>
<!--ref name="normalized-space.string"/-->
</choice>
</oneOrMore>
</element>
</define>
<define name="note">
<a:documentation>A transcriber note.</a:documentation>
<element name="note">
<ref name="global.atts"/>
<optional>
<attribute name="type">
<data type="NCName"/>
</attribute>
</optional>
<oneOrMore>
<choice>
<ref name="time"/>
<ref name="pb"/>
<text/>
</choice>
</oneOrMore>
</element>
</define>
<define name="comment">
<a:documentation>Any type of transcriber comment.</a:documentation>
<choice>
<ref name="note"/>
<element name="gap">
<ref name="global.atts"/>
<attribute name="reason">
<choice>
<value>editorial</value>
<value>inaudible</value>
<value>foreign</value>
</choice>
</attribute>
<oneOrMore>
<ref name="incidentDesc"/>
</oneOrMore>
</element>
<element name="kinesic">
<ref name="global.atts"/>
<optional>
<attribute name="type">
<ref name="kinesicType.val"/>
</attribute>
</optional>
<optional>
<ref name="who.att"/>
</optional>
<oneOrMore>
<ref name="incidentDesc"/>
</oneOrMore>
</element>
<element name="incident">
<ref name="global.atts"/>
<optional>
<attribute name="type">
<ref name="incidentType.val"/>
</attribute>
</optional>
<optional>
<ref name="who.att"/>
</optional>
<oneOrMore>
<ref name="incidentDesc"/>
</oneOrMore>
</element>
<element name="vocal">
<ref name="global.atts"/>
<attribute name="type">
<ref name="vocalType.val"/>
</attribute>
<optional>
<ref name="who.att"/>
</optional>
<oneOrMore>
<ref name="incidentDesc"/>
</oneOrMore>
</element>
</choice>
</define>
<define name="incidentDesc">
<a:documentation>A description of an incident in a speech.</a:documentation>
<element name="desc">
<ref name="lang.att"/>
<ref name="normalized-space.string"/>
</element>
</define>
<define name="media">
<a:documentation>The media element</a:documentation>
<element name="media">
<ref name="global.atts"/>
<attribute name="mimeType">
<data type="token"/>
</attribute>
<ref name="source.att"/>
<attribute name="url">
<ref name="anyURIs"/>
</attribute>
</element>
</define>
</grammar>