metanorma-generic 3.4.0 → 3.4.2

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,205 @@
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
+ <define name="ContExp">
15
+ <choice>
16
+ <ref name="semantics-contexp"/>
17
+ <ref name="cn"/>
18
+ <ref name="ci"/>
19
+ <ref name="csymbol"/>
20
+ <ref name="apply"/>
21
+ <ref name="bind"/>
22
+ <ref name="share"/>
23
+ <ref name="cerror"/>
24
+ <ref name="cbytes"/>
25
+ <ref name="cs"/>
26
+ </choice>
27
+ </define>
28
+ <define name="cn">
29
+ <element name="cn">
30
+ <ref name="cn.attributes"/>
31
+ <ref name="cn.content"/>
32
+ </element>
33
+ </define>
34
+ <define name="cn.content">
35
+ <text/>
36
+ </define>
37
+ <define name="cn.attributes">
38
+ <ref name="CommonAtt"/>
39
+ <attribute name="type">
40
+ <choice>
41
+ <value>integer</value>
42
+ <value>real</value>
43
+ <value>double</value>
44
+ <value>hexdouble</value>
45
+ </choice>
46
+ </attribute>
47
+ </define>
48
+ <define name="semantics-ci">
49
+ <element name="semantics">
50
+ <ref name="semantics.attributes"/>
51
+ <choice>
52
+ <ref name="ci"/>
53
+ <ref name="semantics-ci"/>
54
+ </choice>
55
+ <zeroOrMore>
56
+ <choice>
57
+ <ref name="annotation"/>
58
+ <ref name="annotation-xml"/>
59
+ </choice>
60
+ </zeroOrMore>
61
+ </element>
62
+ </define>
63
+ <define name="semantics-contexp">
64
+ <element name="semantics">
65
+ <ref name="semantics.attributes"/>
66
+ <ref name="ContExp"/>
67
+ <zeroOrMore>
68
+ <choice>
69
+ <ref name="annotation"/>
70
+ <ref name="annotation-xml"/>
71
+ </choice>
72
+ </zeroOrMore>
73
+ </element>
74
+ </define>
75
+ <define name="ci">
76
+ <element name="ci">
77
+ <ref name="ci.attributes"/>
78
+ <ref name="ci.content"/>
79
+ </element>
80
+ </define>
81
+ <define name="ci.attributes">
82
+ <ref name="CommonAtt"/>
83
+ <optional>
84
+ <ref name="ci.type"/>
85
+ </optional>
86
+ </define>
87
+ <define name="ci.type">
88
+ <attribute name="type">
89
+ <choice>
90
+ <value>integer</value>
91
+ <value>rational</value>
92
+ <value>real</value>
93
+ <value>complex</value>
94
+ <value>complex-polar</value>
95
+ <value>complex-cartesian</value>
96
+ <value>constant</value>
97
+ <value>function</value>
98
+ <value>vector</value>
99
+ <value>list</value>
100
+ <value>set</value>
101
+ <value>matrix</value>
102
+ </choice>
103
+ </attribute>
104
+ </define>
105
+ <define name="ci.content">
106
+ <text/>
107
+ </define>
108
+ <define name="csymbol">
109
+ <element name="csymbol">
110
+ <ref name="csymbol.attributes"/>
111
+ <ref name="csymbol.content"/>
112
+ </element>
113
+ </define>
114
+ <define name="SymbolName">
115
+ <data type="NCName"/>
116
+ </define>
117
+ <define name="csymbol.attributes">
118
+ <ref name="CommonAtt"/>
119
+ <ref name="cd"/>
120
+ </define>
121
+ <define name="csymbol.content">
122
+ <ref name="SymbolName"/>
123
+ </define>
124
+ <define name="BvarQ">
125
+ <zeroOrMore>
126
+ <ref name="bvar"/>
127
+ </zeroOrMore>
128
+ </define>
129
+ <define name="bvar">
130
+ <element name="bvar">
131
+ <ref name="CommonAtt"/>
132
+ <choice>
133
+ <ref name="ci"/>
134
+ <ref name="semantics-ci"/>
135
+ </choice>
136
+ </element>
137
+ </define>
138
+ <define name="apply">
139
+ <element name="apply">
140
+ <ref name="CommonAtt"/>
141
+ <ref name="apply.content"/>
142
+ </element>
143
+ </define>
144
+ <define name="apply.content">
145
+ <oneOrMore>
146
+ <ref name="ContExp"/>
147
+ </oneOrMore>
148
+ </define>
149
+ <define name="bind">
150
+ <element name="bind">
151
+ <ref name="CommonAtt"/>
152
+ <ref name="bind.content"/>
153
+ </element>
154
+ </define>
155
+ <define name="bind.content">
156
+ <ref name="ContExp"/>
157
+ <zeroOrMore>
158
+ <ref name="bvar"/>
159
+ </zeroOrMore>
160
+ <ref name="ContExp"/>
161
+ </define>
162
+ <define name="share">
163
+ <element name="share">
164
+ <ref name="CommonAtt"/>
165
+ <ref name="src"/>
166
+ <empty/>
167
+ </element>
168
+ </define>
169
+ <define name="cerror">
170
+ <element name="cerror">
171
+ <ref name="cerror.attributes"/>
172
+ <ref name="csymbol"/>
173
+ <zeroOrMore>
174
+ <ref name="ContExp"/>
175
+ </zeroOrMore>
176
+ </element>
177
+ </define>
178
+ <define name="cerror.attributes">
179
+ <ref name="CommonAtt"/>
180
+ </define>
181
+ <define name="cbytes">
182
+ <element name="cbytes">
183
+ <ref name="cbytes.attributes"/>
184
+ <ref name="base64"/>
185
+ </element>
186
+ </define>
187
+ <define name="cbytes.attributes">
188
+ <ref name="CommonAtt"/>
189
+ </define>
190
+ <define name="base64">
191
+ <data type="base64Binary"/>
192
+ </define>
193
+ <define name="cs">
194
+ <element name="cs">
195
+ <ref name="cs.attributes"/>
196
+ <text/>
197
+ </element>
198
+ </define>
199
+ <define name="cs.attributes">
200
+ <ref name="CommonAtt"/>
201
+ </define>
202
+ <define name="MathExpression" combine="choice">
203
+ <ref name="ContExp"/>
204
+ </define>
205
+ </grammar>
@@ -0,0 +1,23 @@
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-2010 W3C (MIT, ERCIM, Keio)
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:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns="http://relaxng.org/ns/structure/1.0">
14
+ <include href="mathml3-content.rng">
15
+ <a:documentation>Content MathML</a:documentation>
16
+ </include>
17
+ <include href="mathml3-presentation.rng">
18
+ <a:documentation>Presentation MathML</a:documentation>
19
+ </include>
20
+ <include href="mathml3-common.rng">
21
+ <a:documentation>math and semantics common to both Content and Presentation</a:documentation>
22
+ </include>
23
+ </grammar>
@@ -0,0 +1,45 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0">
3
+ <!--
4
+ Metanorma wrapper around the vendored W3C MathML 3.0 RelaxNG grammar.
5
+ Includes the unmodified W3C grammar (start = math) and augments it with
6
+ metanorma's owned extension attributes. Referenced from basicdoc.rnc via:
7
+ mathml = external "mathml/metanorma-mathml.rnc"
8
+ Authoritative param list for data-metanorma-numberformat lives in plurimath
9
+ (Formatter::Standard::DEFAULT_OPTIONS); see metanorma/basicdoc-models#35.
10
+ -->
11
+ <include href="mathml3.rng"/>
12
+ <!--
13
+ metanorma number-formatting hint on <mn>; opaque comma-separated option
14
+ string parsed at presentation time (no-namespace data- attribute, which
15
+ the W3C CommonAtt/NonMathMLAtt does not otherwise permit).
16
+ -->
17
+ <define name="mn.attributes" combine="interleave">
18
+ <optional>
19
+ <attribute name="data-metanorma-numberformat"/>
20
+ </optional>
21
+ </define>
22
+ <!--
23
+ Foreign annotation-xml considered harmful: the metanorma lutaml-model
24
+ serialiser emits no foreign markup, so the W3C annotation-xml escape hatch
25
+ (and its anyElement wildcard) is forbidden in the MathML we process. This
26
+ also removes the untyped `id` attribute the wildcard permits, which clashes
27
+ with xsd:ID under RELAX NG ID-type consistency (the callout-annotation error).
28
+ metanorma only emits presentation MathML; pre-empting the escape hatch before
29
+ semantic MathML is ever wired. Text-only <annotation> is retained.
30
+
31
+ Expressed via `combine` (interleave with notAllowed) rather than an
32
+ include-override: annotation-xml/anyElement are defined in the transitively
33
+ included mathml3-common, and libxml2's RelaxNG (used by Nokogiri for fragment
34
+ / passthrough validation) cannot override a define from a nested include - -
35
+ it demands the combine attribute and otherwise fails to compile the whole
36
+ grammar (every passthrough then wrongly reports "Invalid passthrough
37
+ content"). jing accepts both forms; combine satisfies both. basicdoc-models#35
38
+ -->
39
+ <define name="annotation-xml" combine="interleave">
40
+ <notAllowed/>
41
+ </define>
42
+ <define name="anyElement" combine="interleave">
43
+ <notAllowed/>
44
+ </define>
45
+ </grammar>
@@ -39,7 +39,11 @@ the tag name of the top level containers</a:documentation>
39
39
  <data type="ID"/>
40
40
  </attribute>
41
41
  <ref name="NumberingAttributes"/>
42
- <ref name="BlockAttributes"/>
42
+ <ref name="BlockAttributesCore">
43
+ <a:documentation>requirement carries its own semantic `class` (provision class, below), so
44
+ it uses BlockAttributesCore to avoid duplicating the custom-class slot now
45
+ in BlockAttributes. See metanorma/metanorma-standoc#1197</a:documentation>
46
+ </ref>
43
47
  <optional>
44
48
  <attribute name="filename">
45
49
  <a:documentation>File name of the requirement model when exported</a:documentation>
@@ -47,7 +51,15 @@ the tag name of the top level containers</a:documentation>
47
51
  </optional>
48
52
  <optional>
49
53
  <attribute name="model">
50
- <a:documentation>Model of requirements realised by this requirement, e.g. "ogc" for Modspec</a:documentation>
54
+ <a:documentation>Model of requirements realised by this requirement, e.g. "ogc" for Modspec.
55
+ Current legal values: ogc, default</a:documentation>
56
+ </attribute>
57
+ </optional>
58
+ <optional>
59
+ <attribute name="render">
60
+ <a:documentation>Rendering of requirements realised by this requirement. Current legal values:
61
+ default:: default, inline
62
+ ogc:: default</a:documentation>
51
63
  </attribute>
52
64
  </optional>
53
65
  <optional>
@@ -217,7 +229,11 @@ machine-readable, and is not to be rendered as document output</a:documentation>
217
229
  <data type="boolean"/>
218
230
  </attribute>
219
231
  </optional>
220
- <ref name="BlockAttributes"/>
232
+ <ref name="BlockAttributesCore">
233
+ <a:documentation>component (a RequirementSubpart) carries its own semantic `class`, so this
234
+ uses BlockAttributesCore to avoid duplicating the custom-class slot in
235
+ BlockAttributes. See metanorma/metanorma-standoc#1197</a:documentation>
236
+ </ref>
221
237
  <oneOrMore>
222
238
  <choice>
223
239
  <a:documentation>Content of subpart: blocks, rather than provisions</a:documentation>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Generic
3
- VERSION = "3.4.0".freeze
3
+ VERSION = "3.4.2".freeze
4
4
  end
5
5
  end
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.bindir = "exe"
26
26
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
27
  spec.require_paths = ["lib"]
28
- spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
28
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0")
29
29
 
30
30
  spec.add_dependency "metanorma-standoc", "~> 3.4.2"
31
31
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-generic
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2026-05-13 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: metanorma-standoc
@@ -258,6 +257,12 @@ files:
258
257
  - lib/metanorma/generic/generic.rng
259
258
  - lib/metanorma/generic/isodoc.rng
260
259
  - lib/metanorma/generic/log.rb
260
+ - lib/metanorma/generic/mathml3-common.rng
261
+ - lib/metanorma/generic/mathml3-content.rng
262
+ - lib/metanorma/generic/mathml3-presentation.rng
263
+ - lib/metanorma/generic/mathml3-strict-content.rng
264
+ - lib/metanorma/generic/mathml3.rng
265
+ - lib/metanorma/generic/metanorma-mathml.rng
261
266
  - lib/metanorma/generic/processor.rb
262
267
  - lib/metanorma/generic/reqt.rng
263
268
  - lib/metanorma/generic/rsd.rng
@@ -269,7 +274,6 @@ homepage: https://github.com/metanorma/metanorma-generic
269
274
  licenses:
270
275
  - BSD-2-Clause
271
276
  metadata: {}
272
- post_install_message:
273
277
  rdoc_options: []
274
278
  require_paths:
275
279
  - lib
@@ -277,15 +281,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
277
281
  requirements:
278
282
  - - ">="
279
283
  - !ruby/object:Gem::Version
280
- version: 3.1.0
284
+ version: 3.3.0
281
285
  required_rubygems_version: !ruby/object:Gem::Requirement
282
286
  requirements:
283
287
  - - ">="
284
288
  - !ruby/object:Gem::Version
285
289
  version: '0'
286
290
  requirements: []
287
- rubygems_version: 3.5.22
288
- signing_key:
291
+ rubygems_version: 4.0.10
289
292
  specification_version: 4
290
293
  summary: Metanorma template gem for customisation.
291
294
  test_files: []