sts 0.3.3 → 0.4.0

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 (117) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +7 -1
  3. data/.gitignore +2 -0
  4. data/.rubocop-https---raw-githubusercontent-com-riboseinc-oss-guides-master-ci-rubocop-yml +1 -0
  5. data/.rubocop_todo.yml +12 -15
  6. data/Gemfile +9 -13
  7. data/lib/sts/namespaces.rb +13 -0
  8. data/lib/sts/niso_sts/adoption.rb +9 -13
  9. data/lib/sts/niso_sts/adoption_front.rb +1 -3
  10. data/lib/sts/niso_sts/app.rb +14 -25
  11. data/lib/sts/niso_sts/app_group.rb +1 -5
  12. data/lib/sts/niso_sts/back.rb +5 -12
  13. data/lib/sts/niso_sts/body.rb +2 -6
  14. data/lib/sts/niso_sts/caption.rb +6 -10
  15. data/lib/sts/niso_sts/custom_meta.rb +5 -9
  16. data/lib/sts/niso_sts/custom_meta_group.rb +2 -6
  17. data/lib/sts/niso_sts/def.rb +2 -6
  18. data/lib/sts/niso_sts/def_item.rb +4 -9
  19. data/lib/sts/niso_sts/def_list.rb +6 -10
  20. data/lib/sts/niso_sts/display_formula.rb +5 -8
  21. data/lib/sts/niso_sts/document_identification.rb +6 -8
  22. data/lib/sts/niso_sts/ext_link.rb +5 -9
  23. data/lib/sts/niso_sts/figure.rb +8 -15
  24. data/lib/sts/niso_sts/fn.rb +4 -9
  25. data/lib/sts/niso_sts/fn_group.rb +2 -6
  26. data/lib/sts/niso_sts/front.rb +4 -10
  27. data/lib/sts/niso_sts/graphic.rb +5 -11
  28. data/lib/sts/niso_sts/inline_formula.rb +3 -6
  29. data/lib/sts/niso_sts/label.rb +2 -6
  30. data/lib/sts/niso_sts/list.rb +5 -8
  31. data/lib/sts/niso_sts/list_item.rb +8 -13
  32. data/lib/sts/niso_sts/meta_date.rb +3 -5
  33. data/lib/sts/niso_sts/meta_note.rb +6 -9
  34. data/lib/sts/niso_sts/metadata_iso.rb +20 -30
  35. data/lib/sts/niso_sts/metadata_std.rb +25 -30
  36. data/lib/sts/niso_sts/mixed_citation.rb +8 -12
  37. data/lib/sts/{tbx_iso_tml → niso_sts}/named_content.rb +4 -7
  38. data/lib/sts/niso_sts/non_normative_example.rb +5 -10
  39. data/lib/sts/niso_sts/non_normative_note.rb +6 -9
  40. data/lib/sts/niso_sts/object_id.rb +3 -5
  41. data/lib/sts/niso_sts/page_count.rb +2 -4
  42. data/lib/sts/niso_sts/paragraph.rb +20 -37
  43. data/lib/sts/niso_sts/permissions.rb +4 -6
  44. data/lib/sts/niso_sts/reference.rb +6 -9
  45. data/lib/sts/niso_sts/reference_list.rb +7 -9
  46. data/lib/sts/niso_sts/reference_standard.rb +14 -19
  47. data/lib/sts/niso_sts/section.rb +19 -32
  48. data/lib/sts/niso_sts/section_array.rb +3 -7
  49. data/lib/sts/niso_sts/standard.rb +15 -19
  50. data/lib/sts/niso_sts/standard_identification.rb +13 -14
  51. data/lib/sts/niso_sts/standard_ref.rb +3 -5
  52. data/lib/sts/niso_sts/std_cross_reference.rb +3 -5
  53. data/lib/sts/niso_sts/std_id.rb +5 -7
  54. data/lib/sts/niso_sts/std_id_group.rb +2 -6
  55. data/lib/sts/niso_sts/term.rb +68 -0
  56. data/lib/sts/niso_sts/term_display.rb +4 -8
  57. data/lib/sts/niso_sts/term_section.rb +8 -15
  58. data/lib/sts/niso_sts/title.rb +3 -7
  59. data/lib/sts/niso_sts/title_compl.rb +14 -0
  60. data/lib/sts/niso_sts/title_full.rb +18 -0
  61. data/lib/sts/niso_sts/title_wrap.rb +15 -20
  62. data/lib/sts/niso_sts.rb +56 -18
  63. data/lib/sts/tbx_iso_tml/bold.rb +2 -4
  64. data/lib/sts/tbx_iso_tml/caption.rb +2 -4
  65. data/lib/sts/tbx_iso_tml/col.rb +6 -8
  66. data/lib/sts/tbx_iso_tml/cross_reference.rb +17 -0
  67. data/lib/sts/tbx_iso_tml/definition.rb +16 -24
  68. data/lib/sts/tbx_iso_tml/entailed_term.rb +9 -13
  69. data/lib/sts/tbx_iso_tml/example.rb +8 -12
  70. data/lib/sts/tbx_iso_tml/external_graphic.rb +3 -5
  71. data/lib/sts/tbx_iso_tml/external_source.rb +4 -6
  72. data/lib/sts/tbx_iso_tml/fn.rb +4 -6
  73. data/lib/sts/tbx_iso_tml/fn_group.rb +2 -6
  74. data/lib/sts/tbx_iso_tml/geographical_usage.rb +3 -5
  75. data/lib/sts/tbx_iso_tml/grammatical_gender.rb +3 -5
  76. data/lib/sts/tbx_iso_tml/grammatical_number.rb +3 -5
  77. data/lib/sts/tbx_iso_tml/italic.rb +4 -5
  78. data/lib/sts/tbx_iso_tml/lang_set.rb +16 -30
  79. data/lib/sts/tbx_iso_tml/math.rb +19 -32
  80. data/lib/sts/tbx_iso_tml/mfenced.rb +16 -21
  81. data/lib/sts/tbx_iso_tml/mfrac.rb +9 -12
  82. data/lib/sts/tbx_iso_tml/mi.rb +3 -4
  83. data/lib/sts/tbx_iso_tml/mrow.rb +15 -20
  84. data/lib/sts/tbx_iso_tml/mspace.rb +3 -5
  85. data/lib/sts/tbx_iso_tml/mstyle.rb +9 -9
  86. data/lib/sts/tbx_iso_tml/msub.rb +10 -15
  87. data/lib/sts/tbx_iso_tml/msup.rb +6 -11
  88. data/lib/sts/tbx_iso_tml/munder.rb +3 -7
  89. data/lib/sts/tbx_iso_tml/munderover.rb +6 -9
  90. data/lib/sts/tbx_iso_tml/normative_authorization.rb +3 -5
  91. data/lib/sts/tbx_iso_tml/note.rb +20 -32
  92. data/lib/sts/tbx_iso_tml/part_of_speech.rb +3 -5
  93. data/lib/sts/tbx_iso_tml/pronunciation.rb +16 -0
  94. data/lib/sts/tbx_iso_tml/see.rb +4 -6
  95. data/lib/sts/tbx_iso_tml/semantics.rb +8 -12
  96. data/lib/sts/tbx_iso_tml/source.rb +6 -8
  97. data/lib/sts/tbx_iso_tml/subject_field.rb +17 -0
  98. data/lib/sts/tbx_iso_tml/sup.rb +4 -7
  99. data/lib/sts/tbx_iso_tml/table.rb +8 -14
  100. data/lib/sts/tbx_iso_tml/table_break.rb +0 -2
  101. data/lib/sts/tbx_iso_tml/table_wrap.rb +8 -14
  102. data/lib/sts/tbx_iso_tml/table_wrap_foot.rb +2 -6
  103. data/lib/sts/tbx_iso_tml/tbody.rb +6 -10
  104. data/lib/sts/tbx_iso_tml/td.rb +20 -31
  105. data/lib/sts/tbx_iso_tml/term.rb +18 -34
  106. data/lib/sts/tbx_iso_tml/term_entry.rb +6 -10
  107. data/lib/sts/tbx_iso_tml/term_information_group.rb +13 -22
  108. data/lib/sts/tbx_iso_tml/term_type.rb +3 -5
  109. data/lib/sts/tbx_iso_tml/th.rb +19 -27
  110. data/lib/sts/tbx_iso_tml/thead.rb +6 -10
  111. data/lib/sts/tbx_iso_tml/tr.rb +3 -8
  112. data/lib/sts/tbx_iso_tml/xref.rb +5 -6
  113. data/lib/sts/tbx_iso_tml.rb +52 -25
  114. data/lib/sts/version.rb +1 -1
  115. data/lib/sts.rb +4 -12
  116. data/sts.gemspec +1 -1
  117. metadata +17 -10
@@ -1,14 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
4
  module TbxIsoTml
7
5
  class Caption < Lutaml::Model::Serializable
8
- attribute :p, Lutaml::Model::Type::String
6
+ attribute :p, :string
9
7
 
10
8
  xml do
11
- root "caption"
9
+ element "caption"
12
10
 
13
11
  map_element "p", to: :p
14
12
  end
@@ -1,20 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
4
  module TbxIsoTml
7
5
  class Col < Lutaml::Model::Serializable
8
- attribute :width, Lutaml::Model::Type::String
9
- attribute :char, Lutaml::Model::Type::String
10
- attribute :charoff, Lutaml::Model::Type::String
11
- attribute :span, Lutaml::Model::Type::String
6
+ attribute :width, :string
7
+ attribute :char, :string
8
+ attribute :charoff, :string
9
+ attribute :span, :string
12
10
 
13
11
  xml do
14
- root "col"
12
+ element "col"
15
13
 
16
14
  map_attribute "width", to: :width
17
- map_attribute "char", to: :char
15
+ map_attribute "char", to: :char, value_map: { to: { empty: :empty } }
18
16
  map_attribute "charoff", to: :charoff
19
17
  map_attribute "span", to: :span
20
18
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module TbxIsoTml
5
+ class CrossReference < Lutaml::Model::Serializable
6
+ attribute :value, :string
7
+
8
+ xml do
9
+ element "crossReference"
10
+ mixed_content
11
+ namespace ::Sts::Namespaces::TbxNamespace
12
+
13
+ map_content to: :value
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,38 +1,30 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "entailed_term"
4
- require_relative "note"
5
- require_relative "italic"
6
- require_relative "math"
7
- require_relative "../niso_sts/list"
8
- require_relative "../niso_sts/reference_standard"
9
-
10
3
  module Sts
11
4
  module TbxIsoTml
12
5
  class Definition < Lutaml::Model::Serializable
13
- attribute :entailed_term, EntailedTerm, collection: true
14
- attribute :note, Note
15
- attribute :value, Lutaml::Model::Type::String
16
- attribute :italic, Italic
17
- attribute :math, Sts::TbxIsoTml::Math
18
- attribute :sub, Lutaml::Model::Type::String
19
- attribute :list, Sts::NisoSts::List, collection: true
20
- attribute :std, Sts::NisoSts::ReferenceStandard, collection: true
6
+ attribute :entailed_term, ::Sts::TbxIsoTml::EntailedTerm, collection: true
7
+ attribute :note, ::Sts::TbxIsoTml::Note
8
+ attribute :value, :string
9
+ attribute :italic, ::Sts::TbxIsoTml::Italic
10
+ attribute :math, ::Sts::TbxIsoTml::Math
11
+ attribute :sub, :string
12
+ attribute :list, ::Sts::NisoSts::List, collection: true
13
+ attribute :std, ::Sts::NisoSts::ReferenceStandard, collection: true
21
14
 
22
15
  xml do
23
- root "definition", mixed: true
24
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
16
+ element "definition"
17
+ mixed_content
18
+ namespace ::Sts::Namespaces::TbxNamespace
25
19
 
26
20
  map_content to: :value
27
21
  map_element "entailedTerm", to: :entailed_term
28
22
  map_element "note", to: :note
29
- map_element "italic", to: :italic, namespace: nil, prefix: nil
30
- map_element "sub", to: :sub, namespace: nil, prefix: nil
31
- map_element "list", to: :list, namespace: nil, prefix: nil
32
- map_element "std", to: :std, namespace: nil, prefix: nil
33
- map_element "math", to: :math,
34
- namespace: "http://www.w3.org/1998/Math/MathML",
35
- prefix: "mml"
23
+ map_element "italic", to: :italic
24
+ map_element "sub", to: :sub
25
+ map_element "list", to: :list
26
+ map_element "std", to: :std
27
+ map_element "math", to: :math
36
28
  end
37
29
  end
38
30
  end
@@ -1,24 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
4
  module TbxIsoTml
7
5
  class EntailedTerm < Lutaml::Model::Serializable
8
- attribute :target, Lutaml::Model::Type::String
9
- attribute :xtarget, Lutaml::Model::Type::String
10
- attribute :lang, Lutaml::Model::Type::String
11
- attribute :value, Lutaml::Model::Type::String
6
+ attribute :target, :string
7
+ attribute :xtarget, :string
8
+ attribute :lang, Lutaml::Xml::W3c::XmlLangType
9
+ attribute :value, :string
12
10
 
13
11
  xml do
14
- root "entailedTerm"
15
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
12
+ element "entailedTerm"
13
+ namespace ::Sts::Namespaces::TbxNamespace
16
14
 
17
- map_attribute :target, to: :target
18
- map_attribute :xtarget, to: :xtarget
19
- map_attribute :lang, to: :lang,
20
- namespace: "http://www.w3.org/XML/1998/namespace",
21
- prefix: "xml"
15
+ map_attribute "target", to: :target
16
+ map_attribute "xtarget", to: :xtarget
17
+ map_attribute "lang", to: :lang
22
18
  map_content to: :value
23
19
  end
24
20
  end
@@ -1,30 +1,26 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lutaml/model"
4
- require_relative "entailed_term"
5
-
6
- require_relative "../niso_sts/inline_formula"
7
4
 
8
5
  module Sts
9
6
  module TbxIsoTml
10
7
  class Example < Lutaml::Model::Serializable
11
- attribute :id, Lutaml::Model::Type::String
12
- attribute :value, Lutaml::Model::Type::String
13
- attribute :entailed_term, EntailedTerm, collection: true
14
- attribute :inline_formula, Sts::NisoSts::InlineFormula
8
+ attribute :id, :string
9
+ attribute :value, :string
10
+ attribute :entailed_term, ::Sts::TbxIsoTml::EntailedTerm, collection: true
11
+ attribute :inline_formula, ::Sts::NisoSts::InlineFormula
15
12
 
16
13
  xml do
17
- root "example", mixed: true
18
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
14
+ element "example"
15
+ mixed_content
16
+ namespace ::Sts::Namespaces::TbxNamespace
19
17
 
20
18
  map_content to: :value
21
19
 
22
20
  map_attribute "id", to: :id
23
21
 
24
22
  map_element "entailedTerm", to: :entailed_term
25
- map_element "inline-formula", to: :inline_formula,
26
- namespace: nil,
27
- prefix: nil
23
+ map_element "inline-formula", to: :inline_formula
28
24
  end
29
25
  end
30
26
  end
@@ -1,15 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
4
  module TbxIsoTml
7
5
  class ExternalGraphic < Lutaml::Model::Serializable
8
- attribute :target, Lutaml::Model::Type::String
6
+ attribute :target, :string
9
7
 
10
8
  xml do
11
- root "xGraphic"
12
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
9
+ element "xGraphic"
10
+ namespace ::Sts::Namespaces::TbxNamespace
13
11
 
14
12
  map_attribute "xtarget", to: :target
15
13
  end
@@ -1,16 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
4
  module TbxIsoTml
7
5
  class ExternalSource < Lutaml::Model::Serializable
8
- attribute :target, Lutaml::Model::Type::String
9
- attribute :value, Lutaml::Model::Type::String
6
+ attribute :target, :string
7
+ attribute :value, :string
10
8
 
11
9
  xml do
12
- root "xSource"
13
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
10
+ element "xSource"
11
+ namespace ::Sts::Namespaces::TbxNamespace
14
12
 
15
13
  map_attribute "xtarget", to: :target
16
14
  map_content to: :value
@@ -1,16 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../niso_sts/paragraph"
4
-
5
3
  module Sts
6
4
  module TbxIsoTml
7
5
  class Fn < Lutaml::Model::Serializable
8
- attribute :id, Lutaml::Model::Type::String
9
- attribute :label, Lutaml::Model::Type::String
10
- attribute :p, Sts::NisoSts::Paragraph
6
+ attribute :id, :string
7
+ attribute :label, :string
8
+ attribute :p, ::Sts::NisoSts::Paragraph
11
9
 
12
10
  xml do
13
- root "fn"
11
+ element "fn"
14
12
 
15
13
  map_attribute "id", to: :id
16
14
  map_element "label", to: :label
@@ -1,16 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "fn"
6
-
7
3
  module Sts
8
4
  module TbxIsoTml
9
5
  class FnGroup < Lutaml::Model::Serializable
10
- attribute :fn, Sts::TbxIsoTml::Fn, collection: true
6
+ attribute :fn, ::Sts::TbxIsoTml::Fn, collection: true
11
7
 
12
8
  xml do
13
- root "fn-group"
9
+ element "fn-group"
14
10
 
15
11
  map_element "fn", to: :fn
16
12
  end
@@ -1,15 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
4
  module TbxIsoTml
7
5
  class GeographicalUsage < Lutaml::Model::Serializable
8
- attribute :value, Lutaml::Model::Type::String
6
+ attribute :value, :string
9
7
 
10
8
  xml do
11
- root "geographicalUsage"
12
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
9
+ element "geographicalUsage"
10
+ namespace ::Sts::Namespaces::TbxNamespace
13
11
 
14
12
  map_content to: :value
15
13
  end
@@ -1,16 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
4
  module TbxIsoTml
7
5
  class GrammaticalGender < Lutaml::Model::Serializable
8
- attribute :value, Lutaml::Model::Type::String,
6
+ attribute :value, :string,
9
7
  values: %w[masculine feminine neuter]
10
8
 
11
9
  xml do
12
- root "grammaticalGender"
13
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
10
+ element "grammaticalGender"
11
+ namespace ::Sts::Namespaces::TbxNamespace
14
12
 
15
13
  map_attribute "value", to: :value
16
14
  end
@@ -1,16 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
4
  module TbxIsoTml
7
5
  class GrammaticalNumber < Lutaml::Model::Serializable
8
- attribute :value, Lutaml::Model::Type::String,
6
+ attribute :value, :string,
9
7
  values: %w[singular plural]
10
8
 
11
9
  xml do
12
- root "grammaticalNumber"
13
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
10
+ element "grammaticalNumber"
11
+ namespace ::Sts::Namespaces::TbxNamespace
14
12
 
15
13
  map_attribute "value", to: :value
16
14
  end
@@ -1,15 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
4
  module TbxIsoTml
7
5
  class Italic < Lutaml::Model::Serializable
8
- attribute :value, Lutaml::Model::Type::String
9
- attribute :sub, Lutaml::Model::Type::String
6
+ attribute :value, :string
7
+ attribute :sub, :string
10
8
 
11
9
  xml do
12
- root "italic", mixed: true
10
+ element "italic"
11
+ mixed_content
13
12
  namespace nil, nil
14
13
 
15
14
  map_content to: :value
@@ -1,41 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "note"
6
- require_relative "example"
7
- require_relative "definition"
8
- require_relative "see"
9
- require_relative "source"
10
- require_relative "external_source"
11
- require_relative "term_information_group"
12
-
13
3
  module Sts
14
4
  module TbxIsoTml
15
- class Definition < Lutaml::Model::Serializable; end
16
- class Note < Lutaml::Model::Serializable; end
17
- class Caption < Lutaml::Model::Serializable; end
18
-
19
5
  class LangSet < Lutaml::Model::Serializable
20
- attribute :lang, Lutaml::Model::Type::String
21
- attribute :definition, Sts::TbxIsoTml::Definition, collection: true
22
- attribute :note, Note, collection: true
23
- attribute :example, Example, collection: true
24
- attribute :tig, TermInformationGroup, collection: true
25
- attribute :see, See, collection: true
26
- attribute :source, Source, collection: true
27
- attribute :x_source, ExternalSource, collection: true
28
- attribute :cross_reference, Lutaml::Model::Type::String, collection: true
29
- attribute :subject_field, Lutaml::Model::Type::String
30
- # attribute :x_graphic, ExternalGraphic, collection: true
6
+ attribute :lang, Lutaml::Xml::W3c::XmlLangType
7
+ attribute :definition, ::Sts::TbxIsoTml::Definition, collection: true
8
+ attribute :note, ::Sts::TbxIsoTml::Note, collection: true
9
+ attribute :example, ::Sts::TbxIsoTml::Example, collection: true
10
+ attribute :tig, ::Sts::TbxIsoTml::TermInformationGroup, collection: true
11
+ attribute :see, ::Sts::TbxIsoTml::See, collection: true
12
+ attribute :source, ::Sts::TbxIsoTml::Source, collection: true
13
+ attribute :x_source, ::Sts::TbxIsoTml::ExternalSource, collection: true
14
+ attribute :cross_reference, ::Sts::TbxIsoTml::CrossReference,
15
+ collection: true
16
+ attribute :subject_field, ::Sts::TbxIsoTml::SubjectField, collection: true
17
+ # attribute :x_graphic, ::Sts::TbxIsoTml::ExternalGraphic, collection: true
31
18
 
32
19
  xml do
33
- root "langSet", mixed: true
34
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
20
+ element "langSet"
21
+ mixed_content
22
+ namespace ::Sts::Namespaces::TbxNamespace
35
23
 
36
- map_attribute "lang", to: :lang,
37
- namespace: "http://www.w3.org/XML/1998/namespace",
38
- prefix: "xml"
24
+ map_attribute "lang", to: :lang
39
25
  map_element "definition", to: :definition
40
26
  map_element "source", to: :source
41
27
  map_element "example", to: :example
@@ -1,42 +1,29 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "semantics"
6
- require_relative "mrow"
7
- require_relative "msub"
8
- require_relative "msup"
9
- require_relative "mstyle"
10
- require_relative "mspace"
11
- require_relative "mfrac"
12
- require_relative "mfenced"
13
- require_relative "munderover"
14
-
15
3
  module Sts
16
4
  module TbxIsoTml
17
- class Mfenced < Lutaml::Model::Serializable; end
18
-
19
5
  class Math < Lutaml::Model::Serializable
20
- attribute :id, Lutaml::Model::Type::String
21
- attribute :content, Lutaml::Model::Type::String
22
- attribute :display, Lutaml::Model::Type::String
23
- attribute :mrow, Mrow
24
- attribute :msub, Msub, collection: true
25
- attribute :msup, Msup
26
- attribute :mn, Lutaml::Model::Type::String, collection: true
27
- attribute :mo, Lutaml::Model::Type::String, collection: true
28
- attribute :mi, Lutaml::Model::Type::String
29
- attribute :mtext, Lutaml::Model::Type::String
30
- attribute :semantics, Semantics
31
- attribute :mstyle, Mstyle, collection: true
32
- attribute :mfenced, Mfenced, collection: true
33
- attribute :mspace, Mspace, collection: true
34
- attribute :mfrac, Mfrac, collection: true
35
- attribute :munderover, Munderover, collection: true
6
+ attribute :id, :string
7
+ attribute :content, :string
8
+ attribute :display, :string
9
+ attribute :mrow, ::Sts::TbxIsoTml::Mrow
10
+ attribute :msub, ::Sts::TbxIsoTml::Msub, collection: true
11
+ attribute :msup, ::Sts::TbxIsoTml::Msup
12
+ attribute :mn, :string, collection: true
13
+ attribute :mo, :string, collection: true
14
+ attribute :mi, :string
15
+ attribute :mtext, :string
16
+ attribute :semantics, ::Sts::TbxIsoTml::Semantics
17
+ attribute :mstyle, ::Sts::TbxIsoTml::Mstyle, collection: true
18
+ attribute :mfenced, ::Sts::TbxIsoTml::Mfenced, collection: true
19
+ attribute :mspace, ::Sts::TbxIsoTml::Mspace, collection: true
20
+ attribute :mfrac, ::Sts::TbxIsoTml::Mfrac, collection: true
21
+ attribute :munderover, ::Sts::TbxIsoTml::Munderover, collection: true
36
22
 
37
23
  xml do
38
- root "math", mixed: true
39
- namespace "http://www.w3.org/1998/Math/MathML", "mml"
24
+ element "math"
25
+ mixed_content
26
+ namespace ::Sts::Namespaces::MathmlNamespace
40
27
 
41
28
  map_attribute "id", to: :id
42
29
 
@@ -1,32 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "mspace"
6
- require_relative "msub"
7
- require_relative "mstyle"
8
- require_relative "mfrac"
9
-
10
3
  module Sts
11
4
  module TbxIsoTml
12
5
  class Mfenced < Lutaml::Model::Serializable
13
- attribute :separators, Lutaml::Model::Type::String
14
- attribute :open, Lutaml::Model::Type::String
15
- attribute :close, Lutaml::Model::Type::String
16
- attribute :mo, Lutaml::Model::Type::String, collection: true
17
- attribute :mn, Lutaml::Model::Type::String, collection: true
18
- attribute :mi, Lutaml::Model::Type::String
19
- attribute :mtext, Lutaml::Model::Type::String
20
- attribute :mspace, Mspace, collection: true
21
- attribute :msub, Msub, collection: true
22
- attribute :mstyle, Mstyle, collection: true
23
- attribute :mfrac, Mfrac, collection: true
6
+ attribute :separators, :string
7
+ attribute :open, :string
8
+ attribute :close, :string
9
+ attribute :mo, :string, collection: true
10
+ attribute :mn, :string, collection: true
11
+ attribute :mi, :string
12
+ attribute :mtext, :string
13
+ attribute :mspace, ::Sts::TbxIsoTml::Mspace, collection: true
14
+ attribute :msub, ::Sts::TbxIsoTml::Msub, collection: true
15
+ attribute :mstyle, ::Sts::TbxIsoTml::Mstyle, collection: true
16
+ attribute :mfrac, ::Sts::TbxIsoTml::Mfrac, collection: true
24
17
 
25
18
  xml do
26
- root "mfenced", mixed: true
27
- namespace "http://www.w3.org/1998/Math/MathML", "mml"
19
+ element "mfenced"
20
+ mixed_content
21
+ namespace ::Sts::Namespaces::MathmlNamespace
28
22
 
29
- map_attribute "separators", to: :separators
23
+ map_attribute "separators", to: :separators,
24
+ value_map: { to: { empty: :empty } }
30
25
  map_attribute "open", to: :open
31
26
  map_attribute "close", to: :close
32
27
 
@@ -1,24 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lutaml/model"
4
- require_relative "mrow"
5
- require_relative "mstyle"
6
4
 
7
5
  module Sts
8
6
  module TbxIsoTml
9
- class Mrow < Lutaml::Model::Serializable; end
10
-
11
7
  class Mfrac < Lutaml::Model::Serializable
12
- attribute :mrow, Mrow, collection: true
13
- attribute :mstyle, Mstyle, collection: true
14
- attribute :bevelled, Lutaml::Model::Type::String
15
- attribute :linethickness, Lutaml::Model::Type::String
16
- attribute :mn, Lutaml::Model::Type::String, collection: true
17
- attribute :mtext, Lutaml::Model::Type::String, collection: true
8
+ attribute :mrow, ::Sts::TbxIsoTml::Mrow, collection: true
9
+ attribute :mstyle, ::Sts::TbxIsoTml::Mstyle, collection: true
10
+ attribute :bevelled, :string
11
+ attribute :linethickness, :string
12
+ attribute :mn, :string, collection: true
13
+ attribute :mtext, :string, collection: true
18
14
 
19
15
  xml do
20
- root "mfrac", mixed: true
21
- namespace "http://www.w3.org/1998/Math/MathML", "mml"
16
+ element "mfrac"
17
+ mixed_content
18
+ namespace ::Sts::Namespaces::MathmlNamespace
22
19
 
23
20
  map_attribute "bevelled", to: :bevelled
24
21
  map_attribute "linethickness", to: :linethickness
@@ -1,16 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lutaml/model"
4
- require_relative "mstyle"
5
4
 
6
5
  module Sts
7
6
  module TbxIsoTml
8
7
  class Mi < Lutaml::Model::Serializable
9
- attribute :content, Lutaml::Model::Type::String
8
+ attribute :content, :string
10
9
 
11
10
  xml do
12
- root "mi"
13
- namespace "http://www.w3.org/1998/Math/MathML", "mml"
11
+ element "mi"
12
+ namespace ::Sts::Namespaces::MathmlNamespace
14
13
 
15
14
  map_content to: :content
16
15
  end
@@ -1,32 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lutaml/model"
4
- require_relative "mfrac"
5
- require_relative "mstyle"
6
- require_relative "msub"
7
- require_relative "msup"
8
- require_relative "mspace"
9
- require_relative "mfenced"
10
4
 
11
5
  module Sts
12
6
  module TbxIsoTml
13
7
  class Mrow < Lutaml::Model::Serializable
14
- attribute :content, Lutaml::Model::Type::String
15
- attribute :mo, Lutaml::Model::Type::String, collection: true
16
- attribute :mi, Lutaml::Model::Type::String, collection: true
17
- attribute :mn, Lutaml::Model::Type::String, collection: true
18
- attribute :mtext, Lutaml::Model::Type::String, collection: true
19
- attribute :mrow, Mrow
20
- attribute :mfrac, Mfrac, collection: true
21
- attribute :mstyle, Mstyle, collection: true
22
- attribute :msub, Msub, collection: true
23
- attribute :msup, Msup
24
- attribute :mfenced, Mfenced, collection: true
25
- attribute :mspace, Mspace, collection: true
8
+ attribute :content, :string
9
+ attribute :mo, :string, collection: true
10
+ attribute :mi, :string, collection: true
11
+ attribute :mn, :string, collection: true
12
+ attribute :mtext, :string, collection: true
13
+ attribute :mrow, ::Sts::TbxIsoTml::Mrow
14
+ attribute :mfrac, ::Sts::TbxIsoTml::Mfrac, collection: true
15
+ attribute :mstyle, ::Sts::TbxIsoTml::Mstyle, collection: true
16
+ attribute :msub, ::Sts::TbxIsoTml::Msub, collection: true
17
+ attribute :msup, ::Sts::TbxIsoTml::Msup
18
+ attribute :mfenced, ::Sts::TbxIsoTml::Mfenced, collection: true
19
+ attribute :mspace, ::Sts::TbxIsoTml::Mspace, collection: true
26
20
 
27
21
  xml do
28
- root "mrow", mixed: true
29
- namespace "http://www.w3.org/1998/Math/MathML", "mml"
22
+ element "mrow"
23
+ mixed_content
24
+ namespace ::Sts::Namespaces::MathmlNamespace
30
25
 
31
26
  map_element "mo", to: :mo
32
27
  map_element "mi", to: :mi
@@ -1,15 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
4
  module TbxIsoTml
7
5
  class Mspace < Lutaml::Model::Serializable
8
- attribute :width, Lutaml::Model::Type::String
6
+ attribute :width, :string
9
7
 
10
8
  xml do
11
- root "mspace"
12
- namespace "http://www.w3.org/1998/Math/MathML", "mml"
9
+ element "mspace"
10
+ namespace ::Sts::Namespaces::MathmlNamespace
13
11
 
14
12
  map_attribute "width", to: :width
15
13
  end