mml 2.3.1 → 2.3.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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +61 -5
  3. data/lib/mml/base/common_attributes.rb +44 -0
  4. data/lib/mml/base/content/annotation.rb +0 -2
  5. data/lib/mml/base/content/share.rb +0 -2
  6. data/lib/mml/base/math.rb +10 -4
  7. data/lib/mml/base/mfrac.rb +0 -2
  8. data/lib/mml/base/mglyph.rb +0 -2
  9. data/lib/mml/base/mi.rb +4 -6
  10. data/lib/mml/base/mlabeledtr.rb +2 -2
  11. data/lib/mml/base/mn.rb +0 -2
  12. data/lib/mml/base/mo.rb +3 -1
  13. data/lib/mml/base/ms.rb +2 -2
  14. data/lib/mml/base/mspace.rb +0 -2
  15. data/lib/mml/base/mstyle.rb +2 -2
  16. data/lib/mml/base/universal_presentation_attributes.rb +4 -0
  17. data/lib/mml/base.rb +1 -0
  18. data/lib/mml/common_elements.rb +2 -0
  19. data/lib/mml/v4/a.rb +4 -2
  20. data/lib/mml/version.rb +1 -1
  21. data/schemas/README.adoc +10 -8
  22. data/schemas/mathml4/mathml4-content.rnc +382 -0
  23. data/schemas/mathml4/mathml4-core.rnc +361 -0
  24. data/schemas/mathml4/mathml4-presentation.rnc +358 -0
  25. data/schemas/mathml4/mathml4-strict-content.rnc +86 -0
  26. data/schemas/mathml4/mathml4.rnc +21 -0
  27. data/schemas/mathml4/mathml4.rnc.1 +21 -0
  28. data/schemas/mathml4/mathml4.rng +37 -0
  29. metadata +10 -11
  30. data/schemas/mathml2/CVS/Entries +0 -4
  31. data/schemas/mathml2/CVS/Repository +0 -1
  32. data/schemas/mathml2/CVS/Root +0 -1
  33. data/schemas/mathml2/common/CVS/Entries +0 -4
  34. data/schemas/mathml2/common/CVS/Repository +0 -1
  35. data/schemas/mathml2/common/CVS/Root +0 -1
  36. data/schemas/mathml2/presentation/CVS/Entries +0 -12
  37. data/schemas/mathml2/presentation/CVS/Repository +0 -1
  38. data/schemas/mathml2/presentation/CVS/Root +0 -1
@@ -0,0 +1,382 @@
1
+ # MathML 4 (Content)
2
+ # ##################
3
+
4
+ # Copyright 1998-2024 W3C (MIT, ERCIM, Keio, Beihang)
5
+ #
6
+ # Use and distribution of this code are permitted under the terms
7
+ # W3C Software Notice and License
8
+ # http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
9
+
10
+ default namespace m = "http://www.w3.org/1998/Math/MathML"
11
+ namespace local = ""
12
+
13
+ include "mathml4-strict-content.rnc"{
14
+ cn.content = (text | sep | PresentationExpression)*
15
+ cn.attributes = CommonAtt, DefEncAtt, attribute type {text}?, base?
16
+
17
+ ci.attributes = CommonAtt, DefEncAtt, ci.type?
18
+ ci.type = attribute type {text}
19
+ ci.content = (text | PresentationExpression)*
20
+
21
+ csymbol.attributes = CommonAtt, DefEncAtt, attribute type {text}?,cd?
22
+ csymbol.content = (text | PresentationExpression)*
23
+
24
+ annotation-xml.attributes |= CommonAtt, cd?, name?, encoding?
25
+
26
+ bvar = element bvar {CommonAtt, ((ci | semantics-ci) & degree?)}
27
+
28
+ cbytes.attributes = CommonAtt, DefEncAtt
29
+
30
+ cs.attributes = CommonAtt, DefEncAtt
31
+
32
+ apply.content = ContExp+ | (ContExp, BvarQ, Qualifier*, ContExp*)
33
+
34
+ bind.content = apply.content
35
+ }
36
+
37
+ NonMathMLAtt |= attribute (* - (local:*|m:*)) {xsd:string}
38
+
39
+ math.attributes &=
40
+ attribute alttext {text}?
41
+
42
+ MathMLDataAttributes &=
43
+ attribute data-other {text}?
44
+
45
+ CommonAtt &=
46
+ NonMathMLAtt*,
47
+ MathMLDataAttributes,
48
+ attribute class {xsd:NCName}?,
49
+ attribute style {xsd:string}?,
50
+ attribute href {xsd:anyURI}?,
51
+ attribute intent {text}?,
52
+ attribute arg {xsd:NCName}?
53
+
54
+ base = attribute base {text}
55
+
56
+
57
+ sep = element sep {empty}
58
+ PresentationExpression |= notAllowed
59
+ DefEncAtt = attribute encoding {xsd:string}?,
60
+ attribute definitionURL {xsd:anyURI}?
61
+
62
+
63
+ DomainQ = (domainofapplication|condition|interval|(lowlimit,uplimit?))*
64
+ domainofapplication = element domainofapplication {ContExp}
65
+ condition = element condition {ContExp}
66
+ uplimit = element uplimit {ContExp}
67
+ lowlimit = element lowlimit {ContExp}
68
+
69
+ Qualifier = DomainQ|degree|momentabout|logbase
70
+ degree = element degree {ContExp}
71
+ momentabout = element momentabout {ContExp}
72
+ logbase = element logbase {ContExp}
73
+
74
+ type = attribute type {text}
75
+ order = attribute order {"numeric" | "lexicographic"}
76
+ closure = attribute closure {text}
77
+
78
+
79
+ ContExp |= piecewise
80
+
81
+
82
+ piecewise = element piecewise {CommonAtt, DefEncAtt,(piece* & otherwise?)}
83
+
84
+ piece = element piece {CommonAtt, DefEncAtt, ContExp, ContExp}
85
+
86
+ otherwise = element otherwise {CommonAtt, DefEncAtt, ContExp}
87
+
88
+
89
+ interval.class = interval
90
+ ContExp |= interval.class
91
+
92
+
93
+ interval = element interval { CommonAtt, DefEncAtt,closure?, ContExp,ContExp}
94
+
95
+ unary-functional.class = inverse | ident | domain | codomain | image | ln | log | moment
96
+ ContExp |= unary-functional.class
97
+
98
+
99
+ inverse = element inverse { CommonAtt, DefEncAtt, empty}
100
+ ident = element ident { CommonAtt, DefEncAtt, empty}
101
+ domain = element domain { CommonAtt, DefEncAtt, empty}
102
+ codomain = element codomain { CommonAtt, DefEncAtt, empty}
103
+ image = element image { CommonAtt, DefEncAtt, empty}
104
+ ln = element ln { CommonAtt, DefEncAtt, empty}
105
+ log = element log { CommonAtt, DefEncAtt, empty}
106
+ moment = element moment { CommonAtt, DefEncAtt, empty}
107
+
108
+ lambda.class = lambda
109
+ ContExp |= lambda.class
110
+
111
+
112
+ lambda = element lambda { CommonAtt, DefEncAtt, BvarQ, DomainQ, ContExp}
113
+
114
+ nary-functional.class = compose
115
+ ContExp |= nary-functional.class
116
+
117
+
118
+ compose = element compose { CommonAtt, DefEncAtt, empty}
119
+
120
+ binary-arith.class = quotient | divide | minus | power | rem | root
121
+ ContExp |= binary-arith.class
122
+
123
+
124
+ quotient = element quotient { CommonAtt, DefEncAtt, empty}
125
+ divide = element divide { CommonAtt, DefEncAtt, empty}
126
+ minus = element minus { CommonAtt, DefEncAtt, empty}
127
+ power = element power { CommonAtt, DefEncAtt, empty}
128
+ rem = element rem { CommonAtt, DefEncAtt, empty}
129
+ root = element root { CommonAtt, DefEncAtt, empty}
130
+
131
+ unary-arith.class = factorial | minus | root | abs | conjugate | arg | real | imaginary | floor | ceiling | exp
132
+ ContExp |= unary-arith.class
133
+
134
+
135
+ factorial = element factorial { CommonAtt, DefEncAtt, empty}
136
+ abs = element abs { CommonAtt, DefEncAtt, empty}
137
+ conjugate = element conjugate { CommonAtt, DefEncAtt, empty}
138
+ arg = element arg { CommonAtt, DefEncAtt, empty}
139
+ real = element real { CommonAtt, DefEncAtt, empty}
140
+ imaginary = element imaginary { CommonAtt, DefEncAtt, empty}
141
+ floor = element floor { CommonAtt, DefEncAtt, empty}
142
+ ceiling = element ceiling { CommonAtt, DefEncAtt, empty}
143
+ exp = element exp { CommonAtt, DefEncAtt, empty}
144
+
145
+ nary-minmax.class = max | min
146
+ ContExp |= nary-minmax.class
147
+
148
+
149
+ max = element max { CommonAtt, DefEncAtt, empty}
150
+ min = element min { CommonAtt, DefEncAtt, empty}
151
+
152
+ nary-arith.class = plus | times | gcd | lcm
153
+ ContExp |= nary-arith.class
154
+
155
+
156
+ plus = element plus { CommonAtt, DefEncAtt, empty}
157
+ times = element times { CommonAtt, DefEncAtt, empty}
158
+ gcd = element gcd { CommonAtt, DefEncAtt, empty}
159
+ lcm = element lcm { CommonAtt, DefEncAtt, empty}
160
+
161
+ nary-logical.class = and | or | xor
162
+ ContExp |= nary-logical.class
163
+
164
+
165
+ and = element and { CommonAtt, DefEncAtt, empty}
166
+ or = element or { CommonAtt, DefEncAtt, empty}
167
+ xor = element xor { CommonAtt, DefEncAtt, empty}
168
+
169
+ unary-logical.class = not
170
+ ContExp |= unary-logical.class
171
+
172
+
173
+ not = element not { CommonAtt, DefEncAtt, empty}
174
+
175
+ binary-logical.class = implies | equivalent
176
+ ContExp |= binary-logical.class
177
+
178
+
179
+ implies = element implies { CommonAtt, DefEncAtt, empty}
180
+ equivalent = element equivalent { CommonAtt, DefEncAtt, empty}
181
+
182
+ quantifier.class = forall | exists
183
+ ContExp |= quantifier.class
184
+
185
+
186
+ forall = element forall { CommonAtt, DefEncAtt, empty}
187
+ exists = element exists { CommonAtt, DefEncAtt, empty}
188
+
189
+ nary-reln.class = eq | gt | lt | geq | leq
190
+ ContExp |= nary-reln.class
191
+
192
+
193
+ eq = element eq { CommonAtt, DefEncAtt, empty}
194
+ gt = element gt { CommonAtt, DefEncAtt, empty}
195
+ lt = element lt { CommonAtt, DefEncAtt, empty}
196
+ geq = element geq { CommonAtt, DefEncAtt, empty}
197
+ leq = element leq { CommonAtt, DefEncAtt, empty}
198
+
199
+ binary-reln.class = neq | approx | factorof | tendsto
200
+ ContExp |= binary-reln.class
201
+
202
+
203
+ neq = element neq { CommonAtt, DefEncAtt, empty}
204
+ approx = element approx { CommonAtt, DefEncAtt, empty}
205
+ factorof = element factorof { CommonAtt, DefEncAtt, empty}
206
+ tendsto = element tendsto { CommonAtt, DefEncAtt, type?, empty}
207
+
208
+ int.class = int
209
+ ContExp |= int.class
210
+
211
+
212
+ int = element int { CommonAtt, DefEncAtt, empty}
213
+
214
+ Differential-Operator.class = diff
215
+ ContExp |= Differential-Operator.class
216
+
217
+
218
+ diff = element diff { CommonAtt, DefEncAtt, empty}
219
+
220
+ partialdiff.class = partialdiff
221
+ ContExp |= partialdiff.class
222
+
223
+
224
+ partialdiff = element partialdiff { CommonAtt, DefEncAtt, empty}
225
+
226
+ unary-veccalc.class = divergence | grad | curl | laplacian
227
+ ContExp |= unary-veccalc.class
228
+
229
+
230
+ divergence = element divergence { CommonAtt, DefEncAtt, empty}
231
+ grad = element grad { CommonAtt, DefEncAtt, empty}
232
+ curl = element curl { CommonAtt, DefEncAtt, empty}
233
+ laplacian = element laplacian { CommonAtt, DefEncAtt, empty}
234
+
235
+ nary-setlist-constructor.class = set | \list
236
+ ContExp |= nary-setlist-constructor.class
237
+
238
+
239
+ set = element set { CommonAtt, DefEncAtt, type?, BvarQ*, DomainQ*, ContExp*}
240
+ \list = element \list { CommonAtt, DefEncAtt, order?, BvarQ*, DomainQ*, ContExp*}
241
+
242
+ nary-set.class = union | intersect | cartesianproduct
243
+ ContExp |= nary-set.class
244
+
245
+
246
+ union = element union { CommonAtt, DefEncAtt, empty}
247
+ intersect = element intersect { CommonAtt, DefEncAtt, empty}
248
+ cartesianproduct = element cartesianproduct { CommonAtt, DefEncAtt, empty}
249
+
250
+ binary-set.class = in | notin | notsubset | notprsubset | setdiff
251
+ ContExp |= binary-set.class
252
+
253
+
254
+ in = element in { CommonAtt, DefEncAtt, empty}
255
+ notin = element notin { CommonAtt, DefEncAtt, empty}
256
+ notsubset = element notsubset { CommonAtt, DefEncAtt, empty}
257
+ notprsubset = element notprsubset { CommonAtt, DefEncAtt, empty}
258
+ setdiff = element setdiff { CommonAtt, DefEncAtt, empty}
259
+
260
+ nary-set-reln.class = subset | prsubset
261
+ ContExp |= nary-set-reln.class
262
+
263
+
264
+ subset = element subset { CommonAtt, DefEncAtt, empty}
265
+ prsubset = element prsubset { CommonAtt, DefEncAtt, empty}
266
+
267
+ unary-set.class = card
268
+ ContExp |= unary-set.class
269
+
270
+
271
+ card = element card { CommonAtt, DefEncAtt, empty}
272
+
273
+ sum.class = sum
274
+ ContExp |= sum.class
275
+
276
+
277
+ sum = element sum { CommonAtt, DefEncAtt, empty}
278
+
279
+ product.class = product
280
+ ContExp |= product.class
281
+
282
+
283
+ product = element product { CommonAtt, DefEncAtt, empty}
284
+
285
+ limit.class = limit
286
+ ContExp |= limit.class
287
+
288
+
289
+ limit = element limit { CommonAtt, DefEncAtt, empty}
290
+
291
+ unary-elementary.class = sin | cos | tan | sec | csc | cot | sinh | cosh | tanh | sech | csch | coth | arcsin | arccos | arctan | arccosh | arccot | arccoth | arccsc | arccsch | arcsec | arcsech | arcsinh | arctanh
292
+ ContExp |= unary-elementary.class
293
+
294
+
295
+ sin = element sin { CommonAtt, DefEncAtt, empty}
296
+ cos = element cos { CommonAtt, DefEncAtt, empty}
297
+ tan = element tan { CommonAtt, DefEncAtt, empty}
298
+ sec = element sec { CommonAtt, DefEncAtt, empty}
299
+ csc = element csc { CommonAtt, DefEncAtt, empty}
300
+ cot = element cot { CommonAtt, DefEncAtt, empty}
301
+ sinh = element sinh { CommonAtt, DefEncAtt, empty}
302
+ cosh = element cosh { CommonAtt, DefEncAtt, empty}
303
+ tanh = element tanh { CommonAtt, DefEncAtt, empty}
304
+ sech = element sech { CommonAtt, DefEncAtt, empty}
305
+ csch = element csch { CommonAtt, DefEncAtt, empty}
306
+ coth = element coth { CommonAtt, DefEncAtt, empty}
307
+ arcsin = element arcsin { CommonAtt, DefEncAtt, empty}
308
+ arccos = element arccos { CommonAtt, DefEncAtt, empty}
309
+ arctan = element arctan { CommonAtt, DefEncAtt, empty}
310
+ arccosh = element arccosh { CommonAtt, DefEncAtt, empty}
311
+ arccot = element arccot { CommonAtt, DefEncAtt, empty}
312
+ arccoth = element arccoth { CommonAtt, DefEncAtt, empty}
313
+ arccsc = element arccsc { CommonAtt, DefEncAtt, empty}
314
+ arccsch = element arccsch { CommonAtt, DefEncAtt, empty}
315
+ arcsec = element arcsec { CommonAtt, DefEncAtt, empty}
316
+ arcsech = element arcsech { CommonAtt, DefEncAtt, empty}
317
+ arcsinh = element arcsinh { CommonAtt, DefEncAtt, empty}
318
+ arctanh = element arctanh { CommonAtt, DefEncAtt, empty}
319
+
320
+ nary-stats.class = mean | median | mode | sdev | variance
321
+ ContExp |= nary-stats.class
322
+
323
+
324
+ mean = element mean { CommonAtt, DefEncAtt, empty}
325
+ median = element median { CommonAtt, DefEncAtt, empty}
326
+ mode = element mode { CommonAtt, DefEncAtt, empty}
327
+ sdev = element sdev { CommonAtt, DefEncAtt, empty}
328
+ variance = element variance { CommonAtt, DefEncAtt, empty}
329
+
330
+ nary-constructor.class = vector | matrix | matrixrow
331
+ ContExp |= nary-constructor.class
332
+
333
+
334
+ vector = element vector { CommonAtt, DefEncAtt, BvarQ, DomainQ, ContExp*}
335
+ matrix = element matrix { CommonAtt, DefEncAtt, BvarQ, DomainQ, ContExp*}
336
+ matrixrow = element matrixrow { CommonAtt, DefEncAtt, BvarQ, DomainQ, ContExp*}
337
+
338
+ unary-linalg.class = determinant | transpose
339
+ ContExp |= unary-linalg.class
340
+
341
+
342
+ determinant = element determinant { CommonAtt, DefEncAtt, empty}
343
+ transpose = element transpose { CommonAtt, DefEncAtt, empty}
344
+
345
+ nary-linalg.class = selector
346
+ ContExp |= nary-linalg.class
347
+
348
+
349
+ selector = element selector { CommonAtt, DefEncAtt, empty}
350
+
351
+ binary-linalg.class = vectorproduct | scalarproduct | outerproduct
352
+ ContExp |= binary-linalg.class
353
+
354
+
355
+ vectorproduct = element vectorproduct { CommonAtt, DefEncAtt, empty}
356
+ scalarproduct = element scalarproduct { CommonAtt, DefEncAtt, empty}
357
+ outerproduct = element outerproduct { CommonAtt, DefEncAtt, empty}
358
+
359
+ constant-set.class = integers | reals | rationals | naturalnumbers | complexes | primes | emptyset
360
+ ContExp |= constant-set.class
361
+
362
+
363
+ integers = element integers { CommonAtt, DefEncAtt, empty}
364
+ reals = element reals { CommonAtt, DefEncAtt, empty}
365
+ rationals = element rationals { CommonAtt, DefEncAtt, empty}
366
+ naturalnumbers = element naturalnumbers { CommonAtt, DefEncAtt, empty}
367
+ complexes = element complexes { CommonAtt, DefEncAtt, empty}
368
+ primes = element primes { CommonAtt, DefEncAtt, empty}
369
+ emptyset = element emptyset { CommonAtt, DefEncAtt, empty}
370
+
371
+ constant-arith.class = exponentiale | imaginaryi | notanumber | true | false | pi | eulergamma | infinity
372
+ ContExp |= constant-arith.class
373
+
374
+
375
+ exponentiale = element exponentiale { CommonAtt, DefEncAtt, empty}
376
+ imaginaryi = element imaginaryi { CommonAtt, DefEncAtt, empty}
377
+ notanumber = element notanumber { CommonAtt, DefEncAtt, empty}
378
+ true = element true { CommonAtt, DefEncAtt, empty}
379
+ false = element false { CommonAtt, DefEncAtt, empty}
380
+ pi = element pi { CommonAtt, DefEncAtt, empty}
381
+ eulergamma = element eulergamma { CommonAtt, DefEncAtt, empty}
382
+ infinity = element infinity { CommonAtt, DefEncAtt, empty}