relaton-jis 1.14.0

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