relaton-plateau 1.19.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1511 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ instantiations of this grammar may replace leaf strings
4
+ with more elaborated types; e.g. title (text) replaced with
5
+ title-main, title-intro, title-part; type replaced with
6
+ enum.
7
+
8
+ some renaming at leaf nodes is permissible
9
+
10
+ obligations can change both from optional to mandatory,
11
+ and from mandatory to optional; optional elements may
12
+ be omitted; freely positioned alternatives may be replaced
13
+ with strict ordering
14
+
15
+ DO NOT introduce a namespace here. We do not want a distinct namespace
16
+ for these elements, and a distinct namespace for any grammar inheriting
17
+ these elements; we just want one namespace for any child grammars
18
+ of this.
19
+ -->
20
+ <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
21
+ <!--
22
+ https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/
23
+ iso8601date = xsd:string { pattern = "([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?" }
24
+ Somewhat dumbed down for XSD regex:
25
+ -->
26
+ <define name="ISO8601DateTime">
27
+ <data type="string">
28
+ <param name="pattern">([\+\-]?\d{4})((-?)((0[1-9]|1[0-2])((-?)([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+)?)?((:?)[0-5]\d([.,]\d+)?)?([zZ]|([\+\-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?</param>
29
+ </data>
30
+ </define>
31
+ <define name="ISO8601Date">
32
+ <data type="string">
33
+ <param name="pattern">([\+\-]?\d{4})((-?)((0[1-9]|1[0-2])((-?)([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6]))))?</param>
34
+ </data>
35
+ </define>
36
+ <!-- start = bibitem -->
37
+ <define name="BibData">
38
+ <ref name="BibliographicItem"/>
39
+ </define>
40
+ <define name="status">
41
+ <element name="status">
42
+ <ref name="stage"/>
43
+ <optional>
44
+ <ref name="substage"/>
45
+ </optional>
46
+ <optional>
47
+ <ref name="iteration"/>
48
+ </optional>
49
+ </element>
50
+ </define>
51
+ <define name="stage">
52
+ <element name="stage">
53
+ <optional>
54
+ <attribute name="abbreviation"/>
55
+ </optional>
56
+ <text/>
57
+ </element>
58
+ </define>
59
+ <define name="substage">
60
+ <element name="substage">
61
+ <optional>
62
+ <attribute name="abbreviation"/>
63
+ </optional>
64
+ <text/>
65
+ </element>
66
+ </define>
67
+ <define name="iteration">
68
+ <element name="iteration">
69
+ <text/>
70
+ </element>
71
+ </define>
72
+ <define name="language">
73
+ <element name="language">
74
+ <text/>
75
+ </element>
76
+ </define>
77
+ <define name="locale">
78
+ <a:documentation>ISO-639</a:documentation>
79
+ <element name="locale">
80
+ <text/>
81
+ </element>
82
+ </define>
83
+ <define name="script">
84
+ <a:documentation>ISO-3166</a:documentation>
85
+ <element name="script">
86
+ <text/>
87
+ </element>
88
+ </define>
89
+ <define name="edition">
90
+ <a:documentation>ISO-15924: Latn</a:documentation>
91
+ <element name="edition">
92
+ <optional>
93
+ <attribute name="number"/>
94
+ </optional>
95
+ <text/>
96
+ </element>
97
+ </define>
98
+ <define name="LocalizedStringAttrs">
99
+ <optional>
100
+ <!-- multiple languages and scripts possible: comma delimit them if so -->
101
+ <attribute name="language"/>
102
+ </optional>
103
+ <optional>
104
+ <attribute name="locale"/>
105
+ </optional>
106
+ <optional>
107
+ <attribute name="script"/>
108
+ </optional>
109
+ </define>
110
+ <define name="LocalizedString1">
111
+ <!-- multiple languages and scripts possible: comma delimit them if so -->
112
+ <ref name="LocalizedStringAttrs"/>
113
+ <text/>
114
+ </define>
115
+ <define name="LocalizedString">
116
+ <choice>
117
+ <ref name="LocalizedString1"/>
118
+ <oneOrMore>
119
+ <element name="variant">
120
+ <ref name="LocalizedString1"/>
121
+ </element>
122
+ </oneOrMore>
123
+ </choice>
124
+ </define>
125
+ <define name="LocalizedMarkedUpString1">
126
+ <!-- multiple languages and scripts possible: comma delimit them if so -->
127
+ <ref name="LocalizedStringAttrs"/>
128
+ <oneOrMore>
129
+ <ref name="TextElement"/>
130
+ </oneOrMore>
131
+ </define>
132
+ <define name="LocalizedMarkedUpString">
133
+ <choice>
134
+ <ref name="LocalizedMarkedUpString1"/>
135
+ <oneOrMore>
136
+ <element name="variant">
137
+ <ref name="LocalizedMarkedUpString1"/>
138
+ </element>
139
+ </oneOrMore>
140
+ </choice>
141
+ </define>
142
+ <!--
143
+ Unlike UML, change type to format: type is overloaded
144
+ Would be need if plain were default value and could omit the attribute
145
+ Added LocalizedStringOrXsAny
146
+ -->
147
+ <define name="FormattedString">
148
+ <optional>
149
+ <!-- attribute format { ( "plain" | "html" | "docbook" | "tei" | "asciidoc" | "markdown" ) }?, -->
150
+ <attribute name="format">
151
+ <choice>
152
+ <value>text/plain</value>
153
+ <value>text/html</value>
154
+ <value>application/docbook+xml</value>
155
+ <value>application/tei+xml</value>
156
+ <value>text/x-asciidoc</value>
157
+ <value>text/markdown</value>
158
+ <value>application/x-metanorma+xml</value>
159
+ <text/>
160
+ </choice>
161
+ </attribute>
162
+ </optional>
163
+ <ref name="LocalizedStringOrXsAny"/>
164
+ </define>
165
+ <define name="LocalizedStringOrXsAny1">
166
+ <!-- multiple languages and scripts possible: comma delimit them if so -->
167
+ <ref name="LocalizedStringAttrs"/>
168
+ <oneOrMore>
169
+ <choice>
170
+ <text/>
171
+ <ref name="AnyElement"/>
172
+ </choice>
173
+ </oneOrMore>
174
+ </define>
175
+ <define name="LocalizedStringOrXsAny">
176
+ <choice>
177
+ <ref name="LocalizedStringOrXsAny1"/>
178
+ <oneOrMore>
179
+ <element name="variant">
180
+ <ref name="LocalizedStringOrXsAny1"/>
181
+ </element>
182
+ </oneOrMore>
183
+ </choice>
184
+ </define>
185
+ <define name="contributor">
186
+ <element name="contributor">
187
+ <oneOrMore>
188
+ <ref name="role"/>
189
+ </oneOrMore>
190
+ <ref name="ContributorInfo"/>
191
+ </element>
192
+ </define>
193
+ <define name="role">
194
+ <element name="role">
195
+ <attribute name="type">
196
+ <choice>
197
+ <value>author</value>
198
+ <value>performer</value>
199
+ <value>publisher</value>
200
+ <value>editor</value>
201
+ <value>adapter</value>
202
+ <value>translator</value>
203
+ <value>distributor</value>
204
+ <value>realizer</value>
205
+ <value>owner</value>
206
+ <value>authorizer</value>
207
+ <value>enabler</value>
208
+ <value>subject</value>
209
+ </choice>
210
+ </attribute>
211
+ <zeroOrMore>
212
+ <ref name="roledescription"/>
213
+ </zeroOrMore>
214
+ </element>
215
+ </define>
216
+ <define name="ContributorInfo">
217
+ <choice>
218
+ <ref name="person"/>
219
+ <ref name="organization"/>
220
+ </choice>
221
+ </define>
222
+ <define name="roledescription">
223
+ <element name="description">
224
+ <ref name="LocalizedMarkedUpString"/>
225
+ </element>
226
+ </define>
227
+ <define name="person">
228
+ <element name="person">
229
+ <optional>
230
+ <ref name="fullname"/>
231
+ </optional>
232
+ <zeroOrMore>
233
+ <ref name="credential"/>
234
+ </zeroOrMore>
235
+ <zeroOrMore>
236
+ <ref name="affiliation"/>
237
+ </zeroOrMore>
238
+ <zeroOrMore>
239
+ <ref name="person-identifier"/>
240
+ </zeroOrMore>
241
+ <zeroOrMore>
242
+ <ref name="contact"/>
243
+ </zeroOrMore>
244
+ </element>
245
+ </define>
246
+ <define name="fullname">
247
+ <element name="name">
248
+ <ref name="FullNameType"/>
249
+ </element>
250
+ </define>
251
+ <define name="credential">
252
+ <element name="credential">
253
+ <text/>
254
+ </element>
255
+ </define>
256
+ <define name="FullNameType">
257
+ <optional>
258
+ <ref name="name_abbreviation"/>
259
+ </optional>
260
+ <choice>
261
+ <group>
262
+ <zeroOrMore>
263
+ <ref name="prefix"/>
264
+ </zeroOrMore>
265
+ <zeroOrMore>
266
+ <ref name="forename"/>
267
+ </zeroOrMore>
268
+ <optional>
269
+ <ref name="formatted-initials"/>
270
+ </optional>
271
+ <ref name="surname"/>
272
+ <zeroOrMore>
273
+ <ref name="addition"/>
274
+ </zeroOrMore>
275
+ </group>
276
+ <ref name="completeName"/>
277
+ </choice>
278
+ <zeroOrMore>
279
+ <ref name="biblionote"/>
280
+ </zeroOrMore>
281
+ <zeroOrMore>
282
+ <ref name="variantname"/>
283
+ </zeroOrMore>
284
+ </define>
285
+ <define name="name_abbreviation">
286
+ <element name="abbreviation">
287
+ <ref name="LocalizedString"/>
288
+ </element>
289
+ </define>
290
+ <define name="prefix">
291
+ <element name="prefix">
292
+ <ref name="LocalizedString"/>
293
+ </element>
294
+ </define>
295
+ <define name="formatted-initials">
296
+ <element name="formatted-initials">
297
+ <ref name="LocalizedString"/>
298
+ </element>
299
+ </define>
300
+ <define name="addition">
301
+ <element name="addition">
302
+ <ref name="LocalizedString"/>
303
+ </element>
304
+ </define>
305
+ <define name="surname">
306
+ <element name="surname">
307
+ <ref name="LocalizedString"/>
308
+ </element>
309
+ </define>
310
+ <define name="forename">
311
+ <element name="forename">
312
+ <optional>
313
+ <attribute name="initial"/>
314
+ </optional>
315
+ <ref name="LocalizedString"/>
316
+ </element>
317
+ </define>
318
+ <define name="completeName">
319
+ <element name="completename">
320
+ <ref name="LocalizedString"/>
321
+ </element>
322
+ </define>
323
+ <define name="variantname">
324
+ <element name="variant">
325
+ <attribute name="type"/>
326
+ <ref name="FullNameType"/>
327
+ </element>
328
+ </define>
329
+ <define name="affiliation">
330
+ <element name="affiliation">
331
+ <optional>
332
+ <ref name="affiliationname"/>
333
+ </optional>
334
+ <zeroOrMore>
335
+ <ref name="affiliationdescription"/>
336
+ </zeroOrMore>
337
+ <optional>
338
+ <ref name="organization"/>
339
+ </optional>
340
+ </element>
341
+ </define>
342
+ <define name="affiliationname">
343
+ <element name="name">
344
+ <ref name="LocalizedString"/>
345
+ </element>
346
+ </define>
347
+ <define name="affiliationdescription">
348
+ <element name="description">
349
+ <ref name="LocalizedMarkedUpString"/>
350
+ </element>
351
+ </define>
352
+ <define name="organization">
353
+ <element name="organization">
354
+ <ref name="OrganizationType"/>
355
+ </element>
356
+ </define>
357
+ <define name="OrganizationType">
358
+ <oneOrMore>
359
+ <ref name="orgname"/>
360
+ </oneOrMore>
361
+ <zeroOrMore>
362
+ <ref name="subdivision"/>
363
+ </zeroOrMore>
364
+ <optional>
365
+ <ref name="abbreviation"/>
366
+ </optional>
367
+ <zeroOrMore>
368
+ <ref name="uri"/>
369
+ </zeroOrMore>
370
+ <zeroOrMore>
371
+ <ref name="org-identifier"/>
372
+ </zeroOrMore>
373
+ <zeroOrMore>
374
+ <ref name="contact"/>
375
+ </zeroOrMore>
376
+ <optional>
377
+ <ref name="logo"/>
378
+ </optional>
379
+ </define>
380
+ <define name="orgname">
381
+ <element name="name">
382
+ <choice>
383
+ <ref name="LocalizedString"/>
384
+ <ref name="NameWithVariants"/>
385
+ </choice>
386
+ </element>
387
+ </define>
388
+ <define name="subdivision">
389
+ <element name="subdivision">
390
+ <optional>
391
+ <attribute name="type"/>
392
+ </optional>
393
+ <ref name="OrganizationType"/>
394
+ </element>
395
+ </define>
396
+ <define name="logo">
397
+ <element name="logo">
398
+ <ref name="image-no-id"/>
399
+ </element>
400
+ </define>
401
+ <define name="depiction">
402
+ <element name="depiction">
403
+ <optional>
404
+ <attribute name="scope"/>
405
+ </optional>
406
+ <zeroOrMore>
407
+ <ref name="image-no-id"/>
408
+ </zeroOrMore>
409
+ </element>
410
+ </define>
411
+ <define name="NameWithVariants">
412
+ <element name="primary">
413
+ <ref name="LocalizedString"/>
414
+ </element>
415
+ <zeroOrMore>
416
+ <element name="variant">
417
+ <ref name="NameWithVariants1"/>
418
+ </element>
419
+ </zeroOrMore>
420
+ </define>
421
+ <define name="NameWithVariants1">
422
+ <attribute name="type"/>
423
+ <element name="primary">
424
+ <ref name="LocalizedString"/>
425
+ </element>
426
+ <zeroOrMore>
427
+ <element name="variant">
428
+ <ref name="NameWithVariants1"/>
429
+ </element>
430
+ </zeroOrMore>
431
+ </define>
432
+ <define name="abbreviation">
433
+ <element name="abbreviation">
434
+ <ref name="LocalizedString"/>
435
+ </element>
436
+ </define>
437
+ <define name="uri">
438
+ <element name="uri">
439
+ <optional>
440
+ <attribute name="type"/>
441
+ </optional>
442
+ <data type="anyURI"/>
443
+ </element>
444
+ </define>
445
+ <!-- TODO may change -->
446
+ <define name="contact">
447
+ <choice>
448
+ <ref name="address"/>
449
+ <ref name="phone"/>
450
+ <ref name="email"/>
451
+ <ref name="uri"/>
452
+ </choice>
453
+ </define>
454
+ <define name="phone">
455
+ <element name="phone">
456
+ <optional>
457
+ <attribute name="type"/>
458
+ </optional>
459
+ <text/>
460
+ </element>
461
+ </define>
462
+ <define name="email">
463
+ <element name="email">
464
+ <text/>
465
+ </element>
466
+ </define>
467
+ <define name="address">
468
+ <element name="address">
469
+ <choice>
470
+ <!-- iso191606 TODO -->
471
+ <group>
472
+ <zeroOrMore>
473
+ <ref name="street"/>
474
+ </zeroOrMore>
475
+ <ref name="city"/>
476
+ <optional>
477
+ <ref name="state"/>
478
+ </optional>
479
+ <ref name="country"/>
480
+ <optional>
481
+ <ref name="postcode"/>
482
+ </optional>
483
+ </group>
484
+ <ref name="formattedAddress"/>
485
+ </choice>
486
+ </element>
487
+ </define>
488
+ <define name="street">
489
+ <element name="street">
490
+ <text/>
491
+ </element>
492
+ </define>
493
+ <define name="city">
494
+ <element name="city">
495
+ <text/>
496
+ </element>
497
+ </define>
498
+ <define name="state">
499
+ <element name="state">
500
+ <text/>
501
+ </element>
502
+ </define>
503
+ <define name="country">
504
+ <element name="country">
505
+ <text/>
506
+ </element>
507
+ </define>
508
+ <define name="postcode">
509
+ <element name="postcode">
510
+ <text/>
511
+ </element>
512
+ </define>
513
+ <define name="formattedAddress">
514
+ <element name="formattedAddress">
515
+ <text/>
516
+ </element>
517
+ </define>
518
+ <define name="person-identifier">
519
+ <element name="identifier">
520
+ <attribute name="type">
521
+ <choice>
522
+ <value>isni</value>
523
+ <value>orcid</value>
524
+ <value>uri</value>
525
+ </choice>
526
+ </attribute>
527
+ <text/>
528
+ </element>
529
+ </define>
530
+ <define name="org-identifier">
531
+ <element name="identifier">
532
+ <attribute name="type">
533
+ <data type="string" datatypeLibrary=""/>
534
+ </attribute>
535
+ <text/>
536
+ </element>
537
+ </define>
538
+ <define name="citation">
539
+ <element name="citation">
540
+ <ref name="CitationType"/>
541
+ </element>
542
+ </define>
543
+ <define name="CitationType">
544
+ <attribute name="bibitemid">
545
+ <data type="IDREF"/>
546
+ </attribute>
547
+ <choice>
548
+ <zeroOrMore>
549
+ <ref name="locality"/>
550
+ </zeroOrMore>
551
+ <zeroOrMore>
552
+ <ref name="localityStack"/>
553
+ </zeroOrMore>
554
+ </choice>
555
+ <optional>
556
+ <ref name="date"/>
557
+ </optional>
558
+ </define>
559
+ <define name="date">
560
+ <element name="date">
561
+ <ref name="ISO8601Date"/>
562
+ </element>
563
+ </define>
564
+ <define name="locality">
565
+ <element name="locality">
566
+ <ref name="BibItemLocality"/>
567
+ </element>
568
+ </define>
569
+ <define name="localityStack">
570
+ <element name="localityStack">
571
+ <optional>
572
+ <attribute name="connective">
573
+ <choice>
574
+ <value>and</value>
575
+ <value>or</value>
576
+ <value>from</value>
577
+ <value>to</value>
578
+ <value/>
579
+ </choice>
580
+ </attribute>
581
+ </optional>
582
+ <zeroOrMore>
583
+ <ref name="locality"/>
584
+ </zeroOrMore>
585
+ </element>
586
+ </define>
587
+ <define name="sourceLocality">
588
+ <element name="sourceLocality">
589
+ <ref name="BibItemLocality"/>
590
+ </element>
591
+ </define>
592
+ <define name="sourceLocalityStack">
593
+ <element name="sourceLocalityStack">
594
+ <optional>
595
+ <attribute name="connective">
596
+ <choice>
597
+ <value>and</value>
598
+ <value>or</value>
599
+ <value>from</value>
600
+ <value>to</value>
601
+ <value/>
602
+ </choice>
603
+ </attribute>
604
+ </optional>
605
+ <zeroOrMore>
606
+ <ref name="sourceLocality"/>
607
+ </zeroOrMore>
608
+ </element>
609
+ </define>
610
+ <define name="BibItemLocality">
611
+ <attribute name="type">
612
+ <ref name="LocalityType"/>
613
+ </attribute>
614
+ <optional>
615
+ <ref name="referenceFrom"/>
616
+ </optional>
617
+ <optional>
618
+ <ref name="referenceTo"/>
619
+ </optional>
620
+ </define>
621
+ <define name="LocalityType">
622
+ <data type="string">
623
+ <param name="pattern">section|clause|part|paragraph|chapter|page|title|line|whole|table|annex|figure|note|list|example|volume|issue|time|anchor|locality:[a-zA-Z0-9_]+</param>
624
+ </data>
625
+ </define>
626
+ <define name="referenceFrom">
627
+ <element name="referenceFrom">
628
+ <text/>
629
+ </element>
630
+ </define>
631
+ <define name="referenceTo">
632
+ <element name="referenceTo">
633
+ <text/>
634
+ </element>
635
+ </define>
636
+ <!-- unlike UML, has id attribute; that results from including bibitem in a docmodel -->
637
+ <define name="bibitem">
638
+ <element name="bibitem">
639
+ <attribute name="id">
640
+ <data type="ID"/>
641
+ </attribute>
642
+ <ref name="BibliographicItem"/>
643
+ </element>
644
+ </define>
645
+ <define name="bibitem_no_id">
646
+ <element name="bibitem">
647
+ <ref name="BibliographicItem"/>
648
+ </element>
649
+ </define>
650
+ <define name="relaton_collection">
651
+ <element name="relaton-collection">
652
+ <optional>
653
+ <attribute name="type"/>
654
+ </optional>
655
+ <ref name="btitle"/>
656
+ <zeroOrMore>
657
+ <ref name="contributor"/>
658
+ </zeroOrMore>
659
+ <zeroOrMore>
660
+ <ref name="docrelation"/>
661
+ </zeroOrMore>
662
+ </element>
663
+ </define>
664
+ <define name="BibItemType" combine="choice">
665
+ <choice>
666
+ <value>article</value>
667
+ <value>book</value>
668
+ <value>booklet</value>
669
+ <value>manual</value>
670
+ <value>proceedings</value>
671
+ <value>presentation</value>
672
+ <value>thesis</value>
673
+ <value>techreport</value>
674
+ <value>standard</value>
675
+ <value>unpublished</value>
676
+ <value>map</value>
677
+ <value>electronic resource</value>
678
+ <value>audiovisual</value>
679
+ <value>film</value>
680
+ <value>video</value>
681
+ <value>broadcast</value>
682
+ <value>software</value>
683
+ <value>graphic_work</value>
684
+ <value>music</value>
685
+ <value>patent</value>
686
+ <value>inbook</value>
687
+ <value>incollection</value>
688
+ <value>inproceedings</value>
689
+ <value>journal</value>
690
+ <value>website</value>
691
+ <value>webresource</value>
692
+ <value>dataset</value>
693
+ <value>archival</value>
694
+ <value>social_media</value>
695
+ <value>alert</value>
696
+ <value>message</value>
697
+ <value>conversation</value>
698
+ <value>misc</value>
699
+ </choice>
700
+ </define>
701
+ <define name="BibliographicItem">
702
+ <optional>
703
+ <attribute name="type">
704
+ <ref name="BibItemType"/>
705
+ </attribute>
706
+ </optional>
707
+ <optional>
708
+ <attribute name="schema-version"/>
709
+ </optional>
710
+ <optional>
711
+ <ref name="fetched"/>
712
+ </optional>
713
+ <optional>
714
+ <ref name="formattedref"/>
715
+ </optional>
716
+ <oneOrMore>
717
+ <ref name="btitle"/>
718
+ </oneOrMore>
719
+ <zeroOrMore>
720
+ <ref name="bsource"/>
721
+ </zeroOrMore>
722
+ <oneOrMore>
723
+ <ref name="docidentifier"/>
724
+ </oneOrMore>
725
+ <optional>
726
+ <ref name="docnumber"/>
727
+ </optional>
728
+ <zeroOrMore>
729
+ <ref name="bdate"/>
730
+ </zeroOrMore>
731
+ <zeroOrMore>
732
+ <ref name="contributor"/>
733
+ </zeroOrMore>
734
+ <optional>
735
+ <ref name="edition"/>
736
+ </optional>
737
+ <zeroOrMore>
738
+ <ref name="version"/>
739
+ </zeroOrMore>
740
+ <zeroOrMore>
741
+ <ref name="biblionote"/>
742
+ </zeroOrMore>
743
+ <zeroOrMore>
744
+ <ref name="language"/>
745
+ </zeroOrMore>
746
+ <zeroOrMore>
747
+ <ref name="locale"/>
748
+ </zeroOrMore>
749
+ <zeroOrMore>
750
+ <ref name="script"/>
751
+ </zeroOrMore>
752
+ <zeroOrMore>
753
+ <ref name="bibabstract"/>
754
+ </zeroOrMore>
755
+ <optional>
756
+ <ref name="status"/>
757
+ </optional>
758
+ <zeroOrMore>
759
+ <ref name="copyright"/>
760
+ </zeroOrMore>
761
+ <zeroOrMore>
762
+ <ref name="docrelation"/>
763
+ </zeroOrMore>
764
+ <zeroOrMore>
765
+ <ref name="series"/>
766
+ </zeroOrMore>
767
+ <optional>
768
+ <ref name="medium"/>
769
+ </optional>
770
+ <zeroOrMore>
771
+ <ref name="bplace"/>
772
+ </zeroOrMore>
773
+ <zeroOrMore>
774
+ <ref name="bprice"/>
775
+ </zeroOrMore>
776
+ <zeroOrMore>
777
+ <ref name="extent"/>
778
+ </zeroOrMore>
779
+ <optional>
780
+ <ref name="bibliographic_size"/>
781
+ </optional>
782
+ <zeroOrMore>
783
+ <ref name="accesslocation"/>
784
+ </zeroOrMore>
785
+ <zeroOrMore>
786
+ <ref name="license"/>
787
+ </zeroOrMore>
788
+ <zeroOrMore>
789
+ <ref name="bclassification"/>
790
+ </zeroOrMore>
791
+ <zeroOrMore>
792
+ <ref name="bkeyword"/>
793
+ </zeroOrMore>
794
+ <optional>
795
+ <ref name="validity"/>
796
+ </optional>
797
+ <optional>
798
+ <ref name="depiction"/>
799
+ </optional>
800
+ </define>
801
+ <define name="ReducedBibliographicItem">
802
+ <optional>
803
+ <attribute name="type">
804
+ <ref name="BibItemType"/>
805
+ </attribute>
806
+ </optional>
807
+ <optional>
808
+ <attribute name="schema-version"/>
809
+ </optional>
810
+ <optional>
811
+ <ref name="fetched"/>
812
+ </optional>
813
+ <optional>
814
+ <ref name="formattedref"/>
815
+ </optional>
816
+ <zeroOrMore>
817
+ <ref name="btitle"/>
818
+ </zeroOrMore>
819
+ <zeroOrMore>
820
+ <ref name="bsource"/>
821
+ </zeroOrMore>
822
+ <zeroOrMore>
823
+ <ref name="docidentifier"/>
824
+ </zeroOrMore>
825
+ <optional>
826
+ <ref name="docnumber"/>
827
+ </optional>
828
+ <zeroOrMore>
829
+ <ref name="bdate"/>
830
+ </zeroOrMore>
831
+ <zeroOrMore>
832
+ <ref name="contributor"/>
833
+ </zeroOrMore>
834
+ <optional>
835
+ <ref name="edition"/>
836
+ </optional>
837
+ <zeroOrMore>
838
+ <ref name="version"/>
839
+ </zeroOrMore>
840
+ <zeroOrMore>
841
+ <ref name="biblionote"/>
842
+ </zeroOrMore>
843
+ <zeroOrMore>
844
+ <ref name="language"/>
845
+ </zeroOrMore>
846
+ <zeroOrMore>
847
+ <ref name="locale"/>
848
+ </zeroOrMore>
849
+ <zeroOrMore>
850
+ <ref name="script"/>
851
+ </zeroOrMore>
852
+ <zeroOrMore>
853
+ <ref name="bibabstract"/>
854
+ </zeroOrMore>
855
+ <optional>
856
+ <ref name="status"/>
857
+ </optional>
858
+ <zeroOrMore>
859
+ <ref name="copyright"/>
860
+ </zeroOrMore>
861
+ <zeroOrMore>
862
+ <ref name="docrelation"/>
863
+ </zeroOrMore>
864
+ <zeroOrMore>
865
+ <ref name="series"/>
866
+ </zeroOrMore>
867
+ <optional>
868
+ <ref name="medium"/>
869
+ </optional>
870
+ <zeroOrMore>
871
+ <ref name="bplace"/>
872
+ </zeroOrMore>
873
+ <zeroOrMore>
874
+ <ref name="bprice"/>
875
+ </zeroOrMore>
876
+ <zeroOrMore>
877
+ <ref name="extent"/>
878
+ </zeroOrMore>
879
+ <optional>
880
+ <ref name="bibliographic_size"/>
881
+ </optional>
882
+ <zeroOrMore>
883
+ <ref name="accesslocation"/>
884
+ </zeroOrMore>
885
+ <zeroOrMore>
886
+ <ref name="license"/>
887
+ </zeroOrMore>
888
+ <zeroOrMore>
889
+ <ref name="bclassification"/>
890
+ </zeroOrMore>
891
+ <zeroOrMore>
892
+ <ref name="bkeyword"/>
893
+ </zeroOrMore>
894
+ <optional>
895
+ <ref name="validity"/>
896
+ </optional>
897
+ <optional>
898
+ <ref name="depiction"/>
899
+ </optional>
900
+ </define>
901
+ <define name="btitle">
902
+ <element name="title">
903
+ <ref name="TypedTitleString"/>
904
+ </element>
905
+ </define>
906
+ <define name="bsource">
907
+ <element name="uri">
908
+ <ref name="TypedUri"/>
909
+ </element>
910
+ </define>
911
+ <define name="formattedref">
912
+ <element name="formattedref">
913
+ <oneOrMore>
914
+ <ref name="TextElement"/>
915
+ </oneOrMore>
916
+ </element>
917
+ </define>
918
+ <define name="license">
919
+ <element name="license">
920
+ <text/>
921
+ </element>
922
+ </define>
923
+ <define name="fetched">
924
+ <element name="fetched">
925
+ <ref name="ISO8601DateTime"/>
926
+ </element>
927
+ </define>
928
+ <define name="validity">
929
+ <element name="validity">
930
+ <optional>
931
+ <ref name="validityBegins"/>
932
+ </optional>
933
+ <optional>
934
+ <ref name="validityEnds"/>
935
+ </optional>
936
+ <optional>
937
+ <ref name="validityRevision"/>
938
+ </optional>
939
+ </element>
940
+ </define>
941
+ <define name="validityBegins">
942
+ <element name="validityBegins">
943
+ <ref name="ISO8601DateTime"/>
944
+ </element>
945
+ </define>
946
+ <define name="validityEnds">
947
+ <element name="validityEnds">
948
+ <ref name="ISO8601DateTime"/>
949
+ </element>
950
+ </define>
951
+ <define name="validityRevision">
952
+ <element name="revision">
953
+ <ref name="ISO8601DateTime"/>
954
+ </element>
955
+ </define>
956
+ <define name="TypedTitleString">
957
+ <optional>
958
+ <attribute name="type"/>
959
+ </optional>
960
+ <ref name="LocalizedMarkedUpString"/>
961
+ </define>
962
+ <!-- TitleType = ( "alternative" | "original" | "unofficial" | "subtitle" | "main" ) -->
963
+ <define name="TypedUri">
964
+ <optional>
965
+ <attribute name="type"/>
966
+ </optional>
967
+ <optional>
968
+ <attribute name="language"/>
969
+ </optional>
970
+ <optional>
971
+ <attribute name="locale"/>
972
+ </optional>
973
+ <optional>
974
+ <attribute name="script"/>
975
+ </optional>
976
+ <data type="anyURI"/>
977
+ </define>
978
+ <define name="DateType">
979
+ <optional>
980
+ <attribute name="text"/>
981
+ </optional>
982
+ <optional>
983
+ <ref name="ISO8601Date"/>
984
+ </optional>
985
+ </define>
986
+ <define name="BibliographicDateType">
987
+ <choice>
988
+ <value>published</value>
989
+ <value>accessed</value>
990
+ <value>created</value>
991
+ <value>implemented</value>
992
+ <value>obsoleted</value>
993
+ <value>confirmed</value>
994
+ <value>updated</value>
995
+ <value>corrected</value>
996
+ <value>issued</value>
997
+ <value>transmitted</value>
998
+ <value>copied</value>
999
+ <value>unchanged</value>
1000
+ <value>circulated</value>
1001
+ <value>adapted</value>
1002
+ <value>vote-started</value>
1003
+ <value>vote-ended</value>
1004
+ <value>announced</value>
1005
+ <value>stable-until</value>
1006
+ </choice>
1007
+ </define>
1008
+ <define name="bdate">
1009
+ <element name="date">
1010
+ <attribute name="type">
1011
+ <choice>
1012
+ <ref name="BibliographicDateType"/>
1013
+ <text/>
1014
+ </choice>
1015
+ </attribute>
1016
+ <optional>
1017
+ <attribute name="text"/>
1018
+ </optional>
1019
+ <optional>
1020
+ <choice>
1021
+ <group>
1022
+ <element name="from">
1023
+ <ref name="ISO8601Date"/>
1024
+ </element>
1025
+ <optional>
1026
+ <element name="to">
1027
+ <ref name="ISO8601Date"/>
1028
+ </element>
1029
+ </optional>
1030
+ </group>
1031
+ <element name="on">
1032
+ <ref name="ISO8601Date"/>
1033
+ </element>
1034
+ </choice>
1035
+ </optional>
1036
+ </element>
1037
+ </define>
1038
+ <define name="docidentifier">
1039
+ <element name="docidentifier">
1040
+ <optional>
1041
+ <attribute name="type"/>
1042
+ </optional>
1043
+ <optional>
1044
+ <attribute name="scope"/>
1045
+ </optional>
1046
+ <optional>
1047
+ <attribute name="primary">
1048
+ <data type="boolean"/>
1049
+ </attribute>
1050
+ </optional>
1051
+ <ref name="LocalizedMarkedUpString"/>
1052
+ </element>
1053
+ </define>
1054
+ <define name="docnumber">
1055
+ <element name="docnumber">
1056
+ <text/>
1057
+ </element>
1058
+ </define>
1059
+ <define name="bclassification">
1060
+ <element name="classification">
1061
+ <optional>
1062
+ <attribute name="type"/>
1063
+ </optional>
1064
+ <text/>
1065
+ </element>
1066
+ </define>
1067
+ <define name="bplace">
1068
+ <element name="place">
1069
+ <choice>
1070
+ <text/>
1071
+ <group>
1072
+ <ref name="bibliocity"/>
1073
+ <zeroOrMore>
1074
+ <ref name="biblioregion"/>
1075
+ </zeroOrMore>
1076
+ <zeroOrMore>
1077
+ <ref name="bibliocountry"/>
1078
+ </zeroOrMore>
1079
+ </group>
1080
+ </choice>
1081
+ </element>
1082
+ </define>
1083
+ <define name="bibliocity">
1084
+ <element name="city">
1085
+ <text/>
1086
+ </element>
1087
+ </define>
1088
+ <define name="biblioregion">
1089
+ <element name="region">
1090
+ <ref name="RegionType"/>
1091
+ </element>
1092
+ </define>
1093
+ <define name="bibliocountry">
1094
+ <element name="country">
1095
+ <ref name="RegionType"/>
1096
+ </element>
1097
+ </define>
1098
+ <define name="RegionType">
1099
+ <optional>
1100
+ <attribute name="iso"/>
1101
+ </optional>
1102
+ <optional>
1103
+ <attribute name="recommended">
1104
+ <data type="boolean"/>
1105
+ </attribute>
1106
+ </optional>
1107
+ <text/>
1108
+ </define>
1109
+ <define name="bprice">
1110
+ <element name="price">
1111
+ <attribute name="currency"/>
1112
+ <text/>
1113
+ </element>
1114
+ </define>
1115
+ <define name="medium">
1116
+ <element name="medium">
1117
+ <optional>
1118
+ <ref name="bcontent"/>
1119
+ </optional>
1120
+ <optional>
1121
+ <ref name="genre"/>
1122
+ </optional>
1123
+ <optional>
1124
+ <ref name="form"/>
1125
+ </optional>
1126
+ <optional>
1127
+ <ref name="carrier"/>
1128
+ </optional>
1129
+ <optional>
1130
+ <ref name="size"/>
1131
+ </optional>
1132
+ <optional>
1133
+ <ref name="scale"/>
1134
+ </optional>
1135
+ </element>
1136
+ </define>
1137
+ <define name="bcontent">
1138
+ <element name="content">
1139
+ <text/>
1140
+ </element>
1141
+ </define>
1142
+ <define name="genre">
1143
+ <element name="genre">
1144
+ <text/>
1145
+ </element>
1146
+ </define>
1147
+ <define name="form">
1148
+ <element name="form">
1149
+ <text/>
1150
+ </element>
1151
+ </define>
1152
+ <define name="carrier">
1153
+ <element name="carrier">
1154
+ <text/>
1155
+ </element>
1156
+ </define>
1157
+ <define name="size">
1158
+ <element name="size">
1159
+ <text/>
1160
+ </element>
1161
+ </define>
1162
+ <define name="scale">
1163
+ <element name="scale">
1164
+ <text/>
1165
+ </element>
1166
+ </define>
1167
+ <define name="accesslocation">
1168
+ <element name="accesslocation">
1169
+ <text/>
1170
+ </element>
1171
+ </define>
1172
+ <define name="sizevalue">
1173
+ <element name="value">
1174
+ <attribute name="type"/>
1175
+ <text/>
1176
+ </element>
1177
+ </define>
1178
+ <define name="bibliographic_size">
1179
+ <element name="size">
1180
+ <oneOrMore>
1181
+ <ref name="sizevalue"/>
1182
+ </oneOrMore>
1183
+ </element>
1184
+ </define>
1185
+ <define name="extent">
1186
+ <element name="extent">
1187
+ <choice>
1188
+ <zeroOrMore>
1189
+ <ref name="locality"/>
1190
+ </zeroOrMore>
1191
+ <zeroOrMore>
1192
+ <ref name="localityStack"/>
1193
+ </zeroOrMore>
1194
+ </choice>
1195
+ </element>
1196
+ </define>
1197
+ <define name="series">
1198
+ <element name="series">
1199
+ <optional>
1200
+ <attribute name="type">
1201
+ <ref name="SeriesType"/>
1202
+ </attribute>
1203
+ </optional>
1204
+ <optional>
1205
+ <ref name="formattedref"/>
1206
+ </optional>
1207
+ <ref name="btitle"/>
1208
+ <optional>
1209
+ <ref name="bplace"/>
1210
+ </optional>
1211
+ <optional>
1212
+ <ref name="seriesorganization"/>
1213
+ </optional>
1214
+ <optional>
1215
+ <ref name="abbreviation"/>
1216
+ </optional>
1217
+ <optional>
1218
+ <ref name="seriesfrom"/>
1219
+ </optional>
1220
+ <optional>
1221
+ <ref name="seriesto"/>
1222
+ </optional>
1223
+ <optional>
1224
+ <ref name="seriesnumber"/>
1225
+ </optional>
1226
+ <optional>
1227
+ <ref name="seriespartnumber"/>
1228
+ </optional>
1229
+ <optional>
1230
+ <ref name="seriesrun"/>
1231
+ </optional>
1232
+ </element>
1233
+ </define>
1234
+ <define name="SeriesType">
1235
+ <choice>
1236
+ <value>main</value>
1237
+ <value>alt</value>
1238
+ <text/>
1239
+ </choice>
1240
+ </define>
1241
+ <define name="seriesorganization">
1242
+ <element name="organization">
1243
+ <text/>
1244
+ </element>
1245
+ </define>
1246
+ <define name="seriesfrom">
1247
+ <element name="from">
1248
+ <ref name="ISO8601Date"/>
1249
+ </element>
1250
+ </define>
1251
+ <define name="seriesto">
1252
+ <element name="to">
1253
+ <ref name="ISO8601Date"/>
1254
+ </element>
1255
+ </define>
1256
+ <define name="seriesnumber">
1257
+ <element name="number">
1258
+ <text/>
1259
+ </element>
1260
+ </define>
1261
+ <define name="seriespartnumber">
1262
+ <element name="partnumber">
1263
+ <text/>
1264
+ </element>
1265
+ </define>
1266
+ <define name="seriesrun">
1267
+ <element name="run">
1268
+ <text/>
1269
+ </element>
1270
+ </define>
1271
+ <define name="biblionote">
1272
+ <element name="note">
1273
+ <optional>
1274
+ <attribute name="type"/>
1275
+ </optional>
1276
+ <ref name="LocalizedMarkedUpString"/>
1277
+ </element>
1278
+ </define>
1279
+ <define name="bibabstract">
1280
+ <element name="abstract">
1281
+ <ref name="LocalizedStringAttrs"/>
1282
+ <choice>
1283
+ <oneOrMore>
1284
+ <ref name="BasicBlockNoId"/>
1285
+ </oneOrMore>
1286
+ <oneOrMore>
1287
+ <ref name="TextElement"/>
1288
+ </oneOrMore>
1289
+ </choice>
1290
+ </element>
1291
+ </define>
1292
+ <define name="copyright">
1293
+ <element name="copyright">
1294
+ <ref name="from"/>
1295
+ <optional>
1296
+ <ref name="to"/>
1297
+ </optional>
1298
+ <oneOrMore>
1299
+ <ref name="owner"/>
1300
+ </oneOrMore>
1301
+ <optional>
1302
+ <ref name="copyright_scope"/>
1303
+ </optional>
1304
+ </element>
1305
+ </define>
1306
+ <define name="copyright_scope">
1307
+ <element name="scope">
1308
+ <text/>
1309
+ </element>
1310
+ </define>
1311
+ <define name="from">
1312
+ <element name="from">
1313
+ <data type="gYear"/>
1314
+ </element>
1315
+ </define>
1316
+ <define name="to">
1317
+ <element name="to">
1318
+ <data type="gYear"/>
1319
+ </element>
1320
+ </define>
1321
+ <define name="owner">
1322
+ <element name="owner">
1323
+ <ref name="ContributorInfo"/>
1324
+ </element>
1325
+ </define>
1326
+ <define name="DocRelationType">
1327
+ <choice>
1328
+ <value>includes</value>
1329
+ <value>includedIn</value>
1330
+ <value>hasPart</value>
1331
+ <value>partOf</value>
1332
+ <value>merges</value>
1333
+ <value>mergedInto</value>
1334
+ <value>splits</value>
1335
+ <value>splitInto</value>
1336
+ <value>instanceOf</value>
1337
+ <value>hasInstance</value>
1338
+ <value>exemplarOf</value>
1339
+ <value>hasExemplar</value>
1340
+ <value>manifestationOf</value>
1341
+ <value>hasManifestation</value>
1342
+ <value>reproductionOf</value>
1343
+ <value>hasReproduction</value>
1344
+ <value>reprintOf</value>
1345
+ <value>hasReprint</value>
1346
+ <value>expressionOf</value>
1347
+ <value>hasExpression</value>
1348
+ <value>translatedFrom</value>
1349
+ <value>hasTranslation</value>
1350
+ <value>arrangementOf</value>
1351
+ <value>hasArrangement</value>
1352
+ <value>abridgementOf</value>
1353
+ <value>hasAbridgement</value>
1354
+ <value>annotationOf</value>
1355
+ <value>hasAnnotation</value>
1356
+ <value>draftOf</value>
1357
+ <value>hasDraft</value>
1358
+ <value>editionOf</value>
1359
+ <value>hasEdition</value>
1360
+ <value>updates</value>
1361
+ <value>updatedBy</value>
1362
+ <value>derivedFrom</value>
1363
+ <value>derives</value>
1364
+ <value>describes</value>
1365
+ <value>describedBy</value>
1366
+ <value>catalogues</value>
1367
+ <value>cataloguedBy</value>
1368
+ <value>hasSuccessor</value>
1369
+ <value>successorOf</value>
1370
+ <value>adaptedFrom</value>
1371
+ <value>hasAdaptation</value>
1372
+ <value>adoptedFrom</value>
1373
+ <value>adoptedAs</value>
1374
+ <value>reviewOf</value>
1375
+ <value>hasReview</value>
1376
+ <value>commentaryOf</value>
1377
+ <value>hasCommentary</value>
1378
+ <value>related</value>
1379
+ <value>hasComplement</value>
1380
+ <value>complementOf</value>
1381
+ <value>obsoletes</value>
1382
+ <value>obsoletedBy</value>
1383
+ <value>cites</value>
1384
+ <value>isCitedIn</value>
1385
+ </choice>
1386
+ </define>
1387
+ <define name="docrelation">
1388
+ <element name="relation">
1389
+ <attribute name="type">
1390
+ <ref name="DocRelationType"/>
1391
+ </attribute>
1392
+ <optional>
1393
+ <element name="description">
1394
+ <ref name="LocalizedMarkedUpString"/>
1395
+ </element>
1396
+ </optional>
1397
+ <element name="bibitem">
1398
+ <ref name="ReducedBibliographicItem"/>
1399
+ </element>
1400
+ <choice>
1401
+ <zeroOrMore>
1402
+ <ref name="locality"/>
1403
+ </zeroOrMore>
1404
+ <zeroOrMore>
1405
+ <ref name="localityStack"/>
1406
+ </zeroOrMore>
1407
+ </choice>
1408
+ <choice>
1409
+ <zeroOrMore>
1410
+ <ref name="sourceLocality"/>
1411
+ </zeroOrMore>
1412
+ <zeroOrMore>
1413
+ <ref name="sourceLocalityStack"/>
1414
+ </zeroOrMore>
1415
+ </choice>
1416
+ </element>
1417
+ </define>
1418
+ <define name="version">
1419
+ <element name="version">
1420
+ <optional>
1421
+ <ref name="revision-date"/>
1422
+ </optional>
1423
+ <optional>
1424
+ <ref name="draft"/>
1425
+ </optional>
1426
+ </element>
1427
+ </define>
1428
+ <define name="vedition">
1429
+ <element name="edition">
1430
+ <data type="int"/>
1431
+ </element>
1432
+ </define>
1433
+ <define name="revision-date">
1434
+ <element name="revision-date">
1435
+ <ref name="ISO8601Date"/>
1436
+ </element>
1437
+ </define>
1438
+ <define name="draft">
1439
+ <element name="draft">
1440
+ <text/>
1441
+ </element>
1442
+ </define>
1443
+ <define name="bkeyword">
1444
+ <element name="keyword">
1445
+ <choice>
1446
+ <ref name="LocalizedString"/>
1447
+ <group>
1448
+ <element name="vocab">
1449
+ <ref name="LocalizedString"/>
1450
+ </element>
1451
+ <oneOrMore>
1452
+ <ref name="vocabid"/>
1453
+ </oneOrMore>
1454
+ </group>
1455
+ <group>
1456
+ <oneOrMore>
1457
+ <element name="taxon">
1458
+ <ref name="LocalizedString"/>
1459
+ </element>
1460
+ </oneOrMore>
1461
+ <oneOrMore>
1462
+ <ref name="vocabid"/>
1463
+ </oneOrMore>
1464
+ </group>
1465
+ </choice>
1466
+ </element>
1467
+ </define>
1468
+ <define name="vocabid">
1469
+ <element name="vocabid">
1470
+ <attribute name="type"/>
1471
+ <optional>
1472
+ <attribute name="uri">
1473
+ <data type="anyURI"/>
1474
+ </attribute>
1475
+ </optional>
1476
+ <optional>
1477
+ <element name="code">
1478
+ <text/>
1479
+ </element>
1480
+ </optional>
1481
+ <optional>
1482
+ <element name="term">
1483
+ <text/>
1484
+ </element>
1485
+ </optional>
1486
+ </element>
1487
+ </define>
1488
+ <!--
1489
+ Anycontents = mixed {
1490
+ https://github.com/relaxng/jing-trang/issues/211
1491
+ https://lists.oasis-open.org/archives/office/200808/msg00024.html
1492
+ https://lists.oasis-open.org/archives/office/200808/msg00099.html
1493
+ For this to work, we will actually strip any attributes in the Anycontents before
1494
+ passing it for validation. Horrible I know, but there are no good alternatives
1495
+ that also allow us to do grammar inheritance
1496
+ (attribute * { text } | Any)*
1497
+ Any*
1498
+ }
1499
+ -->
1500
+ <define name="AnyElement">
1501
+ <element>
1502
+ <anyName/>
1503
+ <oneOrMore>
1504
+ <choice>
1505
+ <text/>
1506
+ <ref name="AnyElement"/>
1507
+ </choice>
1508
+ </oneOrMore>
1509
+ </element>
1510
+ </define>
1511
+ </grammar>