metanorma-standoc 3.4.6 → 3.4.8
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.
- checksums.yaml +4 -4
- data/.rubocop.yml +13 -1
- data/lib/metanorma/cleanup/block.rb +79 -24
- data/lib/metanorma/converter/blocks.rb +3 -1
- data/lib/metanorma/converter/blocks_examples.rb +5 -2
- data/lib/metanorma/converter/blocks_notes.rb +2 -2
- data/lib/metanorma/converter/converter.rb +6 -1
- data/lib/metanorma/converter/front_title.rb +3 -1
- data/lib/metanorma/converter/init.rb +10 -0
- data/lib/metanorma/converter/lists.rb +2 -0
- data/lib/metanorma/converter/log.rb +3 -0
- data/lib/metanorma/converter/ref_queue.rb +19 -0
- data/lib/metanorma/converter/render.rb +2 -0
- data/lib/metanorma/converter/table.rb +5 -1
- data/lib/metanorma/standoc/version.rb +1 -1
- data/lib/metanorma/validate/basicdoc.rng +31 -6
- data/lib/metanorma/validate/isodoc.rng +28 -3
- data/lib/metanorma/validate/mathml3-common.rng +257 -0
- data/lib/metanorma/validate/mathml3-content.rng +1544 -0
- data/lib/metanorma/validate/mathml3-presentation.rng +2324 -0
- data/lib/metanorma/validate/mathml3-strict-content.rng +205 -0
- data/lib/metanorma/validate/mathml3.rng +23 -0
- data/lib/metanorma/validate/metanorma-mathml.rng +45 -0
- data/lib/metanorma/validate/reqt.rng +10 -2
- data/lib/metanorma/validate/schema.rb +15 -2
- data/metanorma-standoc.gemspec +1 -1
- metadata +10 -7
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
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)
|
|
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
|
+
<start>
|
|
15
|
+
<ref name="math"/>
|
|
16
|
+
</start>
|
|
17
|
+
<define name="math">
|
|
18
|
+
<element name="math">
|
|
19
|
+
<ref name="math.attributes"/>
|
|
20
|
+
<zeroOrMore>
|
|
21
|
+
<ref name="MathExpression"/>
|
|
22
|
+
</zeroOrMore>
|
|
23
|
+
</element>
|
|
24
|
+
</define>
|
|
25
|
+
<define name="MathExpression">
|
|
26
|
+
<ref name="semantics"/>
|
|
27
|
+
</define>
|
|
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="CommonDeprecatedAtt">
|
|
40
|
+
<optional>
|
|
41
|
+
<attribute name="other"/>
|
|
42
|
+
</optional>
|
|
43
|
+
</define>
|
|
44
|
+
<define name="CommonAtt">
|
|
45
|
+
<optional>
|
|
46
|
+
<attribute name="id">
|
|
47
|
+
<data type="ID"/>
|
|
48
|
+
</attribute>
|
|
49
|
+
</optional>
|
|
50
|
+
<optional>
|
|
51
|
+
<attribute name="xref"/>
|
|
52
|
+
</optional>
|
|
53
|
+
<optional>
|
|
54
|
+
<attribute name="class">
|
|
55
|
+
<data type="NMTOKENS"/>
|
|
56
|
+
</attribute>
|
|
57
|
+
</optional>
|
|
58
|
+
<optional>
|
|
59
|
+
<attribute name="style">
|
|
60
|
+
<data type="string"/>
|
|
61
|
+
</attribute>
|
|
62
|
+
</optional>
|
|
63
|
+
<optional>
|
|
64
|
+
<attribute name="href">
|
|
65
|
+
<data type="anyURI"/>
|
|
66
|
+
</attribute>
|
|
67
|
+
</optional>
|
|
68
|
+
<ref name="CommonDeprecatedAtt"/>
|
|
69
|
+
<zeroOrMore>
|
|
70
|
+
<ref name="NonMathMLAtt"/>
|
|
71
|
+
</zeroOrMore>
|
|
72
|
+
</define>
|
|
73
|
+
<define name="math.attributes">
|
|
74
|
+
<ref name="CommonAtt"/>
|
|
75
|
+
<optional>
|
|
76
|
+
<attribute name="display">
|
|
77
|
+
<choice>
|
|
78
|
+
<value>block</value>
|
|
79
|
+
<value>inline</value>
|
|
80
|
+
</choice>
|
|
81
|
+
</attribute>
|
|
82
|
+
</optional>
|
|
83
|
+
<optional>
|
|
84
|
+
<attribute name="maxwidth">
|
|
85
|
+
<ref name="length"/>
|
|
86
|
+
</attribute>
|
|
87
|
+
</optional>
|
|
88
|
+
<optional>
|
|
89
|
+
<attribute name="overflow">
|
|
90
|
+
<choice>
|
|
91
|
+
<value>linebreak</value>
|
|
92
|
+
<value>scroll</value>
|
|
93
|
+
<value>elide</value>
|
|
94
|
+
<value>truncate</value>
|
|
95
|
+
<value>scale</value>
|
|
96
|
+
</choice>
|
|
97
|
+
</attribute>
|
|
98
|
+
</optional>
|
|
99
|
+
<optional>
|
|
100
|
+
<attribute name="altimg">
|
|
101
|
+
<data type="anyURI"/>
|
|
102
|
+
</attribute>
|
|
103
|
+
</optional>
|
|
104
|
+
<optional>
|
|
105
|
+
<attribute name="altimg-width">
|
|
106
|
+
<ref name="length"/>
|
|
107
|
+
</attribute>
|
|
108
|
+
</optional>
|
|
109
|
+
<optional>
|
|
110
|
+
<attribute name="altimg-height">
|
|
111
|
+
<ref name="length"/>
|
|
112
|
+
</attribute>
|
|
113
|
+
</optional>
|
|
114
|
+
<optional>
|
|
115
|
+
<attribute name="altimg-valign">
|
|
116
|
+
<choice>
|
|
117
|
+
<ref name="length"/>
|
|
118
|
+
<value>top</value>
|
|
119
|
+
<value>middle</value>
|
|
120
|
+
<value>bottom</value>
|
|
121
|
+
</choice>
|
|
122
|
+
</attribute>
|
|
123
|
+
</optional>
|
|
124
|
+
<optional>
|
|
125
|
+
<attribute name="alttext"/>
|
|
126
|
+
</optional>
|
|
127
|
+
<optional>
|
|
128
|
+
<attribute name="cdgroup">
|
|
129
|
+
<data type="anyURI"/>
|
|
130
|
+
</attribute>
|
|
131
|
+
</optional>
|
|
132
|
+
<ref name="math.deprecatedattributes"/>
|
|
133
|
+
</define>
|
|
134
|
+
<!--
|
|
135
|
+
the mathml3-presentation schema adds additional attributes
|
|
136
|
+
to the math element, all those valid on mstyle
|
|
137
|
+
-->
|
|
138
|
+
<define name="math.deprecatedattributes">
|
|
139
|
+
<optional>
|
|
140
|
+
<attribute name="mode">
|
|
141
|
+
<data type="string"/>
|
|
142
|
+
</attribute>
|
|
143
|
+
</optional>
|
|
144
|
+
<optional>
|
|
145
|
+
<attribute name="macros">
|
|
146
|
+
<data type="string"/>
|
|
147
|
+
</attribute>
|
|
148
|
+
</optional>
|
|
149
|
+
</define>
|
|
150
|
+
<define name="name">
|
|
151
|
+
<attribute name="name">
|
|
152
|
+
<data type="NCName"/>
|
|
153
|
+
</attribute>
|
|
154
|
+
</define>
|
|
155
|
+
<define name="cd">
|
|
156
|
+
<attribute name="cd">
|
|
157
|
+
<data type="NCName"/>
|
|
158
|
+
</attribute>
|
|
159
|
+
</define>
|
|
160
|
+
<define name="src">
|
|
161
|
+
<optional>
|
|
162
|
+
<attribute name="src">
|
|
163
|
+
<data type="anyURI"/>
|
|
164
|
+
</attribute>
|
|
165
|
+
</optional>
|
|
166
|
+
</define>
|
|
167
|
+
<define name="annotation">
|
|
168
|
+
<element name="annotation">
|
|
169
|
+
<ref name="annotation.attributes"/>
|
|
170
|
+
<text/>
|
|
171
|
+
</element>
|
|
172
|
+
</define>
|
|
173
|
+
<define name="annotation-xml.model">
|
|
174
|
+
<zeroOrMore>
|
|
175
|
+
<choice>
|
|
176
|
+
<ref name="MathExpression"/>
|
|
177
|
+
<ref name="anyElement"/>
|
|
178
|
+
</choice>
|
|
179
|
+
</zeroOrMore>
|
|
180
|
+
</define>
|
|
181
|
+
<define name="anyElement">
|
|
182
|
+
<element>
|
|
183
|
+
<anyName>
|
|
184
|
+
<except>
|
|
185
|
+
<nsName/>
|
|
186
|
+
</except>
|
|
187
|
+
</anyName>
|
|
188
|
+
<zeroOrMore>
|
|
189
|
+
<choice>
|
|
190
|
+
<attribute>
|
|
191
|
+
<anyName/>
|
|
192
|
+
</attribute>
|
|
193
|
+
<text/>
|
|
194
|
+
<ref name="anyElement"/>
|
|
195
|
+
</choice>
|
|
196
|
+
</zeroOrMore>
|
|
197
|
+
</element>
|
|
198
|
+
</define>
|
|
199
|
+
<define name="annotation-xml">
|
|
200
|
+
<element name="annotation-xml">
|
|
201
|
+
<ref name="annotation.attributes"/>
|
|
202
|
+
<ref name="annotation-xml.model"/>
|
|
203
|
+
</element>
|
|
204
|
+
</define>
|
|
205
|
+
<define name="annotation.attributes">
|
|
206
|
+
<ref name="CommonAtt"/>
|
|
207
|
+
<optional>
|
|
208
|
+
<ref name="cd"/>
|
|
209
|
+
</optional>
|
|
210
|
+
<optional>
|
|
211
|
+
<ref name="name"/>
|
|
212
|
+
</optional>
|
|
213
|
+
<ref name="DefEncAtt"/>
|
|
214
|
+
<optional>
|
|
215
|
+
<ref name="src"/>
|
|
216
|
+
</optional>
|
|
217
|
+
</define>
|
|
218
|
+
<define name="DefEncAtt">
|
|
219
|
+
<optional>
|
|
220
|
+
<attribute name="encoding">
|
|
221
|
+
<data type="string"/>
|
|
222
|
+
</attribute>
|
|
223
|
+
</optional>
|
|
224
|
+
<optional>
|
|
225
|
+
<attribute name="definitionURL">
|
|
226
|
+
<data type="anyURI"/>
|
|
227
|
+
</attribute>
|
|
228
|
+
</optional>
|
|
229
|
+
</define>
|
|
230
|
+
<define name="semantics">
|
|
231
|
+
<element name="semantics">
|
|
232
|
+
<ref name="semantics.attributes"/>
|
|
233
|
+
<ref name="MathExpression"/>
|
|
234
|
+
<zeroOrMore>
|
|
235
|
+
<choice>
|
|
236
|
+
<ref name="annotation"/>
|
|
237
|
+
<ref name="annotation-xml"/>
|
|
238
|
+
</choice>
|
|
239
|
+
</zeroOrMore>
|
|
240
|
+
</element>
|
|
241
|
+
</define>
|
|
242
|
+
<define name="semantics.attributes">
|
|
243
|
+
<ref name="CommonAtt"/>
|
|
244
|
+
<ref name="DefEncAtt"/>
|
|
245
|
+
<optional>
|
|
246
|
+
<ref name="cd"/>
|
|
247
|
+
</optional>
|
|
248
|
+
<optional>
|
|
249
|
+
<ref name="name"/>
|
|
250
|
+
</optional>
|
|
251
|
+
</define>
|
|
252
|
+
<define name="length">
|
|
253
|
+
<data type="string">
|
|
254
|
+
<param name="pattern">\s*((-?[0-9]*([0-9]\.?|\.[0-9])[0-9]*(e[mx]|in|cm|mm|p[xtc]|%)?)|(negative)?((very){0,2}thi(n|ck)|medium)mathspace)\s*</param>
|
|
255
|
+
</data>
|
|
256
|
+
</define>
|
|
257
|
+
</grammar>
|