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,19 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lutaml/model"
4
- require_relative "../tbx_iso_tml/math"
5
4
 
6
5
  module Sts
7
6
  module NisoSts
8
7
  class InlineFormula < Lutaml::Model::Serializable
9
- attribute :math, TbxIsoTml::Math
8
+ attribute :math, ::Sts::TbxIsoTml::Math
10
9
 
11
10
  xml do
12
- root "inline-formula"
11
+ element "inline-formula"
13
12
 
14
- map_element "math", to: :math,
15
- namespace: "http://www.w3.org/1998/Math/MathML",
16
- prefix: "mml"
13
+ map_element "math", to: :math
17
14
  end
18
15
  end
19
16
  end
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "../tbx_iso_tml/sup"
6
-
7
3
  module Sts
8
4
  module NisoSts
9
5
  class Label < Lutaml::Model::Serializable
@@ -11,7 +7,7 @@ module Sts
11
7
  attribute :sup, Sts::TbxIsoTml::Sup
12
8
 
13
9
  xml do
14
- root "label"
10
+ element "label"
15
11
 
16
12
  map_content to: :content
17
13
  map_element "sup", to: :sup
@@ -1,21 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "list_item"
4
- require "lutaml/model"
5
-
6
3
  module Sts
7
4
  module NisoSts
8
5
  class List < Lutaml::Model::Serializable
9
6
  attribute :text, :string
10
7
  attribute :list_type, :string
11
- attribute :list_item, ListItem, collection: true
8
+ attribute :list_item, ::Sts::NisoSts::ListItem, collection: true
12
9
 
13
10
  xml do
14
- root "list"
11
+ element "list"
15
12
 
16
13
  map_content to: :text
17
14
  map_attribute "list-type", to: :list_type
18
- map_element "list-item", to: :list_item, namespace: nil, prefix: nil
15
+ map_element "list-item", to: :list_item
19
16
  end
20
17
  end
21
18
  end
@@ -1,27 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lutaml/model"
4
- require_relative "list"
5
- require_relative "non_normative_example"
6
4
 
7
5
  module Sts
8
6
  module NisoSts
9
- class Paragraph < Lutaml::Model::Serializable; end
10
- class List < Lutaml::Model::Serializable; end
11
-
12
7
  class ListItem < Lutaml::Model::Serializable
13
- attribute :label, Label
14
- attribute :list, List
15
- attribute :non_normative_example, NonNormativeExample
16
- attribute :p, Sts::NisoSts::Paragraph
8
+ attribute :label, ::Sts::NisoSts::Label
9
+ attribute :list, ::Sts::NisoSts::List
10
+ attribute :non_normative_example, ::Sts::NisoSts::NonNormativeExample
11
+ attribute :p, ::Sts::NisoSts::Paragraph, collection: true
17
12
 
18
13
  xml do
19
- root "list-item"
14
+ element "list-item"
20
15
 
21
- map_element :label, to: :label
22
- map_element :list, to: :list
16
+ map_element "label", to: :label
17
+ map_element "list", to: :list
23
18
  map_element "non-normative-example", to: :non_normative_example
24
- map_element :p, to: :p
19
+ map_element "p", to: :p
25
20
  end
26
21
  end
27
22
  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 NisoSts
7
5
  class MetaDate < Lutaml::Model::Serializable
@@ -9,7 +7,7 @@ module Sts
9
7
  attribute :type, :string
10
8
 
11
9
  xml do
12
- root "meta-date"
10
+ element "meta-date"
13
11
 
14
12
  map_content to: :content
15
13
 
@@ -1,19 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "paragraph"
6
-
7
3
  module Sts
8
4
  module NisoSts
9
5
  class MetaNote < Lutaml::Model::Serializable
10
6
  attribute :id, :string
11
7
  attribute :content_type, :string
12
- attribute :p, Paragraph, collection: true
8
+ attribute :p, ::Sts::NisoSts::Paragraph, collection: true
13
9
  attribute :title, :string
14
10
 
15
11
  xml do
16
- root "meta-note", mixed: true
12
+ element "meta-note"
13
+ mixed_content
17
14
 
18
15
  map_attribute "id", to: :id
19
16
  map_attribute "content-type", to: :content_type
@@ -1,39 +1,28 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "custom_meta_group"
6
- require_relative "document_identification"
7
- require_relative "meta_date"
8
- require_relative "page_count"
9
- require_relative "permissions"
10
- require_relative "standard_identification"
11
- require_relative "standard_ref"
12
- require_relative "std_cross_reference"
13
- require_relative "title_wrap"
14
-
15
3
  module Sts
16
4
  module NisoSts
17
5
  class MetadataIso < Lutaml::Model::Serializable
18
6
  attribute :comm_ref, :string
19
7
  attribute :content_language, :string
20
- attribute :custom_meta_group, CustomMetaGroup
21
- attribute :doc_ident, DocumentIdentification
8
+ attribute :custom_meta_group, ::Sts::NisoSts::CustomMetaGroup
9
+ attribute :doc_ident, ::Sts::NisoSts::DocumentIdentification
22
10
  attribute :doc_ref, :string
23
11
  attribute :ics, :string
24
- attribute :meta_date, MetaDate
25
- attribute :page_count, PageCount
26
- attribute :permissions, Permissions
12
+ attribute :meta_date, ::Sts::NisoSts::MetaDate
13
+ attribute :page_count, ::Sts::NisoSts::PageCount
14
+ attribute :permissions, ::Sts::NisoSts::Permissions
27
15
  attribute :pub_date, :string
28
16
  attribute :release_date, :string
29
17
  attribute :secretariat, :string
30
- attribute :std_ident, StandardIdentification
31
- attribute :std_ref, StandardRef
32
- attribute :std_xref, StdCrossReference
33
- attribute :title_wrap, TitleWrap
18
+ attribute :std_ident, ::Sts::NisoSts::StandardIdentification
19
+ attribute :std_ref, ::Sts::NisoSts::StandardRef
20
+ attribute :std_xref, ::Sts::NisoSts::StdCrossReference
21
+ attribute :title_wrap, ::Sts::NisoSts::TitleWrap
34
22
 
35
23
  xml do
36
- root "iso-meta", mixed: true
24
+ element "iso-meta"
25
+ mixed_content
37
26
 
38
27
  map_element "comm-ref", to: :comm_ref,
39
28
  value_map: { to: { empty: :empty } }
@@ -1,40 +1,33 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lutaml/model"
4
- require_relative "title_wrap"
5
- require_relative "document_identification"
6
- require_relative "standard_identification"
7
- require_relative "standard_ref"
8
- require_relative "page_count"
9
- require_relative "std_cross_reference"
10
- require_relative "meta_note"
11
- require_relative "custom_meta_group"
12
- require_relative "permissions"
13
4
 
14
5
  module Sts
15
6
  module NisoSts
16
7
  class MetadataStd < Lutaml::Model::Serializable
17
8
  attribute :id, :string
18
- attribute :title_wrap, TitleWrap, collection: true
9
+ attribute :title_wrap, ::Sts::NisoSts::TitleWrap, collection: true
19
10
  attribute :content_language, :string
20
- attribute :std_ident, StandardIdentification
21
- attribute :doc_ident, DocumentIdentification
22
- attribute :std_ref, StandardRef, collection: true
11
+ attribute :std_ident, ::Sts::NisoSts::StandardIdentification
12
+ attribute :doc_ident, ::Sts::NisoSts::DocumentIdentification
13
+ attribute :std_ref, ::Sts::NisoSts::StandardRef, collection: true
23
14
  attribute :doc_ref, :string
24
15
  attribute :pub_date, :string
25
16
  attribute :release_date, :string
26
17
  attribute :release_version, :string
27
18
  attribute :comm_ref, :string
28
19
  attribute :secretariat, :string
29
- attribute :page_count, PageCount
20
+ attribute :page_count, ::Sts::NisoSts::PageCount
30
21
  attribute :ics, :string
31
- attribute :std_xref, StdCrossReference
32
- attribute :permissions, Permissions
33
- attribute :meta_note, MetaNote, collection: true
34
- attribute :custom_meta_group, CustomMetaGroup, collection: true
22
+ attribute :std_xref, ::Sts::NisoSts::StdCrossReference
23
+ attribute :permissions, ::Sts::NisoSts::Permissions
24
+ attribute :meta_note, ::Sts::NisoSts::MetaNote, collection: true
25
+ attribute :custom_meta_group, ::Sts::NisoSts::CustomMetaGroup,
26
+ collection: true
35
27
 
36
28
  xml do
37
- root "std-meta", mixed: true
29
+ element "std-meta"
30
+ mixed_content
38
31
 
39
32
  map_attribute "id", to: :id
40
33
 
@@ -1,10 +1,5 @@
1
1
  # frozen_striing_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "ext_link"
6
- require_relative "reference_standard"
7
-
8
3
  module Sts
9
4
  module NisoSts
10
5
  class MixedCitation < Lutaml::Model::Serializable
@@ -12,11 +7,12 @@ module Sts
12
7
  attribute :bold, :string
13
8
  attribute :italic, :string
14
9
  attribute :publication_type, :string
15
- attribute :std, ReferenceStandard, collection: true
16
- attribute :ext_link, ExtLink
10
+ attribute :std, ::Sts::NisoSts::ReferenceStandard, collection: true
11
+ attribute :ext_link, ::Sts::NisoSts::ExtLink
17
12
 
18
13
  xml do
19
- root "mixed-citation", mixed: true
14
+ element "mixed-citation"
15
+ mixed_content
20
16
 
21
17
  map_content to: :content
22
18
 
@@ -1,18 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
- module TbxIsoTml
4
+ module NisoSts
7
5
  class NamedContent < Lutaml::Model::Serializable
8
6
  attribute :content_type, :string
9
7
  attribute :content, :string
10
8
 
11
9
  xml do
12
- root "named-content"
10
+ element "named-content"
13
11
 
14
12
  map_attribute "content-type", to: :content_type
15
-
16
13
  map_content to: :content
17
14
  end
18
15
  end
@@ -1,20 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "paragraph"
6
-
7
3
  module Sts
8
4
  module NisoSts
9
- class Paragraph < Lutaml::Model::Serializable; end
10
-
11
5
  class NonNormativeExample < Lutaml::Model::Serializable
12
6
  attribute :id, :string
13
- attribute :p, Paragraph
14
- attribute :label, Label
7
+ attribute :p, ::Sts::NisoSts::Paragraph
8
+ attribute :label, ::Sts::NisoSts::Label
15
9
 
16
10
  xml do
17
- root "non-normative-example", mixed: true
11
+ element "non-normative-example"
12
+ mixed_content
18
13
 
19
14
  map_attribute "id", to: :id
20
15
  map_element "p", to: :p
@@ -1,19 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "paragraph"
6
-
7
3
  module Sts
8
4
  module NisoSts
9
5
  class NonNormativeNote < Lutaml::Model::Serializable
10
6
  attribute :id, :string
11
7
  attribute :content_type, :string
12
- attribute :p, Paragraph
13
- attribute :label, Label
8
+ attribute :p, ::Sts::NisoSts::Paragraph
9
+ attribute :label, ::Sts::NisoSts::Label
14
10
 
15
11
  xml do
16
- root "non-normative-note", mixed: true
12
+ element "non-normative-note"
13
+ mixed_content
17
14
 
18
15
  map_attribute "content-type", to: :content_type
19
16
  map_attribute "id", to: :id
@@ -4,8 +4,6 @@
4
4
  # <object-id pub-id-type="publisher-id">fig-1</object-id>
5
5
  # rubocop:enable Layout/LineLength
6
6
 
7
- require "lutaml/model"
8
-
9
7
  module Sts
10
8
  module NisoSts
11
9
  class ObjectId < Lutaml::Model::Serializable
@@ -13,7 +11,7 @@ module Sts
13
11
  attribute :content, :string
14
12
 
15
13
  xml do
16
- root "object-id"
14
+ element "object-id"
17
15
 
18
16
  map_attribute "pub-id-type", to: :pub_id_type
19
17
  map_content to: :content
@@ -1,14 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
3
  module Sts
6
4
  module NisoSts
7
5
  class PageCount < Lutaml::Model::Serializable
8
6
  attribute :count, :integer
9
7
 
10
8
  xml do
11
- root "page-count"
9
+ element "page-count"
12
10
  map_attribute "count", to: :count
13
11
  end
14
12
  end
@@ -1,42 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "list"
6
- require_relative "inline_formula"
7
- require_relative "display_formula"
8
- require_relative "def_list"
9
- require_relative "non_normative_note"
10
- require_relative "non_normative_example"
11
- require_relative "reference_standard"
12
- require_relative "ext_link"
13
- require_relative "../tbx_iso_tml/entailed_term"
14
- require_relative "../tbx_iso_tml/xref"
15
-
16
3
  module Sts
17
4
  module NisoSts
18
- class NonNormativeNote < Lutaml::Model::Serializable; end
19
- class ReferenceStandard < Lutaml::Model::Serializable; end
20
-
21
5
  class Paragraph < Lutaml::Model::Serializable
22
6
  attribute :id, :string
23
7
  attribute :text, :string
24
8
  attribute :italic, :string, collection: true
25
9
  attribute :bold, :string, collection: true
26
10
  attribute :uri, :string
27
- attribute :list, Sts::NisoSts::List
28
- attribute :def_list, DefList
29
- attribute :non_normative_note, NonNormativeNote
30
- attribute :non_normative_example, NonNormativeExample
31
- attribute :inline_formula, Sts::NisoSts::InlineFormula, collection: true
32
- attribute :disp_formula, Sts::NisoSts::DisplayFormula, collection: true
33
- attribute :xref, TbxIsoTml::Xref, collection: true
34
- attribute :std, ReferenceStandard, collection: true
35
- attribute :ext_link, ExtLink
36
- attribute :entailed_term, Sts::TbxIsoTml::EntailedTerm
11
+ attribute :list, ::Sts::NisoSts::List
12
+ attribute :def_list, ::Sts::NisoSts::DefList
13
+ attribute :non_normative_note, ::Sts::NisoSts::NonNormativeNote
14
+ attribute :non_normative_example, ::Sts::NisoSts::NonNormativeExample
15
+ attribute :inline_formula, ::Sts::NisoSts::InlineFormula, collection: true
16
+ attribute :disp_formula, ::Sts::NisoSts::DisplayFormula, collection: true
17
+ attribute :xref, ::Sts::TbxIsoTml::Xref, collection: true
18
+ attribute :std, ::Sts::NisoSts::ReferenceStandard, collection: true
19
+ attribute :ext_link, ::Sts::NisoSts::ExtLink
20
+ attribute :entailed_term, ::Sts::TbxIsoTml::EntailedTerm
37
21
 
38
22
  xml do
39
- root "p", mixed: true
23
+ element "p"
24
+ mixed_content
40
25
 
41
26
  map_attribute "id", to: :id
42
27
  map_content to: :text
@@ -49,12 +34,10 @@ module Sts
49
34
  map_element "inline-formula", to: :inline_formula
50
35
  map_element "disp-formula", to: :disp_formula
51
36
  map_element "ext-link", to: :ext_link
52
- map_element "entailedTerm", to: :entailed_term,
53
- namespace: "urn:iso:std:iso:30042:ed-1",
54
- prefix: "tbx"
37
+ map_element "entailedTerm", to: :entailed_term
55
38
  map_element "uri", to: :uri
56
- map_element "std", to: :std, namespace: nil, prefix: nil
57
- map_element "xref", to: :xref, namespace: nil, prefix: nil
39
+ map_element "std", to: :std
40
+ map_element "xref", to: :xref
58
41
  end
59
42
  end
60
43
  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 NisoSts
7
5
  class Permissions < Lutaml::Model::Serializable
@@ -10,7 +8,7 @@ module Sts
10
8
  attribute :copyright_holder, :string
11
9
 
12
10
  xml do
13
- root "permissions"
11
+ element "permissions"
14
12
  map_element "copyright-statement", to: :copyright_statement
15
13
  map_element "copyright-year", to: :copyright_year
16
14
  map_element "copyright-holder", to: :copyright_holder
@@ -1,19 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "reference_standard"
4
- require_relative "mixed_citation"
5
-
6
3
  module Sts
7
4
  module NisoSts
8
5
  class Reference < Lutaml::Model::Serializable
9
6
  attribute :content_type, :string
10
7
  attribute :id, :string
11
- attribute :label, Label
12
- attribute :mixed_citation, MixedCitation
13
- attribute :std, ReferenceStandard, collection: true
8
+ attribute :label, ::Sts::NisoSts::Label
9
+ attribute :mixed_citation, ::Sts::NisoSts::MixedCitation
10
+ attribute :std, ::Sts::NisoSts::ReferenceStandard, collection: true
14
11
 
15
12
  xml do
16
- root "ref"
13
+ element "ref"
17
14
  map_attribute "content-type", to: :content_type
18
15
  map_attribute "id", to: :id
19
16
  map_element "label", to: :label
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "reference"
4
-
5
3
  module Sts
6
4
  module NisoSts
7
5
  class ReferenceList < Lutaml::Model::Serializable
@@ -9,11 +7,11 @@ module Sts
9
7
  attribute :id, :string
10
8
  attribute :specific_use, :string
11
9
  attribute :title, :string
12
- attribute :label, Label
13
- attribute :ref, Reference, collection: true
10
+ attribute :label, ::Sts::NisoSts::Label
11
+ attribute :ref, ::Sts::NisoSts::Reference, collection: true
14
12
 
15
13
  xml do
16
- root "ref-list"
14
+ element "ref-list"
17
15
 
18
16
  map_attribute "content-type", to: :content_type
19
17
  map_attribute "id", to: :id
@@ -1,10 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lutaml/model"
4
- require_relative "standard_ref"
5
- require_relative "std_id_group"
6
- require_relative "fn"
7
- require_relative "../tbx_iso_tml/xref"
8
4
 
9
5
  module Sts
10
6
  module NisoSts
@@ -12,24 +8,23 @@ module Sts
12
8
  attribute :type, :string
13
9
  attribute :std_id, :string
14
10
  attribute :content, :string
15
- attribute :std_ref, StandardRef
11
+ attribute :std_ref, ::Sts::NisoSts::StandardRef
16
12
  attribute :title, :string
17
- attribute :fn, Fn, collection: true
18
- attribute :std_id_group, StdIdGroup, collection: true
19
- attribute :xref, Sts::TbxIsoTml::Xref, collection: true
13
+ attribute :fn, ::Sts::NisoSts::Fn, collection: true
14
+ attribute :std_id_group, ::Sts::NisoSts::StdIdGroup, collection: true
15
+ attribute :xref, ::Sts::TbxIsoTml::Xref, collection: true
20
16
 
21
17
  xml do
22
- root "std", mixed: true
18
+ element "std"
19
+ mixed_content
23
20
 
24
21
  map_attribute "type", to: :type
25
22
  map_attribute "std-id", to: :std_id
26
23
 
27
- map_element "std-ref", to: :std_ref, namespace: nil, prefix: nil
28
- map_element "fn", to: :fn, namespace: nil, prefix: nil
29
- map_element "title", to: :title, namespace: nil, prefix: nil
30
- map_element "std-id-group", to: :std_id_group,
31
- namespace: nil,
32
- prefix: nil
24
+ map_element "std-ref", to: :std_ref
25
+ map_element "fn", to: :fn
26
+ map_element "title", to: :title
27
+ map_element "std-id-group", to: :std_id_group
33
28
  map_element "xref", to: :xref
34
29
 
35
30
  map_content to: :content
@@ -1,44 +1,31 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "paragraph"
6
- require_relative "list"
7
- require_relative "term_section"
8
- require_relative "reference_list"
9
- require_relative "non_normative_note"
10
- require_relative "non_normative_example"
11
- require_relative "figure"
12
- require_relative "title"
13
- require_relative "section_array"
14
-
15
- require_relative "../tbx_iso_tml/table_wrap"
16
-
17
3
  module Sts
18
4
  module NisoSts
19
- class Title < Lutaml::Model::Serializable; end
20
-
21
5
  class Section < Lutaml::Model::Serializable
22
6
  attribute :id, :string
23
7
  attribute :specific_use, :string
24
- attribute :label, Label
25
- attribute :title, Title
8
+ attribute :label, ::Sts::NisoSts::Label
9
+ attribute :title, ::Sts::NisoSts::Title
26
10
  attribute :type, :string
27
- attribute :array, SectionArray
28
- attribute :paragraphs, Paragraph, collection: true
29
- attribute :list, List, collection: true
30
- attribute :term_sec, TermSection, collection: true
31
- attribute :ref_list, ReferenceList, collection: true
32
- attribute :non_normative_note, NonNormativeNote, collection: true
33
- attribute :non_normative_example, NonNormativeExample, collection: true
34
- attribute :sec, Section, collection: true
35
- attribute :figures, Figure, collection: true
36
- attribute :fig, Figure, collection: true
11
+ attribute :array, ::Sts::NisoSts::SectionArray
12
+ attribute :paragraphs, ::Sts::NisoSts::Paragraph, collection: true
13
+ attribute :list, ::Sts::NisoSts::List, collection: true
14
+ attribute :term_sec, ::Sts::NisoSts::TermSection, collection: true
15
+ attribute :ref_list, ::Sts::NisoSts::ReferenceList, collection: true
16
+ attribute :non_normative_note, ::Sts::NisoSts::NonNormativeNote,
17
+ collection: true
18
+ attribute :non_normative_example, ::Sts::NisoSts::NonNormativeExample,
19
+ collection: true
20
+ attribute :sec, ::Sts::NisoSts::Section, collection: true
21
+ attribute :figures, ::Sts::NisoSts::Figure, collection: true
22
+ attribute :fig, ::Sts::NisoSts::Figure, collection: true
37
23
 
38
24
  attribute :table_wrap, ::Sts::TbxIsoTml::TableWrap, collection: true
39
25
 
40
26
  xml do
41
- root "sec", mixed: true
27
+ element "sec"
28
+ mixed_content
42
29
 
43
30
  map_attribute "id", to: :id
44
31
  map_attribute "sec-type", to: :type
@@ -1,17 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
4
-
5
- require_relative "../tbx_iso_tml/table"
6
-
7
3
  module Sts
8
4
  module NisoSts
9
5
  class SectionArray < Lutaml::Model::Serializable
10
6
  attribute :id, :string
11
- attribute :table, Sts::TbxIsoTml::Table
7
+ attribute :table, ::Sts::TbxIsoTml::Table
12
8
 
13
9
  xml do
14
- root "array"
10
+ element "array"
15
11
 
16
12
  map_attribute "id", to: :id
17
13
  map_element "table", to: :table