metanorma-generic 3.4.2 → 3.4.3

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.
@@ -1,36 +1,63 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <!--
3
- This is the Mathematical Markup Language (MathML) 3.0, an XML
4
- application for describing mathematical notation and capturing
5
- both its structure and content.
6
-
7
- Copyright 1998-2014 W3C (MIT, ERCIM, Keio, Beihang)
3
+ MathML 4 (Presentation)
4
+ #######################
5
+ -->
6
+ <!--
7
+ Copyright 1998-2026 W3C (MIT, ERCIM, Keio, Beihang)
8
8
 
9
9
  Use and distribution of this code are permitted under the terms
10
10
  W3C Software Notice and License
11
11
  http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
12
12
  -->
13
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
- <define name="MathExpression" combine="choice">
15
- <ref name="PresentationExpression"/>
16
- </define>
17
- <define name="ImpliedMrow">
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">
18
40
  <zeroOrMore>
19
- <ref name="MathExpression"/>
41
+ <ref name="NonMathMLAtt"/>
20
42
  </zeroOrMore>
43
+ <optional>
44
+ <attribute name="xref"/>
45
+ </optional>
46
+ <optional>
47
+ <attribute name="href">
48
+ <data type="anyURI"/>
49
+ </attribute>
50
+ </optional>
21
51
  </define>
22
- <define name="TableRowExpression">
23
- <choice>
24
- <ref name="mtr"/>
25
- <ref name="mlabeledtr"/>
26
- </choice>
52
+ <define name="MathMalignExpression" combine="choice">
53
+ <ref name="MalignExpression"/>
27
54
  </define>
28
- <define name="TableCellExpression">
29
- <ref name="mtd"/>
55
+ <define name="MathExpression" combine="choice">
56
+ <ref name="PresentationExpression"/>
30
57
  </define>
31
58
  <define name="MstackExpression">
32
59
  <choice>
33
- <ref name="MathExpression"/>
60
+ <ref name="MathMalignExpression"/>
34
61
  <ref name="mscarries"/>
35
62
  <ref name="msline"/>
36
63
  <ref name="msrow"/>
@@ -39,25 +66,10 @@
39
66
  </define>
40
67
  <define name="MsrowExpression">
41
68
  <choice>
42
- <ref name="MathExpression"/>
69
+ <ref name="MathMalignExpression"/>
43
70
  <ref name="none"/>
44
71
  </choice>
45
72
  </define>
46
- <define name="MultiScriptExpression">
47
- <choice>
48
- <ref name="MathExpression"/>
49
- <ref name="none"/>
50
- </choice>
51
- <choice>
52
- <ref name="MathExpression"/>
53
- <ref name="none"/>
54
- </choice>
55
- </define>
56
- <define name="mpadded-length">
57
- <data type="string">
58
- <param name="pattern">\s*([\+\-]?[0-9]*([0-9]\.?|\.[0-9])[0-9]*\s*((%?\s*(height|depth|width)?)|e[mx]|in|cm|mm|p[xtc]|((negative)?((very){0,2}thi(n|ck)|medium)mathspace))?)\s*</param>
59
- </data>
60
- </define>
61
73
  <define name="linestyle">
62
74
  <choice>
63
75
  <value>none</value>
@@ -117,177 +129,16 @@
117
129
  <param name="pattern">\s*\S\s*</param>
118
130
  </data>
119
131
  </define>
120
- <define name="color">
121
- <data type="string">
122
- <param name="pattern">\s*((#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?)|[aA][qQ][uU][aA]|[bB][lL][aA][cC][kK]|[bB][lL][uU][eE]|[fF][uU][cC][hH][sS][iI][aA]|[gG][rR][aA][yY]|[gG][rR][eE][eE][nN]|[lL][iI][mM][eE]|[mM][aA][rR][oO][oO][nN]|[nN][aA][vV][yY]|[oO][lL][iI][vV][eE]|[pP][uU][rR][pP][lL][eE]|[rR][eE][dD]|[sS][iI][lL][vV][eE][rR]|[tT][eE][aA][lL]|[wW][hH][iI][tT][eE]|[yY][eE][lL][lL][oO][wW])\s*</param>
123
- </data>
124
- </define>
125
- <define name="group-alignment">
126
- <choice>
127
- <value>left</value>
128
- <value>center</value>
129
- <value>right</value>
130
- <value>decimalpoint</value>
131
- </choice>
132
- </define>
133
- <define name="group-alignment-list">
134
- <list>
135
- <oneOrMore>
136
- <ref name="group-alignment"/>
137
- </oneOrMore>
138
- </list>
139
- </define>
140
- <define name="group-alignment-list-list">
141
- <data type="string">
142
- <param name="pattern">(\s*\{\s*(left|center|right|decimalpoint)(\s+(left|center|right|decimalpoint))*\})*\s*</param>
143
- </data>
144
- </define>
145
132
  <define name="positive-integer">
146
133
  <data type="positiveInteger"/>
147
134
  </define>
148
- <define name="TokenExpression">
149
- <choice>
150
- <ref name="mi"/>
151
- <ref name="mn"/>
152
- <ref name="mo"/>
153
- <ref name="mtext"/>
154
- <ref name="mspace"/>
155
- <ref name="ms"/>
156
- </choice>
157
- </define>
158
- <define name="token.content">
135
+ <define name="token.content" combine="choice">
159
136
  <choice>
160
137
  <ref name="mglyph"/>
161
- <ref name="malignmark"/>
162
138
  <text/>
163
139
  </choice>
164
140
  </define>
165
- <define name="mi">
166
- <element name="mi">
167
- <ref name="mi.attributes"/>
168
- <zeroOrMore>
169
- <ref name="token.content"/>
170
- </zeroOrMore>
171
- </element>
172
- </define>
173
- <define name="mi.attributes">
174
- <ref name="CommonAtt"/>
175
- <ref name="CommonPresAtt"/>
176
- <ref name="TokenAtt"/>
177
- </define>
178
- <define name="mn">
179
- <element name="mn">
180
- <ref name="mn.attributes"/>
181
- <zeroOrMore>
182
- <ref name="token.content"/>
183
- </zeroOrMore>
184
- </element>
185
- </define>
186
- <define name="mn.attributes">
187
- <ref name="CommonAtt"/>
188
- <ref name="CommonPresAtt"/>
189
- <ref name="TokenAtt"/>
190
- </define>
191
- <define name="mo">
192
- <element name="mo">
193
- <ref name="mo.attributes"/>
194
- <zeroOrMore>
195
- <ref name="token.content"/>
196
- </zeroOrMore>
197
- </element>
198
- </define>
199
- <define name="mo.attributes">
200
- <ref name="CommonAtt"/>
201
- <ref name="CommonPresAtt"/>
202
- <ref name="TokenAtt"/>
203
- <optional>
204
- <attribute name="form">
205
- <choice>
206
- <value>prefix</value>
207
- <value>infix</value>
208
- <value>postfix</value>
209
- </choice>
210
- </attribute>
211
- </optional>
212
- <optional>
213
- <attribute name="fence">
214
- <choice>
215
- <value>true</value>
216
- <value>false</value>
217
- </choice>
218
- </attribute>
219
- </optional>
220
- <optional>
221
- <attribute name="separator">
222
- <choice>
223
- <value>true</value>
224
- <value>false</value>
225
- </choice>
226
- </attribute>
227
- </optional>
228
- <optional>
229
- <attribute name="lspace">
230
- <ref name="length"/>
231
- </attribute>
232
- </optional>
233
- <optional>
234
- <attribute name="rspace">
235
- <ref name="length"/>
236
- </attribute>
237
- </optional>
238
- <optional>
239
- <attribute name="stretchy">
240
- <choice>
241
- <value>true</value>
242
- <value>false</value>
243
- </choice>
244
- </attribute>
245
- </optional>
246
- <optional>
247
- <attribute name="symmetric">
248
- <choice>
249
- <value>true</value>
250
- <value>false</value>
251
- </choice>
252
- </attribute>
253
- </optional>
254
- <optional>
255
- <attribute name="maxsize">
256
- <choice>
257
- <ref name="length"/>
258
- <value>infinity</value>
259
- </choice>
260
- </attribute>
261
- </optional>
262
- <optional>
263
- <attribute name="minsize">
264
- <ref name="length"/>
265
- </attribute>
266
- </optional>
267
- <optional>
268
- <attribute name="largeop">
269
- <choice>
270
- <value>true</value>
271
- <value>false</value>
272
- </choice>
273
- </attribute>
274
- </optional>
275
- <optional>
276
- <attribute name="movablelimits">
277
- <choice>
278
- <value>true</value>
279
- <value>false</value>
280
- </choice>
281
- </attribute>
282
- </optional>
283
- <optional>
284
- <attribute name="accent">
285
- <choice>
286
- <value>true</value>
287
- <value>false</value>
288
- </choice>
289
- </attribute>
290
- </optional>
141
+ <define name="mo.attributes" combine="interleave">
291
142
  <optional>
292
143
  <attribute name="linebreak">
293
144
  <choice>
@@ -301,7 +152,7 @@
301
152
  </optional>
302
153
  <optional>
303
154
  <attribute name="lineleading">
304
- <ref name="length"/>
155
+ <ref name="length-percentage"/>
305
156
  </attribute>
306
157
  </optional>
307
158
  <optional>
@@ -330,7 +181,7 @@
330
181
  </optional>
331
182
  <optional>
332
183
  <attribute name="indentshift">
333
- <ref name="length"/>
184
+ <ref name="length-percentage"/>
334
185
  </attribute>
335
186
  </optional>
336
187
  <optional>
@@ -353,7 +204,7 @@
353
204
  <optional>
354
205
  <attribute name="indentshiftfirst">
355
206
  <choice>
356
- <ref name="length"/>
207
+ <ref name="length-percentage"/>
357
208
  <value>indentshift</value>
358
209
  </choice>
359
210
  </attribute>
@@ -373,50 +224,24 @@
373
224
  <optional>
374
225
  <attribute name="indentshiftlast">
375
226
  <choice>
376
- <ref name="length"/>
227
+ <ref name="length-percentage"/>
377
228
  <value>indentshift</value>
378
229
  </choice>
379
230
  </attribute>
380
231
  </optional>
381
- </define>
382
- <define name="mtext">
383
- <element name="mtext">
384
- <ref name="mtext.attributes"/>
385
- <zeroOrMore>
386
- <ref name="token.content"/>
387
- </zeroOrMore>
388
- </element>
389
- </define>
390
- <define name="mtext.attributes">
391
- <ref name="CommonAtt"/>
392
- <ref name="CommonPresAtt"/>
393
- <ref name="TokenAtt"/>
394
- </define>
395
- <define name="mspace">
396
- <element name="mspace">
397
- <ref name="mspace.attributes"/>
398
- <empty/>
399
- </element>
400
- </define>
401
- <define name="mspace.attributes">
402
- <ref name="CommonAtt"/>
403
- <ref name="CommonPresAtt"/>
404
- <ref name="TokenAtt"/>
405
- <optional>
406
- <attribute name="width">
407
- <ref name="length"/>
408
- </attribute>
409
- </optional>
410
- <optional>
411
- <attribute name="height">
412
- <ref name="length"/>
413
- </attribute>
414
- </optional>
415
232
  <optional>
416
- <attribute name="depth">
417
- <ref name="length"/>
233
+ <attribute name="accent">
234
+ <ref name="mathml-boolean"/>
418
235
  </attribute>
419
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">
420
245
  <optional>
421
246
  <attribute name="linebreak">
422
247
  <choice>
@@ -442,7 +267,7 @@
442
267
  </optional>
443
268
  <optional>
444
269
  <attribute name="indentshift">
445
- <ref name="length"/>
270
+ <ref name="length-percentage"/>
446
271
  </attribute>
447
272
  </optional>
448
273
  <optional>
@@ -465,7 +290,7 @@
465
290
  <optional>
466
291
  <attribute name="indentshiftfirst">
467
292
  <choice>
468
- <ref name="length"/>
293
+ <ref name="length-percentage"/>
469
294
  <value>indentshift</value>
470
295
  </choice>
471
296
  </attribute>
@@ -485,24 +310,13 @@
485
310
  <optional>
486
311
  <attribute name="indentshiftlast">
487
312
  <choice>
488
- <ref name="length"/>
313
+ <ref name="length-percentage"/>
489
314
  <value>indentshift</value>
490
315
  </choice>
491
316
  </attribute>
492
317
  </optional>
493
318
  </define>
494
- <define name="ms">
495
- <element name="ms">
496
- <ref name="ms.attributes"/>
497
- <zeroOrMore>
498
- <ref name="token.content"/>
499
- </zeroOrMore>
500
- </element>
501
- </define>
502
- <define name="ms.attributes">
503
- <ref name="CommonAtt"/>
504
- <ref name="CommonPresAtt"/>
505
- <ref name="TokenAtt"/>
319
+ <define name="ms.attributes" combine="interleave">
506
320
  <optional>
507
321
  <attribute name="lquote"/>
508
322
  </optional>
@@ -513,13 +327,11 @@
513
327
  <define name="mglyph">
514
328
  <element name="mglyph">
515
329
  <ref name="mglyph.attributes"/>
516
- <ref name="mglyph.deprecatedattributes"/>
517
330
  <empty/>
518
331
  </element>
519
332
  </define>
520
333
  <define name="mglyph.attributes">
521
- <ref name="CommonAtt"/>
522
- <ref name="CommonPresAtt"/>
334
+ <ref name="MathMLPGlobalAttributes"/>
523
335
  <optional>
524
336
  <attribute name="src">
525
337
  <data type="anyURI"/>
@@ -527,65 +339,23 @@
527
339
  </optional>
528
340
  <optional>
529
341
  <attribute name="width">
530
- <ref name="length"/>
342
+ <ref name="length-percentage"/>
531
343
  </attribute>
532
344
  </optional>
533
345
  <optional>
534
346
  <attribute name="height">
535
- <ref name="length"/>
347
+ <ref name="length-percentage"/>
536
348
  </attribute>
537
349
  </optional>
538
350
  <optional>
539
351
  <attribute name="valign">
540
- <ref name="length"/>
352
+ <ref name="length-percentage"/>
541
353
  </attribute>
542
354
  </optional>
543
355
  <optional>
544
356
  <attribute name="alt"/>
545
357
  </optional>
546
358
  </define>
547
- <define name="mglyph.deprecatedattributes">
548
- <optional>
549
- <attribute name="index">
550
- <ref name="integer"/>
551
- </attribute>
552
- </optional>
553
- <optional>
554
- <attribute name="mathvariant">
555
- <choice>
556
- <value>normal</value>
557
- <value>bold</value>
558
- <value>italic</value>
559
- <value>bold-italic</value>
560
- <value>double-struck</value>
561
- <value>bold-fraktur</value>
562
- <value>script</value>
563
- <value>bold-script</value>
564
- <value>fraktur</value>
565
- <value>sans-serif</value>
566
- <value>bold-sans-serif</value>
567
- <value>sans-serif-italic</value>
568
- <value>sans-serif-bold-italic</value>
569
- <value>monospace</value>
570
- <value>initial</value>
571
- <value>tailed</value>
572
- <value>looped</value>
573
- <value>stretched</value>
574
- </choice>
575
- </attribute>
576
- </optional>
577
- <optional>
578
- <attribute name="mathsize">
579
- <choice>
580
- <value>small</value>
581
- <value>normal</value>
582
- <value>big</value>
583
- <ref name="length"/>
584
- </choice>
585
- </attribute>
586
- </optional>
587
- <ref name="DeprecatedTokenAtt"/>
588
- </define>
589
359
  <define name="msline">
590
360
  <element name="msline">
591
361
  <ref name="msline.attributes"/>
@@ -593,8 +363,7 @@
593
363
  </element>
594
364
  </define>
595
365
  <define name="msline.attributes">
596
- <ref name="CommonAtt"/>
597
- <ref name="CommonPresAtt"/>
366
+ <ref name="MathMLPGlobalAttributes"/>
598
367
  <optional>
599
368
  <attribute name="position">
600
369
  <ref name="integer"/>
@@ -607,18 +376,18 @@
607
376
  </optional>
608
377
  <optional>
609
378
  <attribute name="leftoverhang">
610
- <ref name="length"/>
379
+ <ref name="length-percentage"/>
611
380
  </attribute>
612
381
  </optional>
613
382
  <optional>
614
383
  <attribute name="rightoverhang">
615
- <ref name="length"/>
384
+ <ref name="length-percentage"/>
616
385
  </attribute>
617
386
  </optional>
618
387
  <optional>
619
388
  <attribute name="mslinethickness">
620
389
  <choice>
621
- <ref name="length"/>
390
+ <ref name="length-percentage"/>
622
391
  <value>thin</value>
623
392
  <value>medium</value>
624
393
  <value>thick</value>
@@ -626,125 +395,6 @@
626
395
  </attribute>
627
396
  </optional>
628
397
  </define>
629
- <define name="none">
630
- <element name="none">
631
- <ref name="none.attributes"/>
632
- <empty/>
633
- </element>
634
- </define>
635
- <define name="none.attributes">
636
- <ref name="CommonAtt"/>
637
- <ref name="CommonPresAtt"/>
638
- </define>
639
- <define name="mprescripts">
640
- <element name="mprescripts">
641
- <ref name="mprescripts.attributes"/>
642
- <empty/>
643
- </element>
644
- </define>
645
- <define name="mprescripts.attributes">
646
- <ref name="CommonAtt"/>
647
- <ref name="CommonPresAtt"/>
648
- </define>
649
- <define name="CommonPresAtt">
650
- <optional>
651
- <attribute name="mathcolor">
652
- <ref name="color"/>
653
- </attribute>
654
- </optional>
655
- <optional>
656
- <attribute name="mathbackground">
657
- <choice>
658
- <ref name="color"/>
659
- <value>transparent</value>
660
- </choice>
661
- </attribute>
662
- </optional>
663
- </define>
664
- <define name="TokenAtt">
665
- <optional>
666
- <attribute name="mathvariant">
667
- <choice>
668
- <value>normal</value>
669
- <value>bold</value>
670
- <value>italic</value>
671
- <value>bold-italic</value>
672
- <value>double-struck</value>
673
- <value>bold-fraktur</value>
674
- <value>script</value>
675
- <value>bold-script</value>
676
- <value>fraktur</value>
677
- <value>sans-serif</value>
678
- <value>bold-sans-serif</value>
679
- <value>sans-serif-italic</value>
680
- <value>sans-serif-bold-italic</value>
681
- <value>monospace</value>
682
- <value>initial</value>
683
- <value>tailed</value>
684
- <value>looped</value>
685
- <value>stretched</value>
686
- </choice>
687
- </attribute>
688
- </optional>
689
- <optional>
690
- <attribute name="mathsize">
691
- <choice>
692
- <value>small</value>
693
- <value>normal</value>
694
- <value>big</value>
695
- <ref name="length"/>
696
- </choice>
697
- </attribute>
698
- </optional>
699
- <optional>
700
- <attribute name="dir">
701
- <choice>
702
- <value>ltr</value>
703
- <value>rtl</value>
704
- </choice>
705
- </attribute>
706
- </optional>
707
- <ref name="DeprecatedTokenAtt"/>
708
- </define>
709
- <define name="DeprecatedTokenAtt">
710
- <optional>
711
- <attribute name="fontfamily"/>
712
- </optional>
713
- <optional>
714
- <attribute name="fontweight">
715
- <choice>
716
- <value>normal</value>
717
- <value>bold</value>
718
- </choice>
719
- </attribute>
720
- </optional>
721
- <optional>
722
- <attribute name="fontstyle">
723
- <choice>
724
- <value>normal</value>
725
- <value>italic</value>
726
- </choice>
727
- </attribute>
728
- </optional>
729
- <optional>
730
- <attribute name="fontsize">
731
- <ref name="length"/>
732
- </attribute>
733
- </optional>
734
- <optional>
735
- <attribute name="color">
736
- <ref name="color"/>
737
- </attribute>
738
- </optional>
739
- <optional>
740
- <attribute name="background">
741
- <choice>
742
- <ref name="color"/>
743
- <value>transparent</value>
744
- </choice>
745
- </attribute>
746
- </optional>
747
- </define>
748
398
  <define name="MalignExpression">
749
399
  <choice>
750
400
  <ref name="maligngroup"/>
@@ -758,16 +408,7 @@
758
408
  </element>
759
409
  </define>
760
410
  <define name="malignmark.attributes">
761
- <ref name="CommonAtt"/>
762
- <ref name="CommonPresAtt"/>
763
- <optional>
764
- <attribute name="edge">
765
- <choice>
766
- <value>left</value>
767
- <value>right</value>
768
- </choice>
769
- </attribute>
770
- </optional>
411
+ <ref name="MathMLPGlobalAttributes"/>
771
412
  </define>
772
413
  <define name="maligngroup">
773
414
  <element name="maligngroup">
@@ -776,23 +417,11 @@
776
417
  </element>
777
418
  </define>
778
419
  <define name="maligngroup.attributes">
779
- <ref name="CommonAtt"/>
780
- <ref name="CommonPresAtt"/>
781
- <optional>
782
- <attribute name="groupalign">
783
- <choice>
784
- <value>left</value>
785
- <value>center</value>
786
- <value>right</value>
787
- <value>decimalpoint</value>
788
- </choice>
789
- </attribute>
790
- </optional>
420
+ <ref name="MathMLPGlobalAttributes"/>
791
421
  </define>
792
422
  <define name="PresentationExpression">
793
423
  <choice>
794
424
  <ref name="TokenExpression"/>
795
- <ref name="MalignExpression"/>
796
425
  <ref name="mrow"/>
797
426
  <ref name="mfrac"/>
798
427
  <ref name="msqrt"/>
@@ -816,46 +445,10 @@
816
445
  <ref name="maction"/>
817
446
  </choice>
818
447
  </define>
819
- <define name="mrow">
820
- <element name="mrow">
821
- <ref name="mrow.attributes"/>
822
- <zeroOrMore>
823
- <ref name="MathExpression"/>
824
- </zeroOrMore>
825
- </element>
826
- </define>
827
- <define name="mrow.attributes">
828
- <ref name="CommonAtt"/>
829
- <ref name="CommonPresAtt"/>
830
- <optional>
831
- <attribute name="dir">
832
- <choice>
833
- <value>ltr</value>
834
- <value>rtl</value>
835
- </choice>
836
- </attribute>
837
- </optional>
838
- </define>
839
- <define name="mfrac">
840
- <element name="mfrac">
841
- <ref name="mfrac.attributes"/>
842
- <ref name="MathExpression"/>
843
- <ref name="MathExpression"/>
844
- </element>
448
+ <define name="mrow.attributes" combine="interleave">
449
+ <ref name="MathMLlink.attributes"/>
845
450
  </define>
846
- <define name="mfrac.attributes">
847
- <ref name="CommonAtt"/>
848
- <ref name="CommonPresAtt"/>
849
- <optional>
850
- <attribute name="linethickness">
851
- <choice>
852
- <ref name="length"/>
853
- <value>thin</value>
854
- <value>medium</value>
855
- <value>thick</value>
856
- </choice>
857
- </attribute>
858
- </optional>
451
+ <define name="mfrac.attributes" combine="interleave">
859
452
  <optional>
860
453
  <attribute name="numalign">
861
454
  <choice>
@@ -876,61 +469,15 @@
876
469
  </optional>
877
470
  <optional>
878
471
  <attribute name="bevelled">
879
- <choice>
880
- <value>true</value>
881
- <value>false</value>
882
- </choice>
472
+ <ref name="mathml-boolean"/>
883
473
  </attribute>
884
474
  </optional>
885
475
  </define>
886
- <define name="msqrt">
887
- <element name="msqrt">
888
- <ref name="msqrt.attributes"/>
889
- <ref name="ImpliedMrow"/>
890
- </element>
891
- </define>
892
- <define name="msqrt.attributes">
893
- <ref name="CommonAtt"/>
894
- <ref name="CommonPresAtt"/>
895
- </define>
896
- <define name="mroot">
897
- <element name="mroot">
898
- <ref name="mroot.attributes"/>
899
- <ref name="MathExpression"/>
900
- <ref name="MathExpression"/>
901
- </element>
902
- </define>
903
- <define name="mroot.attributes">
904
- <ref name="CommonAtt"/>
905
- <ref name="CommonPresAtt"/>
906
- </define>
907
- <define name="mstyle">
908
- <element name="mstyle">
909
- <ref name="mstyle.attributes"/>
910
- <ref name="ImpliedMrow"/>
911
- </element>
912
- </define>
913
- <define name="mstyle.attributes">
914
- <ref name="CommonAtt"/>
915
- <ref name="CommonPresAtt"/>
476
+ <define name="mstyle.attributes" combine="interleave">
916
477
  <ref name="mstyle.specificattributes"/>
917
478
  <ref name="mstyle.generalattributes"/>
918
- <ref name="mstyle.deprecatedattributes"/>
919
479
  </define>
920
480
  <define name="mstyle.specificattributes">
921
- <optional>
922
- <attribute name="scriptlevel">
923
- <ref name="integer"/>
924
- </attribute>
925
- </optional>
926
- <optional>
927
- <attribute name="displaystyle">
928
- <choice>
929
- <value>true</value>
930
- <value>false</value>
931
- </choice>
932
- </attribute>
933
- </optional>
934
481
  <optional>
935
482
  <attribute name="scriptsizemultiplier">
936
483
  <ref name="number"/>
@@ -938,7 +485,7 @@
938
485
  </optional>
939
486
  <optional>
940
487
  <attribute name="scriptminsize">
941
- <ref name="length"/>
488
+ <ref name="length-percentage"/>
942
489
  </attribute>
943
490
  </optional>
944
491
  <optional>
@@ -956,21 +503,24 @@
956
503
  </attribute>
957
504
  </optional>
958
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
+ -->
959
515
  <define name="mstyle.generalattributes">
960
516
  <optional>
961
517
  <attribute name="accent">
962
- <choice>
963
- <value>true</value>
964
- <value>false</value>
965
- </choice>
518
+ <ref name="mathml-boolean"/>
966
519
  </attribute>
967
520
  </optional>
968
521
  <optional>
969
522
  <attribute name="accentunder">
970
- <choice>
971
- <value>true</value>
972
- <value>false</value>
973
- </choice>
523
+ <ref name="mathml-boolean"/>
974
524
  </attribute>
975
525
  </optional>
976
526
  <optional>
@@ -979,27 +529,12 @@
979
529
  <value>left</value>
980
530
  <value>right</value>
981
531
  <value>center</value>
982
- </choice>
983
- </attribute>
984
- </optional>
985
- <optional>
986
- <attribute name="alignmentscope">
987
- <list>
988
- <oneOrMore>
989
- <choice>
990
- <value>true</value>
991
- <value>false</value>
992
- </choice>
993
- </oneOrMore>
994
- </list>
532
+ </choice>
995
533
  </attribute>
996
534
  </optional>
997
535
  <optional>
998
536
  <attribute name="bevelled">
999
- <choice>
1000
- <value>true</value>
1001
- <value>false</value>
1002
- </choice>
537
+ <ref name="mathml-boolean"/>
1003
538
  </attribute>
1004
539
  </optional>
1005
540
  <optional>
@@ -1014,7 +549,7 @@
1014
549
  <optional>
1015
550
  <attribute name="charspacing">
1016
551
  <choice>
1017
- <ref name="length"/>
552
+ <ref name="length-percentage"/>
1018
553
  <value>loose</value>
1019
554
  <value>medium</value>
1020
555
  <value>tight</value>
@@ -1046,7 +581,7 @@
1046
581
  <attribute name="columnspacing">
1047
582
  <list>
1048
583
  <oneOrMore>
1049
- <ref name="length"/>
584
+ <ref name="length-percentage"/>
1050
585
  </oneOrMore>
1051
586
  </list>
1052
587
  </attribute>
@@ -1062,7 +597,7 @@
1062
597
  <oneOrMore>
1063
598
  <choice>
1064
599
  <value>auto</value>
1065
- <ref name="length"/>
600
+ <ref name="length-percentage"/>
1066
601
  <value>fit</value>
1067
602
  </choice>
1068
603
  </oneOrMore>
@@ -1095,47 +630,17 @@
1095
630
  </optional>
1096
631
  <optional>
1097
632
  <attribute name="depth">
1098
- <ref name="length"/>
1099
- </attribute>
1100
- </optional>
1101
- <optional>
1102
- <attribute name="dir">
1103
- <choice>
1104
- <value>ltr</value>
1105
- <value>rtl</value>
1106
- </choice>
1107
- </attribute>
1108
- </optional>
1109
- <optional>
1110
- <attribute name="edge">
1111
- <choice>
1112
- <value>left</value>
1113
- <value>right</value>
1114
- </choice>
633
+ <ref name="length-percentage"/>
1115
634
  </attribute>
1116
635
  </optional>
1117
636
  <optional>
1118
637
  <attribute name="equalcolumns">
1119
- <choice>
1120
- <value>true</value>
1121
- <value>false</value>
1122
- </choice>
638
+ <ref name="mathml-boolean"/>
1123
639
  </attribute>
1124
640
  </optional>
1125
641
  <optional>
1126
642
  <attribute name="equalrows">
1127
- <choice>
1128
- <value>true</value>
1129
- <value>false</value>
1130
- </choice>
1131
- </attribute>
1132
- </optional>
1133
- <optional>
1134
- <attribute name="fence">
1135
- <choice>
1136
- <value>true</value>
1137
- <value>false</value>
1138
- </choice>
643
+ <ref name="mathml-boolean"/>
1139
644
  </attribute>
1140
645
  </optional>
1141
646
  <optional>
@@ -1155,19 +660,14 @@
1155
660
  <optional>
1156
661
  <attribute name="framespacing">
1157
662
  <list>
1158
- <ref name="length"/>
1159
- <ref name="length"/>
663
+ <ref name="length-percentage"/>
664
+ <ref name="length-percentage"/>
1160
665
  </list>
1161
666
  </attribute>
1162
667
  </optional>
1163
- <optional>
1164
- <attribute name="groupalign">
1165
- <ref name="group-alignment-list-list"/>
1166
- </attribute>
1167
- </optional>
1168
668
  <optional>
1169
669
  <attribute name="height">
1170
- <ref name="length"/>
670
+ <ref name="length-percentage"/>
1171
671
  </attribute>
1172
672
  </optional>
1173
673
  <optional>
@@ -1207,13 +707,13 @@
1207
707
  </optional>
1208
708
  <optional>
1209
709
  <attribute name="indentshift">
1210
- <ref name="length"/>
710
+ <ref name="length-percentage"/>
1211
711
  </attribute>
1212
712
  </optional>
1213
713
  <optional>
1214
714
  <attribute name="indentshiftfirst">
1215
715
  <choice>
1216
- <ref name="length"/>
716
+ <ref name="length-percentage"/>
1217
717
  <value>indentshift</value>
1218
718
  </choice>
1219
719
  </attribute>
@@ -1221,7 +721,7 @@
1221
721
  <optional>
1222
722
  <attribute name="indentshiftlast">
1223
723
  <choice>
1224
- <ref name="length"/>
724
+ <ref name="length-percentage"/>
1225
725
  <value>indentshift</value>
1226
726
  </choice>
1227
727
  </attribute>
@@ -1233,15 +733,12 @@
1233
733
  </optional>
1234
734
  <optional>
1235
735
  <attribute name="largeop">
1236
- <choice>
1237
- <value>true</value>
1238
- <value>false</value>
1239
- </choice>
736
+ <ref name="mathml-boolean"/>
1240
737
  </attribute>
1241
738
  </optional>
1242
739
  <optional>
1243
740
  <attribute name="leftoverhang">
1244
- <ref name="length"/>
741
+ <ref name="length-percentage"/>
1245
742
  </attribute>
1246
743
  </optional>
1247
744
  <optional>
@@ -1275,13 +772,13 @@
1275
772
  </optional>
1276
773
  <optional>
1277
774
  <attribute name="lineleading">
1278
- <ref name="length"/>
775
+ <ref name="length-percentage"/>
1279
776
  </attribute>
1280
777
  </optional>
1281
778
  <optional>
1282
779
  <attribute name="linethickness">
1283
780
  <choice>
1284
- <ref name="length"/>
781
+ <ref name="length-percentage"/>
1285
782
  <value>thin</value>
1286
783
  <value>medium</value>
1287
784
  <value>thick</value>
@@ -1323,73 +820,28 @@
1323
820
  </optional>
1324
821
  <optional>
1325
822
  <attribute name="lspace">
1326
- <ref name="length"/>
1327
- </attribute>
1328
- </optional>
1329
- <optional>
1330
- <attribute name="mathsize">
1331
- <choice>
1332
- <value>small</value>
1333
- <value>normal</value>
1334
- <value>big</value>
1335
- <ref name="length"/>
1336
- </choice>
1337
- </attribute>
1338
- </optional>
1339
- <optional>
1340
- <attribute name="mathvariant">
1341
- <choice>
1342
- <value>normal</value>
1343
- <value>bold</value>
1344
- <value>italic</value>
1345
- <value>bold-italic</value>
1346
- <value>double-struck</value>
1347
- <value>bold-fraktur</value>
1348
- <value>script</value>
1349
- <value>bold-script</value>
1350
- <value>fraktur</value>
1351
- <value>sans-serif</value>
1352
- <value>bold-sans-serif</value>
1353
- <value>sans-serif-italic</value>
1354
- <value>sans-serif-bold-italic</value>
1355
- <value>monospace</value>
1356
- <value>initial</value>
1357
- <value>tailed</value>
1358
- <value>looped</value>
1359
- <value>stretched</value>
1360
- </choice>
1361
- </attribute>
1362
- </optional>
1363
- <optional>
1364
- <attribute name="maxsize">
1365
- <choice>
1366
- <ref name="length"/>
1367
- <value>infinity</value>
1368
- </choice>
823
+ <ref name="length-percentage"/>
1369
824
  </attribute>
1370
825
  </optional>
1371
826
  <optional>
1372
827
  <attribute name="minlabelspacing">
1373
- <ref name="length"/>
828
+ <ref name="length-percentage"/>
1374
829
  </attribute>
1375
830
  </optional>
1376
831
  <optional>
1377
832
  <attribute name="minsize">
1378
- <ref name="length"/>
833
+ <ref name="length-percentage"/>
1379
834
  </attribute>
1380
835
  </optional>
1381
836
  <optional>
1382
837
  <attribute name="movablelimits">
1383
- <choice>
1384
- <value>true</value>
1385
- <value>false</value>
1386
- </choice>
838
+ <ref name="mathml-boolean"/>
1387
839
  </attribute>
1388
840
  </optional>
1389
841
  <optional>
1390
842
  <attribute name="mslinethickness">
1391
843
  <choice>
1392
- <ref name="length"/>
844
+ <ref name="length-percentage"/>
1393
845
  <value>thin</value>
1394
846
  <value>medium</value>
1395
847
  <value>thick</value>
@@ -1418,7 +870,7 @@
1418
870
  </optional>
1419
871
  <optional>
1420
872
  <attribute name="rightoverhang">
1421
- <ref name="length"/>
873
+ <ref name="length-percentage"/>
1422
874
  </attribute>
1423
875
  </optional>
1424
876
  <optional>
@@ -1443,7 +895,7 @@
1443
895
  <attribute name="rowspacing">
1444
896
  <list>
1445
897
  <oneOrMore>
1446
- <ref name="length"/>
898
+ <ref name="length-percentage"/>
1447
899
  </oneOrMore>
1448
900
  </list>
1449
901
  </attribute>
@@ -1458,7 +910,7 @@
1458
910
  </optional>
1459
911
  <optional>
1460
912
  <attribute name="rspace">
1461
- <ref name="length"/>
913
+ <ref name="length-percentage"/>
1462
914
  </attribute>
1463
915
  </optional>
1464
916
  <optional>
@@ -1466,14 +918,6 @@
1466
918
  <ref name="positive-integer"/>
1467
919
  </attribute>
1468
920
  </optional>
1469
- <optional>
1470
- <attribute name="separator">
1471
- <choice>
1472
- <value>true</value>
1473
- <value>false</value>
1474
- </choice>
1475
- </attribute>
1476
- </optional>
1477
921
  <optional>
1478
922
  <attribute name="separators"/>
1479
923
  </optional>
@@ -1504,154 +948,62 @@
1504
948
  </optional>
1505
949
  <optional>
1506
950
  <attribute name="stretchy">
1507
- <choice>
1508
- <value>true</value>
1509
- <value>false</value>
1510
- </choice>
951
+ <ref name="mathml-boolean"/>
1511
952
  </attribute>
1512
953
  </optional>
1513
954
  <optional>
1514
955
  <attribute name="subscriptshift">
1515
- <ref name="length"/>
956
+ <ref name="length-percentage"/>
1516
957
  </attribute>
1517
958
  </optional>
1518
959
  <optional>
1519
960
  <attribute name="superscriptshift">
1520
- <ref name="length"/>
961
+ <ref name="length-percentage"/>
1521
962
  </attribute>
1522
963
  </optional>
1523
964
  <optional>
1524
965
  <attribute name="symmetric">
1525
- <choice>
1526
- <value>true</value>
1527
- <value>false</value>
1528
- </choice>
966
+ <ref name="mathml-boolean"/>
1529
967
  </attribute>
1530
968
  </optional>
1531
969
  <optional>
1532
970
  <attribute name="valign">
1533
- <ref name="length"/>
971
+ <ref name="length-percentage"/>
1534
972
  </attribute>
1535
973
  </optional>
1536
974
  <optional>
1537
975
  <attribute name="width">
1538
- <ref name="length"/>
1539
- </attribute>
1540
- </optional>
1541
- </define>
1542
- <define name="mstyle.deprecatedattributes">
1543
- <ref name="DeprecatedTokenAtt"/>
1544
- <optional>
1545
- <attribute name="veryverythinmathspace">
1546
- <ref name="length"/>
1547
- </attribute>
1548
- </optional>
1549
- <optional>
1550
- <attribute name="verythinmathspace">
1551
- <ref name="length"/>
1552
- </attribute>
1553
- </optional>
1554
- <optional>
1555
- <attribute name="thinmathspace">
1556
- <ref name="length"/>
1557
- </attribute>
1558
- </optional>
1559
- <optional>
1560
- <attribute name="mediummathspace">
1561
- <ref name="length"/>
1562
- </attribute>
1563
- </optional>
1564
- <optional>
1565
- <attribute name="thickmathspace">
1566
- <ref name="length"/>
1567
- </attribute>
1568
- </optional>
1569
- <optional>
1570
- <attribute name="verythickmathspace">
1571
- <ref name="length"/>
1572
- </attribute>
1573
- </optional>
1574
- <optional>
1575
- <attribute name="veryverythickmathspace">
1576
- <ref name="length"/>
976
+ <ref name="length-percentage"/>
1577
977
  </attribute>
1578
978
  </optional>
1579
979
  </define>
1580
- <define name="math.attributes" combine="interleave">
1581
- <ref name="CommonPresAtt"/>
1582
- </define>
1583
980
  <define name="math.attributes" combine="interleave">
1584
981
  <ref name="mstyle.specificattributes"/>
1585
982
  </define>
1586
983
  <define name="math.attributes" combine="interleave">
1587
984
  <ref name="mstyle.generalattributes"/>
1588
985
  </define>
1589
- <define name="merror">
1590
- <element name="merror">
1591
- <ref name="merror.attributes"/>
1592
- <ref name="ImpliedMrow"/>
1593
- </element>
1594
- </define>
1595
- <define name="merror.attributes">
1596
- <ref name="CommonAtt"/>
1597
- <ref name="CommonPresAtt"/>
1598
- </define>
1599
- <define name="mpadded">
1600
- <element name="mpadded">
1601
- <ref name="mpadded.attributes"/>
1602
- <ref name="ImpliedMrow"/>
1603
- </element>
1604
- </define>
1605
- <define name="mpadded.attributes">
1606
- <ref name="CommonAtt"/>
1607
- <ref name="CommonPresAtt"/>
1608
- <optional>
1609
- <attribute name="height">
1610
- <ref name="mpadded-length"/>
1611
- </attribute>
1612
- </optional>
1613
- <optional>
1614
- <attribute name="depth">
1615
- <ref name="mpadded-length"/>
1616
- </attribute>
1617
- </optional>
1618
- <optional>
1619
- <attribute name="width">
1620
- <ref name="mpadded-length"/>
1621
- </attribute>
1622
- </optional>
1623
- <optional>
1624
- <attribute name="lspace">
1625
- <ref name="mpadded-length"/>
1626
- </attribute>
1627
- </optional>
986
+ <define name="math.attributes" combine="interleave">
1628
987
  <optional>
1629
- <attribute name="voffset">
1630
- <ref name="mpadded-length"/>
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>
1631
996
  </attribute>
1632
997
  </optional>
1633
998
  </define>
1634
- <define name="mphantom">
1635
- <element name="mphantom">
1636
- <ref name="mphantom.attributes"/>
1637
- <ref name="ImpliedMrow"/>
1638
- </element>
1639
- </define>
1640
- <define name="mphantom.attributes">
1641
- <ref name="CommonAtt"/>
1642
- <ref name="CommonPresAtt"/>
1643
- </define>
1644
999
  <define name="mfenced">
1645
1000
  <element name="mfenced">
1646
1001
  <ref name="mfenced.attributes"/>
1647
- <zeroOrMore>
1648
- <ref name="MathExpression"/>
1649
- </zeroOrMore>
1002
+ <ref name="ImpliedMrow"/>
1650
1003
  </element>
1651
1004
  </define>
1652
1005
  <define name="mfenced.attributes">
1653
- <ref name="CommonAtt"/>
1654
- <ref name="CommonPresAtt"/>
1006
+ <ref name="MathMLPGlobalAttributes"/>
1655
1007
  <optional>
1656
1008
  <attribute name="open"/>
1657
1009
  </optional>
@@ -1669,84 +1021,12 @@
1669
1021
  </element>
1670
1022
  </define>
1671
1023
  <define name="menclose.attributes">
1672
- <ref name="CommonAtt"/>
1673
- <ref name="CommonPresAtt"/>
1024
+ <ref name="MathMLPGlobalAttributes"/>
1674
1025
  <optional>
1675
1026
  <attribute name="notation"/>
1676
1027
  </optional>
1677
1028
  </define>
1678
- <define name="msub">
1679
- <element name="msub">
1680
- <ref name="msub.attributes"/>
1681
- <ref name="MathExpression"/>
1682
- <ref name="MathExpression"/>
1683
- </element>
1684
- </define>
1685
- <define name="msub.attributes">
1686
- <ref name="CommonAtt"/>
1687
- <ref name="CommonPresAtt"/>
1688
- <optional>
1689
- <attribute name="subscriptshift">
1690
- <ref name="length"/>
1691
- </attribute>
1692
- </optional>
1693
- </define>
1694
- <define name="msup">
1695
- <element name="msup">
1696
- <ref name="msup.attributes"/>
1697
- <ref name="MathExpression"/>
1698
- <ref name="MathExpression"/>
1699
- </element>
1700
- </define>
1701
- <define name="msup.attributes">
1702
- <ref name="CommonAtt"/>
1703
- <ref name="CommonPresAtt"/>
1704
- <optional>
1705
- <attribute name="superscriptshift">
1706
- <ref name="length"/>
1707
- </attribute>
1708
- </optional>
1709
- </define>
1710
- <define name="msubsup">
1711
- <element name="msubsup">
1712
- <ref name="msubsup.attributes"/>
1713
- <ref name="MathExpression"/>
1714
- <ref name="MathExpression"/>
1715
- <ref name="MathExpression"/>
1716
- </element>
1717
- </define>
1718
- <define name="msubsup.attributes">
1719
- <ref name="CommonAtt"/>
1720
- <ref name="CommonPresAtt"/>
1721
- <optional>
1722
- <attribute name="subscriptshift">
1723
- <ref name="length"/>
1724
- </attribute>
1725
- </optional>
1726
- <optional>
1727
- <attribute name="superscriptshift">
1728
- <ref name="length"/>
1729
- </attribute>
1730
- </optional>
1731
- </define>
1732
- <define name="munder">
1733
- <element name="munder">
1734
- <ref name="munder.attributes"/>
1735
- <ref name="MathExpression"/>
1736
- <ref name="MathExpression"/>
1737
- </element>
1738
- </define>
1739
- <define name="munder.attributes">
1740
- <ref name="CommonAtt"/>
1741
- <ref name="CommonPresAtt"/>
1742
- <optional>
1743
- <attribute name="accentunder">
1744
- <choice>
1745
- <value>true</value>
1746
- <value>false</value>
1747
- </choice>
1748
- </attribute>
1749
- </optional>
1029
+ <define name="munder.attributes" combine="interleave">
1750
1030
  <optional>
1751
1031
  <attribute name="align">
1752
1032
  <choice>
@@ -1757,24 +1037,18 @@
1757
1037
  </attribute>
1758
1038
  </optional>
1759
1039
  </define>
1760
- <define name="mover">
1761
- <element name="mover">
1762
- <ref name="mover.attributes"/>
1763
- <ref name="MathExpression"/>
1764
- <ref name="MathExpression"/>
1765
- </element>
1766
- </define>
1767
- <define name="mover.attributes">
1768
- <ref name="CommonAtt"/>
1769
- <ref name="CommonPresAtt"/>
1040
+ <define name="mover.attributes" combine="interleave">
1770
1041
  <optional>
1771
- <attribute name="accent">
1042
+ <attribute name="align">
1772
1043
  <choice>
1773
- <value>true</value>
1774
- <value>false</value>
1044
+ <value>left</value>
1045
+ <value>right</value>
1046
+ <value>center</value>
1775
1047
  </choice>
1776
1048
  </attribute>
1777
1049
  </optional>
1050
+ </define>
1051
+ <define name="munderover.attributes" combine="interleave">
1778
1052
  <optional>
1779
1053
  <attribute name="align">
1780
1054
  <choice>
@@ -1785,72 +1059,33 @@
1785
1059
  </attribute>
1786
1060
  </optional>
1787
1061
  </define>
1788
- <define name="munderover">
1789
- <element name="munderover">
1790
- <ref name="munderover.attributes"/>
1791
- <ref name="MathExpression"/>
1792
- <ref name="MathExpression"/>
1793
- <ref name="MathExpression"/>
1794
- </element>
1062
+ <define name="msub.attributes" combine="interleave">
1063
+ <optional>
1064
+ <attribute name="subscriptshift">
1065
+ <ref name="length-percentage"/>
1066
+ </attribute>
1067
+ </optional>
1795
1068
  </define>
1796
- <define name="munderover.attributes">
1797
- <ref name="CommonAtt"/>
1798
- <ref name="CommonPresAtt"/>
1069
+ <define name="msup.attributes" combine="interleave">
1799
1070
  <optional>
1800
- <attribute name="accent">
1801
- <choice>
1802
- <value>true</value>
1803
- <value>false</value>
1804
- </choice>
1071
+ <attribute name="superscriptshift">
1072
+ <ref name="length-percentage"/>
1805
1073
  </attribute>
1806
1074
  </optional>
1075
+ </define>
1076
+ <define name="msubsup.attributes" combine="interleave">
1807
1077
  <optional>
1808
- <attribute name="accentunder">
1809
- <choice>
1810
- <value>true</value>
1811
- <value>false</value>
1812
- </choice>
1078
+ <attribute name="subscriptshift">
1079
+ <ref name="length-percentage"/>
1813
1080
  </attribute>
1814
1081
  </optional>
1815
1082
  <optional>
1816
- <attribute name="align">
1817
- <choice>
1818
- <value>left</value>
1819
- <value>right</value>
1820
- <value>center</value>
1821
- </choice>
1083
+ <attribute name="superscriptshift">
1084
+ <ref name="length-percentage"/>
1822
1085
  </attribute>
1823
1086
  </optional>
1824
1087
  </define>
1825
- <define name="mmultiscripts">
1826
- <element name="mmultiscripts">
1827
- <ref name="mmultiscripts.attributes"/>
1828
- <ref name="MathExpression"/>
1829
- <zeroOrMore>
1830
- <ref name="MultiScriptExpression"/>
1831
- </zeroOrMore>
1832
- <optional>
1833
- <ref name="mprescripts"/>
1834
- <zeroOrMore>
1835
- <ref name="MultiScriptExpression"/>
1836
- </zeroOrMore>
1837
- </optional>
1838
- </element>
1839
- </define>
1840
- <define name="mmultiscripts.attributes">
1841
- <ref name="msubsup.attributes"/>
1842
- </define>
1843
- <define name="mtable">
1844
- <element name="mtable">
1845
- <ref name="mtable.attributes"/>
1846
- <zeroOrMore>
1847
- <ref name="TableRowExpression"/>
1848
- </zeroOrMore>
1849
- </element>
1850
- </define>
1851
- <define name="mtable.attributes">
1852
- <ref name="CommonAtt"/>
1853
- <ref name="CommonPresAtt"/>
1088
+ <define name="mtable.attributes" combine="interleave">
1854
1089
  <optional>
1855
1090
  <attribute name="align">
1856
1091
  <data type="string">
@@ -1876,30 +1111,13 @@
1876
1111
  </list>
1877
1112
  </attribute>
1878
1113
  </optional>
1879
- <optional>
1880
- <attribute name="groupalign">
1881
- <ref name="group-alignment-list-list"/>
1882
- </attribute>
1883
- </optional>
1884
- <optional>
1885
- <attribute name="alignmentscope">
1886
- <list>
1887
- <oneOrMore>
1888
- <choice>
1889
- <value>true</value>
1890
- <value>false</value>
1891
- </choice>
1892
- </oneOrMore>
1893
- </list>
1894
- </attribute>
1895
- </optional>
1896
1114
  <optional>
1897
1115
  <attribute name="columnwidth">
1898
1116
  <list>
1899
1117
  <oneOrMore>
1900
1118
  <choice>
1901
1119
  <value>auto</value>
1902
- <ref name="length"/>
1120
+ <ref name="length-percentage"/>
1903
1121
  <value>fit</value>
1904
1122
  </choice>
1905
1123
  </oneOrMore>
@@ -1910,7 +1128,7 @@
1910
1128
  <attribute name="width">
1911
1129
  <choice>
1912
1130
  <value>auto</value>
1913
- <ref name="length"/>
1131
+ <ref name="length-percentage"/>
1914
1132
  </choice>
1915
1133
  </attribute>
1916
1134
  </optional>
@@ -1918,7 +1136,7 @@
1918
1136
  <attribute name="rowspacing">
1919
1137
  <list>
1920
1138
  <oneOrMore>
1921
- <ref name="length"/>
1139
+ <ref name="length-percentage"/>
1922
1140
  </oneOrMore>
1923
1141
  </list>
1924
1142
  </attribute>
@@ -1927,7 +1145,7 @@
1927
1145
  <attribute name="columnspacing">
1928
1146
  <list>
1929
1147
  <oneOrMore>
1930
- <ref name="length"/>
1148
+ <ref name="length-percentage"/>
1931
1149
  </oneOrMore>
1932
1150
  </list>
1933
1151
  </attribute>
@@ -1958,73 +1176,30 @@
1958
1176
  <optional>
1959
1177
  <attribute name="framespacing">
1960
1178
  <list>
1961
- <ref name="length"/>
1962
- <ref name="length"/>
1179
+ <ref name="length-percentage"/>
1180
+ <ref name="length-percentage"/>
1963
1181
  </list>
1964
1182
  </attribute>
1965
1183
  </optional>
1966
1184
  <optional>
1967
1185
  <attribute name="equalrows">
1968
- <choice>
1969
- <value>true</value>
1970
- <value>false</value>
1971
- </choice>
1186
+ <ref name="mathml-boolean"/>
1972
1187
  </attribute>
1973
1188
  </optional>
1974
1189
  <optional>
1975
1190
  <attribute name="equalcolumns">
1976
- <choice>
1977
- <value>true</value>
1978
- <value>false</value>
1979
- </choice>
1980
- </attribute>
1981
- </optional>
1982
- <optional>
1983
- <attribute name="displaystyle">
1984
- <choice>
1985
- <value>true</value>
1986
- <value>false</value>
1987
- </choice>
1988
- </attribute>
1989
- </optional>
1990
- <optional>
1991
- <attribute name="side">
1992
- <choice>
1993
- <value>left</value>
1994
- <value>right</value>
1995
- <value>leftoverlap</value>
1996
- <value>rightoverlap</value>
1997
- </choice>
1998
- </attribute>
1999
- </optional>
2000
- <optional>
2001
- <attribute name="minlabelspacing">
2002
- <ref name="length"/>
1191
+ <ref name="mathml-boolean"/>
2003
1192
  </attribute>
2004
1193
  </optional>
2005
1194
  </define>
2006
- <define name="mlabeledtr">
2007
- <element name="mlabeledtr">
2008
- <ref name="mlabeledtr.attributes"/>
2009
- <oneOrMore>
2010
- <ref name="TableCellExpression"/>
2011
- </oneOrMore>
2012
- </element>
2013
- </define>
2014
- <define name="mlabeledtr.attributes">
2015
- <ref name="mtr.attributes"/>
2016
- </define>
2017
- <define name="mtr">
2018
- <element name="mtr">
2019
- <ref name="mtr.attributes"/>
2020
- <zeroOrMore>
2021
- <ref name="TableCellExpression"/>
2022
- </zeroOrMore>
2023
- </element>
2024
- </define>
2025
- <define name="mtr.attributes">
2026
- <ref name="CommonAtt"/>
2027
- <ref name="CommonPresAtt"/>
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">
2028
1203
  <optional>
2029
1204
  <attribute name="rowalign">
2030
1205
  <choice>
@@ -2045,31 +1220,8 @@
2045
1220
  </list>
2046
1221
  </attribute>
2047
1222
  </optional>
2048
- <optional>
2049
- <attribute name="groupalign">
2050
- <ref name="group-alignment-list-list"/>
2051
- </attribute>
2052
- </optional>
2053
- </define>
2054
- <define name="mtd">
2055
- <element name="mtd">
2056
- <ref name="mtd.attributes"/>
2057
- <ref name="ImpliedMrow"/>
2058
- </element>
2059
1223
  </define>
2060
- <define name="mtd.attributes">
2061
- <ref name="CommonAtt"/>
2062
- <ref name="CommonPresAtt"/>
2063
- <optional>
2064
- <attribute name="rowspan">
2065
- <ref name="positive-integer"/>
2066
- </attribute>
2067
- </optional>
2068
- <optional>
2069
- <attribute name="columnspan">
2070
- <ref name="positive-integer"/>
2071
- </attribute>
2072
- </optional>
1224
+ <define name="mtd.attributes" combine="interleave">
2073
1225
  <optional>
2074
1226
  <attribute name="rowalign">
2075
1227
  <choice>
@@ -2086,11 +1238,6 @@
2086
1238
  <ref name="columnalignstyle"/>
2087
1239
  </attribute>
2088
1240
  </optional>
2089
- <optional>
2090
- <attribute name="groupalign">
2091
- <ref name="group-alignment-list"/>
2092
- </attribute>
2093
- </optional>
2094
1241
  </define>
2095
1242
  <define name="mstack">
2096
1243
  <element name="mstack">
@@ -2101,8 +1248,7 @@
2101
1248
  </element>
2102
1249
  </define>
2103
1250
  <define name="mstack.attributes">
2104
- <ref name="CommonAtt"/>
2105
- <ref name="CommonPresAtt"/>
1251
+ <ref name="MathMLPGlobalAttributes"/>
2106
1252
  <optional>
2107
1253
  <attribute name="align">
2108
1254
  <data type="string">
@@ -2132,7 +1278,7 @@
2132
1278
  <optional>
2133
1279
  <attribute name="charspacing">
2134
1280
  <choice>
2135
- <ref name="length"/>
1281
+ <ref name="length-percentage"/>
2136
1282
  <value>loose</value>
2137
1283
  <value>medium</value>
2138
1284
  <value>tight</value>
@@ -2178,8 +1324,7 @@
2178
1324
  </element>
2179
1325
  </define>
2180
1326
  <define name="msgroup.attributes">
2181
- <ref name="CommonAtt"/>
2182
- <ref name="CommonPresAtt"/>
1327
+ <ref name="MathMLPGlobalAttributes"/>
2183
1328
  <optional>
2184
1329
  <attribute name="position">
2185
1330
  <ref name="integer"/>
@@ -2200,8 +1345,7 @@
2200
1345
  </element>
2201
1346
  </define>
2202
1347
  <define name="msrow.attributes">
2203
- <ref name="CommonAtt"/>
2204
- <ref name="CommonPresAtt"/>
1348
+ <ref name="MathMLPGlobalAttributes"/>
2205
1349
  <optional>
2206
1350
  <attribute name="position">
2207
1351
  <ref name="integer"/>
@@ -2220,8 +1364,7 @@
2220
1364
  </element>
2221
1365
  </define>
2222
1366
  <define name="mscarries.attributes">
2223
- <ref name="CommonAtt"/>
2224
- <ref name="CommonPresAtt"/>
1367
+ <ref name="MathMLPGlobalAttributes"/>
2225
1368
  <optional>
2226
1369
  <attribute name="position">
2227
1370
  <ref name="integer"/>
@@ -2271,8 +1414,7 @@
2271
1414
  </element>
2272
1415
  </define>
2273
1416
  <define name="mscarry.attributes">
2274
- <ref name="CommonAtt"/>
2275
- <ref name="CommonPresAtt"/>
1417
+ <ref name="MathMLPGlobalAttributes"/>
2276
1418
  <optional>
2277
1419
  <attribute name="location">
2278
1420
  <choice>
@@ -2303,22 +1445,4 @@
2303
1445
  </attribute>
2304
1446
  </optional>
2305
1447
  </define>
2306
- <define name="maction">
2307
- <element name="maction">
2308
- <ref name="maction.attributes"/>
2309
- <oneOrMore>
2310
- <ref name="MathExpression"/>
2311
- </oneOrMore>
2312
- </element>
2313
- </define>
2314
- <define name="maction.attributes">
2315
- <ref name="CommonAtt"/>
2316
- <ref name="CommonPresAtt"/>
2317
- <attribute name="actiontype"/>
2318
- <optional>
2319
- <attribute name="selection">
2320
- <ref name="positive-integer"/>
2321
- </attribute>
2322
- </optional>
2323
- </define>
2324
1448
  </grammar>