metanorma-cc 2.8.8 → 2.8.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1448 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ MathML 4 (Presentation)
4
+ #######################
5
+ -->
6
+ <!--
7
+ Copyright 1998-2026 W3C (MIT, ERCIM, Keio, Beihang)
8
+
9
+ Use and distribution of this code are permitted under the terms
10
+ W3C Software Notice and License
11
+ http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
12
+ -->
13
+ <grammar ns="http://www.w3.org/1998/Math/MathML" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
14
+ <!-- MathML Core -->
15
+ <include href="mathml4-core.rng">
16
+ <!-- named lengths -->
17
+ <define name="length-percentage">
18
+ <data type="string">
19
+ <param name="pattern">\s*((-?[0-9]*([0-9]\.?|\.[0-9])[0-9]*(r?em|ex|in|cm|mm|p[xtc]|Q|v[hw]|vmin|vmax|%))|0|(negative)?((very){0,2}thi(n|ck)|medium)mathspace)\s*</param>
20
+ </data>
21
+ </define>
22
+ <define name="mpadded-length-percentage">
23
+ <data type="string">
24
+ <param name="pattern">\s*([\+\-]?[0-9]*([0-9]\.?|\.[0-9])[0-9]*\s*((%?\s*(height|depth|width)?)|r?em|ex|in|cm|mm|p[xtc]|Q|v[hw]|vmin|vmax|%|((negative)?((very){0,2}thi(n|ck)|medium)mathspace))?)\s*</param>
25
+ </data>
26
+ </define>
27
+ </include>
28
+ <define name="NonMathMLAtt">
29
+ <attribute>
30
+ <anyName>
31
+ <except>
32
+ <nsName ns=""/>
33
+ <nsName/>
34
+ </except>
35
+ </anyName>
36
+ <data type="string"/>
37
+ </attribute>
38
+ </define>
39
+ <define name="MathMLPGlobalAttributes" combine="interleave">
40
+ <zeroOrMore>
41
+ <ref name="NonMathMLAtt"/>
42
+ </zeroOrMore>
43
+ <optional>
44
+ <attribute name="xref"/>
45
+ </optional>
46
+ <optional>
47
+ <attribute name="href">
48
+ <data type="anyURI"/>
49
+ </attribute>
50
+ </optional>
51
+ </define>
52
+ <define name="MathMalignExpression" combine="choice">
53
+ <ref name="MalignExpression"/>
54
+ </define>
55
+ <define name="MathExpression" combine="choice">
56
+ <ref name="PresentationExpression"/>
57
+ </define>
58
+ <define name="MstackExpression">
59
+ <choice>
60
+ <ref name="MathMalignExpression"/>
61
+ <ref name="mscarries"/>
62
+ <ref name="msline"/>
63
+ <ref name="msrow"/>
64
+ <ref name="msgroup"/>
65
+ </choice>
66
+ </define>
67
+ <define name="MsrowExpression">
68
+ <choice>
69
+ <ref name="MathMalignExpression"/>
70
+ <ref name="none"/>
71
+ </choice>
72
+ </define>
73
+ <define name="linestyle">
74
+ <choice>
75
+ <value>none</value>
76
+ <value>solid</value>
77
+ <value>dashed</value>
78
+ </choice>
79
+ </define>
80
+ <define name="verticalalign">
81
+ <choice>
82
+ <value>top</value>
83
+ <value>bottom</value>
84
+ <value>center</value>
85
+ <value>baseline</value>
86
+ <value>axis</value>
87
+ </choice>
88
+ </define>
89
+ <define name="columnalignstyle">
90
+ <choice>
91
+ <value>left</value>
92
+ <value>center</value>
93
+ <value>right</value>
94
+ </choice>
95
+ </define>
96
+ <define name="notationstyle">
97
+ <choice>
98
+ <value>longdiv</value>
99
+ <value>actuarial</value>
100
+ <value>radical</value>
101
+ <value>box</value>
102
+ <value>roundedbox</value>
103
+ <value>circle</value>
104
+ <value>left</value>
105
+ <value>right</value>
106
+ <value>top</value>
107
+ <value>bottom</value>
108
+ <value>updiagonalstrike</value>
109
+ <value>downdiagonalstrike</value>
110
+ <value>verticalstrike</value>
111
+ <value>horizontalstrike</value>
112
+ <value>madruwb</value>
113
+ </choice>
114
+ </define>
115
+ <define name="idref">
116
+ <text/>
117
+ </define>
118
+ <define name="unsigned-integer">
119
+ <data type="unsignedLong"/>
120
+ </define>
121
+ <define name="integer">
122
+ <data type="integer"/>
123
+ </define>
124
+ <define name="number">
125
+ <data type="decimal"/>
126
+ </define>
127
+ <define name="character">
128
+ <data type="string">
129
+ <param name="pattern">\s*\S\s*</param>
130
+ </data>
131
+ </define>
132
+ <define name="positive-integer">
133
+ <data type="positiveInteger"/>
134
+ </define>
135
+ <define name="token.content" combine="choice">
136
+ <choice>
137
+ <ref name="mglyph"/>
138
+ <text/>
139
+ </choice>
140
+ </define>
141
+ <define name="mo.attributes" combine="interleave">
142
+ <optional>
143
+ <attribute name="linebreak">
144
+ <choice>
145
+ <value>auto</value>
146
+ <value>newline</value>
147
+ <value>nobreak</value>
148
+ <value>goodbreak</value>
149
+ <value>badbreak</value>
150
+ </choice>
151
+ </attribute>
152
+ </optional>
153
+ <optional>
154
+ <attribute name="lineleading">
155
+ <ref name="length-percentage"/>
156
+ </attribute>
157
+ </optional>
158
+ <optional>
159
+ <attribute name="linebreakstyle">
160
+ <choice>
161
+ <value>before</value>
162
+ <value>after</value>
163
+ <value>duplicate</value>
164
+ <value>infixlinebreakstyle</value>
165
+ </choice>
166
+ </attribute>
167
+ </optional>
168
+ <optional>
169
+ <attribute name="linebreakmultchar"/>
170
+ </optional>
171
+ <optional>
172
+ <attribute name="indentalign">
173
+ <choice>
174
+ <value>left</value>
175
+ <value>center</value>
176
+ <value>right</value>
177
+ <value>auto</value>
178
+ <value>id</value>
179
+ </choice>
180
+ </attribute>
181
+ </optional>
182
+ <optional>
183
+ <attribute name="indentshift">
184
+ <ref name="length-percentage"/>
185
+ </attribute>
186
+ </optional>
187
+ <optional>
188
+ <attribute name="indenttarget">
189
+ <ref name="idref"/>
190
+ </attribute>
191
+ </optional>
192
+ <optional>
193
+ <attribute name="indentalignfirst">
194
+ <choice>
195
+ <value>left</value>
196
+ <value>center</value>
197
+ <value>right</value>
198
+ <value>auto</value>
199
+ <value>id</value>
200
+ <value>indentalign</value>
201
+ </choice>
202
+ </attribute>
203
+ </optional>
204
+ <optional>
205
+ <attribute name="indentshiftfirst">
206
+ <choice>
207
+ <ref name="length-percentage"/>
208
+ <value>indentshift</value>
209
+ </choice>
210
+ </attribute>
211
+ </optional>
212
+ <optional>
213
+ <attribute name="indentalignlast">
214
+ <choice>
215
+ <value>left</value>
216
+ <value>center</value>
217
+ <value>right</value>
218
+ <value>auto</value>
219
+ <value>id</value>
220
+ <value>indentalign</value>
221
+ </choice>
222
+ </attribute>
223
+ </optional>
224
+ <optional>
225
+ <attribute name="indentshiftlast">
226
+ <choice>
227
+ <ref name="length-percentage"/>
228
+ <value>indentshift</value>
229
+ </choice>
230
+ </attribute>
231
+ </optional>
232
+ <optional>
233
+ <attribute name="accent">
234
+ <ref name="mathml-boolean"/>
235
+ </attribute>
236
+ </optional>
237
+ </define>
238
+ <!--
239
+ METANORMA MODIFICATION (basicdoc-models#39): upstream re-declared
240
+ `attribute maxsize {"infinity"}?` here to extend the core value space;
241
+ RELAX NG forbids duplicate attributes, so "infinity" is merged into the
242
+ core declaration (mathml4-core.rnc mo.attributes) instead.
243
+ -->
244
+ <define name="mspace.attributes" combine="interleave">
245
+ <optional>
246
+ <attribute name="linebreak">
247
+ <choice>
248
+ <value>auto</value>
249
+ <value>newline</value>
250
+ <value>nobreak</value>
251
+ <value>goodbreak</value>
252
+ <value>badbreak</value>
253
+ <value>indentingnewline</value>
254
+ </choice>
255
+ </attribute>
256
+ </optional>
257
+ <optional>
258
+ <attribute name="indentalign">
259
+ <choice>
260
+ <value>left</value>
261
+ <value>center</value>
262
+ <value>right</value>
263
+ <value>auto</value>
264
+ <value>id</value>
265
+ </choice>
266
+ </attribute>
267
+ </optional>
268
+ <optional>
269
+ <attribute name="indentshift">
270
+ <ref name="length-percentage"/>
271
+ </attribute>
272
+ </optional>
273
+ <optional>
274
+ <attribute name="indenttarget">
275
+ <ref name="idref"/>
276
+ </attribute>
277
+ </optional>
278
+ <optional>
279
+ <attribute name="indentalignfirst">
280
+ <choice>
281
+ <value>left</value>
282
+ <value>center</value>
283
+ <value>right</value>
284
+ <value>auto</value>
285
+ <value>id</value>
286
+ <value>indentalign</value>
287
+ </choice>
288
+ </attribute>
289
+ </optional>
290
+ <optional>
291
+ <attribute name="indentshiftfirst">
292
+ <choice>
293
+ <ref name="length-percentage"/>
294
+ <value>indentshift</value>
295
+ </choice>
296
+ </attribute>
297
+ </optional>
298
+ <optional>
299
+ <attribute name="indentalignlast">
300
+ <choice>
301
+ <value>left</value>
302
+ <value>center</value>
303
+ <value>right</value>
304
+ <value>auto</value>
305
+ <value>id</value>
306
+ <value>indentalign</value>
307
+ </choice>
308
+ </attribute>
309
+ </optional>
310
+ <optional>
311
+ <attribute name="indentshiftlast">
312
+ <choice>
313
+ <ref name="length-percentage"/>
314
+ <value>indentshift</value>
315
+ </choice>
316
+ </attribute>
317
+ </optional>
318
+ </define>
319
+ <define name="ms.attributes" combine="interleave">
320
+ <optional>
321
+ <attribute name="lquote"/>
322
+ </optional>
323
+ <optional>
324
+ <attribute name="rquote"/>
325
+ </optional>
326
+ </define>
327
+ <define name="mglyph">
328
+ <element name="mglyph">
329
+ <ref name="mglyph.attributes"/>
330
+ <empty/>
331
+ </element>
332
+ </define>
333
+ <define name="mglyph.attributes">
334
+ <ref name="MathMLPGlobalAttributes"/>
335
+ <optional>
336
+ <attribute name="src">
337
+ <data type="anyURI"/>
338
+ </attribute>
339
+ </optional>
340
+ <optional>
341
+ <attribute name="width">
342
+ <ref name="length-percentage"/>
343
+ </attribute>
344
+ </optional>
345
+ <optional>
346
+ <attribute name="height">
347
+ <ref name="length-percentage"/>
348
+ </attribute>
349
+ </optional>
350
+ <optional>
351
+ <attribute name="valign">
352
+ <ref name="length-percentage"/>
353
+ </attribute>
354
+ </optional>
355
+ <optional>
356
+ <attribute name="alt"/>
357
+ </optional>
358
+ </define>
359
+ <define name="msline">
360
+ <element name="msline">
361
+ <ref name="msline.attributes"/>
362
+ <empty/>
363
+ </element>
364
+ </define>
365
+ <define name="msline.attributes">
366
+ <ref name="MathMLPGlobalAttributes"/>
367
+ <optional>
368
+ <attribute name="position">
369
+ <ref name="integer"/>
370
+ </attribute>
371
+ </optional>
372
+ <optional>
373
+ <attribute name="length">
374
+ <ref name="unsigned-integer"/>
375
+ </attribute>
376
+ </optional>
377
+ <optional>
378
+ <attribute name="leftoverhang">
379
+ <ref name="length-percentage"/>
380
+ </attribute>
381
+ </optional>
382
+ <optional>
383
+ <attribute name="rightoverhang">
384
+ <ref name="length-percentage"/>
385
+ </attribute>
386
+ </optional>
387
+ <optional>
388
+ <attribute name="mslinethickness">
389
+ <choice>
390
+ <ref name="length-percentage"/>
391
+ <value>thin</value>
392
+ <value>medium</value>
393
+ <value>thick</value>
394
+ </choice>
395
+ </attribute>
396
+ </optional>
397
+ </define>
398
+ <define name="MalignExpression">
399
+ <choice>
400
+ <ref name="maligngroup"/>
401
+ <ref name="malignmark"/>
402
+ </choice>
403
+ </define>
404
+ <define name="malignmark">
405
+ <element name="malignmark">
406
+ <ref name="malignmark.attributes"/>
407
+ <empty/>
408
+ </element>
409
+ </define>
410
+ <define name="malignmark.attributes">
411
+ <ref name="MathMLPGlobalAttributes"/>
412
+ </define>
413
+ <define name="maligngroup">
414
+ <element name="maligngroup">
415
+ <ref name="maligngroup.attributes"/>
416
+ <empty/>
417
+ </element>
418
+ </define>
419
+ <define name="maligngroup.attributes">
420
+ <ref name="MathMLPGlobalAttributes"/>
421
+ </define>
422
+ <define name="PresentationExpression">
423
+ <choice>
424
+ <ref name="TokenExpression"/>
425
+ <ref name="mrow"/>
426
+ <ref name="mfrac"/>
427
+ <ref name="msqrt"/>
428
+ <ref name="mroot"/>
429
+ <ref name="mstyle"/>
430
+ <ref name="merror"/>
431
+ <ref name="mpadded"/>
432
+ <ref name="mphantom"/>
433
+ <ref name="mfenced"/>
434
+ <ref name="menclose"/>
435
+ <ref name="msub"/>
436
+ <ref name="msup"/>
437
+ <ref name="msubsup"/>
438
+ <ref name="munder"/>
439
+ <ref name="mover"/>
440
+ <ref name="munderover"/>
441
+ <ref name="mmultiscripts"/>
442
+ <ref name="mtable"/>
443
+ <ref name="mstack"/>
444
+ <ref name="mlongdiv"/>
445
+ <ref name="maction"/>
446
+ </choice>
447
+ </define>
448
+ <define name="mrow.attributes" combine="interleave">
449
+ <ref name="MathMLlink.attributes"/>
450
+ </define>
451
+ <define name="mfrac.attributes" combine="interleave">
452
+ <optional>
453
+ <attribute name="numalign">
454
+ <choice>
455
+ <value>left</value>
456
+ <value>center</value>
457
+ <value>right</value>
458
+ </choice>
459
+ </attribute>
460
+ </optional>
461
+ <optional>
462
+ <attribute name="denomalign">
463
+ <choice>
464
+ <value>left</value>
465
+ <value>center</value>
466
+ <value>right</value>
467
+ </choice>
468
+ </attribute>
469
+ </optional>
470
+ <optional>
471
+ <attribute name="bevelled">
472
+ <ref name="mathml-boolean"/>
473
+ </attribute>
474
+ </optional>
475
+ </define>
476
+ <define name="mstyle.attributes" combine="interleave">
477
+ <ref name="mstyle.specificattributes"/>
478
+ <ref name="mstyle.generalattributes"/>
479
+ </define>
480
+ <define name="mstyle.specificattributes">
481
+ <optional>
482
+ <attribute name="scriptsizemultiplier">
483
+ <ref name="number"/>
484
+ </attribute>
485
+ </optional>
486
+ <optional>
487
+ <attribute name="scriptminsize">
488
+ <ref name="length-percentage"/>
489
+ </attribute>
490
+ </optional>
491
+ <optional>
492
+ <attribute name="infixlinebreakstyle">
493
+ <choice>
494
+ <value>before</value>
495
+ <value>after</value>
496
+ <value>duplicate</value>
497
+ </choice>
498
+ </attribute>
499
+ </optional>
500
+ <optional>
501
+ <attribute name="decimalpoint">
502
+ <ref name="character"/>
503
+ </attribute>
504
+ </optional>
505
+ </define>
506
+ <!--
507
+ METANORMA MODIFICATION (basicdoc-models#39): `dir`, `mathsize` and
508
+ `mathvariant` are removed from mstyle.generalattributes below — they are
509
+ already carried by MathMLPGlobalAttributes (mathml4-core.rnc), and since
510
+ math.attributes and mstyle.attributes combine both sets, RELAX NG's
511
+ duplicate-attribute restriction rejects the composed grammar (jing:
512
+ 'duplicate attribute "dir"'). The attributes remain available on every
513
+ element via MathMLPGlobalAttributes.
514
+ -->
515
+ <define name="mstyle.generalattributes">
516
+ <optional>
517
+ <attribute name="accent">
518
+ <ref name="mathml-boolean"/>
519
+ </attribute>
520
+ </optional>
521
+ <optional>
522
+ <attribute name="accentunder">
523
+ <ref name="mathml-boolean"/>
524
+ </attribute>
525
+ </optional>
526
+ <optional>
527
+ <attribute name="align">
528
+ <choice>
529
+ <value>left</value>
530
+ <value>right</value>
531
+ <value>center</value>
532
+ </choice>
533
+ </attribute>
534
+ </optional>
535
+ <optional>
536
+ <attribute name="bevelled">
537
+ <ref name="mathml-boolean"/>
538
+ </attribute>
539
+ </optional>
540
+ <optional>
541
+ <attribute name="charalign">
542
+ <choice>
543
+ <value>left</value>
544
+ <value>center</value>
545
+ <value>right</value>
546
+ </choice>
547
+ </attribute>
548
+ </optional>
549
+ <optional>
550
+ <attribute name="charspacing">
551
+ <choice>
552
+ <ref name="length-percentage"/>
553
+ <value>loose</value>
554
+ <value>medium</value>
555
+ <value>tight</value>
556
+ </choice>
557
+ </attribute>
558
+ </optional>
559
+ <optional>
560
+ <attribute name="close"/>
561
+ </optional>
562
+ <optional>
563
+ <attribute name="columnalign">
564
+ <list>
565
+ <oneOrMore>
566
+ <ref name="columnalignstyle"/>
567
+ </oneOrMore>
568
+ </list>
569
+ </attribute>
570
+ </optional>
571
+ <optional>
572
+ <attribute name="columnlines">
573
+ <list>
574
+ <oneOrMore>
575
+ <ref name="linestyle"/>
576
+ </oneOrMore>
577
+ </list>
578
+ </attribute>
579
+ </optional>
580
+ <optional>
581
+ <attribute name="columnspacing">
582
+ <list>
583
+ <oneOrMore>
584
+ <ref name="length-percentage"/>
585
+ </oneOrMore>
586
+ </list>
587
+ </attribute>
588
+ </optional>
589
+ <optional>
590
+ <attribute name="columnspan">
591
+ <ref name="positive-integer"/>
592
+ </attribute>
593
+ </optional>
594
+ <optional>
595
+ <attribute name="columnwidth">
596
+ <list>
597
+ <oneOrMore>
598
+ <choice>
599
+ <value>auto</value>
600
+ <ref name="length-percentage"/>
601
+ <value>fit</value>
602
+ </choice>
603
+ </oneOrMore>
604
+ </list>
605
+ </attribute>
606
+ </optional>
607
+ <optional>
608
+ <attribute name="crossout">
609
+ <list>
610
+ <zeroOrMore>
611
+ <choice>
612
+ <value>none</value>
613
+ <value>updiagonalstrike</value>
614
+ <value>downdiagonalstrike</value>
615
+ <value>verticalstrike</value>
616
+ <value>horizontalstrike</value>
617
+ </choice>
618
+ </zeroOrMore>
619
+ </list>
620
+ </attribute>
621
+ </optional>
622
+ <optional>
623
+ <attribute name="denomalign">
624
+ <choice>
625
+ <value>left</value>
626
+ <value>center</value>
627
+ <value>right</value>
628
+ </choice>
629
+ </attribute>
630
+ </optional>
631
+ <optional>
632
+ <attribute name="depth">
633
+ <ref name="length-percentage"/>
634
+ </attribute>
635
+ </optional>
636
+ <optional>
637
+ <attribute name="equalcolumns">
638
+ <ref name="mathml-boolean"/>
639
+ </attribute>
640
+ </optional>
641
+ <optional>
642
+ <attribute name="equalrows">
643
+ <ref name="mathml-boolean"/>
644
+ </attribute>
645
+ </optional>
646
+ <optional>
647
+ <attribute name="form">
648
+ <choice>
649
+ <value>prefix</value>
650
+ <value>infix</value>
651
+ <value>postfix</value>
652
+ </choice>
653
+ </attribute>
654
+ </optional>
655
+ <optional>
656
+ <attribute name="frame">
657
+ <ref name="linestyle"/>
658
+ </attribute>
659
+ </optional>
660
+ <optional>
661
+ <attribute name="framespacing">
662
+ <list>
663
+ <ref name="length-percentage"/>
664
+ <ref name="length-percentage"/>
665
+ </list>
666
+ </attribute>
667
+ </optional>
668
+ <optional>
669
+ <attribute name="height">
670
+ <ref name="length-percentage"/>
671
+ </attribute>
672
+ </optional>
673
+ <optional>
674
+ <attribute name="indentalign">
675
+ <choice>
676
+ <value>left</value>
677
+ <value>center</value>
678
+ <value>right</value>
679
+ <value>auto</value>
680
+ <value>id</value>
681
+ </choice>
682
+ </attribute>
683
+ </optional>
684
+ <optional>
685
+ <attribute name="indentalignfirst">
686
+ <choice>
687
+ <value>left</value>
688
+ <value>center</value>
689
+ <value>right</value>
690
+ <value>auto</value>
691
+ <value>id</value>
692
+ <value>indentalign</value>
693
+ </choice>
694
+ </attribute>
695
+ </optional>
696
+ <optional>
697
+ <attribute name="indentalignlast">
698
+ <choice>
699
+ <value>left</value>
700
+ <value>center</value>
701
+ <value>right</value>
702
+ <value>auto</value>
703
+ <value>id</value>
704
+ <value>indentalign</value>
705
+ </choice>
706
+ </attribute>
707
+ </optional>
708
+ <optional>
709
+ <attribute name="indentshift">
710
+ <ref name="length-percentage"/>
711
+ </attribute>
712
+ </optional>
713
+ <optional>
714
+ <attribute name="indentshiftfirst">
715
+ <choice>
716
+ <ref name="length-percentage"/>
717
+ <value>indentshift</value>
718
+ </choice>
719
+ </attribute>
720
+ </optional>
721
+ <optional>
722
+ <attribute name="indentshiftlast">
723
+ <choice>
724
+ <ref name="length-percentage"/>
725
+ <value>indentshift</value>
726
+ </choice>
727
+ </attribute>
728
+ </optional>
729
+ <optional>
730
+ <attribute name="indenttarget">
731
+ <ref name="idref"/>
732
+ </attribute>
733
+ </optional>
734
+ <optional>
735
+ <attribute name="largeop">
736
+ <ref name="mathml-boolean"/>
737
+ </attribute>
738
+ </optional>
739
+ <optional>
740
+ <attribute name="leftoverhang">
741
+ <ref name="length-percentage"/>
742
+ </attribute>
743
+ </optional>
744
+ <optional>
745
+ <attribute name="length">
746
+ <ref name="unsigned-integer"/>
747
+ </attribute>
748
+ </optional>
749
+ <optional>
750
+ <attribute name="linebreak">
751
+ <choice>
752
+ <value>auto</value>
753
+ <value>newline</value>
754
+ <value>nobreak</value>
755
+ <value>goodbreak</value>
756
+ <value>badbreak</value>
757
+ </choice>
758
+ </attribute>
759
+ </optional>
760
+ <optional>
761
+ <attribute name="linebreakmultchar"/>
762
+ </optional>
763
+ <optional>
764
+ <attribute name="linebreakstyle">
765
+ <choice>
766
+ <value>before</value>
767
+ <value>after</value>
768
+ <value>duplicate</value>
769
+ <value>infixlinebreakstyle</value>
770
+ </choice>
771
+ </attribute>
772
+ </optional>
773
+ <optional>
774
+ <attribute name="lineleading">
775
+ <ref name="length-percentage"/>
776
+ </attribute>
777
+ </optional>
778
+ <optional>
779
+ <attribute name="linethickness">
780
+ <choice>
781
+ <ref name="length-percentage"/>
782
+ <value>thin</value>
783
+ <value>medium</value>
784
+ <value>thick</value>
785
+ </choice>
786
+ </attribute>
787
+ </optional>
788
+ <optional>
789
+ <attribute name="location">
790
+ <choice>
791
+ <value>w</value>
792
+ <value>nw</value>
793
+ <value>n</value>
794
+ <value>ne</value>
795
+ <value>e</value>
796
+ <value>se</value>
797
+ <value>s</value>
798
+ <value>sw</value>
799
+ </choice>
800
+ </attribute>
801
+ </optional>
802
+ <optional>
803
+ <attribute name="longdivstyle">
804
+ <choice>
805
+ <value>lefttop</value>
806
+ <value>stackedrightright</value>
807
+ <value>mediumstackedrightright</value>
808
+ <value>shortstackedrightright</value>
809
+ <value>righttop</value>
810
+ <value>left/\right</value>
811
+ <value>left)(right</value>
812
+ <value>:right=right</value>
813
+ <value>stackedleftleft</value>
814
+ <value>stackedleftlinetop</value>
815
+ </choice>
816
+ </attribute>
817
+ </optional>
818
+ <optional>
819
+ <attribute name="lquote"/>
820
+ </optional>
821
+ <optional>
822
+ <attribute name="lspace">
823
+ <ref name="length-percentage"/>
824
+ </attribute>
825
+ </optional>
826
+ <optional>
827
+ <attribute name="minlabelspacing">
828
+ <ref name="length-percentage"/>
829
+ </attribute>
830
+ </optional>
831
+ <optional>
832
+ <attribute name="minsize">
833
+ <ref name="length-percentage"/>
834
+ </attribute>
835
+ </optional>
836
+ <optional>
837
+ <attribute name="movablelimits">
838
+ <ref name="mathml-boolean"/>
839
+ </attribute>
840
+ </optional>
841
+ <optional>
842
+ <attribute name="mslinethickness">
843
+ <choice>
844
+ <ref name="length-percentage"/>
845
+ <value>thin</value>
846
+ <value>medium</value>
847
+ <value>thick</value>
848
+ </choice>
849
+ </attribute>
850
+ </optional>
851
+ <optional>
852
+ <attribute name="notation"/>
853
+ </optional>
854
+ <optional>
855
+ <attribute name="numalign">
856
+ <choice>
857
+ <value>left</value>
858
+ <value>center</value>
859
+ <value>right</value>
860
+ </choice>
861
+ </attribute>
862
+ </optional>
863
+ <optional>
864
+ <attribute name="open"/>
865
+ </optional>
866
+ <optional>
867
+ <attribute name="position">
868
+ <ref name="integer"/>
869
+ </attribute>
870
+ </optional>
871
+ <optional>
872
+ <attribute name="rightoverhang">
873
+ <ref name="length-percentage"/>
874
+ </attribute>
875
+ </optional>
876
+ <optional>
877
+ <attribute name="rowalign">
878
+ <list>
879
+ <oneOrMore>
880
+ <ref name="verticalalign"/>
881
+ </oneOrMore>
882
+ </list>
883
+ </attribute>
884
+ </optional>
885
+ <optional>
886
+ <attribute name="rowlines">
887
+ <list>
888
+ <oneOrMore>
889
+ <ref name="linestyle"/>
890
+ </oneOrMore>
891
+ </list>
892
+ </attribute>
893
+ </optional>
894
+ <optional>
895
+ <attribute name="rowspacing">
896
+ <list>
897
+ <oneOrMore>
898
+ <ref name="length-percentage"/>
899
+ </oneOrMore>
900
+ </list>
901
+ </attribute>
902
+ </optional>
903
+ <optional>
904
+ <attribute name="rowspan">
905
+ <ref name="positive-integer"/>
906
+ </attribute>
907
+ </optional>
908
+ <optional>
909
+ <attribute name="rquote"/>
910
+ </optional>
911
+ <optional>
912
+ <attribute name="rspace">
913
+ <ref name="length-percentage"/>
914
+ </attribute>
915
+ </optional>
916
+ <optional>
917
+ <attribute name="selection">
918
+ <ref name="positive-integer"/>
919
+ </attribute>
920
+ </optional>
921
+ <optional>
922
+ <attribute name="separators"/>
923
+ </optional>
924
+ <optional>
925
+ <attribute name="shift">
926
+ <ref name="integer"/>
927
+ </attribute>
928
+ </optional>
929
+ <optional>
930
+ <attribute name="side">
931
+ <choice>
932
+ <value>left</value>
933
+ <value>right</value>
934
+ <value>leftoverlap</value>
935
+ <value>rightoverlap</value>
936
+ </choice>
937
+ </attribute>
938
+ </optional>
939
+ <optional>
940
+ <attribute name="stackalign">
941
+ <choice>
942
+ <value>left</value>
943
+ <value>center</value>
944
+ <value>right</value>
945
+ <value>decimalpoint</value>
946
+ </choice>
947
+ </attribute>
948
+ </optional>
949
+ <optional>
950
+ <attribute name="stretchy">
951
+ <ref name="mathml-boolean"/>
952
+ </attribute>
953
+ </optional>
954
+ <optional>
955
+ <attribute name="subscriptshift">
956
+ <ref name="length-percentage"/>
957
+ </attribute>
958
+ </optional>
959
+ <optional>
960
+ <attribute name="superscriptshift">
961
+ <ref name="length-percentage"/>
962
+ </attribute>
963
+ </optional>
964
+ <optional>
965
+ <attribute name="symmetric">
966
+ <ref name="mathml-boolean"/>
967
+ </attribute>
968
+ </optional>
969
+ <optional>
970
+ <attribute name="valign">
971
+ <ref name="length-percentage"/>
972
+ </attribute>
973
+ </optional>
974
+ <optional>
975
+ <attribute name="width">
976
+ <ref name="length-percentage"/>
977
+ </attribute>
978
+ </optional>
979
+ </define>
980
+ <define name="math.attributes" combine="interleave">
981
+ <ref name="mstyle.specificattributes"/>
982
+ </define>
983
+ <define name="math.attributes" combine="interleave">
984
+ <ref name="mstyle.generalattributes"/>
985
+ </define>
986
+ <define name="math.attributes" combine="interleave">
987
+ <optional>
988
+ <attribute name="overflow">
989
+ <choice>
990
+ <value>linebreak</value>
991
+ <value>scroll</value>
992
+ <value>elide</value>
993
+ <value>truncate</value>
994
+ <value>scale</value>
995
+ </choice>
996
+ </attribute>
997
+ </optional>
998
+ </define>
999
+ <define name="mfenced">
1000
+ <element name="mfenced">
1001
+ <ref name="mfenced.attributes"/>
1002
+ <ref name="ImpliedMrow"/>
1003
+ </element>
1004
+ </define>
1005
+ <define name="mfenced.attributes">
1006
+ <ref name="MathMLPGlobalAttributes"/>
1007
+ <optional>
1008
+ <attribute name="open"/>
1009
+ </optional>
1010
+ <optional>
1011
+ <attribute name="close"/>
1012
+ </optional>
1013
+ <optional>
1014
+ <attribute name="separators"/>
1015
+ </optional>
1016
+ </define>
1017
+ <define name="menclose">
1018
+ <element name="menclose">
1019
+ <ref name="menclose.attributes"/>
1020
+ <ref name="ImpliedMrow"/>
1021
+ </element>
1022
+ </define>
1023
+ <define name="menclose.attributes">
1024
+ <ref name="MathMLPGlobalAttributes"/>
1025
+ <optional>
1026
+ <attribute name="notation"/>
1027
+ </optional>
1028
+ </define>
1029
+ <define name="munder.attributes" combine="interleave">
1030
+ <optional>
1031
+ <attribute name="align">
1032
+ <choice>
1033
+ <value>left</value>
1034
+ <value>right</value>
1035
+ <value>center</value>
1036
+ </choice>
1037
+ </attribute>
1038
+ </optional>
1039
+ </define>
1040
+ <define name="mover.attributes" combine="interleave">
1041
+ <optional>
1042
+ <attribute name="align">
1043
+ <choice>
1044
+ <value>left</value>
1045
+ <value>right</value>
1046
+ <value>center</value>
1047
+ </choice>
1048
+ </attribute>
1049
+ </optional>
1050
+ </define>
1051
+ <define name="munderover.attributes" combine="interleave">
1052
+ <optional>
1053
+ <attribute name="align">
1054
+ <choice>
1055
+ <value>left</value>
1056
+ <value>right</value>
1057
+ <value>center</value>
1058
+ </choice>
1059
+ </attribute>
1060
+ </optional>
1061
+ </define>
1062
+ <define name="msub.attributes" combine="interleave">
1063
+ <optional>
1064
+ <attribute name="subscriptshift">
1065
+ <ref name="length-percentage"/>
1066
+ </attribute>
1067
+ </optional>
1068
+ </define>
1069
+ <define name="msup.attributes" combine="interleave">
1070
+ <optional>
1071
+ <attribute name="superscriptshift">
1072
+ <ref name="length-percentage"/>
1073
+ </attribute>
1074
+ </optional>
1075
+ </define>
1076
+ <define name="msubsup.attributes" combine="interleave">
1077
+ <optional>
1078
+ <attribute name="subscriptshift">
1079
+ <ref name="length-percentage"/>
1080
+ </attribute>
1081
+ </optional>
1082
+ <optional>
1083
+ <attribute name="superscriptshift">
1084
+ <ref name="length-percentage"/>
1085
+ </attribute>
1086
+ </optional>
1087
+ </define>
1088
+ <define name="mtable.attributes" combine="interleave">
1089
+ <optional>
1090
+ <attribute name="align">
1091
+ <data type="string">
1092
+ <param name="pattern">\s*(top|bottom|center|baseline|axis)(\s+-?[0-9]+)?\s*</param>
1093
+ </data>
1094
+ </attribute>
1095
+ </optional>
1096
+ <optional>
1097
+ <attribute name="rowalign">
1098
+ <list>
1099
+ <oneOrMore>
1100
+ <ref name="verticalalign"/>
1101
+ </oneOrMore>
1102
+ </list>
1103
+ </attribute>
1104
+ </optional>
1105
+ <optional>
1106
+ <attribute name="columnalign">
1107
+ <list>
1108
+ <oneOrMore>
1109
+ <ref name="columnalignstyle"/>
1110
+ </oneOrMore>
1111
+ </list>
1112
+ </attribute>
1113
+ </optional>
1114
+ <optional>
1115
+ <attribute name="columnwidth">
1116
+ <list>
1117
+ <oneOrMore>
1118
+ <choice>
1119
+ <value>auto</value>
1120
+ <ref name="length-percentage"/>
1121
+ <value>fit</value>
1122
+ </choice>
1123
+ </oneOrMore>
1124
+ </list>
1125
+ </attribute>
1126
+ </optional>
1127
+ <optional>
1128
+ <attribute name="width">
1129
+ <choice>
1130
+ <value>auto</value>
1131
+ <ref name="length-percentage"/>
1132
+ </choice>
1133
+ </attribute>
1134
+ </optional>
1135
+ <optional>
1136
+ <attribute name="rowspacing">
1137
+ <list>
1138
+ <oneOrMore>
1139
+ <ref name="length-percentage"/>
1140
+ </oneOrMore>
1141
+ </list>
1142
+ </attribute>
1143
+ </optional>
1144
+ <optional>
1145
+ <attribute name="columnspacing">
1146
+ <list>
1147
+ <oneOrMore>
1148
+ <ref name="length-percentage"/>
1149
+ </oneOrMore>
1150
+ </list>
1151
+ </attribute>
1152
+ </optional>
1153
+ <optional>
1154
+ <attribute name="rowlines">
1155
+ <list>
1156
+ <oneOrMore>
1157
+ <ref name="linestyle"/>
1158
+ </oneOrMore>
1159
+ </list>
1160
+ </attribute>
1161
+ </optional>
1162
+ <optional>
1163
+ <attribute name="columnlines">
1164
+ <list>
1165
+ <oneOrMore>
1166
+ <ref name="linestyle"/>
1167
+ </oneOrMore>
1168
+ </list>
1169
+ </attribute>
1170
+ </optional>
1171
+ <optional>
1172
+ <attribute name="frame">
1173
+ <ref name="linestyle"/>
1174
+ </attribute>
1175
+ </optional>
1176
+ <optional>
1177
+ <attribute name="framespacing">
1178
+ <list>
1179
+ <ref name="length-percentage"/>
1180
+ <ref name="length-percentage"/>
1181
+ </list>
1182
+ </attribute>
1183
+ </optional>
1184
+ <optional>
1185
+ <attribute name="equalrows">
1186
+ <ref name="mathml-boolean"/>
1187
+ </attribute>
1188
+ </optional>
1189
+ <optional>
1190
+ <attribute name="equalcolumns">
1191
+ <ref name="mathml-boolean"/>
1192
+ </attribute>
1193
+ </optional>
1194
+ </define>
1195
+ <!--
1196
+ METANORMA MODIFICATION (basicdoc-models#39): `attribute displaystyle`
1197
+ removed from the mtable augmentation — MathMLPGlobalAttributes
1198
+ (mathml4-core.rnc) already carries displaystyle on every element, and
1199
+ RELAX NG's duplicate-attribute restriction rejects the re-declaration
1200
+ (jing: 'duplicate attribute "displaystyle"').
1201
+ -->
1202
+ <define name="mtr.attributes" combine="interleave">
1203
+ <optional>
1204
+ <attribute name="rowalign">
1205
+ <choice>
1206
+ <value>top</value>
1207
+ <value>bottom</value>
1208
+ <value>center</value>
1209
+ <value>baseline</value>
1210
+ <value>axis</value>
1211
+ </choice>
1212
+ </attribute>
1213
+ </optional>
1214
+ <optional>
1215
+ <attribute name="columnalign">
1216
+ <list>
1217
+ <oneOrMore>
1218
+ <ref name="columnalignstyle"/>
1219
+ </oneOrMore>
1220
+ </list>
1221
+ </attribute>
1222
+ </optional>
1223
+ </define>
1224
+ <define name="mtd.attributes" combine="interleave">
1225
+ <optional>
1226
+ <attribute name="rowalign">
1227
+ <choice>
1228
+ <value>top</value>
1229
+ <value>bottom</value>
1230
+ <value>center</value>
1231
+ <value>baseline</value>
1232
+ <value>axis</value>
1233
+ </choice>
1234
+ </attribute>
1235
+ </optional>
1236
+ <optional>
1237
+ <attribute name="columnalign">
1238
+ <ref name="columnalignstyle"/>
1239
+ </attribute>
1240
+ </optional>
1241
+ </define>
1242
+ <define name="mstack">
1243
+ <element name="mstack">
1244
+ <ref name="mstack.attributes"/>
1245
+ <zeroOrMore>
1246
+ <ref name="MstackExpression"/>
1247
+ </zeroOrMore>
1248
+ </element>
1249
+ </define>
1250
+ <define name="mstack.attributes">
1251
+ <ref name="MathMLPGlobalAttributes"/>
1252
+ <optional>
1253
+ <attribute name="align">
1254
+ <data type="string">
1255
+ <param name="pattern">\s*(top|bottom|center|baseline|axis)(\s+-?[0-9]+)?\s*</param>
1256
+ </data>
1257
+ </attribute>
1258
+ </optional>
1259
+ <optional>
1260
+ <attribute name="stackalign">
1261
+ <choice>
1262
+ <value>left</value>
1263
+ <value>center</value>
1264
+ <value>right</value>
1265
+ <value>decimalpoint</value>
1266
+ </choice>
1267
+ </attribute>
1268
+ </optional>
1269
+ <optional>
1270
+ <attribute name="charalign">
1271
+ <choice>
1272
+ <value>left</value>
1273
+ <value>center</value>
1274
+ <value>right</value>
1275
+ </choice>
1276
+ </attribute>
1277
+ </optional>
1278
+ <optional>
1279
+ <attribute name="charspacing">
1280
+ <choice>
1281
+ <ref name="length-percentage"/>
1282
+ <value>loose</value>
1283
+ <value>medium</value>
1284
+ <value>tight</value>
1285
+ </choice>
1286
+ </attribute>
1287
+ </optional>
1288
+ </define>
1289
+ <define name="mlongdiv">
1290
+ <element name="mlongdiv">
1291
+ <ref name="mlongdiv.attributes"/>
1292
+ <ref name="MstackExpression"/>
1293
+ <ref name="MstackExpression"/>
1294
+ <oneOrMore>
1295
+ <ref name="MstackExpression"/>
1296
+ </oneOrMore>
1297
+ </element>
1298
+ </define>
1299
+ <define name="mlongdiv.attributes">
1300
+ <ref name="msgroup.attributes"/>
1301
+ <optional>
1302
+ <attribute name="longdivstyle">
1303
+ <choice>
1304
+ <value>lefttop</value>
1305
+ <value>stackedrightright</value>
1306
+ <value>mediumstackedrightright</value>
1307
+ <value>shortstackedrightright</value>
1308
+ <value>righttop</value>
1309
+ <value>left/\right</value>
1310
+ <value>left)(right</value>
1311
+ <value>:right=right</value>
1312
+ <value>stackedleftleft</value>
1313
+ <value>stackedleftlinetop</value>
1314
+ </choice>
1315
+ </attribute>
1316
+ </optional>
1317
+ </define>
1318
+ <define name="msgroup">
1319
+ <element name="msgroup">
1320
+ <ref name="msgroup.attributes"/>
1321
+ <zeroOrMore>
1322
+ <ref name="MstackExpression"/>
1323
+ </zeroOrMore>
1324
+ </element>
1325
+ </define>
1326
+ <define name="msgroup.attributes">
1327
+ <ref name="MathMLPGlobalAttributes"/>
1328
+ <optional>
1329
+ <attribute name="position">
1330
+ <ref name="integer"/>
1331
+ </attribute>
1332
+ </optional>
1333
+ <optional>
1334
+ <attribute name="shift">
1335
+ <ref name="integer"/>
1336
+ </attribute>
1337
+ </optional>
1338
+ </define>
1339
+ <define name="msrow">
1340
+ <element name="msrow">
1341
+ <ref name="msrow.attributes"/>
1342
+ <zeroOrMore>
1343
+ <ref name="MsrowExpression"/>
1344
+ </zeroOrMore>
1345
+ </element>
1346
+ </define>
1347
+ <define name="msrow.attributes">
1348
+ <ref name="MathMLPGlobalAttributes"/>
1349
+ <optional>
1350
+ <attribute name="position">
1351
+ <ref name="integer"/>
1352
+ </attribute>
1353
+ </optional>
1354
+ </define>
1355
+ <define name="mscarries">
1356
+ <element name="mscarries">
1357
+ <ref name="mscarries.attributes"/>
1358
+ <zeroOrMore>
1359
+ <choice>
1360
+ <ref name="MsrowExpression"/>
1361
+ <ref name="mscarry"/>
1362
+ </choice>
1363
+ </zeroOrMore>
1364
+ </element>
1365
+ </define>
1366
+ <define name="mscarries.attributes">
1367
+ <ref name="MathMLPGlobalAttributes"/>
1368
+ <optional>
1369
+ <attribute name="position">
1370
+ <ref name="integer"/>
1371
+ </attribute>
1372
+ </optional>
1373
+ <optional>
1374
+ <attribute name="location">
1375
+ <choice>
1376
+ <value>w</value>
1377
+ <value>nw</value>
1378
+ <value>n</value>
1379
+ <value>ne</value>
1380
+ <value>e</value>
1381
+ <value>se</value>
1382
+ <value>s</value>
1383
+ <value>sw</value>
1384
+ </choice>
1385
+ </attribute>
1386
+ </optional>
1387
+ <optional>
1388
+ <attribute name="crossout">
1389
+ <list>
1390
+ <zeroOrMore>
1391
+ <choice>
1392
+ <value>none</value>
1393
+ <value>updiagonalstrike</value>
1394
+ <value>downdiagonalstrike</value>
1395
+ <value>verticalstrike</value>
1396
+ <value>horizontalstrike</value>
1397
+ </choice>
1398
+ </zeroOrMore>
1399
+ </list>
1400
+ </attribute>
1401
+ </optional>
1402
+ <optional>
1403
+ <attribute name="scriptsizemultiplier">
1404
+ <ref name="number"/>
1405
+ </attribute>
1406
+ </optional>
1407
+ </define>
1408
+ <define name="mscarry">
1409
+ <element name="mscarry">
1410
+ <ref name="mscarry.attributes"/>
1411
+ <zeroOrMore>
1412
+ <ref name="MsrowExpression"/>
1413
+ </zeroOrMore>
1414
+ </element>
1415
+ </define>
1416
+ <define name="mscarry.attributes">
1417
+ <ref name="MathMLPGlobalAttributes"/>
1418
+ <optional>
1419
+ <attribute name="location">
1420
+ <choice>
1421
+ <value>w</value>
1422
+ <value>nw</value>
1423
+ <value>n</value>
1424
+ <value>ne</value>
1425
+ <value>e</value>
1426
+ <value>se</value>
1427
+ <value>s</value>
1428
+ <value>sw</value>
1429
+ </choice>
1430
+ </attribute>
1431
+ </optional>
1432
+ <optional>
1433
+ <attribute name="crossout">
1434
+ <list>
1435
+ <zeroOrMore>
1436
+ <choice>
1437
+ <value>none</value>
1438
+ <value>updiagonalstrike</value>
1439
+ <value>downdiagonalstrike</value>
1440
+ <value>verticalstrike</value>
1441
+ <value>horizontalstrike</value>
1442
+ </choice>
1443
+ </zeroOrMore>
1444
+ </list>
1445
+ </attribute>
1446
+ </optional>
1447
+ </define>
1448
+ </grammar>