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,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
- attribute :mathvariant, Lutaml::Model::Type::String
10
- attribute :mstyle, Mstyle
11
- attribute :mspace, Mspace, collection: true
12
- attribute :mi, Lutaml::Model::Type::String, collection: true
13
- attribute :mn, Lutaml::Model::Type::String, collection: true
14
- attribute :mo, Lutaml::Model::Type::String, collection: true
8
+ attribute :mathvariant, :string
9
+ attribute :mstyle, ::Sts::TbxIsoTml::Mstyle
10
+ attribute :mspace, ::Sts::TbxIsoTml::Mspace, collection: true
11
+ attribute :mi, :string, collection: true
12
+ attribute :mn, :string, collection: true
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
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
6
+ attribute :mstyle, ::Sts::TbxIsoTml::Mstyle, collection: true
7
+ attribute :mrow, ::Sts::TbxIsoTml::Mrow
8
+ attribute :mspace, ::Sts::TbxIsoTml::Mspace
9
+ attribute :mo, :string, collection: true
10
+ attribute :mi, :string, collection: true
11
+ attribute :mn, :string, collection: true
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
13
- attribute :mi, Lutaml::Model::Type::String
14
- attribute :mn, Lutaml::Model::Type::String, collection: true
6
+ attribute :mstyle, ::Sts::TbxIsoTml::Mstyle
7
+ attribute :mrow, ::Sts::TbxIsoTml::Mrow
8
+ attribute :mi, :string
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
- attribute :mo, Lutaml::Model::Type::String
11
- attribute :mi, Lutaml::Model::Type::String
12
- attribute :mrow, Mrow, collection: true
6
+ attribute :mo, :string
7
+ attribute :mi, :string
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,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 NormativeAuthorization < Lutaml::Model::Serializable
8
- attribute :value, Lutaml::Model::Type::String,
6
+ attribute :value, :string,
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
- attribute :id, Lutaml::Model::Type::String
18
- attribute :value, Lutaml::Model::Type::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
6
+ attribute :id, :string
7
+ attribute :value, :string
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,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 PartOfSpeech < Lutaml::Model::Serializable
8
- attribute :value, Lutaml::Model::Type::String,
6
+ attribute :value, :string,
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
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module TbxIsoTml
5
+ class Pronunciation < Lutaml::Model::Serializable
6
+ attribute :value, :string
7
+
8
+ xml do
9
+ element "pronunciation"
10
+ namespace ::Sts::Namespaces::TbxNamespace
11
+
12
+ map_content to: :value
13
+ end
14
+ end
15
+ end
16
+ 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 See < Lutaml::Model::Serializable
8
- attribute :script, Lutaml::Model::Type::String
9
- attribute :value, Lutaml::Model::Type::String
6
+ attribute :script, :string
7
+ attribute :value, :string
10
8
 
11
9
  xml do
12
- root "see"
13
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
10
+ element "see"
11
+ namespace ::Sts::Namespaces::TbxNamespace
14
12
 
15
13
  map_attribute "script", to: :script
16
14
  map_content to: :value
@@ -1,22 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "mrow"
6
- require_relative "munder"
7
-
8
3
  module Sts
9
4
  module TbxIsoTml
10
5
  class Semantics < Lutaml::Model::Serializable
11
- attribute :mrow, Mrow, collection: true
12
- attribute :mo, Lutaml::Model::Type::String
13
- attribute :mtext, Lutaml::Model::Type::String
14
- attribute :munder, Sts::TbxIsoTml::Munder
15
- attribute :content, Lutaml::Model::Type::String
6
+ attribute :mrow, ::Sts::TbxIsoTml::Mrow, collection: true
7
+ attribute :mo, :string
8
+ attribute :mtext, :string
9
+ attribute :munder, ::Sts::TbxIsoTml::Munder
10
+ attribute :content, :string
16
11
 
17
12
  xml do
18
- root "semantics", mixed: true
19
- namespace "http://www.w3.org/1998/Math/MathML", "mml"
13
+ element "semantics"
14
+ mixed_content
15
+ namespace ::Sts::Namespaces::MathmlNamespace
20
16
 
21
17
  map_element "mrow", to: :mrow
22
18
  map_element "mo", to: :mo
@@ -1,20 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "italic"
4
- require "lutaml/model"
5
-
6
3
  module Sts
7
4
  module TbxIsoTml
8
5
  class Source < Lutaml::Model::Serializable
9
- attribute :value, Lutaml::Model::Type::String
10
- attribute :italic, Italic
6
+ attribute :value, :string
7
+ attribute :italic, ::Sts::TbxIsoTml::Italic
11
8
 
12
9
  xml do
13
- root "source", mixed: true
14
- namespace "urn:iso:std:iso:30042:ed-1", "tbx"
10
+ element "source"
11
+ mixed_content
12
+ namespace ::Sts::Namespaces::TbxNamespace
15
13
 
16
14
  map_content to: :value
17
- map_element "italic", to: :italic, namespace: nil, prefix: nil
15
+ map_element "italic", to: :italic
18
16
  end
19
17
  end
20
18
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module TbxIsoTml
5
+ class SubjectField < Lutaml::Model::Serializable
6
+ attribute :value, :string
7
+
8
+ xml do
9
+ element "subjectField"
10
+ mixed_content
11
+ namespace ::Sts::Namespaces::TbxNamespace
12
+
13
+ map_content to: :value
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,20 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lutaml/model"
4
- require_relative "xref"
5
4
 
6
5
  module Sts
7
6
  module TbxIsoTml
8
- class Xref < Lutaml::Model::Serializable; end
9
-
10
7
  class Sup < Lutaml::Model::Serializable
11
- attribute :value, Lutaml::Model::Type::String
12
- attribute :xref, Xref
8
+ attribute :value, :string
9
+ attribute :xref, ::Sts::TbxIsoTml::Xref
13
10
 
14
11
  xml do
15
- root "sup"
12
+ element "sup"
16
13
 
17
- map_element "xref", to: :xref, namespace: nil, prefix: nil
14
+ map_element "xref", to: :xref
18
15
  map_content to: :value
19
16
  end
20
17
  end
@@ -1,24 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "col"
6
- require_relative "thead"
7
- require_relative "tbody"
8
-
9
3
  module Sts
10
4
  module TbxIsoTml
11
5
  class Table < Lutaml::Model::Serializable
12
- attribute :col, Sts::TbxIsoTml::Col, collection: true
13
- attribute :thead, Sts::TbxIsoTml::Thead
14
- attribute :tbody, Sts::TbxIsoTml::Tbody
15
- attribute :border, Lutaml::Model::Type::String
16
- attribute :rules, Lutaml::Model::Type::String
17
- attribute :frame, Lutaml::Model::Type::String
18
- attribute :width, Lutaml::Model::Type::String
6
+ attribute :col, ::Sts::TbxIsoTml::Col, collection: true
7
+ attribute :thead, ::Sts::TbxIsoTml::Thead
8
+ attribute :tbody, ::Sts::TbxIsoTml::Tbody
9
+ attribute :border, :string
10
+ attribute :rules, :string
11
+ attribute :frame, :string
12
+ attribute :width, :string
19
13
 
20
14
  xml do
21
- root "table"
15
+ element "table"
22
16
 
23
17
  map_attribute "border", to: :border
24
18
  map_attribute "rules", to: :rules
@@ -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 TableBreak < Lutaml::Model::Serializable
@@ -1,26 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "table"
6
- require_relative "table_wrap_foot"
7
-
8
3
  module Sts
9
4
  module TbxIsoTml
10
5
  class TableWrap < Lutaml::Model::Serializable
11
- attribute :id, Lutaml::Model::Type::String
12
- attribute :orientation, Lutaml::Model::Type::String
13
- attribute :position, Lutaml::Model::Type::String
14
- attribute :label, Lutaml::Model::Type::String
15
- attribute :table, Sts::TbxIsoTml::Table, collection: true
16
- attribute :table_wrap_foot, Sts::TbxIsoTml::TableWrapFoot
6
+ attribute :id, :string
7
+ attribute :orientation, :string
8
+ attribute :position, :string
9
+ attribute :label, :string
10
+ attribute :table, ::Sts::TbxIsoTml::Table, collection: true
11
+ attribute :table_wrap_foot, ::Sts::TbxIsoTml::TableWrapFoot
17
12
 
18
13
  # TODO: This require will cause a loop when defined in header
19
- require_relative "../niso_sts/caption"
20
- attribute :caption, Sts::NisoSts::Caption
14
+ attribute :caption, ::Sts::NisoSts::Caption
21
15
 
22
16
  xml do
23
- root "table-wrap"
17
+ element "table-wrap"
24
18
 
25
19
  map_attribute "id", to: :id
26
20
  map_attribute "orientation", to: :orientation
@@ -1,16 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "fn_group"
6
-
7
3
  module Sts
8
4
  module TbxIsoTml
9
5
  class TableWrapFoot < Lutaml::Model::Serializable
10
- attribute :fn_group, Sts::TbxIsoTml::FnGroup
6
+ attribute :fn_group, ::Sts::TbxIsoTml::FnGroup
11
7
 
12
8
  xml do
13
- root "table-wrap-foot"
9
+ element "table-wrap-foot"
14
10
 
15
11
  map_element "fn-group", to: :fn_group
16
12
  end
@@ -1,21 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "tr"
6
-
7
3
  module Sts
8
4
  module TbxIsoTml
9
5
  class Tbody < Lutaml::Model::Serializable
10
- attribute :tr, Sts::TbxIsoTml::Tr, collection: true
11
- attribute :char, Lutaml::Model::Type::String
12
- attribute :charoff, Lutaml::Model::Type::String
13
- attribute :valign, Lutaml::Model::Type::String
6
+ attribute :tr, ::Sts::TbxIsoTml::Tr, collection: true
7
+ attribute :char, :string
8
+ attribute :charoff, :string
9
+ attribute :valign, :string
14
10
 
15
11
  xml do
16
- root "tbody"
12
+ element "tbody"
17
13
 
18
- map_attribute "char", to: :char
14
+ map_attribute "char", to: :char, value_map: { to: { empty: :empty } }
19
15
  map_attribute "charoff", to: :charoff
20
16
  map_attribute "valign", to: :valign
21
17
 
@@ -1,45 +1,34 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "italic"
6
- require_relative "xref"
7
- require_relative "bold"
8
- require_relative "../niso_sts/reference_standard"
9
- require_relative "../niso_sts/inline_formula"
10
- require_relative "../niso_sts/non_normative_note"
11
- require_relative "../niso_sts/graphic"
12
- require_relative "../niso_sts/def_list"
13
- require_relative "../niso_sts/paragraph"
14
-
15
3
  module Sts
16
4
  module TbxIsoTml
17
5
  class Td < Lutaml::Model::Serializable
18
- attribute :content, Lutaml::Model::Type::String
19
- attribute :align, Lutaml::Model::Type::String
20
- attribute :scope, Lutaml::Model::Type::String
21
- attribute :style, Lutaml::Model::Type::String
6
+ attribute :content, :string
7
+ attribute :align, :string
8
+ attribute :scope, :string
9
+ attribute :style, :string
22
10
  attribute :bold, Bold
23
11
  attribute :italic, Italic
24
- attribute :content_type, Lutaml::Model::Type::String
25
- attribute :char, Lutaml::Model::Type::String
26
- attribute :charoff, Lutaml::Model::Type::String
27
- attribute :colspan, Lutaml::Model::Type::String
28
- attribute :rowspan, Lutaml::Model::Type::String
29
- attribute :valign, Lutaml::Model::Type::String
30
- attribute :inline_formula, Sts::NisoSts::InlineFormula, collection: true
12
+ attribute :content_type, :string
13
+ attribute :char, :string
14
+ attribute :charoff, :string
15
+ attribute :colspan, :string
16
+ attribute :rowspan, :string
17
+ attribute :valign, :string
18
+ attribute :inline_formula, ::Sts::NisoSts::InlineFormula, collection: true
31
19
  attribute :non_normative_note,
32
- Sts::NisoSts::NonNormativeNote,
20
+ ::Sts::NisoSts::NonNormativeNote,
33
21
  collection: true
34
- attribute :list, Sts::NisoSts::List
22
+ attribute :list, ::Sts::NisoSts::List
35
23
  attribute :xref, Xref, collection: true
36
- attribute :std, Sts::NisoSts::ReferenceStandard
37
- attribute :graphic, Sts::NisoSts::Graphic
38
- attribute :def_list, Sts::NisoSts::DefList
39
- attribute :paragraph, Sts::NisoSts::Paragraph
24
+ attribute :std, ::Sts::NisoSts::ReferenceStandard
25
+ attribute :graphic, ::Sts::NisoSts::Graphic
26
+ attribute :def_list, ::Sts::NisoSts::DefList
27
+ attribute :paragraph, ::Sts::NisoSts::Paragraph
40
28
 
41
29
  xml do
42
- root "td", mixed: true
30
+ element "td"
31
+ mixed_content
43
32
 
44
33
  map_content to: :content
45
34
 
@@ -47,7 +36,7 @@ module Sts
47
36
  map_attribute "scope", to: :scope
48
37
  map_attribute "style", to: :style
49
38
  map_attribute "content-type", to: :content_type
50
- map_attribute "char", to: :char
39
+ map_attribute "char", to: :char, value_map: { to: { empty: :empty } }
51
40
  map_attribute "charoff", to: :charoff
52
41
  map_attribute "colspan", to: :colspan
53
42
  map_attribute "rowspan", to: :rowspan