mml 2.3.0 → 2.3.1
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/.gitmodules +9 -0
- data/.rubocop.yml +4 -0
- data/.rubocop_todo.yml +30 -21
- data/Gemfile +0 -2
- data/README.adoc +176 -47
- data/Rakefile +16 -1
- data/lib/mml/base/content/annotation.rb +30 -0
- data/lib/mml/base/content/annotation_xml.rb +31 -0
- data/lib/mml/base/content/apply.rb +27 -0
- data/lib/mml/base/content/arith.rb +243 -0
- data/lib/mml/base/content/bind.rb +27 -0
- data/lib/mml/base/content/bvar.rb +20 -0
- data/lib/mml/base/content/calculus.rb +103 -0
- data/lib/mml/base/content/cbytes.rb +24 -0
- data/lib/mml/base/content/cerror.rb +24 -0
- data/lib/mml/base/content/ci.rb +77 -0
- data/lib/mml/base/content/cn.rb +33 -0
- data/lib/mml/base/content/condition.rb +20 -0
- data/lib/mml/base/content/constants.rb +173 -0
- data/lib/mml/base/content/cs.rb +22 -0
- data/lib/mml/base/content/csymbol.rb +79 -0
- data/lib/mml/base/content/declare.rb +34 -0
- data/lib/mml/base/content/degree.rb +20 -0
- data/lib/mml/base/content/elementary_functions.rb +309 -0
- data/lib/mml/base/content/fn.rb +25 -0
- data/lib/mml/base/content/functions.rb +85 -0
- data/lib/mml/base/content/interval.rb +24 -0
- data/lib/mml/base/content/inverse.rb +25 -0
- data/lib/mml/base/content/lambda.rb +20 -0
- data/lib/mml/base/content/linear_algebra.rb +122 -0
- data/lib/mml/base/content/logic.rb +93 -0
- data/lib/mml/base/content/otherwise.rb +20 -0
- data/lib/mml/base/content/piece.rb +20 -0
- data/lib/mml/base/content/piecewise.rb +20 -0
- data/lib/mml/base/content/relations.rb +113 -0
- data/lib/mml/base/content/reln.rb +19 -0
- data/lib/mml/base/content/semantics.rb +27 -0
- data/lib/mml/base/content/sep.rb +19 -0
- data/lib/mml/base/content/sets.rb +163 -0
- data/lib/mml/base/content/share.rb +24 -0
- data/lib/mml/base/content/statistics.rb +95 -0
- data/lib/mml/base/content/vector_calculus.rb +63 -0
- data/lib/mml/base/content_loader.rb +195 -0
- data/lib/mml/base/maction.rb +1 -0
- data/lib/mml/base/math.rb +41 -0
- data/lib/mml/base/menclose.rb +1 -1
- data/lib/mml/base/mfenced.rb +2 -2
- data/lib/mml/base/mfrac.rb +2 -0
- data/lib/mml/base/mglyph.rb +2 -0
- data/lib/mml/base/mi.rb +7 -2
- data/lib/mml/base/mlabeledtr.rb +0 -4
- data/lib/mml/base/mn.rb +5 -2
- data/lib/mml/base/mo.rb +0 -2
- data/lib/mml/base/mrow.rb +0 -2
- data/lib/mml/base/ms.rb +2 -4
- data/lib/mml/base/mscarries.rb +1 -1
- data/lib/mml/base/mstyle.rb +2 -6
- data/lib/mml/base/mtable.rb +8 -0
- data/lib/mml/base/mtd.rb +6 -0
- data/lib/mml/base/mtext.rb +0 -2
- data/lib/mml/base/semantics.rb +4 -2
- data/lib/mml/base/universal_presentation_attributes.rb +42 -0
- data/lib/mml/base/v3_common.rb +16 -0
- data/lib/mml/base/v3_presentation_attributes.rb +15 -0
- data/lib/mml/base/v4_attributes.rb +4 -18
- data/lib/mml/base.rb +10 -0
- data/lib/mml/common_elements.rb +334 -0
- data/lib/mml/context_configuration.rb +29 -0
- data/lib/mml/v2/annotation.rb +9 -0
- data/lib/mml/v2/annotation_xml.rb +9 -0
- data/lib/mml/v2/apply.rb +9 -0
- data/lib/mml/v2/arith.rb +93 -0
- data/lib/mml/v2/bind.rb +9 -0
- data/lib/mml/v2/bvar.rb +9 -0
- data/lib/mml/v2/calculus.rb +33 -0
- data/lib/mml/v2/ci.rb +9 -0
- data/lib/mml/v2/cn.rb +9 -0
- data/lib/mml/v2/common_elements.rb +34 -0
- data/lib/mml/v2/condition.rb +9 -0
- data/lib/mml/v2/configuration.rb +13 -0
- data/lib/mml/v2/constants.rb +65 -0
- data/lib/mml/v2/csymbol.rb +9 -0
- data/lib/mml/v2/degree.rb +9 -0
- data/lib/mml/v2/elementary_functions.rb +121 -0
- data/lib/mml/v2/fn.rb +9 -0
- data/lib/mml/v2/functions.rb +29 -0
- data/lib/mml/v2/interval.rb +9 -0
- data/lib/mml/v2/inverse.rb +9 -0
- data/lib/mml/v2/lambda.rb +9 -0
- data/lib/mml/v2/linear_algebra.rb +41 -0
- data/lib/mml/v2/logic.rb +33 -0
- data/lib/mml/v2/maction.rb +9 -0
- data/lib/mml/v2/maligngroup.rb +9 -0
- data/lib/mml/v2/malignmark.rb +9 -0
- data/lib/mml/v2/math.rb +11 -0
- data/lib/mml/v2/menclose.rb +9 -0
- data/lib/mml/v2/merror.rb +9 -0
- data/lib/mml/v2/mfenced.rb +9 -0
- data/lib/mml/v2/mfrac.rb +9 -0
- data/lib/mml/v2/mfraction.rb +9 -0
- data/lib/mml/v2/mglyph.rb +9 -0
- data/lib/mml/v2/mi.rb +9 -0
- data/lib/mml/v2/mlabeledtr.rb +9 -0
- data/lib/mml/v2/mlongdiv.rb +9 -0
- data/lib/mml/v2/mmultiscripts.rb +9 -0
- data/lib/mml/v2/mn.rb +9 -0
- data/lib/mml/v2/mo.rb +10 -0
- data/lib/mml/v2/mover.rb +9 -0
- data/lib/mml/v2/mpadded.rb +9 -0
- data/lib/mml/v2/mphantom.rb +9 -0
- data/lib/mml/v2/mprescripts.rb +9 -0
- data/lib/mml/v2/mroot.rb +9 -0
- data/lib/mml/v2/mrow.rb +9 -0
- data/lib/mml/v2/ms.rb +9 -0
- data/lib/mml/v2/mscarries.rb +9 -0
- data/lib/mml/v2/mscarry.rb +9 -0
- data/lib/mml/v2/msgroup.rb +9 -0
- data/lib/mml/v2/msline.rb +9 -0
- data/lib/mml/v2/mspace.rb +9 -0
- data/lib/mml/v2/msqrt.rb +9 -0
- data/lib/mml/v2/msrow.rb +9 -0
- data/lib/mml/v2/mstack.rb +9 -0
- data/lib/mml/v2/mstyle.rb +10 -0
- data/lib/mml/v2/msub.rb +9 -0
- data/lib/mml/v2/msubsup.rb +9 -0
- data/lib/mml/v2/msup.rb +9 -0
- data/lib/mml/v2/mtable.rb +9 -0
- data/lib/mml/v2/mtd.rb +9 -0
- data/lib/mml/v2/mtext.rb +9 -0
- data/lib/mml/v2/mtr.rb +9 -0
- data/lib/mml/v2/munder.rb +9 -0
- data/lib/mml/v2/munderover.rb +9 -0
- data/lib/mml/v2/namespace.rb +7 -0
- data/lib/mml/v2/none.rb +9 -0
- data/lib/mml/v2/otherwise.rb +9 -0
- data/lib/mml/v2/piece.rb +9 -0
- data/lib/mml/v2/piecewise.rb +9 -0
- data/lib/mml/v2/relations.rb +41 -0
- data/lib/mml/v2/reln.rb +13 -0
- data/lib/mml/v2/semantics.rb +9 -0
- data/lib/mml/v2/sep.rb +9 -0
- data/lib/mml/v2/sets.rb +57 -0
- data/lib/mml/v2/statistics.rb +33 -0
- data/lib/mml/v2/vector_calculus.rb +21 -0
- data/lib/mml/v2.rb +311 -0
- data/lib/mml/v3/annotation.rb +10 -0
- data/lib/mml/v3/annotation_xml.rb +10 -0
- data/lib/mml/v3/apply.rb +10 -0
- data/lib/mml/v3/arith.rb +115 -0
- data/lib/mml/v3/bind.rb +10 -0
- data/lib/mml/v3/calculus.rb +40 -0
- data/lib/mml/v3/cbytes.rb +10 -0
- data/lib/mml/v3/cerror.rb +10 -0
- data/lib/mml/v3/ci.rb +10 -0
- data/lib/mml/v3/cn.rb +10 -0
- data/lib/mml/v3/common_elements.rb +34 -0
- data/lib/mml/v3/constants.rb +80 -0
- data/lib/mml/v3/constructs.rb +55 -0
- data/lib/mml/v3/cs.rb +10 -0
- data/lib/mml/v3/csymbol.rb +10 -0
- data/lib/mml/v3/deprecated_content.rb +29 -0
- data/lib/mml/v3/elementary_functions.rb +145 -0
- data/lib/mml/v3/functions.rb +35 -0
- data/lib/mml/v3/linear_algebra.rb +50 -0
- data/lib/mml/v3/logic.rb +40 -0
- data/lib/mml/v3/maction.rb +1 -1
- data/lib/mml/v3/math.rb +7 -1
- data/lib/mml/v3/mi.rb +1 -0
- data/lib/mml/v3/mn.rb +1 -0
- data/lib/mml/v3/mo.rb +1 -0
- data/lib/mml/v3/mrow.rb +1 -0
- data/lib/mml/v3/ms.rb +1 -0
- data/lib/mml/v3/mstyle.rb +1 -0
- data/lib/mml/v3/mtext.rb +1 -0
- data/lib/mml/v3/relations.rb +50 -0
- data/lib/mml/v3/sets.rb +70 -0
- data/lib/mml/v3/statistics.rb +40 -0
- data/lib/mml/v3/vector_calculus.rb +25 -0
- data/lib/mml/v3.rb +25 -0
- data/lib/mml/v4/a.rb +0 -1
- data/lib/mml/v4/annotation.rb +10 -0
- data/lib/mml/v4/annotation_xml.rb +14 -0
- data/lib/mml/v4/apply.rb +9 -0
- data/lib/mml/v4/arith.rb +93 -0
- data/lib/mml/v4/calculus.rb +25 -0
- data/lib/mml/v4/cbytes.rb +9 -0
- data/lib/mml/v4/cerror.rb +9 -0
- data/lib/mml/v4/ci.rb +9 -0
- data/lib/mml/v4/cn.rb +9 -0
- data/lib/mml/v4/common_elements.rb +33 -0
- data/lib/mml/v4/constants.rb +65 -0
- data/lib/mml/v4/constructs.rb +49 -0
- data/lib/mml/v4/cs.rb +9 -0
- data/lib/mml/v4/csymbol.rb +9 -0
- data/lib/mml/v4/deprecated_content.rb +25 -0
- data/lib/mml/v4/elementary_functions.rb +118 -0
- data/lib/mml/v4/factorof.rb +9 -0
- data/lib/mml/v4/functions.rb +30 -0
- data/lib/mml/v4/limit.rb +9 -0
- data/lib/mml/v4/linear_algebra.rb +41 -0
- data/lib/mml/v4/logic.rb +33 -0
- data/lib/mml/v4/maction.rb +1 -2
- data/lib/mml/v4/maligngroup.rb +0 -1
- data/lib/mml/v4/malignmark.rb +0 -1
- data/lib/mml/v4/math.rb +1 -1
- data/lib/mml/v4/menclose.rb +0 -1
- data/lib/mml/v4/merror.rb +0 -1
- data/lib/mml/v4/mfenced.rb +0 -1
- data/lib/mml/v4/mfrac.rb +0 -1
- data/lib/mml/v4/mfraction.rb +0 -1
- data/lib/mml/v4/mglyph.rb +0 -1
- data/lib/mml/v4/mi.rb +1 -1
- data/lib/mml/v4/mlabeledtr.rb +0 -1
- data/lib/mml/v4/mlongdiv.rb +0 -1
- data/lib/mml/v4/mmultiscripts.rb +0 -1
- data/lib/mml/v4/mn.rb +1 -1
- data/lib/mml/v4/mo.rb +1 -1
- data/lib/mml/v4/mover.rb +0 -1
- data/lib/mml/v4/mpadded.rb +0 -1
- data/lib/mml/v4/mphantom.rb +0 -1
- data/lib/mml/v4/mprescripts.rb +0 -1
- data/lib/mml/v4/mroot.rb +0 -1
- data/lib/mml/v4/mrow.rb +1 -1
- data/lib/mml/v4/ms.rb +1 -1
- data/lib/mml/v4/mscarries.rb +0 -1
- data/lib/mml/v4/mscarry.rb +0 -1
- data/lib/mml/v4/msgroup.rb +0 -1
- data/lib/mml/v4/msline.rb +0 -1
- data/lib/mml/v4/mspace.rb +0 -1
- data/lib/mml/v4/msqrt.rb +0 -1
- data/lib/mml/v4/msrow.rb +0 -1
- data/lib/mml/v4/mstack.rb +0 -1
- data/lib/mml/v4/mstyle.rb +1 -1
- data/lib/mml/v4/msub.rb +0 -1
- data/lib/mml/v4/msubsup.rb +0 -1
- data/lib/mml/v4/msup.rb +0 -1
- data/lib/mml/v4/mtable.rb +0 -1
- data/lib/mml/v4/mtd.rb +0 -1
- data/lib/mml/v4/mtext.rb +1 -1
- data/lib/mml/v4/mtr.rb +0 -1
- data/lib/mml/v4/munder.rb +0 -1
- data/lib/mml/v4/munderover.rb +0 -1
- data/lib/mml/v4/none.rb +0 -1
- data/lib/mml/v4/relations.rb +37 -0
- data/lib/mml/v4/semantics.rb +0 -1
- data/lib/mml/v4/sets.rb +57 -0
- data/lib/mml/v4/statistics.rb +33 -0
- data/lib/mml/v4/tendsto.rb +9 -0
- data/lib/mml/v4/vector_calculus.rb +21 -0
- data/lib/mml/v4.rb +421 -44
- data/lib/mml/version.rb +1 -1
- data/lib/mml/versioned_parser.rb +1 -1
- data/lib/mml.rb +3 -1
- data/reference-docs/mathml-source/pubtext/mathmlspec.dtd +150 -0
- data/reference-docs/mathml-source/pubtext/xmlspec.dtd +2649 -0
- data/reference-docs/mathml-source/readme.txt +40 -0
- data/reference-docs/mathml-source/run +296 -0
- data/reference-docs/mathml-source/style/html/html2xhtml.xsl +216 -0
- data/reference-docs/mathml-source/style/html/images.xsl +98 -0
- data/reference-docs/mathml-source/style/html/mml6.xsl +1156 -0
- data/reference-docs/mathml-source/style/html/mmldiff.xsl +566 -0
- data/reference-docs/mathml-source/style/html/mmlspec.xsl +2531 -0
- data/reference-docs/mathml-source/style/html/slices-common.xsl +312 -0
- data/reference-docs/mathml-source/style/html/slices.xsl +48 -0
- data/reference-docs/mathml-source/style/html/xmlspec.xsl +2542 -0
- data/reference-docs/mathml-source/style/pdf/mathmlspec.xsl +2510 -0
- data/reference-docs/mathml-source/xml/changes.xml +773 -0
- data/reference-docs/mathml-source/xml/character-set.xml +1011 -0
- data/reference-docs/mathml-source/xml/content-element-def.xml +6143 -0
- data/reference-docs/mathml-source/xml/content-markup.xml +8178 -0
- data/reference-docs/mathml-source/xml/contributors.xml +425 -0
- data/reference-docs/mathml-source/xml/dom-bindings.xml +20 -0
- data/reference-docs/mathml-source/xml/dom-intro.xml +114 -0
- data/reference-docs/mathml-source/xml/fundamentals.xml +1646 -0
- data/reference-docs/mathml-source/xml/glossary.xml +519 -0
- data/reference-docs/mathml-source/xml/interface.xml +1096 -0
- data/reference-docs/mathml-source/xml/introduction.xml +724 -0
- data/reference-docs/mathml-source/xml/mathml-css-sample.xml +304 -0
- data/reference-docs/mathml-source/xml/mathml-dom.xml +3813 -0
- data/reference-docs/mathml-source/xml/mathml-spec.xml +356 -0
- data/reference-docs/mathml-source/xml/mixing.xml +982 -0
- data/reference-docs/mathml-source/xml/operator-dict.xml +551 -0
- data/reference-docs/mathml-source/xml/parsing.xml +2565 -0
- data/reference-docs/mathml-source/xml/presentation-markup.xml +6834 -0
- data/reference-docs/mathml-source/xml/references.xml +323 -0
- data/reference-docs/mathml-source/xml/validation-grammar.xml +877 -0
- data/schemas/README.adoc +15 -0
- data/schemas/mathml2/CVS/Entries +4 -0
- data/schemas/mathml2/CVS/Repository +1 -0
- data/schemas/mathml2/CVS/Root +1 -0
- data/schemas/mathml2/common/CVS/Entries +4 -0
- data/schemas/mathml2/common/CVS/Repository +1 -0
- data/schemas/mathml2/common/CVS/Root +1 -0
- data/schemas/mathml2/common/common-attribs.xsd +41 -0
- data/schemas/mathml2/common/math.xsd +126 -0
- data/schemas/mathml2/common/xlink-href.xsd +20 -0
- data/schemas/mathml2/content/CVS/Entries +16 -0
- data/schemas/mathml2/content/CVS/Repository +1 -0
- data/schemas/mathml2/content/CVS/Root +1 -0
- data/schemas/mathml2/content/arith.xsd +90 -0
- data/schemas/mathml2/content/calculus.xsd +146 -0
- data/schemas/mathml2/content/common-attrib.xsd +30 -0
- data/schemas/mathml2/content/constants.xsd +83 -0
- data/schemas/mathml2/content/constructs.xsd +260 -0
- data/schemas/mathml2/content/elementary-functions.xsd +117 -0
- data/schemas/mathml2/content/functions.xsd +73 -0
- data/schemas/mathml2/content/linear-algebra.xsd +173 -0
- data/schemas/mathml2/content/logic.xsd +53 -0
- data/schemas/mathml2/content/relations.xsd +55 -0
- data/schemas/mathml2/content/semantics.xsd +85 -0
- data/schemas/mathml2/content/sets.xsd +236 -0
- data/schemas/mathml2/content/statistics.xsd +136 -0
- data/schemas/mathml2/content/tokens.xsd +120 -0
- data/schemas/mathml2/content/tokens.xsd.~1.3.~ +119 -0
- data/schemas/mathml2/content/vector-calculus.xsd +88 -0
- data/schemas/mathml2/mathml2.xsd +59 -0
- data/schemas/mathml2/presentation/CVS/Entries +12 -0
- data/schemas/mathml2/presentation/CVS/Repository +1 -0
- data/schemas/mathml2/presentation/CVS/Root +1 -0
- data/schemas/mathml2/presentation/action.xsd +44 -0
- data/schemas/mathml2/presentation/characters.xsd +37 -0
- data/schemas/mathml2/presentation/common-attribs.xsd +113 -0
- data/schemas/mathml2/presentation/common-types.xsd +103 -0
- data/schemas/mathml2/presentation/error.xsd +40 -0
- data/schemas/mathml2/presentation/layout.xsd +195 -0
- data/schemas/mathml2/presentation/scripts.xsd +186 -0
- data/schemas/mathml2/presentation/space.xsd +52 -0
- data/schemas/mathml2/presentation/style.xsd +69 -0
- data/schemas/mathml2/presentation/table.xsd +216 -0
- data/schemas/mathml2/presentation/tokens.xsd +124 -0
- data/schemas/mathml3/mathml3-common.xsd +99 -0
- data/schemas/mathml3/mathml3-content.xsd +684 -0
- data/schemas/mathml3/mathml3-presentation.xsd +2151 -0
- data/schemas/mathml3/mathml3-strict-content.xsd +186 -0
- data/schemas/mathml3/mathml3.xsd +9 -0
- metadata +250 -2
data/lib/mml/common_elements.rb
CHANGED
|
@@ -4,6 +4,7 @@ require "lutaml/model"
|
|
|
4
4
|
|
|
5
5
|
module Mml
|
|
6
6
|
class CommonElements < Lutaml::Model::Serializable
|
|
7
|
+
# Presentation elements
|
|
7
8
|
attribute :mmultiscripts_value, :mmultiscripts, collection: true
|
|
8
9
|
attribute :maligngroup_value, :maligngroup, collection: true
|
|
9
10
|
attribute :malignmark_value, :malignmark, collection: true
|
|
@@ -41,8 +42,175 @@ module Mml
|
|
|
41
42
|
attribute :mo_value, :mo, collection: true
|
|
42
43
|
attribute :mn_value, :mn, collection: true
|
|
43
44
|
attribute :ms_value, :ms, collection: true
|
|
45
|
+
attribute :maction_value, :maction, collection: true
|
|
44
46
|
|
|
47
|
+
# Content elements - containers
|
|
48
|
+
attribute :apply_value, :apply, collection: true
|
|
49
|
+
attribute :ci_value, :ci, collection: true
|
|
50
|
+
attribute :cn_value, :cn, collection: true
|
|
51
|
+
attribute :csymbol_value, :csymbol, collection: true
|
|
52
|
+
attribute :annotation_xml_value, :"annotation-xml", collection: true
|
|
53
|
+
|
|
54
|
+
# Content elements - constructs
|
|
55
|
+
attribute :bind_value, :bind, collection: true
|
|
56
|
+
attribute :bvar_value, :bvar, collection: true
|
|
57
|
+
attribute :condition_value, :condition, collection: true
|
|
58
|
+
attribute :interval_value, :interval, collection: true
|
|
59
|
+
attribute :lambda_value, :lambda, collection: true
|
|
60
|
+
attribute :inverse_value, :inverse, collection: true
|
|
61
|
+
attribute :degree_value, :degree, collection: true
|
|
62
|
+
attribute :piecewise_value, :piecewise, collection: true
|
|
63
|
+
attribute :piece_value, :piece, collection: true
|
|
64
|
+
attribute :otherwise_value, :otherwise, collection: true
|
|
65
|
+
attribute :sep_value, :sep, collection: true
|
|
66
|
+
|
|
67
|
+
# Content elements - arithmetic
|
|
68
|
+
attribute :abs_value, :abs, collection: true
|
|
69
|
+
attribute :conjugate_value, :conjugate, collection: true
|
|
70
|
+
attribute :arg_value, :arg, collection: true
|
|
71
|
+
attribute :real_value, :real, collection: true
|
|
72
|
+
attribute :imaginary_value, :imaginary, collection: true
|
|
73
|
+
attribute :floor_value, :floor, collection: true
|
|
74
|
+
attribute :ceiling_value, :ceiling, collection: true
|
|
75
|
+
attribute :quotient_value, :quotient, collection: true
|
|
76
|
+
attribute :divide_value, :divide, collection: true
|
|
77
|
+
attribute :rem_value, :rem, collection: true
|
|
78
|
+
attribute :minus_value, :minus, collection: true
|
|
79
|
+
attribute :plus_value, :plus, collection: true
|
|
80
|
+
attribute :times_value, :times, collection: true
|
|
81
|
+
attribute :power_value, :power, collection: true
|
|
82
|
+
attribute :root_value, :root, collection: true
|
|
83
|
+
attribute :max_value, :max, collection: true
|
|
84
|
+
attribute :min_value, :min, collection: true
|
|
85
|
+
attribute :gcd_value, :gcd, collection: true
|
|
86
|
+
attribute :lcm_value, :lcm, collection: true
|
|
87
|
+
attribute :sum_value, :sum, collection: true
|
|
88
|
+
attribute :product_value, :product, collection: true
|
|
89
|
+
attribute :factorial_value, :factorial, collection: true
|
|
90
|
+
|
|
91
|
+
# Content elements - logic
|
|
92
|
+
attribute :and_value, :and, collection: true
|
|
93
|
+
attribute :or_value, :or, collection: true
|
|
94
|
+
attribute :xor_value, :xor, collection: true
|
|
95
|
+
attribute :not_value, :not, collection: true
|
|
96
|
+
attribute :implies_value, :implies, collection: true
|
|
97
|
+
attribute :forall_value, :forall, collection: true
|
|
98
|
+
attribute :exists_value, :exists, collection: true
|
|
99
|
+
|
|
100
|
+
# Content elements - relations
|
|
101
|
+
attribute :eq_value, :eq, collection: true
|
|
102
|
+
attribute :neq_value, :neq, collection: true
|
|
103
|
+
attribute :lt_value, :lt, collection: true
|
|
104
|
+
attribute :gt_value, :gt, collection: true
|
|
105
|
+
attribute :leq_value, :leq, collection: true
|
|
106
|
+
attribute :geq_value, :geq, collection: true
|
|
107
|
+
attribute :equivalent_value, :equivalent, collection: true
|
|
108
|
+
attribute :approx_value, :approx, collection: true
|
|
109
|
+
|
|
110
|
+
# Content elements - sets
|
|
111
|
+
attribute :set_value, :set, collection: true
|
|
112
|
+
attribute :list_value, :list, collection: true
|
|
113
|
+
attribute :union_value, :union, collection: true
|
|
114
|
+
attribute :intersect_value, :intersect, collection: true
|
|
115
|
+
attribute :in_value, :in, collection: true
|
|
116
|
+
attribute :notin_value, :notin, collection: true
|
|
117
|
+
attribute :notsubset_value, :notsubset, collection: true
|
|
118
|
+
attribute :notprsubset_value, :notprsubset, collection: true
|
|
119
|
+
attribute :subset_value, :subset, collection: true
|
|
120
|
+
attribute :prsubset_value, :prsubset, collection: true
|
|
121
|
+
attribute :setdiff_value, :setdiff, collection: true
|
|
122
|
+
attribute :card_value, :card, collection: true
|
|
123
|
+
attribute :cartesianproduct_value, :cartesianproduct, collection: true
|
|
124
|
+
|
|
125
|
+
# Content elements - calculus
|
|
126
|
+
attribute :diff_value, :diff, collection: true
|
|
127
|
+
attribute :partialdiff_value, :partialdiff, collection: true
|
|
128
|
+
attribute :int_value, :int, collection: true
|
|
129
|
+
attribute :lowlimit_value, :lowlimit, collection: true
|
|
130
|
+
attribute :uplimit_value, :uplimit, collection: true
|
|
131
|
+
|
|
132
|
+
# Content elements - vector calculus
|
|
133
|
+
attribute :divergence_value, :divergence, collection: true
|
|
134
|
+
attribute :grad_value, :grad, collection: true
|
|
135
|
+
attribute :curl_value, :curl, collection: true
|
|
136
|
+
attribute :laplacian_value, :laplacian, collection: true
|
|
137
|
+
|
|
138
|
+
# Content elements - functions
|
|
139
|
+
attribute :compose_value, :compose, collection: true
|
|
140
|
+
attribute :domain_value, :domain, collection: true
|
|
141
|
+
attribute :codomain_value, :codomain, collection: true
|
|
142
|
+
attribute :image_value, :image, collection: true
|
|
143
|
+
attribute :ident_value, :ident, collection: true
|
|
144
|
+
|
|
145
|
+
# Content elements - elementary functions
|
|
146
|
+
attribute :sin_value, :sin, collection: true
|
|
147
|
+
attribute :cos_value, :cos, collection: true
|
|
148
|
+
attribute :tan_value, :tan, collection: true
|
|
149
|
+
attribute :sec_value, :sec, collection: true
|
|
150
|
+
attribute :csc_value, :csc, collection: true
|
|
151
|
+
attribute :cot_value, :cot, collection: true
|
|
152
|
+
attribute :sinh_value, :sinh, collection: true
|
|
153
|
+
attribute :cosh_value, :cosh, collection: true
|
|
154
|
+
attribute :tanh_value, :tanh, collection: true
|
|
155
|
+
attribute :sech_value, :sech, collection: true
|
|
156
|
+
attribute :csch_value, :csch, collection: true
|
|
157
|
+
attribute :coth_value, :coth, collection: true
|
|
158
|
+
attribute :arcsin_value, :arcsin, collection: true
|
|
159
|
+
attribute :arccos_value, :arccos, collection: true
|
|
160
|
+
attribute :arctan_value, :arctan, collection: true
|
|
161
|
+
attribute :arcsec_value, :arcsec, collection: true
|
|
162
|
+
attribute :arccsc_value, :arccsc, collection: true
|
|
163
|
+
attribute :arccot_value, :arccot, collection: true
|
|
164
|
+
attribute :arcsinh_value, :arcsinh, collection: true
|
|
165
|
+
attribute :arccosh_value, :arccosh, collection: true
|
|
166
|
+
attribute :arctanh_value, :arctanh, collection: true
|
|
167
|
+
attribute :arcsech_value, :arcsech, collection: true
|
|
168
|
+
attribute :arccsch_value, :arccsch, collection: true
|
|
169
|
+
attribute :arccoth_value, :arccoth, collection: true
|
|
170
|
+
attribute :exp_value, :exp, collection: true
|
|
171
|
+
attribute :ln_value, :ln, collection: true
|
|
172
|
+
attribute :log_value, :log, collection: true
|
|
173
|
+
|
|
174
|
+
# Content elements - constants
|
|
175
|
+
attribute :integers_value, :integers, collection: true
|
|
176
|
+
attribute :reals_value, :reals, collection: true
|
|
177
|
+
attribute :rationals_value, :rationals, collection: true
|
|
178
|
+
attribute :naturalnumbers_value, :naturalnumbers, collection: true
|
|
179
|
+
attribute :complexes_value, :complexes, collection: true
|
|
180
|
+
attribute :primes_value, :primes, collection: true
|
|
181
|
+
attribute :exponentiale_value, :exponentiale, collection: true
|
|
182
|
+
attribute :imaginaryi_value, :imaginaryi, collection: true
|
|
183
|
+
attribute :notanumber_value, :notanumber, collection: true
|
|
184
|
+
attribute :true_value, :true, collection: true # rubocop:disable Lint/BooleanSymbol
|
|
185
|
+
attribute :false_value, :false, collection: true # rubocop:disable Lint/BooleanSymbol
|
|
186
|
+
attribute :emptyset_value, :emptyset, collection: true
|
|
187
|
+
attribute :pi_value, :pi, collection: true
|
|
188
|
+
attribute :eulergamma_value, :eulergamma, collection: true
|
|
189
|
+
attribute :infinity_value, :infinity, collection: true
|
|
190
|
+
|
|
191
|
+
# Content elements - linear algebra
|
|
192
|
+
attribute :vector_value, :vector, collection: true
|
|
193
|
+
attribute :matrix_value, :matrix, collection: true
|
|
194
|
+
attribute :matrixrow_value, :matrixrow, collection: true
|
|
195
|
+
attribute :determinant_value, :determinant, collection: true
|
|
196
|
+
attribute :transpose_value, :transpose, collection: true
|
|
197
|
+
attribute :selector_value, :selector, collection: true
|
|
198
|
+
attribute :vectorproduct_value, :vectorproduct, collection: true
|
|
199
|
+
attribute :scalarproduct_value, :scalarproduct, collection: true
|
|
200
|
+
attribute :outerproduct_value, :outerproduct, collection: true
|
|
201
|
+
|
|
202
|
+
# Content elements - statistics
|
|
203
|
+
attribute :mean_value, :mean, collection: true
|
|
204
|
+
attribute :sdev_value, :sdev, collection: true
|
|
205
|
+
attribute :variance_value, :variance, collection: true
|
|
206
|
+
attribute :median_value, :median, collection: true
|
|
207
|
+
attribute :mode_value, :mode, collection: true
|
|
208
|
+
attribute :moment_value, :moment, collection: true
|
|
209
|
+
attribute :momentabout_value, :momentabout, collection: true
|
|
210
|
+
|
|
211
|
+
# rubocop:disable Metrics/BlockLength
|
|
45
212
|
xml do
|
|
213
|
+
# Presentation elements
|
|
46
214
|
map_element "mmultiscripts", to: :mmultiscripts_value
|
|
47
215
|
map_element "maligngroup", to: :maligngroup_value
|
|
48
216
|
map_element "malignmark", to: :malignmark_value
|
|
@@ -80,6 +248,172 @@ module Mml
|
|
|
80
248
|
map_element "mo", to: :mo_value
|
|
81
249
|
map_element "mn", to: :mn_value
|
|
82
250
|
map_element "ms", to: :ms_value
|
|
251
|
+
map_element "maction", to: :maction_value
|
|
252
|
+
|
|
253
|
+
# Content elements - containers
|
|
254
|
+
map_element "apply", to: :apply_value
|
|
255
|
+
map_element "ci", to: :ci_value
|
|
256
|
+
map_element "cn", to: :cn_value
|
|
257
|
+
map_element "csymbol", to: :csymbol_value
|
|
258
|
+
map_element "annotation-xml", to: :annotation_xml_value
|
|
259
|
+
|
|
260
|
+
# Content elements - constructs
|
|
261
|
+
map_element "bind", to: :bind_value
|
|
262
|
+
map_element "bvar", to: :bvar_value
|
|
263
|
+
map_element "condition", to: :condition_value
|
|
264
|
+
map_element "interval", to: :interval_value
|
|
265
|
+
map_element "lambda", to: :lambda_value
|
|
266
|
+
map_element "inverse", to: :inverse_value
|
|
267
|
+
map_element "degree", to: :degree_value
|
|
268
|
+
map_element "piecewise", to: :piecewise_value
|
|
269
|
+
map_element "piece", to: :piece_value
|
|
270
|
+
map_element "otherwise", to: :otherwise_value
|
|
271
|
+
map_element "sep", to: :sep_value
|
|
272
|
+
|
|
273
|
+
# Content elements - arithmetic
|
|
274
|
+
map_element "abs", to: :abs_value
|
|
275
|
+
map_element "conjugate", to: :conjugate_value
|
|
276
|
+
map_element "arg", to: :arg_value
|
|
277
|
+
map_element "real", to: :real_value
|
|
278
|
+
map_element "imaginary", to: :imaginary_value
|
|
279
|
+
map_element "floor", to: :floor_value
|
|
280
|
+
map_element "ceiling", to: :ceiling_value
|
|
281
|
+
map_element "quotient", to: :quotient_value
|
|
282
|
+
map_element "divide", to: :divide_value
|
|
283
|
+
map_element "rem", to: :rem_value
|
|
284
|
+
map_element "minus", to: :minus_value
|
|
285
|
+
map_element "plus", to: :plus_value
|
|
286
|
+
map_element "times", to: :times_value
|
|
287
|
+
map_element "power", to: :power_value
|
|
288
|
+
map_element "root", to: :root_value
|
|
289
|
+
map_element "max", to: :max_value
|
|
290
|
+
map_element "min", to: :min_value
|
|
291
|
+
map_element "gcd", to: :gcd_value
|
|
292
|
+
map_element "lcm", to: :lcm_value
|
|
293
|
+
map_element "sum", to: :sum_value
|
|
294
|
+
map_element "product", to: :product_value
|
|
295
|
+
map_element "factorial", to: :factorial_value
|
|
296
|
+
|
|
297
|
+
# Content elements - logic
|
|
298
|
+
map_element "and", to: :and_value
|
|
299
|
+
map_element "or", to: :or_value
|
|
300
|
+
map_element "xor", to: :xor_value
|
|
301
|
+
map_element "not", to: :not_value
|
|
302
|
+
map_element "implies", to: :implies_value
|
|
303
|
+
map_element "forall", to: :forall_value
|
|
304
|
+
map_element "exists", to: :exists_value
|
|
305
|
+
|
|
306
|
+
# Content elements - relations
|
|
307
|
+
map_element "eq", to: :eq_value
|
|
308
|
+
map_element "neq", to: :neq_value
|
|
309
|
+
map_element "lt", to: :lt_value
|
|
310
|
+
map_element "gt", to: :gt_value
|
|
311
|
+
map_element "leq", to: :leq_value
|
|
312
|
+
map_element "geq", to: :geq_value
|
|
313
|
+
map_element "equivalent", to: :equivalent_value
|
|
314
|
+
map_element "approx", to: :approx_value
|
|
315
|
+
|
|
316
|
+
# Content elements - sets
|
|
317
|
+
map_element "set", to: :set_value
|
|
318
|
+
map_element "list", to: :list_value
|
|
319
|
+
map_element "union", to: :union_value
|
|
320
|
+
map_element "intersect", to: :intersect_value
|
|
321
|
+
map_element "in", to: :in_value
|
|
322
|
+
map_element "notin", to: :notin_value
|
|
323
|
+
map_element "notsubset", to: :notsubset_value
|
|
324
|
+
map_element "notprsubset", to: :notprsubset_value
|
|
325
|
+
map_element "subset", to: :subset_value
|
|
326
|
+
map_element "prsubset", to: :prsubset_value
|
|
327
|
+
map_element "setdiff", to: :setdiff_value
|
|
328
|
+
map_element "card", to: :card_value
|
|
329
|
+
map_element "cartesianproduct", to: :cartesianproduct_value
|
|
330
|
+
|
|
331
|
+
# Content elements - calculus
|
|
332
|
+
map_element "diff", to: :diff_value
|
|
333
|
+
map_element "partialdiff", to: :partialdiff_value
|
|
334
|
+
map_element "int", to: :int_value
|
|
335
|
+
map_element "lowlimit", to: :lowlimit_value
|
|
336
|
+
map_element "uplimit", to: :uplimit_value
|
|
337
|
+
|
|
338
|
+
# Content elements - vector calculus
|
|
339
|
+
map_element "divergence", to: :divergence_value
|
|
340
|
+
map_element "grad", to: :grad_value
|
|
341
|
+
map_element "curl", to: :curl_value
|
|
342
|
+
map_element "laplacian", to: :laplacian_value
|
|
343
|
+
|
|
344
|
+
# Content elements - functions
|
|
345
|
+
map_element "compose", to: :compose_value
|
|
346
|
+
map_element "domain", to: :domain_value
|
|
347
|
+
map_element "codomain", to: :codomain_value
|
|
348
|
+
map_element "image", to: :image_value
|
|
349
|
+
map_element "ident", to: :ident_value
|
|
350
|
+
|
|
351
|
+
# Content elements - elementary functions
|
|
352
|
+
map_element "sin", to: :sin_value
|
|
353
|
+
map_element "cos", to: :cos_value
|
|
354
|
+
map_element "tan", to: :tan_value
|
|
355
|
+
map_element "sec", to: :sec_value
|
|
356
|
+
map_element "csc", to: :csc_value
|
|
357
|
+
map_element "cot", to: :cot_value
|
|
358
|
+
map_element "sinh", to: :sinh_value
|
|
359
|
+
map_element "cosh", to: :cosh_value
|
|
360
|
+
map_element "tanh", to: :tanh_value
|
|
361
|
+
map_element "sech", to: :sech_value
|
|
362
|
+
map_element "csch", to: :csch_value
|
|
363
|
+
map_element "coth", to: :coth_value
|
|
364
|
+
map_element "arcsin", to: :arcsin_value
|
|
365
|
+
map_element "arccos", to: :arccos_value
|
|
366
|
+
map_element "arctan", to: :arctan_value
|
|
367
|
+
map_element "arcsec", to: :arcsec_value
|
|
368
|
+
map_element "arccsc", to: :arccsc_value
|
|
369
|
+
map_element "arccot", to: :arccot_value
|
|
370
|
+
map_element "arcsinh", to: :arcsinh_value
|
|
371
|
+
map_element "arccosh", to: :arccosh_value
|
|
372
|
+
map_element "arctanh", to: :arctanh_value
|
|
373
|
+
map_element "arcsech", to: :arcsech_value
|
|
374
|
+
map_element "arccsch", to: :arccsch_value
|
|
375
|
+
map_element "arccoth", to: :arccoth_value
|
|
376
|
+
map_element "exp", to: :exp_value
|
|
377
|
+
map_element "ln", to: :ln_value
|
|
378
|
+
map_element "log", to: :log_value
|
|
379
|
+
|
|
380
|
+
# Content elements - constants
|
|
381
|
+
map_element "integers", to: :integers_value
|
|
382
|
+
map_element "reals", to: :reals_value
|
|
383
|
+
map_element "rationals", to: :rationals_value
|
|
384
|
+
map_element "naturalnumbers", to: :naturalnumbers_value
|
|
385
|
+
map_element "complexes", to: :complexes_value
|
|
386
|
+
map_element "primes", to: :primes_value
|
|
387
|
+
map_element "exponentiale", to: :exponentiale_value
|
|
388
|
+
map_element "imaginaryi", to: :imaginaryi_value
|
|
389
|
+
map_element "notanumber", to: :notanumber_value
|
|
390
|
+
map_element "true", to: :true_value
|
|
391
|
+
map_element "false", to: :false_value
|
|
392
|
+
map_element "emptyset", to: :emptyset_value
|
|
393
|
+
map_element "pi", to: :pi_value
|
|
394
|
+
map_element "eulergamma", to: :eulergamma_value
|
|
395
|
+
map_element "infinity", to: :infinity_value
|
|
396
|
+
|
|
397
|
+
# Content elements - linear algebra
|
|
398
|
+
map_element "vector", to: :vector_value
|
|
399
|
+
map_element "matrix", to: :matrix_value
|
|
400
|
+
map_element "matrixrow", to: :matrixrow_value
|
|
401
|
+
map_element "determinant", to: :determinant_value
|
|
402
|
+
map_element "transpose", to: :transpose_value
|
|
403
|
+
map_element "selector", to: :selector_value
|
|
404
|
+
map_element "vectorproduct", to: :vectorproduct_value
|
|
405
|
+
map_element "scalarproduct", to: :scalarproduct_value
|
|
406
|
+
map_element "outerproduct", to: :outerproduct_value
|
|
407
|
+
|
|
408
|
+
# Content elements - statistics
|
|
409
|
+
map_element "mean", to: :mean_value
|
|
410
|
+
map_element "sdev", to: :sdev_value
|
|
411
|
+
map_element "variance", to: :variance_value
|
|
412
|
+
map_element "median", to: :median_value
|
|
413
|
+
map_element "mode", to: :mode_value
|
|
414
|
+
map_element "moment", to: :moment_value
|
|
415
|
+
map_element "momentabout", to: :momentabout_value
|
|
83
416
|
end
|
|
417
|
+
# rubocop:enable Metrics/BlockLength
|
|
84
418
|
end
|
|
85
419
|
end
|
|
@@ -66,6 +66,35 @@ module Mml
|
|
|
66
66
|
Lutaml::Model::Config.xml_adapter_type = adapter
|
|
67
67
|
end
|
|
68
68
|
|
|
69
|
+
# Convenience API for setting up model substitutions.
|
|
70
|
+
# Creates a derived context with the given substitutions.
|
|
71
|
+
#
|
|
72
|
+
# @param models [Hash] A hash mapping original classes to substitute classes
|
|
73
|
+
# e.g., { Mml::V4::Mover => Overset }
|
|
74
|
+
#
|
|
75
|
+
# @example
|
|
76
|
+
# Mml::V4::Configuration.custom_models = { Mml::V4::Mover => Overset }
|
|
77
|
+
# math = Mml::V4.parse(xml, context: :custom_models)
|
|
78
|
+
def custom_models=(models)
|
|
79
|
+
substitutions = models.map do |from_type, to_type|
|
|
80
|
+
{ from_type: from_type, to_type: to_type }
|
|
81
|
+
end
|
|
82
|
+
create_context(id: :custom_models, substitutions: substitutions)
|
|
83
|
+
@default_context_id = :custom_models
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def custom_models
|
|
87
|
+
registered_substitutions ||= {}
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def default_context_id
|
|
91
|
+
@default_context_id || context_id
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def clear_custom_models
|
|
95
|
+
@default_context_id = nil
|
|
96
|
+
end
|
|
97
|
+
|
|
69
98
|
private
|
|
70
99
|
|
|
71
100
|
def populate_base_context
|
data/lib/mml/v2/apply.rb
ADDED
data/lib/mml/v2/arith.rb
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module V2
|
|
5
|
+
class Abs < Lutaml::Model::Serializable
|
|
6
|
+
include Base::Content::Abs
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
class Conjugate < Lutaml::Model::Serializable
|
|
10
|
+
include Base::Content::Conjugate
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
class Arg < Lutaml::Model::Serializable
|
|
14
|
+
include Base::Content::Arg
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
class Real < Lutaml::Model::Serializable
|
|
18
|
+
include Base::Content::Real
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
class Imaginary < Lutaml::Model::Serializable
|
|
22
|
+
include Base::Content::Imaginary
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
class Floor < Lutaml::Model::Serializable
|
|
26
|
+
include Base::Content::Floor
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
class Ceiling < Lutaml::Model::Serializable
|
|
30
|
+
include Base::Content::Ceiling
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
class Quotient < Lutaml::Model::Serializable
|
|
34
|
+
include Base::Content::Quotient
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
class Divide < Lutaml::Model::Serializable
|
|
38
|
+
include Base::Content::Divide
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
class Rem < Lutaml::Model::Serializable
|
|
42
|
+
include Base::Content::Rem
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
class Minus < Lutaml::Model::Serializable
|
|
46
|
+
include Base::Content::Minus
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
class Plus < Lutaml::Model::Serializable
|
|
50
|
+
include Base::Content::Plus
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
class Times < Lutaml::Model::Serializable
|
|
54
|
+
include Base::Content::Times
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
class Power < Lutaml::Model::Serializable
|
|
58
|
+
include Base::Content::Power
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
class Root < Lutaml::Model::Serializable
|
|
62
|
+
include Base::Content::Root
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
class Max < Lutaml::Model::Serializable
|
|
66
|
+
include Base::Content::Max
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
class Min < Lutaml::Model::Serializable
|
|
70
|
+
include Base::Content::Min
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
class Gcd < Lutaml::Model::Serializable
|
|
74
|
+
include Base::Content::Gcd
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
class Lcm < Lutaml::Model::Serializable
|
|
78
|
+
include Base::Content::Lcm
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
class Sum < Lutaml::Model::Serializable
|
|
82
|
+
include Base::Content::Sum
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
class Product < Lutaml::Model::Serializable
|
|
86
|
+
include Base::Content::Product
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
class Factorial < Lutaml::Model::Serializable
|
|
90
|
+
include Base::Content::Factorial
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
data/lib/mml/v2/bind.rb
ADDED
data/lib/mml/v2/bvar.rb
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module V2
|
|
5
|
+
class Int < CommonElements
|
|
6
|
+
include Base::Content::Int
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
class Diff < CommonElements
|
|
10
|
+
include Base::Content::Diff
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
class Partialdiff < CommonElements
|
|
14
|
+
include Base::Content::Partialdiff
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
class Limit < CommonElements
|
|
18
|
+
include Base::Content::Limit
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
class Lowlimit < CommonElements
|
|
22
|
+
include Base::Content::Lowlimit
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
class Uplimit < CommonElements
|
|
26
|
+
include Base::Content::Uplimit
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
class Tendsto < CommonElements
|
|
30
|
+
include Base::Content::Tendsto
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
data/lib/mml/v2/ci.rb
ADDED
data/lib/mml/v2/cn.rb
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module V2
|
|
5
|
+
class CommonElements < Mml::CommonElements
|
|
6
|
+
def self.lutaml_default_register
|
|
7
|
+
:mml_v2
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
attribute :factorof_value, :factorof, collection: true
|
|
11
|
+
attribute :limit_value, :limit, collection: true
|
|
12
|
+
attribute :tendsto_value, :tendsto, collection: true
|
|
13
|
+
attribute :domainofapplication_value, :domainofapplication,
|
|
14
|
+
collection: true
|
|
15
|
+
attribute :fn_value, :fn, collection: true
|
|
16
|
+
attribute :reln_value, :reln, collection: true
|
|
17
|
+
attribute :logbase_value, :logbase, collection: true
|
|
18
|
+
attribute :annotation_value, :annotation, collection: true
|
|
19
|
+
attribute :annotation_xml_value, :"annotation-xml", collection: true
|
|
20
|
+
|
|
21
|
+
xml do
|
|
22
|
+
map_element "factorof", to: :factorof_value
|
|
23
|
+
map_element "limit", to: :limit_value
|
|
24
|
+
map_element "tendsto", to: :tendsto_value
|
|
25
|
+
map_element "domainofapplication", to: :domainofapplication_value
|
|
26
|
+
map_element "fn", to: :fn_value
|
|
27
|
+
map_element "reln", to: :reln_value
|
|
28
|
+
map_element "logbase", to: :logbase_value
|
|
29
|
+
map_element "annotation", to: :annotation_value
|
|
30
|
+
map_element "annotation-xml", to: :annotation_xml_value
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|