sts 0.3.4 → 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 (116) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +7 -1
  3. data/.gitignore +2 -0
  4. data/.rubocop_todo.yml +10 -28
  5. data/Gemfile +4 -2
  6. data/lib/sts/namespaces.rb +13 -0
  7. data/lib/sts/niso_sts/adoption.rb +8 -12
  8. data/lib/sts/niso_sts/adoption_front.rb +1 -3
  9. data/lib/sts/niso_sts/app.rb +11 -22
  10. data/lib/sts/niso_sts/app_group.rb +1 -5
  11. data/lib/sts/niso_sts/back.rb +5 -12
  12. data/lib/sts/niso_sts/body.rb +2 -6
  13. data/lib/sts/niso_sts/caption.rb +6 -10
  14. data/lib/sts/niso_sts/custom_meta.rb +3 -7
  15. data/lib/sts/niso_sts/custom_meta_group.rb +2 -6
  16. data/lib/sts/niso_sts/def.rb +2 -6
  17. data/lib/sts/niso_sts/def_item.rb +3 -8
  18. data/lib/sts/niso_sts/def_list.rb +3 -7
  19. data/lib/sts/niso_sts/display_formula.rb +4 -7
  20. data/lib/sts/niso_sts/document_identification.rb +1 -3
  21. data/lib/sts/niso_sts/ext_link.rb +3 -7
  22. data/lib/sts/niso_sts/figure.rb +6 -13
  23. data/lib/sts/niso_sts/fn.rb +3 -8
  24. data/lib/sts/niso_sts/fn_group.rb +2 -6
  25. data/lib/sts/niso_sts/front.rb +4 -10
  26. data/lib/sts/niso_sts/graphic.rb +5 -11
  27. data/lib/sts/niso_sts/inline_formula.rb +3 -6
  28. data/lib/sts/niso_sts/label.rb +1 -5
  29. data/lib/sts/niso_sts/list.rb +3 -6
  30. data/lib/sts/niso_sts/list_item.rb +8 -13
  31. data/lib/sts/niso_sts/meta_date.rb +1 -3
  32. data/lib/sts/niso_sts/meta_note.rb +3 -6
  33. data/lib/sts/niso_sts/metadata_iso.rb +11 -22
  34. data/lib/sts/niso_sts/metadata_std.rb +12 -19
  35. data/lib/sts/niso_sts/mixed_citation.rb +4 -8
  36. data/lib/sts/{tbx_iso_tml → niso_sts}/named_content.rb +2 -5
  37. data/lib/sts/niso_sts/non_normative_example.rb +4 -9
  38. data/lib/sts/niso_sts/non_normative_note.rb +4 -7
  39. data/lib/sts/niso_sts/object_id.rb +1 -3
  40. data/lib/sts/niso_sts/page_count.rb +1 -3
  41. data/lib/sts/niso_sts/paragraph.rb +15 -32
  42. data/lib/sts/niso_sts/permissions.rb +1 -3
  43. data/lib/sts/niso_sts/reference.rb +4 -7
  44. data/lib/sts/niso_sts/reference_list.rb +3 -5
  45. data/lib/sts/niso_sts/reference_standard.rb +10 -15
  46. data/lib/sts/niso_sts/section.rb +16 -29
  47. data/lib/sts/niso_sts/section_array.rb +2 -6
  48. data/lib/sts/niso_sts/standard.rb +11 -15
  49. data/lib/sts/niso_sts/standard_identification.rb +3 -6
  50. data/lib/sts/niso_sts/standard_ref.rb +1 -3
  51. data/lib/sts/niso_sts/std_cross_reference.rb +2 -4
  52. data/lib/sts/niso_sts/std_id.rb +1 -3
  53. data/lib/sts/niso_sts/std_id_group.rb +2 -6
  54. data/lib/sts/niso_sts/term.rb +68 -0
  55. data/lib/sts/niso_sts/term_display.rb +4 -8
  56. data/lib/sts/niso_sts/term_section.rb +6 -13
  57. data/lib/sts/niso_sts/title.rb +2 -6
  58. data/lib/sts/niso_sts/title_compl.rb +14 -0
  59. data/lib/sts/niso_sts/title_full.rb +18 -0
  60. data/lib/sts/niso_sts/title_wrap.rb +12 -17
  61. data/lib/sts/niso_sts.rb +56 -18
  62. data/lib/sts/tbx_iso_tml/bold.rb +1 -3
  63. data/lib/sts/tbx_iso_tml/caption.rb +1 -3
  64. data/lib/sts/tbx_iso_tml/col.rb +1 -3
  65. data/lib/sts/tbx_iso_tml/cross_reference.rb +17 -0
  66. data/lib/sts/tbx_iso_tml/definition.rb +14 -22
  67. data/lib/sts/tbx_iso_tml/entailed_term.rb +6 -10
  68. data/lib/sts/tbx_iso_tml/example.rb +6 -10
  69. data/lib/sts/tbx_iso_tml/external_graphic.rb +2 -4
  70. data/lib/sts/tbx_iso_tml/external_source.rb +2 -4
  71. data/lib/sts/tbx_iso_tml/fn.rb +2 -4
  72. data/lib/sts/tbx_iso_tml/fn_group.rb +2 -6
  73. data/lib/sts/tbx_iso_tml/geographical_usage.rb +2 -4
  74. data/lib/sts/tbx_iso_tml/grammatical_gender.rb +2 -4
  75. data/lib/sts/tbx_iso_tml/grammatical_number.rb +2 -4
  76. data/lib/sts/tbx_iso_tml/italic.rb +2 -3
  77. data/lib/sts/tbx_iso_tml/lang_set.rb +16 -30
  78. data/lib/sts/tbx_iso_tml/math.rb +12 -25
  79. data/lib/sts/tbx_iso_tml/mfenced.rb +7 -13
  80. data/lib/sts/tbx_iso_tml/mfrac.rb +5 -8
  81. data/lib/sts/tbx_iso_tml/mi.rb +2 -3
  82. data/lib/sts/tbx_iso_tml/mrow.rb +10 -15
  83. data/lib/sts/tbx_iso_tml/mspace.rb +2 -4
  84. data/lib/sts/tbx_iso_tml/mstyle.rb +5 -5
  85. data/lib/sts/tbx_iso_tml/msub.rb +6 -11
  86. data/lib/sts/tbx_iso_tml/msup.rb +4 -9
  87. data/lib/sts/tbx_iso_tml/munder.rb +3 -7
  88. data/lib/sts/tbx_iso_tml/munderover.rb +4 -7
  89. data/lib/sts/tbx_iso_tml/normative_authorization.rb +2 -4
  90. data/lib/sts/tbx_iso_tml/note.rb +18 -30
  91. data/lib/sts/tbx_iso_tml/part_of_speech.rb +2 -4
  92. data/lib/sts/tbx_iso_tml/pronunciation.rb +16 -0
  93. data/lib/sts/tbx_iso_tml/see.rb +2 -4
  94. data/lib/sts/tbx_iso_tml/semantics.rb +5 -9
  95. data/lib/sts/tbx_iso_tml/source.rb +5 -7
  96. data/lib/sts/tbx_iso_tml/subject_field.rb +17 -0
  97. data/lib/sts/tbx_iso_tml/sup.rb +3 -6
  98. data/lib/sts/tbx_iso_tml/table.rb +4 -10
  99. data/lib/sts/tbx_iso_tml/table_break.rb +0 -2
  100. data/lib/sts/tbx_iso_tml/table_wrap.rb +4 -10
  101. data/lib/sts/tbx_iso_tml/table_wrap_foot.rb +2 -6
  102. data/lib/sts/tbx_iso_tml/tbody.rb +2 -6
  103. data/lib/sts/tbx_iso_tml/td.rb +9 -20
  104. data/lib/sts/tbx_iso_tml/term.rb +13 -29
  105. data/lib/sts/tbx_iso_tml/term_entry.rb +5 -9
  106. data/lib/sts/tbx_iso_tml/term_information_group.rb +11 -20
  107. data/lib/sts/tbx_iso_tml/term_type.rb +2 -4
  108. data/lib/sts/tbx_iso_tml/th.rb +8 -16
  109. data/lib/sts/tbx_iso_tml/thead.rb +2 -6
  110. data/lib/sts/tbx_iso_tml/tr.rb +3 -8
  111. data/lib/sts/tbx_iso_tml/xref.rb +2 -3
  112. data/lib/sts/tbx_iso_tml.rb +52 -25
  113. data/lib/sts/version.rb +1 -1
  114. data/lib/sts.rb +4 -12
  115. data/sts.gemspec +1 -1
  116. metadata +12 -5
@@ -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
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,7 +1,5 @@
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
@@ -9,8 +7,8 @@ module Sts
9
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
6
  attribute :id, :string
9
7
  attribute :label, :string
10
- attribute :p, Sts::NisoSts::Paragraph
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
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,7 +1,5 @@
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
@@ -9,8 +7,8 @@ module Sts
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,7 +1,5 @@
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
@@ -9,8 +7,8 @@ module Sts
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,7 +1,5 @@
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
@@ -9,7 +7,8 @@ module Sts
9
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, :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, :string, collection: true
29
- attribute :subject_field, :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
6
  attribute :id, :string
21
7
  attribute :content, :string
22
8
  attribute :display, :string
23
- attribute :mrow, Mrow
24
- attribute :msub, Msub, collection: true
25
- attribute :msup, Msup
9
+ attribute :mrow, ::Sts::TbxIsoTml::Mrow
10
+ attribute :msub, ::Sts::TbxIsoTml::Msub, collection: true
11
+ attribute :msup, ::Sts::TbxIsoTml::Msup
26
12
  attribute :mn, :string, collection: true
27
13
  attribute :mo, :string, collection: true
28
14
  attribute :mi, :string
29
15
  attribute :mtext, :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
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,12 +1,5 @@
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
@@ -17,14 +10,15 @@ module Sts
17
10
  attribute :mn, :string, collection: true
18
11
  attribute :mi, :string
19
12
  attribute :mtext, :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
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
23
  map_attribute "separators", to: :separators,
30
24
  value_map: { to: { empty: :empty } }
@@ -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
8
+ attribute :mrow, ::Sts::TbxIsoTml::Mrow, collection: true
9
+ attribute :mstyle, ::Sts::TbxIsoTml::Mstyle, collection: true
14
10
  attribute :bevelled, :string
15
11
  attribute :linethickness, :string
16
12
  attribute :mn, :string, collection: true
17
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,7 +1,6 @@
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
@@ -9,8 +8,8 @@ module Sts
9
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,12 +1,6 @@
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
@@ -16,17 +10,18 @@ module Sts
16
10
  attribute :mi, :string, collection: true
17
11
  attribute :mn, :string, collection: true
18
12
  attribute :mtext, :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
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
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
@@ -1,21 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lutaml/model"
4
- require_relative "mspace"
5
4
 
6
5
  module Sts
7
6
  module TbxIsoTml
8
7
  class Mstyle < Lutaml::Model::Serializable
9
8
  attribute :mathvariant, :string
10
- attribute :mstyle, Mstyle
11
- attribute :mspace, Mspace, collection: true
9
+ attribute :mstyle, ::Sts::TbxIsoTml::Mstyle
10
+ attribute :mspace, ::Sts::TbxIsoTml::Mspace, collection: true
12
11
  attribute :mi, :string, collection: true
13
12
  attribute :mn, :string, collection: true
14
13
  attribute :mo, :string, collection: true
15
14
 
16
15
  xml do
17
- root "mstyle", mixed: true
18
- namespace "http://www.w3.org/1998/Math/MathML", "mml"
16
+ element "mstyle"
17
+ mixed_content
18
+ namespace ::Sts::Namespaces::MathmlNamespace
19
19
 
20
20
  map_attribute "mathvariant", to: :mathvariant
21
21
  map_element "mi", to: :mi
@@ -1,25 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "mstyle"
6
- require_relative "mrow"
7
- require_relative "mspace"
8
-
9
3
  module Sts
10
4
  module TbxIsoTml
11
5
  class Msub < Lutaml::Model::Serializable
12
- attribute :mstyle, Mstyle, collection: true
13
- attribute :mrow, Mrow
14
- attribute :mspace, Mspace
6
+ attribute :mstyle, ::Sts::TbxIsoTml::Mstyle, collection: true
7
+ attribute :mrow, ::Sts::TbxIsoTml::Mrow
8
+ attribute :mspace, ::Sts::TbxIsoTml::Mspace
15
9
  attribute :mo, :string, collection: true
16
10
  attribute :mi, :string, collection: true
17
11
  attribute :mn, :string, collection: true
18
12
  attribute :mtext, :string, collection: true
19
13
 
20
14
  xml do
21
- root "msub", mixed: true
22
- namespace "http://www.w3.org/1998/Math/MathML", "mml"
15
+ element "msub"
16
+ mixed_content
17
+ namespace ::Sts::Namespaces::MathmlNamespace
23
18
 
24
19
  map_element "mstyle", to: :mstyle
25
20
  map_element "mo", to: :mo
@@ -1,21 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "mstyle"
6
- require_relative "mrow"
7
-
8
3
  module Sts
9
4
  module TbxIsoTml
10
5
  class Msup < Lutaml::Model::Serializable
11
- attribute :mstyle, Mstyle
12
- attribute :mrow, Mrow
6
+ attribute :mstyle, ::Sts::TbxIsoTml::Mstyle
7
+ attribute :mrow, ::Sts::TbxIsoTml::Mrow
13
8
  attribute :mi, :string
14
9
  attribute :mn, :string, collection: true
15
10
 
16
11
  xml do
17
- root "msup"
18
- namespace "http://www.w3.org/1998/Math/MathML", "mml"
12
+ element "msup"
13
+ namespace ::Sts::Namespaces::MathmlNamespace
19
14
 
20
15
  map_element "mstyle", to: :mstyle
21
16
  map_element "mi", to: :mi
@@ -1,17 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "mrow"
6
-
7
3
  module Sts
8
4
  module TbxIsoTml
9
5
  class Munder < Lutaml::Model::Serializable
10
- attribute :mrow, Mrow, collection: true
6
+ attribute :mrow, ::Sts::TbxIsoTml::Mrow, collection: true
11
7
 
12
8
  xml do
13
- root "munder"
14
- namespace "http://www.w3.org/1998/Math/MathML", "mml"
9
+ element "munder"
10
+ namespace ::Sts::Namespaces::MathmlNamespace
15
11
 
16
12
  map_element "mrow", to: :mrow
17
13
  end
@@ -1,19 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "mrow"
6
-
7
3
  module Sts
8
4
  module TbxIsoTml
9
5
  class Munderover < Lutaml::Model::Serializable
10
6
  attribute :mo, :string
11
7
  attribute :mi, :string
12
- attribute :mrow, Mrow, collection: true
8
+ attribute :mrow, ::Sts::TbxIsoTml::Mrow, collection: true
13
9
 
14
10
  xml do
15
- root "munderover", mixed: true
16
- namespace "http://www.w3.org/1998/Math/MathML", "mml"
11
+ element "munderover"
12
+ mixed_content
13
+ namespace ::Sts::Namespaces::MathmlNamespace
17
14
 
18
15
  map_element "mo", to: :mo
19
16
  map_element "mi", to: :mi
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
4
  module TbxIsoTml
7
5
  class NormativeAuthorization < Lutaml::Model::Serializable
@@ -9,8 +7,8 @@ module Sts
9
7
  values: %w[admittedTerm preferredTerm deprecatedTerm]
10
8
 
11
9
  xml do
12
- root "normativeAuthorization"
13
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
10
+ element "normativeAuthorization"
11
+ namespace ::Sts::Namespaces::TbxNamespace
14
12
 
15
13
  map_attribute "value", to: :value
16
14
  end
@@ -1,46 +1,34 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "table_wrap"
6
- require_relative "entailed_term"
7
- require_relative "math"
8
- require_relative "sup"
9
- require_relative "italic"
10
- require_relative "xref"
11
- require_relative "../niso_sts/list"
12
- require_relative "../niso_sts/reference_standard"
13
-
14
3
  module Sts
15
4
  module TbxIsoTml
16
5
  class Note < Lutaml::Model::Serializable
17
6
  attribute :id, :string
18
7
  attribute :value, :string
19
- attribute :table_wrap, Sts::TbxIsoTml::TableWrap
20
- attribute :entailed_term, EntailedTerm, collection: true
21
- attribute :math, Sts::TbxIsoTml::Math, collection: true
22
- attribute :xref, Sts::TbxIsoTml::Xref
23
- attribute :list, Sts::NisoSts::List
24
- attribute :std, Sts::NisoSts::ReferenceStandard
25
- attribute :sup, Sup
26
- attribute :italic, Italic, collection: true
8
+ attribute :table_wrap, ::Sts::TbxIsoTml::TableWrap
9
+ attribute :entailed_term, ::Sts::TbxIsoTml::EntailedTerm, collection: true
10
+ attribute :math, ::Sts::TbxIsoTml::Math, collection: true
11
+ attribute :xref, ::Sts::TbxIsoTml::Xref
12
+ attribute :list, ::Sts::NisoSts::List
13
+ attribute :std, ::Sts::NisoSts::ReferenceStandard
14
+ attribute :sup, ::Sts::TbxIsoTml::Sup
15
+ attribute :italic, ::Sts::TbxIsoTml::Italic, collection: true
27
16
 
28
17
  xml do
29
- root "note", mixed: true
30
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
18
+ element "note"
19
+ mixed_content
20
+ namespace ::Sts::Namespaces::TbxNamespace
31
21
 
32
22
  map_attribute "id", to: :id
33
23
  map_content to: :value
34
24
  map_element "entailedTerm", to: :entailed_term
35
- map_element "list", to: :list, namespace: nil, prefix: nil
36
- map_element "table-wrap", to: :table_wrap, namespace: nil, prefix: nil
37
- map_element "std", to: :std, namespace: nil, prefix: nil
38
- map_element "sup", to: :sup, namespace: nil, prefix: nil
39
- map_element "italic", to: :italic, namespace: nil, prefix: nil
40
- map_element "xref", to: :xref, namespace: nil, prefix: nil
41
- map_element "math", to: :math,
42
- namespace: "http://www.w3.org/1998/Math/MathML",
43
- prefix: "mml"
25
+ map_element "list", to: :list
26
+ map_element "table-wrap", to: :table_wrap
27
+ map_element "std", to: :std
28
+ map_element "sup", to: :sup
29
+ map_element "italic", to: :italic
30
+ map_element "xref", to: :xref
31
+ map_element "math", to: :math
44
32
  end
45
33
  end
46
34
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
4
  module TbxIsoTml
7
5
  class PartOfSpeech < Lutaml::Model::Serializable
@@ -9,8 +7,8 @@ module Sts
9
7
  values: %w[noun verb adj adv]
10
8
 
11
9
  xml do
12
- root "partOfSpeech"
13
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
10
+ element "partOfSpeech"
11
+ namespace ::Sts::Namespaces::TbxNamespace
14
12
 
15
13
  map_attribute "value", to: :value
16
14
  end