metanorma-cc 2.8.6 → 2.8.9
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 +14 -2
- data/lib/isodoc/cc/cc.standard.xsl +199 -25
- data/lib/isodoc/cc/html/htmlstyle.css +3 -1
- data/lib/metanorma/cc/basicdoc.rng +40 -6
- data/lib/metanorma/cc/biblio.rng +8 -12
- data/lib/metanorma/cc/isodoc.rng +60 -9
- data/lib/metanorma/cc/mathml3-common.rng +257 -0
- data/lib/metanorma/cc/mathml3-content.rng +1544 -0
- data/lib/metanorma/cc/mathml3-presentation.rng +2324 -0
- data/lib/metanorma/cc/mathml3-strict-content.rng +205 -0
- data/lib/metanorma/cc/mathml3.rng +23 -0
- data/lib/metanorma/cc/metanorma-mathml.rng +45 -0
- data/lib/metanorma/cc/reqt.rng +19 -3
- data/lib/metanorma/cc/version.rb +1 -1
- data/metanorma-cc.gemspec +1 -1
- metadata +10 -7
data/lib/metanorma/cc/isodoc.rng
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
3
|
-
<!-- VERSION v2.1.
|
|
3
|
+
<!-- VERSION v2.1.6 -->
|
|
4
4
|
|
|
5
5
|
<!--
|
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
|
@@ -164,6 +164,9 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
|
|
|
164
164
|
</choice>
|
|
165
165
|
</attribute>
|
|
166
166
|
</optional>
|
|
167
|
+
<optional>
|
|
168
|
+
<ref name="DisplayDirective"/>
|
|
169
|
+
</optional>
|
|
167
170
|
</define>
|
|
168
171
|
<define name="DlAttributes">
|
|
169
172
|
<ref name="BlockAttributes"/>
|
|
@@ -210,6 +213,12 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
|
|
|
210
213
|
<define name="ExampleAttributes">
|
|
211
214
|
<ref name="NumberingAttributes"/>
|
|
212
215
|
<ref name="BlockAttributes"/>
|
|
216
|
+
<optional>
|
|
217
|
+
<attribute name="collapsible">
|
|
218
|
+
<a:documentation>Render the example as collapsible (HTML5 details/summary)</a:documentation>
|
|
219
|
+
<data type="boolean"/>
|
|
220
|
+
</attribute>
|
|
221
|
+
</optional>
|
|
213
222
|
</define>
|
|
214
223
|
<define name="ExampleBody">
|
|
215
224
|
<optional>
|
|
@@ -814,6 +823,9 @@ titlecase, or lowercase</a:documentation>
|
|
|
814
823
|
</define>
|
|
815
824
|
<define name="UlAttributes" combine="interleave">
|
|
816
825
|
<ref name="BlockAttributes"/>
|
|
826
|
+
<optional>
|
|
827
|
+
<ref name="DisplayDirective"/>
|
|
828
|
+
</optional>
|
|
817
829
|
</define>
|
|
818
830
|
<define name="TableAttributes" combine="interleave">
|
|
819
831
|
<optional>
|
|
@@ -840,7 +852,7 @@ titlecase, or lowercase</a:documentation>
|
|
|
840
852
|
<a:documentation>Width of the figure block in rendering</a:documentation>
|
|
841
853
|
</attribute>
|
|
842
854
|
</optional>
|
|
843
|
-
<ref name="
|
|
855
|
+
<ref name="BlockAttributesCore"/>
|
|
844
856
|
</define>
|
|
845
857
|
<define name="SourceAttributes" combine="interleave">
|
|
846
858
|
<ref name="BlockAttributes"/>
|
|
@@ -1271,7 +1283,11 @@ That concept may be defined as a term within the current document, or it may be
|
|
|
1271
1283
|
<a:documentation>Class of input form</a:documentation>
|
|
1272
1284
|
</attribute>
|
|
1273
1285
|
</optional>
|
|
1274
|
-
<ref name="
|
|
1286
|
+
<ref name="BlockAttributesCore">
|
|
1287
|
+
<a:documentation>form declares its own class above, so it uses BlockAttributesCore to
|
|
1288
|
+
avoid duplicating the custom-class slot in BlockAttributes. Treated like
|
|
1289
|
+
figure. See metanorma/metanorma-standoc#1197</a:documentation>
|
|
1290
|
+
</ref>
|
|
1275
1291
|
<zeroOrMore>
|
|
1276
1292
|
<!-- Input form contents -->
|
|
1277
1293
|
<choice>
|
|
@@ -1968,7 +1984,7 @@ used in document amendments</a:documentation>
|
|
|
1968
1984
|
<a:documentation>Zero or more examples of how the term is to be used</a:documentation>
|
|
1969
1985
|
</ref>
|
|
1970
1986
|
</zeroOrMore>
|
|
1971
|
-
<ref name="
|
|
1987
|
+
<ref name="TermSources">
|
|
1972
1988
|
<a:documentation>Bibliographic references for the managed term</a:documentation>
|
|
1973
1989
|
</ref>
|
|
1974
1990
|
</element>
|
|
@@ -2077,7 +2093,7 @@ used in document amendments</a:documentation>
|
|
|
2077
2093
|
<a:documentation>Information about how the designation is to be used</a:documentation>
|
|
2078
2094
|
</ref>
|
|
2079
2095
|
</optional>
|
|
2080
|
-
<ref name="
|
|
2096
|
+
<ref name="TermSources">
|
|
2081
2097
|
<a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
|
|
2082
2098
|
</ref>
|
|
2083
2099
|
</define>
|
|
@@ -2348,7 +2364,7 @@ used in document amendments</a:documentation>
|
|
|
2348
2364
|
<ref name="formula"/>
|
|
2349
2365
|
</choice>
|
|
2350
2366
|
</oneOrMore>
|
|
2351
|
-
<ref name="
|
|
2367
|
+
<ref name="TermSources">
|
|
2352
2368
|
<a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
|
|
2353
2369
|
</ref>
|
|
2354
2370
|
</element>
|
|
@@ -2365,7 +2381,7 @@ used in document amendments</a:documentation>
|
|
|
2365
2381
|
<ref name="formula"/>
|
|
2366
2382
|
</choice>
|
|
2367
2383
|
</oneOrMore>
|
|
2368
|
-
<ref name="
|
|
2384
|
+
<ref name="TermSources">
|
|
2369
2385
|
<a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
|
|
2370
2386
|
</ref>
|
|
2371
2387
|
</element>
|
|
@@ -2756,7 +2772,11 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
|
|
|
2756
2772
|
</oneOrMore>
|
|
2757
2773
|
</element>
|
|
2758
2774
|
</define>
|
|
2759
|
-
<define name="
|
|
2775
|
+
<define name="BlockAttributesCore">
|
|
2776
|
+
<a:documentation>Block attributes excluding the custom CSS class. Blocks that already carry
|
|
2777
|
+
their own `class` attribute (e.g. figure, via basicdoc FigureAttributes)
|
|
2778
|
+
include this directly, to avoid a duplicate-attribute collision with the
|
|
2779
|
+
`class` added in BlockAttributes. See metanorma/metanorma-standoc#1197</a:documentation>
|
|
2760
2780
|
<optional>
|
|
2761
2781
|
<attribute name="keep-with-next">
|
|
2762
2782
|
<a:documentation>Keep this block on the same page as the following block in paged media</a:documentation>
|
|
@@ -2788,6 +2808,37 @@ to span across both columns</a:documentation>
|
|
|
2788
2808
|
</attribute>
|
|
2789
2809
|
</optional>
|
|
2790
2810
|
</define>
|
|
2811
|
+
<define name="BlockAttributes">
|
|
2812
|
+
<a:documentation>Universal block attributes, including a custom CSS class (space-separated,
|
|
2813
|
+
appended additively to the block's built-in HTML class, HTML output only).
|
|
2814
|
+
See metanorma/metanorma-standoc#1197</a:documentation>
|
|
2815
|
+
<ref name="BlockAttributesCore"/>
|
|
2816
|
+
<optional>
|
|
2817
|
+
<attribute name="class">
|
|
2818
|
+
<a:documentation>Custom CSS class(es) for the block in HTML output</a:documentation>
|
|
2819
|
+
</attribute>
|
|
2820
|
+
</optional>
|
|
2821
|
+
</define>
|
|
2822
|
+
<define name="DisplayDirective">
|
|
2823
|
+
<a:documentation>Directive on how to render a block in Presentation XML </a:documentation>
|
|
2824
|
+
<optional>
|
|
2825
|
+
<attribute name="display">
|
|
2826
|
+
<a:documentation>Display style for block.
|
|
2827
|
+
If the block is `ol` or `ul` and dispay is `table`,
|
|
2828
|
+
the list is to be rendered as a table, with a column for each nested level, and a row for each terminal sublist</a:documentation>
|
|
2829
|
+
</attribute>
|
|
2830
|
+
</optional>
|
|
2831
|
+
<optional>
|
|
2832
|
+
<attribute name="display-directives">
|
|
2833
|
+
<a:documentation>display-directives is a key-value set of attributes, guiding how the rendering of the block should happen.
|
|
2834
|
+
The key-value set is comma-delimited, and encoded as `key1='value1',key2='value'`,
|
|
2835
|
+
as with stem//mn/@data-metanorma-numberformat
|
|
2836
|
+
* If the block is `ol` or `ul` and dispay is `table`, display-directives can have the value `colgroup='col1,col2,...coln'`,
|
|
2837
|
+
where each col value is a percentage width of the column in the output table (with no % suffix).
|
|
2838
|
+
e.g. `colgroup='50,33.3,16.7'` </a:documentation>
|
|
2839
|
+
</attribute>
|
|
2840
|
+
</optional>
|
|
2841
|
+
</define>
|
|
2791
2842
|
<define name="ReferencesAttributes">
|
|
2792
2843
|
<optional>
|
|
2793
2844
|
<attribute name="obligation">
|
|
@@ -2800,7 +2851,7 @@ Normative References contents contain normative references, but as a clause in t
|
|
|
2800
2851
|
<data type="boolean"/>
|
|
2801
2852
|
</attribute>
|
|
2802
2853
|
</define>
|
|
2803
|
-
<define name="
|
|
2854
|
+
<define name="TermSources">
|
|
2804
2855
|
<zeroOrMore>
|
|
2805
2856
|
<ref name="termsource"/>
|
|
2806
2857
|
</zeroOrMore>
|
|
@@ -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>
|