metanorma-generic 2.6.3 → 2.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -98,6 +98,28 @@
98
98
  <ref name="amend"/>
99
99
  </choice>
100
100
  </define>
101
+ <define name="BasicBlockNoId">
102
+ <choice>
103
+ <ref name="paragraph-with-footnote-no-id"/>
104
+ <ref name="table-no-id"/>
105
+ <ref name="formula-no-id"/>
106
+ <ref name="admonition-no-id"/>
107
+ <ref name="ol-no-id"/>
108
+ <ref name="ul-no-id"/>
109
+ <ref name="dl-no-id"/>
110
+ <ref name="figure-no-id"/>
111
+ <ref name="quote-no-id"/>
112
+ <ref name="sourcecode-no-id"/>
113
+ <ref name="example-no-id"/>
114
+ <ref name="review"/>
115
+ <ref name="pre-no-id"/>
116
+ <ref name="note-no-id"/>
117
+ <ref name="pagebreak"/>
118
+ <ref name="hr"/>
119
+ <ref name="bookmark"/>
120
+ <ref name="amend"/>
121
+ </choice>
122
+ </define>
101
123
  <define name="amend">
102
124
  <element name="amend">
103
125
  <ref name="AmendType"/>
@@ -191,15 +213,31 @@
191
213
  <value>justified</value>
192
214
  </choice>
193
215
  </define>
194
- <define name="ParagraphType">
216
+ <define name="RequiredId">
195
217
  <attribute name="id">
196
218
  <data type="ID"/>
197
219
  </attribute>
220
+ </define>
221
+ <define name="OptionalId">
222
+ <optional>
223
+ <attribute name="id">
224
+ <data type="ID"/>
225
+ </attribute>
226
+ </optional>
227
+ </define>
228
+ <define name="ParagraphAttrs">
198
229
  <optional>
199
230
  <attribute name="align">
200
231
  <ref name="Alignments"/>
201
232
  </attribute>
202
233
  </optional>
234
+ </define>
235
+ <define name="ParagraphType">
236
+ <ref name="RequiredId"/>
237
+ <ref name="ParagraphAttrs"/>
238
+ <ref name="ParagraphBody"/>
239
+ </define>
240
+ <define name="ParagraphBody">
203
241
  <zeroOrMore>
204
242
  <ref name="TextElement"/>
205
243
  </zeroOrMore>
@@ -207,42 +245,68 @@
207
245
  <ref name="note"/>
208
246
  </zeroOrMore>
209
247
  </define>
248
+ <define name="ParagraphFnBody">
249
+ <zeroOrMore>
250
+ <choice>
251
+ <ref name="TextElement"/>
252
+ <ref name="fn"/>
253
+ </choice>
254
+ </zeroOrMore>
255
+ <zeroOrMore>
256
+ <ref name="note"/>
257
+ </zeroOrMore>
258
+ </define>
259
+ <define name="paragraph-no-id">
260
+ <element name="p">
261
+ <ref name="OptionalId"/>
262
+ <ref name="ParagraphAttrs"/>
263
+ <ref name="ParagraphBody"/>
264
+ </element>
265
+ </define>
210
266
  <define name="paragraph-with-footnote">
211
267
  <element name="p">
212
- <attribute name="id">
213
- <data type="ID"/>
214
- </attribute>
215
- <optional>
216
- <attribute name="align">
217
- <ref name="Alignments"/>
218
- </attribute>
219
- </optional>
220
- <zeroOrMore>
221
- <choice>
222
- <ref name="TextElement"/>
223
- <ref name="fn"/>
224
- </choice>
225
- </zeroOrMore>
226
- <zeroOrMore>
227
- <ref name="note"/>
228
- </zeroOrMore>
268
+ <ref name="RequiredId"/>
269
+ <ref name="ParagraphAttrs"/>
270
+ <ref name="ParagraphFnBody"/>
271
+ </element>
272
+ </define>
273
+ <define name="paragraph-with-footnote-no-id">
274
+ <element name="p">
275
+ <ref name="OptionalId"/>
276
+ <ref name="ParagraphAttrs"/>
277
+ <ref name="ParagraphFnBody"/>
229
278
  </element>
230
279
  </define>
231
280
  <define name="note">
232
281
  <element name="note">
233
- <attribute name="id">
234
- <data type="ID"/>
235
- </attribute>
236
- <oneOrMore>
237
- <ref name="paragraph"/>
238
- </oneOrMore>
282
+ <ref name="RequiredId"/>
283
+ <ref name="NoteAttr"/>
284
+ <ref name="NoteBody"/>
285
+ </element>
286
+ </define>
287
+ <define name="note-no-id">
288
+ <element name="note">
289
+ <ref name="OptionalId"/>
290
+ <ref name="NoteAttr"/>
291
+ <ref name="NoteNoIdBody"/>
239
292
  </element>
240
293
  </define>
294
+ <define name="NoteAttr">
295
+ <empty/>
296
+ </define>
297
+ <define name="NoteBody">
298
+ <oneOrMore>
299
+ <ref name="paragraph"/>
300
+ </oneOrMore>
301
+ </define>
302
+ <define name="NoteNoIdBody">
303
+ <oneOrMore>
304
+ <ref name="paragraph-no-id"/>
305
+ </oneOrMore>
306
+ </define>
241
307
  <define name="review">
242
308
  <element name="review">
243
- <attribute name="id">
244
- <data type="ID"/>
245
- </attribute>
309
+ <ref name="RequiredId"/>
246
310
  <attribute name="reviewer"/>
247
311
  <optional>
248
312
  <attribute name="type"/>
@@ -269,55 +333,100 @@
269
333
  </define>
270
334
  <define name="formula">
271
335
  <element name="formula">
272
- <attribute name="id">
273
- <data type="ID"/>
274
- </attribute>
275
- <optional>
276
- <attribute name="unnumbered">
277
- <data type="boolean"/>
278
- </attribute>
279
- </optional>
280
- <optional>
281
- <attribute name="subsequence"/>
282
- </optional>
283
- <optional>
284
- <attribute name="inequality">
285
- <data type="boolean"/>
286
- </attribute>
287
- </optional>
288
- <ref name="stem"/>
289
- <optional>
290
- <ref name="dl"/>
291
- </optional>
292
- <zeroOrMore>
293
- <ref name="note"/>
294
- </zeroOrMore>
336
+ <ref name="RequiredId"/>
337
+ <ref name="FormulaAttr"/>
338
+ <ref name="FormulaBody"/>
295
339
  </element>
296
340
  </define>
341
+ <define name="formula-no-id">
342
+ <element name="formula">
343
+ <ref name="OptionalId"/>
344
+ <ref name="FormulaAttr"/>
345
+ <ref name="FormulaNoIdBody"/>
346
+ </element>
347
+ </define>
348
+ <define name="FormulaAttr">
349
+ <optional>
350
+ <attribute name="unnumbered">
351
+ <data type="boolean"/>
352
+ </attribute>
353
+ </optional>
354
+ <optional>
355
+ <attribute name="subsequence"/>
356
+ </optional>
357
+ <optional>
358
+ <attribute name="inequality">
359
+ <data type="boolean"/>
360
+ </attribute>
361
+ </optional>
362
+ </define>
363
+ <define name="FormulaBody">
364
+ <ref name="stem"/>
365
+ <optional>
366
+ <ref name="dl"/>
367
+ </optional>
368
+ <zeroOrMore>
369
+ <ref name="note"/>
370
+ </zeroOrMore>
371
+ </define>
372
+ <define name="FormulaNoIdBody">
373
+ <ref name="stem"/>
374
+ <optional>
375
+ <ref name="dl-no-id"/>
376
+ </optional>
377
+ <zeroOrMore>
378
+ <ref name="note-no-id"/>
379
+ </zeroOrMore>
380
+ </define>
297
381
  <define name="quote">
298
382
  <element name="quote">
299
- <attribute name="id">
300
- <data type="ID"/>
301
- </attribute>
302
- <optional>
303
- <attribute name="alignment">
304
- <ref name="Alignments"/>
305
- </attribute>
306
- </optional>
307
- <optional>
308
- <ref name="quote-source"/>
309
- </optional>
310
- <optional>
311
- <ref name="quote-author"/>
312
- </optional>
313
- <oneOrMore>
314
- <ref name="paragraph-with-footnote"/>
315
- </oneOrMore>
316
- <zeroOrMore>
317
- <ref name="note"/>
318
- </zeroOrMore>
383
+ <ref name="RequiredId"/>
384
+ <ref name="QuoteAttr"/>
385
+ <ref name="QuoteBody"/>
386
+ </element>
387
+ </define>
388
+ <define name="quote-no-id">
389
+ <element name="quote">
390
+ <ref name="OptionalId"/>
391
+ <ref name="QuoteAttr"/>
392
+ <ref name="QuoteNoIdBody"/>
319
393
  </element>
320
394
  </define>
395
+ <define name="QuoteAttr">
396
+ <optional>
397
+ <attribute name="alignment">
398
+ <ref name="Alignments"/>
399
+ </attribute>
400
+ </optional>
401
+ </define>
402
+ <define name="QuoteBody">
403
+ <optional>
404
+ <ref name="quote-source"/>
405
+ </optional>
406
+ <optional>
407
+ <ref name="quote-author"/>
408
+ </optional>
409
+ <oneOrMore>
410
+ <ref name="paragraph-with-footnote"/>
411
+ </oneOrMore>
412
+ <zeroOrMore>
413
+ <ref name="note"/>
414
+ </zeroOrMore>
415
+ </define>
416
+ <define name="QuoteNoIdBody">
417
+ <optional>
418
+ <ref name="quote-source"/>
419
+ </optional>
420
+ <optional>
421
+ <ref name="quote-author"/>
422
+ </optional>
423
+ <oneOrMore>
424
+ <ref name="paragraph-with-footnote-no-id"/>
425
+ </oneOrMore>
426
+ <zeroOrMore>
427
+ <ref name="note-no-id"/>
428
+ </zeroOrMore>
429
+ </define>
321
430
  <define name="quote-source">
322
431
  <element name="source">
323
432
  <ref name="erefType"/>
@@ -330,95 +439,172 @@
330
439
  </define>
331
440
  <define name="sourcecode">
332
441
  <element name="sourcecode">
333
- <attribute name="id">
334
- <data type="ID"/>
335
- </attribute>
336
- <optional>
337
- <attribute name="unnumbered">
338
- <data type="boolean"/>
339
- </attribute>
340
- </optional>
341
- <optional>
342
- <attribute name="subsequence"/>
343
- </optional>
344
- <optional>
345
- <attribute name="lang"/>
346
- </optional>
347
- <optional>
348
- <ref name="tname"/>
349
- </optional>
350
- <oneOrMore>
351
- <choice>
352
- <text/>
353
- <ref name="callout"/>
354
- </choice>
355
- </oneOrMore>
356
- <zeroOrMore>
357
- <ref name="annotation"/>
358
- </zeroOrMore>
359
- <zeroOrMore>
360
- <ref name="note"/>
361
- </zeroOrMore>
442
+ <ref name="RequiredId"/>
443
+ <ref name="SourceAttr"/>
444
+ <ref name="SourceBody"/>
445
+ </element>
446
+ </define>
447
+ <define name="sourcecode-no-id">
448
+ <element name="sourcecode">
449
+ <ref name="OptionalId"/>
450
+ <ref name="SourceAttr"/>
451
+ <ref name="SourceNoIdBody"/>
362
452
  </element>
363
453
  </define>
454
+ <define name="SourceAttr">
455
+ <optional>
456
+ <attribute name="unnumbered">
457
+ <data type="boolean"/>
458
+ </attribute>
459
+ </optional>
460
+ <optional>
461
+ <attribute name="subsequence"/>
462
+ </optional>
463
+ <optional>
464
+ <attribute name="lang"/>
465
+ </optional>
466
+ </define>
467
+ <define name="SourceBody">
468
+ <optional>
469
+ <ref name="tname"/>
470
+ </optional>
471
+ <oneOrMore>
472
+ <choice>
473
+ <text/>
474
+ <ref name="callout"/>
475
+ </choice>
476
+ </oneOrMore>
477
+ <zeroOrMore>
478
+ <ref name="annotation"/>
479
+ </zeroOrMore>
480
+ <zeroOrMore>
481
+ <ref name="note"/>
482
+ </zeroOrMore>
483
+ </define>
484
+ <define name="SourceNoIdBody">
485
+ <optional>
486
+ <ref name="tname"/>
487
+ </optional>
488
+ <oneOrMore>
489
+ <choice>
490
+ <text/>
491
+ <ref name="callout"/>
492
+ </choice>
493
+ </oneOrMore>
494
+ <zeroOrMore>
495
+ <ref name="annotation"/>
496
+ </zeroOrMore>
497
+ <zeroOrMore>
498
+ <ref name="note-no-id"/>
499
+ </zeroOrMore>
500
+ </define>
364
501
  <define name="pre">
365
502
  <element name="pre">
366
- <attribute name="id">
367
- <data type="ID"/>
368
- </attribute>
369
- <optional>
370
- <attribute name="alt"/>
371
- </optional>
372
- <optional>
373
- <ref name="tname"/>
374
- </optional>
375
- <text/>
376
- <zeroOrMore>
377
- <ref name="note"/>
378
- </zeroOrMore>
503
+ <ref name="RequiredId"/>
504
+ <ref name="PreAttr"/>
505
+ <ref name="PreBody"/>
506
+ </element>
507
+ </define>
508
+ <define name="pre-no-id">
509
+ <element name="pre">
510
+ <ref name="OptionalId"/>
511
+ <ref name="PreAttr"/>
512
+ <ref name="PreNoIdBody"/>
379
513
  </element>
380
514
  </define>
515
+ <define name="PreAttr">
516
+ <optional>
517
+ <attribute name="alt"/>
518
+ </optional>
519
+ </define>
520
+ <define name="PreBody">
521
+ <optional>
522
+ <ref name="tname"/>
523
+ </optional>
524
+ <text/>
525
+ <zeroOrMore>
526
+ <ref name="note"/>
527
+ </zeroOrMore>
528
+ </define>
529
+ <define name="PreNoIdBody">
530
+ <optional>
531
+ <ref name="tname"/>
532
+ </optional>
533
+ <text/>
534
+ <zeroOrMore>
535
+ <ref name="note-no-id"/>
536
+ </zeroOrMore>
537
+ </define>
381
538
  <define name="table">
382
539
  <element name="table">
383
- <attribute name="id">
384
- <data type="ID"/>
540
+ <ref name="RequiredId"/>
541
+ <ref name="TableAttr"/>
542
+ <ref name="TableBody"/>
543
+ </element>
544
+ </define>
545
+ <define name="table-no-id">
546
+ <element name="table">
547
+ <ref name="OptionalId"/>
548
+ <ref name="TableAttr"/>
549
+ <ref name="TableNoIdBody"/>
550
+ </element>
551
+ </define>
552
+ <define name="TableAttr">
553
+ <optional>
554
+ <attribute name="unnumbered">
555
+ <data type="boolean"/>
385
556
  </attribute>
386
- <optional>
387
- <attribute name="unnumbered">
388
- <data type="boolean"/>
389
- </attribute>
390
- </optional>
391
- <optional>
392
- <attribute name="subsequence"/>
393
- </optional>
394
- <optional>
395
- <attribute name="alt"/>
396
- </optional>
397
- <optional>
398
- <attribute name="summary"/>
399
- </optional>
400
- <optional>
401
- <attribute name="uri">
402
- <data type="anyURI"/>
403
- </attribute>
404
- </optional>
405
- <optional>
406
- <ref name="tname"/>
407
- </optional>
408
- <optional>
409
- <ref name="thead"/>
410
- </optional>
411
- <ref name="tbody"/>
412
- <optional>
413
- <ref name="tfoot"/>
414
- </optional>
415
- <zeroOrMore>
416
- <ref name="table-note"/>
417
- </zeroOrMore>
418
- <optional>
419
- <ref name="dl"/>
420
- </optional>
421
- </element>
557
+ </optional>
558
+ <optional>
559
+ <attribute name="subsequence"/>
560
+ </optional>
561
+ <optional>
562
+ <attribute name="alt"/>
563
+ </optional>
564
+ <optional>
565
+ <attribute name="summary"/>
566
+ </optional>
567
+ <optional>
568
+ <attribute name="uri">
569
+ <data type="anyURI"/>
570
+ </attribute>
571
+ </optional>
572
+ </define>
573
+ <define name="TableBody">
574
+ <optional>
575
+ <ref name="tname"/>
576
+ </optional>
577
+ <optional>
578
+ <ref name="thead"/>
579
+ </optional>
580
+ <ref name="tbody"/>
581
+ <optional>
582
+ <ref name="tfoot"/>
583
+ </optional>
584
+ <optional>
585
+ <ref name="dl"/>
586
+ </optional>
587
+ <zeroOrMore>
588
+ <ref name="table-note"/>
589
+ </zeroOrMore>
590
+ </define>
591
+ <define name="TableNoIdBody">
592
+ <optional>
593
+ <ref name="tname"/>
594
+ </optional>
595
+ <optional>
596
+ <ref name="thead-no-id"/>
597
+ </optional>
598
+ <ref name="tbody-no-id"/>
599
+ <optional>
600
+ <ref name="tfoot-no-id"/>
601
+ </optional>
602
+ <optional>
603
+ <ref name="dl-no-id"/>
604
+ </optional>
605
+ <zeroOrMore>
606
+ <ref name="table-note-no-id"/>
607
+ </zeroOrMore>
422
608
  </define>
423
609
  <define name="tname">
424
610
  <element name="name">
@@ -441,11 +627,21 @@
441
627
  <ref name="tr"/>
442
628
  </element>
443
629
  </define>
630
+ <define name="thead-no-id">
631
+ <element name="thead">
632
+ <ref name="tr-no-id"/>
633
+ </element>
634
+ </define>
444
635
  <define name="tfoot">
445
636
  <element name="tfoot">
446
637
  <ref name="tr"/>
447
638
  </element>
448
639
  </define>
640
+ <define name="tfoot-no-id">
641
+ <element name="tfoot">
642
+ <ref name="tr-no-id"/>
643
+ </element>
644
+ </define>
449
645
  <define name="tbody">
450
646
  <element name="tbody">
451
647
  <oneOrMore>
@@ -453,11 +649,23 @@
453
649
  </oneOrMore>
454
650
  </element>
455
651
  </define>
652
+ <define name="tbody-no-id">
653
+ <element name="tbody">
654
+ <oneOrMore>
655
+ <ref name="tr-no-id"/>
656
+ </oneOrMore>
657
+ </element>
658
+ </define>
456
659
  <define name="table-note">
457
660
  <element name="note">
458
661
  <ref name="paragraph"/>
459
662
  </element>
460
663
  </define>
664
+ <define name="table-note-no-id">
665
+ <element name="note">
666
+ <ref name="paragraph-no-id"/>
667
+ </element>
668
+ </define>
461
669
  <define name="tr">
462
670
  <element name="tr">
463
671
  <oneOrMore>
@@ -468,139 +676,207 @@
468
676
  </oneOrMore>
469
677
  </element>
470
678
  </define>
679
+ <define name="tr-no-id">
680
+ <element name="tr">
681
+ <oneOrMore>
682
+ <choice>
683
+ <ref name="td-no-id"/>
684
+ <ref name="th-no-id"/>
685
+ </choice>
686
+ </oneOrMore>
687
+ </element>
688
+ </define>
471
689
  <define name="td">
472
690
  <element name="td">
473
- <optional>
474
- <attribute name="colspan"/>
475
- </optional>
476
- <optional>
477
- <attribute name="rowspan"/>
478
- </optional>
479
- <optional>
480
- <attribute name="align">
481
- <choice>
482
- <value>left</value>
483
- <value>right</value>
484
- <value>center</value>
485
- </choice>
486
- </attribute>
487
- </optional>
488
- <optional>
489
- <attribute name="valign">
490
- <choice>
491
- <value>top</value>
492
- <value>middle</value>
493
- <value>bottom</value>
494
- <value>baseline</value>
495
- </choice>
496
- </attribute>
497
- </optional>
498
- <choice>
499
- <zeroOrMore>
500
- <ref name="TextElement"/>
501
- </zeroOrMore>
502
- <oneOrMore>
503
- <ref name="paragraph-with-footnote"/>
504
- </oneOrMore>
505
- </choice>
691
+ <ref name="TdAttr"/>
692
+ <ref name="TdBody"/>
506
693
  </element>
507
694
  </define>
508
- <define name="th">
509
- <element name="th">
510
- <optional>
511
- <attribute name="colspan"/>
512
- </optional>
513
- <optional>
514
- <attribute name="rowspan"/>
515
- </optional>
516
- <optional>
517
- <attribute name="align">
518
- <choice>
519
- <value>left</value>
520
- <value>right</value>
521
- <value>center</value>
522
- </choice>
523
- </attribute>
524
- </optional>
525
- <optional>
526
- <attribute name="valign">
527
- <choice>
528
- <value>top</value>
529
- <value>middle</value>
530
- <value>bottom</value>
531
- <value>baseline</value>
532
- </choice>
533
- </attribute>
534
- </optional>
535
- <choice>
536
- <zeroOrMore>
537
- <ref name="TextElement"/>
538
- </zeroOrMore>
539
- <oneOrMore>
540
- <ref name="paragraph-with-footnote"/>
541
- </oneOrMore>
542
- </choice>
695
+ <define name="td-no-id">
696
+ <element name="td">
697
+ <ref name="TdAttr"/>
698
+ <ref name="TdNoIdBody"/>
543
699
  </element>
544
700
  </define>
545
- <define name="example">
546
- <element name="example">
547
- <attribute name="id">
548
- <data type="ID"/>
701
+ <define name="TdAttr">
702
+ <optional>
703
+ <attribute name="colspan"/>
704
+ </optional>
705
+ <optional>
706
+ <attribute name="rowspan"/>
707
+ </optional>
708
+ <optional>
709
+ <attribute name="align">
710
+ <choice>
711
+ <value>left</value>
712
+ <value>right</value>
713
+ <value>center</value>
714
+ </choice>
549
715
  </attribute>
550
- <optional>
551
- <attribute name="unnumbered">
552
- <data type="boolean"/>
553
- </attribute>
554
- </optional>
555
- <optional>
556
- <attribute name="subsequence"/>
557
- </optional>
558
- <optional>
559
- <ref name="tname"/>
560
- </optional>
561
- <oneOrMore>
716
+ </optional>
717
+ <optional>
718
+ <attribute name="valign">
562
719
  <choice>
563
- <ref name="formula"/>
564
- <ref name="ul"/>
565
- <ref name="ol"/>
566
- <ref name="dl"/>
567
- <ref name="quote"/>
568
- <ref name="sourcecode"/>
569
- <ref name="paragraph-with-footnote"/>
720
+ <value>top</value>
721
+ <value>middle</value>
722
+ <value>bottom</value>
723
+ <value>baseline</value>
570
724
  </choice>
725
+ </attribute>
726
+ </optional>
727
+ </define>
728
+ <define name="TdBody">
729
+ <choice>
730
+ <zeroOrMore>
731
+ <ref name="TextElement"/>
732
+ </zeroOrMore>
733
+ <oneOrMore>
734
+ <ref name="paragraph-with-footnote"/>
571
735
  </oneOrMore>
736
+ </choice>
737
+ </define>
738
+ <define name="TdNoIdBody">
739
+ <choice>
572
740
  <zeroOrMore>
573
- <ref name="note"/>
741
+ <ref name="TextElement"/>
574
742
  </zeroOrMore>
743
+ <oneOrMore>
744
+ <ref name="paragraph-with-footnote-no-id"/>
745
+ </oneOrMore>
746
+ </choice>
747
+ </define>
748
+ <define name="th">
749
+ <element name="th">
750
+ <ref name="ThAttr"/>
751
+ <ref name="ThBody"/>
575
752
  </element>
576
753
  </define>
577
- <define name="admonition">
578
- <element name="admonition">
579
- <attribute name="type">
580
- <ref name="AdmonitionType"/>
581
- </attribute>
582
- <optional>
583
- <attribute name="class"/>
584
- </optional>
585
- <attribute name="id">
586
- <data type="ID"/>
754
+ <define name="th-no-id">
755
+ <element name="th">
756
+ <ref name="ThAttr"/>
757
+ <ref name="ThNoIdBody"/>
758
+ </element>
759
+ </define>
760
+ <define name="ThAttr">
761
+ <ref name="TdAttr"/>
762
+ </define>
763
+ <define name="ThBody">
764
+ <ref name="TdBody"/>
765
+ </define>
766
+ <define name="ThNoIdBody">
767
+ <ref name="TdNoIdBody"/>
768
+ </define>
769
+ <define name="example">
770
+ <element name="example">
771
+ <ref name="RequiredId"/>
772
+ <ref name="ExampleAttr"/>
773
+ <ref name="ExampleBody"/>
774
+ </element>
775
+ </define>
776
+ <define name="example-no-id">
777
+ <element name="example">
778
+ <ref name="OptionalId"/>
779
+ <ref name="ExampleAttr"/>
780
+ <ref name="ExampleNoIdBody"/>
781
+ </element>
782
+ </define>
783
+ <define name="ExampleAttr">
784
+ <optional>
785
+ <attribute name="unnumbered">
786
+ <data type="boolean"/>
587
787
  </attribute>
588
- <optional>
589
- <attribute name="uri">
590
- <data type="anyURI"/>
591
- </attribute>
592
- </optional>
593
- <optional>
594
- <ref name="tname"/>
595
- </optional>
596
- <zeroOrMore>
788
+ </optional>
789
+ <optional>
790
+ <attribute name="subsequence"/>
791
+ </optional>
792
+ </define>
793
+ <define name="ExampleBody">
794
+ <optional>
795
+ <ref name="tname"/>
796
+ </optional>
797
+ <oneOrMore>
798
+ <choice>
799
+ <ref name="formula"/>
800
+ <ref name="ul"/>
801
+ <ref name="ol"/>
802
+ <ref name="dl"/>
803
+ <ref name="quote"/>
804
+ <ref name="sourcecode"/>
597
805
  <ref name="paragraph-with-footnote"/>
598
- </zeroOrMore>
599
- <zeroOrMore>
600
- <ref name="note"/>
601
- </zeroOrMore>
806
+ </choice>
807
+ </oneOrMore>
808
+ <zeroOrMore>
809
+ <ref name="note"/>
810
+ </zeroOrMore>
811
+ </define>
812
+ <define name="ExampleNoIdBody">
813
+ <optional>
814
+ <ref name="tname"/>
815
+ </optional>
816
+ <oneOrMore>
817
+ <choice>
818
+ <ref name="formula-no-id"/>
819
+ <ref name="ul-no-id"/>
820
+ <ref name="ol-no-id"/>
821
+ <ref name="dl-no-id"/>
822
+ <ref name="quote-no-id"/>
823
+ <ref name="sourcecode-no-id"/>
824
+ <ref name="paragraph-with-footnote-no-id"/>
825
+ </choice>
826
+ </oneOrMore>
827
+ <zeroOrMore>
828
+ <ref name="note-no-id"/>
829
+ </zeroOrMore>
830
+ </define>
831
+ <define name="admonition">
832
+ <element name="admonition">
833
+ <ref name="RequiredId"/>
834
+ <ref name="AdmonitionAttr"/>
835
+ <ref name="AdmonitionBody"/>
602
836
  </element>
603
837
  </define>
838
+ <define name="admonition-no-id">
839
+ <element name="admonition">
840
+ <ref name="OptionalId"/>
841
+ <ref name="AdmonitionAttr"/>
842
+ <ref name="AdmonitionNoIdBody"/>
843
+ </element>
844
+ </define>
845
+ <define name="AdmonitionAttr">
846
+ <attribute name="type">
847
+ <ref name="AdmonitionType"/>
848
+ </attribute>
849
+ <optional>
850
+ <attribute name="class"/>
851
+ </optional>
852
+ <optional>
853
+ <attribute name="uri">
854
+ <data type="anyURI"/>
855
+ </attribute>
856
+ </optional>
857
+ </define>
858
+ <define name="AdmonitionBody">
859
+ <optional>
860
+ <ref name="tname"/>
861
+ </optional>
862
+ <zeroOrMore>
863
+ <ref name="paragraph-with-footnote"/>
864
+ </zeroOrMore>
865
+ <zeroOrMore>
866
+ <ref name="note"/>
867
+ </zeroOrMore>
868
+ </define>
869
+ <define name="AdmonitionNoIdBody">
870
+ <optional>
871
+ <ref name="tname"/>
872
+ </optional>
873
+ <zeroOrMore>
874
+ <ref name="paragraph-with-footnote-no-id"/>
875
+ </zeroOrMore>
876
+ <zeroOrMore>
877
+ <ref name="note-no-id"/>
878
+ </zeroOrMore>
879
+ </define>
604
880
  <define name="AdmonitionType">
605
881
  <choice>
606
882
  <value>warning</value>
@@ -612,48 +888,88 @@
612
888
  </define>
613
889
  <define name="figure">
614
890
  <element name="figure">
615
- <attribute name="id">
616
- <data type="ID"/>
891
+ <ref name="RequiredId"/>
892
+ <ref name="FigureAttr"/>
893
+ <ref name="FigureBody"/>
894
+ </element>
895
+ </define>
896
+ <define name="figure-no-id">
897
+ <element name="figure">
898
+ <ref name="OptionalId"/>
899
+ <ref name="FigureAttr"/>
900
+ <ref name="FigureNoIdBody"/>
901
+ </element>
902
+ </define>
903
+ <define name="FigureAttr">
904
+ <optional>
905
+ <attribute name="unnumbered">
906
+ <data type="boolean"/>
617
907
  </attribute>
618
- <optional>
619
- <attribute name="unnumbered">
620
- <data type="boolean"/>
621
- </attribute>
622
- </optional>
623
- <optional>
624
- <attribute name="subsequence"/>
625
- </optional>
626
- <optional>
627
- <attribute name="class"/>
628
- </optional>
629
- <optional>
630
- <ref name="source"/>
631
- </optional>
632
- <optional>
633
- <ref name="tname"/>
634
- </optional>
635
- <choice>
636
- <ref name="image"/>
637
- <ref name="video"/>
638
- <ref name="audio"/>
639
- <ref name="pre"/>
640
- <oneOrMore>
641
- <ref name="paragraph-with-footnote"/>
642
- </oneOrMore>
643
- <zeroOrMore>
644
- <ref name="figure"/>
645
- </zeroOrMore>
646
- </choice>
908
+ </optional>
909
+ <optional>
910
+ <attribute name="subsequence"/>
911
+ </optional>
912
+ <optional>
913
+ <attribute name="class"/>
914
+ </optional>
915
+ </define>
916
+ <define name="FigureBody">
917
+ <optional>
918
+ <ref name="source"/>
919
+ </optional>
920
+ <optional>
921
+ <ref name="tname"/>
922
+ </optional>
923
+ <choice>
924
+ <ref name="image"/>
925
+ <ref name="video"/>
926
+ <ref name="audio"/>
927
+ <ref name="pre"/>
928
+ <oneOrMore>
929
+ <ref name="paragraph-with-footnote"/>
930
+ </oneOrMore>
647
931
  <zeroOrMore>
648
- <ref name="fn"/>
932
+ <ref name="figure"/>
649
933
  </zeroOrMore>
650
- <optional>
651
- <ref name="dl"/>
652
- </optional>
934
+ </choice>
935
+ <zeroOrMore>
936
+ <ref name="fn"/>
937
+ </zeroOrMore>
938
+ <optional>
939
+ <ref name="dl"/>
940
+ </optional>
941
+ <zeroOrMore>
942
+ <ref name="note"/>
943
+ </zeroOrMore>
944
+ </define>
945
+ <define name="FigureNoIdBody">
946
+ <optional>
947
+ <ref name="source"/>
948
+ </optional>
949
+ <optional>
950
+ <ref name="tname"/>
951
+ </optional>
952
+ <choice>
953
+ <ref name="image-no-id"/>
954
+ <ref name="video-no-id"/>
955
+ <ref name="audio-no-id"/>
956
+ <ref name="pre-no-id"/>
957
+ <oneOrMore>
958
+ <ref name="paragraph-with-footnote-no-id"/>
959
+ </oneOrMore>
653
960
  <zeroOrMore>
654
- <ref name="note"/>
961
+ <ref name="figure-no-id"/>
655
962
  </zeroOrMore>
656
- </element>
963
+ </choice>
964
+ <zeroOrMore>
965
+ <ref name="fn"/>
966
+ </zeroOrMore>
967
+ <optional>
968
+ <ref name="dl-no-id"/>
969
+ </optional>
970
+ <zeroOrMore>
971
+ <ref name="note-no-id"/>
972
+ </zeroOrMore>
657
973
  </define>
658
974
  <define name="TextElement">
659
975
  <choice>
@@ -1007,13 +1323,17 @@
1007
1323
  -->
1008
1324
  <define name="image">
1009
1325
  <element name="image">
1010
- <ref name="Image"/>
1326
+ <ref name="RequiredId"/>
1327
+ <ref name="ImageAttr"/>
1011
1328
  </element>
1012
1329
  </define>
1013
- <define name="Image">
1014
- <attribute name="id">
1015
- <data type="ID"/>
1016
- </attribute>
1330
+ <define name="image-no-id">
1331
+ <element name="image">
1332
+ <ref name="OptionalId"/>
1333
+ <ref name="ImageAttr"/>
1334
+ </element>
1335
+ </define>
1336
+ <define name="ImageAttr">
1017
1337
  <attribute name="src">
1018
1338
  <data type="anyURI"/>
1019
1339
  </attribute>
@@ -1053,75 +1373,97 @@
1053
1373
  </define>
1054
1374
  <define name="video">
1055
1375
  <element name="video">
1056
- <attribute name="id">
1057
- <data type="ID"/>
1376
+ <ref name="RequiredId"/>
1377
+ <ref name="VideoAttr"/>
1378
+ <ref name="VideoBody"/>
1379
+ </element>
1380
+ </define>
1381
+ <define name="video-no-id">
1382
+ <element name="video">
1383
+ <ref name="OptionalId"/>
1384
+ <ref name="VideoAttr"/>
1385
+ <ref name="VideoBody"/>
1386
+ </element>
1387
+ </define>
1388
+ <define name="VideoAttr">
1389
+ <attribute name="src">
1390
+ <data type="anyURI"/>
1391
+ </attribute>
1392
+ <attribute name="mimetype"/>
1393
+ <optional>
1394
+ <attribute name="filename"/>
1395
+ </optional>
1396
+ <optional>
1397
+ <attribute name="width">
1398
+ <choice>
1399
+ <data type="int"/>
1400
+ <value>auto</value>
1401
+ </choice>
1058
1402
  </attribute>
1059
- <attribute name="src">
1403
+ </optional>
1404
+ <optional>
1405
+ <attribute name="height">
1406
+ <choice>
1407
+ <data type="int"/>
1408
+ <value>auto</value>
1409
+ </choice>
1410
+ </attribute>
1411
+ </optional>
1412
+ <optional>
1413
+ <attribute name="alt"/>
1414
+ </optional>
1415
+ <optional>
1416
+ <attribute name="title"/>
1417
+ </optional>
1418
+ <optional>
1419
+ <attribute name="longdesc">
1060
1420
  <data type="anyURI"/>
1061
1421
  </attribute>
1062
- <attribute name="mimetype"/>
1063
- <optional>
1064
- <attribute name="filename"/>
1065
- </optional>
1066
- <optional>
1067
- <attribute name="width">
1068
- <choice>
1069
- <data type="int"/>
1070
- <value>auto</value>
1071
- </choice>
1072
- </attribute>
1073
- </optional>
1074
- <optional>
1075
- <attribute name="height">
1076
- <choice>
1077
- <data type="int"/>
1078
- <value>auto</value>
1079
- </choice>
1080
- </attribute>
1081
- </optional>
1082
- <optional>
1083
- <attribute name="alt"/>
1084
- </optional>
1085
- <optional>
1086
- <attribute name="title"/>
1087
- </optional>
1088
- <optional>
1089
- <attribute name="longdesc">
1090
- <data type="anyURI"/>
1091
- </attribute>
1092
- </optional>
1093
- <zeroOrMore>
1094
- <ref name="altsource"/>
1095
- </zeroOrMore>
1096
- </element>
1422
+ </optional>
1423
+ </define>
1424
+ <define name="VideoBody">
1425
+ <zeroOrMore>
1426
+ <ref name="altsource"/>
1427
+ </zeroOrMore>
1097
1428
  </define>
1098
1429
  <define name="audio">
1099
1430
  <element name="audio">
1100
- <attribute name="id">
1101
- <data type="ID"/>
1102
- </attribute>
1103
- <attribute name="src">
1431
+ <ref name="RequiredId"/>
1432
+ <ref name="AudioAttr"/>
1433
+ <ref name="AudioBody"/>
1434
+ </element>
1435
+ </define>
1436
+ <define name="audio-no-id">
1437
+ <element name="audio">
1438
+ <ref name="OptionalId"/>
1439
+ <ref name="AudioAttr"/>
1440
+ <ref name="AudioBody"/>
1441
+ </element>
1442
+ </define>
1443
+ <define name="AudioAttr">
1444
+ <attribute name="src">
1445
+ <data type="anyURI"/>
1446
+ </attribute>
1447
+ <attribute name="mimetype"/>
1448
+ <optional>
1449
+ <attribute name="filename"/>
1450
+ </optional>
1451
+ <optional>
1452
+ <attribute name="alt"/>
1453
+ </optional>
1454
+ <optional>
1455
+ <attribute name="title"/>
1456
+ </optional>
1457
+ <optional>
1458
+ <attribute name="longdesc">
1104
1459
  <data type="anyURI"/>
1105
1460
  </attribute>
1106
- <attribute name="mimetype"/>
1107
- <optional>
1108
- <attribute name="filename"/>
1109
- </optional>
1110
- <optional>
1111
- <attribute name="alt"/>
1112
- </optional>
1113
- <optional>
1114
- <attribute name="title"/>
1115
- </optional>
1116
- <optional>
1117
- <attribute name="longdesc">
1118
- <data type="anyURI"/>
1119
- </attribute>
1120
- </optional>
1121
- <zeroOrMore>
1122
- <ref name="altsource"/>
1123
- </zeroOrMore>
1124
- </element>
1461
+ </optional>
1462
+ </define>
1463
+ <define name="AudioBody">
1464
+ <zeroOrMore>
1465
+ <ref name="altsource"/>
1466
+ </zeroOrMore>
1125
1467
  </define>
1126
1468
  <define name="altsource">
1127
1469
  <element name="altsource">
@@ -1152,76 +1494,148 @@
1152
1494
  </define>
1153
1495
  <define name="annotation">
1154
1496
  <element name="annotation">
1155
- <attribute name="id">
1156
- <data type="ID"/>
1157
- </attribute>
1497
+ <ref name="RequiredId"/>
1158
1498
  <ref name="paragraph"/>
1159
1499
  </element>
1160
1500
  </define>
1161
1501
  <define name="ul">
1162
1502
  <element name="ul">
1163
- <attribute name="id">
1164
- <data type="ID"/>
1165
- </attribute>
1166
- <oneOrMore>
1167
- <ref name="li"/>
1168
- </oneOrMore>
1169
- <zeroOrMore>
1170
- <ref name="note"/>
1171
- </zeroOrMore>
1503
+ <ref name="RequiredId"/>
1504
+ <ref name="UlAttr"/>
1505
+ <ref name="UlBody"/>
1506
+ </element>
1507
+ </define>
1508
+ <define name="ul-no-id">
1509
+ <element name="ul">
1510
+ <ref name="OptionalId"/>
1511
+ <ref name="UlAttr"/>
1512
+ <ref name="UlNoIdBody"/>
1172
1513
  </element>
1173
1514
  </define>
1515
+ <define name="UlAttr">
1516
+ <empty/>
1517
+ </define>
1518
+ <define name="UlBody">
1519
+ <oneOrMore>
1520
+ <ref name="li"/>
1521
+ </oneOrMore>
1522
+ <zeroOrMore>
1523
+ <ref name="note"/>
1524
+ </zeroOrMore>
1525
+ </define>
1526
+ <define name="UlNoIdBody">
1527
+ <oneOrMore>
1528
+ <ref name="li-no-id"/>
1529
+ </oneOrMore>
1530
+ <zeroOrMore>
1531
+ <ref name="note-no-id"/>
1532
+ </zeroOrMore>
1533
+ </define>
1174
1534
  <define name="li">
1175
1535
  <element name="li">
1176
- <optional>
1177
- <attribute name="id">
1178
- <data type="ID"/>
1179
- </attribute>
1180
- </optional>
1181
- <oneOrMore>
1182
- <ref name="paragraph-with-footnote"/>
1183
- </oneOrMore>
1536
+ <ref name="OptionalId"/>
1537
+ <ref name="LiAttr"/>
1538
+ <ref name="LiBody"/>
1184
1539
  </element>
1185
1540
  </define>
1541
+ <define name="li-no-id">
1542
+ <element name="li">
1543
+ <ref name="OptionalId"/>
1544
+ <ref name="LiAttr"/>
1545
+ <ref name="LiNoIdBody"/>
1546
+ </element>
1547
+ </define>
1548
+ <define name="LiAttr">
1549
+ <empty/>
1550
+ </define>
1551
+ <define name="LiBody">
1552
+ <oneOrMore>
1553
+ <ref name="paragraph-with-footnote"/>
1554
+ </oneOrMore>
1555
+ </define>
1556
+ <define name="LiNoIdBody">
1557
+ <oneOrMore>
1558
+ <ref name="paragraph-with-footnote-no-id"/>
1559
+ </oneOrMore>
1560
+ </define>
1186
1561
  <define name="ol">
1187
1562
  <element name="ol">
1188
- <attribute name="id">
1189
- <data type="ID"/>
1190
- </attribute>
1191
- <attribute name="type">
1192
- <choice>
1193
- <value>roman</value>
1194
- <value>alphabet</value>
1195
- <value>arabic</value>
1196
- <value>roman_upper</value>
1197
- <value>alphabet_upper</value>
1198
- </choice>
1199
- </attribute>
1200
- <optional>
1201
- <attribute name="start"/>
1202
- </optional>
1203
- <oneOrMore>
1204
- <ref name="li"/>
1205
- </oneOrMore>
1206
- <zeroOrMore>
1207
- <ref name="note"/>
1208
- </zeroOrMore>
1563
+ <ref name="RequiredId"/>
1564
+ <ref name="OlAttr"/>
1565
+ <ref name="OlBody"/>
1209
1566
  </element>
1210
1567
  </define>
1568
+ <define name="ol-no-id">
1569
+ <element name="ol">
1570
+ <ref name="OptionalId"/>
1571
+ <ref name="OlAttr"/>
1572
+ <ref name="OlNoIdBody"/>
1573
+ </element>
1574
+ </define>
1575
+ <define name="OlAttr">
1576
+ <attribute name="type">
1577
+ <choice>
1578
+ <value>roman</value>
1579
+ <value>alphabet</value>
1580
+ <value>arabic</value>
1581
+ <value>roman_upper</value>
1582
+ <value>alphabet_upper</value>
1583
+ </choice>
1584
+ </attribute>
1585
+ <optional>
1586
+ <attribute name="start"/>
1587
+ </optional>
1588
+ </define>
1589
+ <define name="OlBody">
1590
+ <oneOrMore>
1591
+ <ref name="li"/>
1592
+ </oneOrMore>
1593
+ <zeroOrMore>
1594
+ <ref name="note"/>
1595
+ </zeroOrMore>
1596
+ </define>
1597
+ <define name="OlNoIdBody">
1598
+ <oneOrMore>
1599
+ <ref name="li-no-id"/>
1600
+ </oneOrMore>
1601
+ <zeroOrMore>
1602
+ <ref name="note-no-id"/>
1603
+ </zeroOrMore>
1604
+ </define>
1211
1605
  <define name="dl">
1212
1606
  <element name="dl">
1213
- <attribute name="id">
1214
- <data type="ID"/>
1215
- </attribute>
1216
- <oneOrMore>
1217
- <ref name="dt"/>
1218
- <ref name="dd"/>
1219
- </oneOrMore>
1220
- <zeroOrMore>
1221
- <ref name="note"/>
1222
- </zeroOrMore>
1607
+ <ref name="RequiredId"/>
1608
+ <ref name="DlAttr"/>
1609
+ <ref name="DlBody"/>
1223
1610
  </element>
1224
1611
  </define>
1612
+ <define name="dl-no-id">
1613
+ <element name="dl">
1614
+ <ref name="OptionalId"/>
1615
+ <ref name="DlNoIdBody"/>
1616
+ </element>
1617
+ </define>
1618
+ <define name="DlAttr">
1619
+ <empty/>
1620
+ </define>
1621
+ <define name="DlBody">
1622
+ <oneOrMore>
1623
+ <ref name="dt"/>
1624
+ <ref name="dd"/>
1625
+ </oneOrMore>
1626
+ <zeroOrMore>
1627
+ <ref name="note"/>
1628
+ </zeroOrMore>
1629
+ </define>
1630
+ <define name="DlNoIdBody">
1631
+ <oneOrMore>
1632
+ <ref name="dt"/>
1633
+ <ref name="dd-no-id"/>
1634
+ </oneOrMore>
1635
+ <zeroOrMore>
1636
+ <ref name="note-no-id"/>
1637
+ </zeroOrMore>
1638
+ </define>
1225
1639
  <define name="dt">
1226
1640
  <element name="dt">
1227
1641
  <zeroOrMore>
@@ -1236,4 +1650,11 @@
1236
1650
  </zeroOrMore>
1237
1651
  </element>
1238
1652
  </define>
1653
+ <define name="dd-no-id">
1654
+ <element name="dd">
1655
+ <zeroOrMore>
1656
+ <ref name="paragraph-with-footnote-no-id"/>
1657
+ </zeroOrMore>
1658
+ </element>
1659
+ </define>
1239
1660
  </grammar>