sts 0.3.3 → 0.3.4

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 (87) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop-https---raw-githubusercontent-com-riboseinc-oss-guides-master-ci-rubocop-yml +1 -0
  3. data/.rubocop_todo.yml +27 -12
  4. data/Gemfile +6 -12
  5. data/lib/sts/niso_sts/adoption.rb +2 -2
  6. data/lib/sts/niso_sts/app.rb +3 -3
  7. data/lib/sts/niso_sts/custom_meta.rb +3 -3
  8. data/lib/sts/niso_sts/def_item.rb +1 -1
  9. data/lib/sts/niso_sts/def_list.rb +3 -3
  10. data/lib/sts/niso_sts/display_formula.rb +1 -1
  11. data/lib/sts/niso_sts/document_identification.rb +5 -5
  12. data/lib/sts/niso_sts/ext_link.rb +3 -3
  13. data/lib/sts/niso_sts/figure.rb +2 -2
  14. data/lib/sts/niso_sts/fn.rb +1 -1
  15. data/lib/sts/niso_sts/graphic.rb +1 -1
  16. data/lib/sts/niso_sts/label.rb +1 -1
  17. data/lib/sts/niso_sts/list.rb +2 -2
  18. data/lib/sts/niso_sts/meta_date.rb +2 -2
  19. data/lib/sts/niso_sts/meta_note.rb +3 -3
  20. data/lib/sts/niso_sts/metadata_iso.rb +9 -8
  21. data/lib/sts/niso_sts/metadata_std.rb +13 -11
  22. data/lib/sts/niso_sts/mixed_citation.rb +4 -4
  23. data/lib/sts/niso_sts/non_normative_example.rb +1 -1
  24. data/lib/sts/niso_sts/non_normative_note.rb +2 -2
  25. data/lib/sts/niso_sts/object_id.rb +2 -2
  26. data/lib/sts/niso_sts/page_count.rb +1 -1
  27. data/lib/sts/niso_sts/paragraph.rb +5 -5
  28. data/lib/sts/niso_sts/permissions.rb +3 -3
  29. data/lib/sts/niso_sts/reference.rb +2 -2
  30. data/lib/sts/niso_sts/reference_list.rb +4 -4
  31. data/lib/sts/niso_sts/reference_standard.rb +4 -4
  32. data/lib/sts/niso_sts/section.rb +3 -3
  33. data/lib/sts/niso_sts/section_array.rb +1 -1
  34. data/lib/sts/niso_sts/standard.rb +5 -5
  35. data/lib/sts/niso_sts/standard_identification.rb +10 -8
  36. data/lib/sts/niso_sts/standard_ref.rb +2 -2
  37. data/lib/sts/niso_sts/std_cross_reference.rb +1 -1
  38. data/lib/sts/niso_sts/std_id.rb +4 -4
  39. data/lib/sts/niso_sts/term_section.rb +2 -2
  40. data/lib/sts/niso_sts/title.rb +1 -1
  41. data/lib/sts/niso_sts/title_wrap.rb +4 -4
  42. data/lib/sts/tbx_iso_tml/bold.rb +1 -1
  43. data/lib/sts/tbx_iso_tml/caption.rb +1 -1
  44. data/lib/sts/tbx_iso_tml/col.rb +5 -5
  45. data/lib/sts/tbx_iso_tml/definition.rb +2 -2
  46. data/lib/sts/tbx_iso_tml/entailed_term.rb +4 -4
  47. data/lib/sts/tbx_iso_tml/example.rb +2 -2
  48. data/lib/sts/tbx_iso_tml/external_graphic.rb +1 -1
  49. data/lib/sts/tbx_iso_tml/external_source.rb +2 -2
  50. data/lib/sts/tbx_iso_tml/fn.rb +2 -2
  51. data/lib/sts/tbx_iso_tml/geographical_usage.rb +1 -1
  52. data/lib/sts/tbx_iso_tml/grammatical_gender.rb +1 -1
  53. data/lib/sts/tbx_iso_tml/grammatical_number.rb +1 -1
  54. data/lib/sts/tbx_iso_tml/italic.rb +2 -2
  55. data/lib/sts/tbx_iso_tml/lang_set.rb +3 -3
  56. data/lib/sts/tbx_iso_tml/math.rb +7 -7
  57. data/lib/sts/tbx_iso_tml/mfenced.rb +9 -8
  58. data/lib/sts/tbx_iso_tml/mfrac.rb +4 -4
  59. data/lib/sts/tbx_iso_tml/mi.rb +1 -1
  60. data/lib/sts/tbx_iso_tml/mrow.rb +5 -5
  61. data/lib/sts/tbx_iso_tml/mspace.rb +1 -1
  62. data/lib/sts/tbx_iso_tml/mstyle.rb +4 -4
  63. data/lib/sts/tbx_iso_tml/msub.rb +4 -4
  64. data/lib/sts/tbx_iso_tml/msup.rb +2 -2
  65. data/lib/sts/tbx_iso_tml/munderover.rb +2 -2
  66. data/lib/sts/tbx_iso_tml/named_content.rb +2 -2
  67. data/lib/sts/tbx_iso_tml/normative_authorization.rb +1 -1
  68. data/lib/sts/tbx_iso_tml/note.rb +2 -2
  69. data/lib/sts/tbx_iso_tml/part_of_speech.rb +1 -1
  70. data/lib/sts/tbx_iso_tml/see.rb +2 -2
  71. data/lib/sts/tbx_iso_tml/semantics.rb +3 -3
  72. data/lib/sts/tbx_iso_tml/source.rb +1 -1
  73. data/lib/sts/tbx_iso_tml/sup.rb +1 -1
  74. data/lib/sts/tbx_iso_tml/table.rb +4 -4
  75. data/lib/sts/tbx_iso_tml/table_wrap.rb +4 -4
  76. data/lib/sts/tbx_iso_tml/tbody.rb +4 -4
  77. data/lib/sts/tbx_iso_tml/td.rb +11 -11
  78. data/lib/sts/tbx_iso_tml/term.rb +5 -5
  79. data/lib/sts/tbx_iso_tml/term_entry.rb +1 -1
  80. data/lib/sts/tbx_iso_tml/term_information_group.rb +3 -3
  81. data/lib/sts/tbx_iso_tml/term_type.rb +1 -1
  82. data/lib/sts/tbx_iso_tml/th.rb +11 -11
  83. data/lib/sts/tbx_iso_tml/thead.rb +4 -4
  84. data/lib/sts/tbx_iso_tml/xref.rb +3 -3
  85. data/lib/sts/version.rb +1 -1
  86. data/sts.gemspec +1 -1
  87. metadata +9 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc24ac782acd2343da8180b1a4474170d1f54559aa20afbe791dba3a3dd6af59
4
- data.tar.gz: 2b52bdbbfe5511afc17fef573d1f330ebfab4337a91f4f29cf6ea66a29fe44de
3
+ metadata.gz: a4c33b0d9e555f39d6325c27b46bc0557bd21699c1c050f1f5aa7eaa322082df
4
+ data.tar.gz: 4427f44d8745804697c0d2a9a4f78f08c0552caa69079b88b50834a8645490bd
5
5
  SHA512:
6
- metadata.gz: a15aec03e61e5cba62d00ca58d217f0cadfa9d0d0630770024da4363f76513ab51403fefb884b6b64c0b9de8e625d790613b3ab5cc27d111d89e32e4f96d1c27
7
- data.tar.gz: f94ddf2eb409f3a09dc281b3b962083b1ae67fb573b951d70980c1e27dc6240cd6d084114597fabbafa0e297a45ffe83c6216100ec552d43096571901c2c6eac
6
+ metadata.gz: c450defe1889541f576c21ba203d09b872722583ef1f9843f5b9afea44d9b970ccd8a0deb99627c6f186643d188c1e77379dc62f6b634a3096d7c199a4e56c4d
7
+ data.tar.gz: 152d2ec43794d41885c5f8172f29b6cebf6039384808555c8b157349b1337df9e4e0b4c2a18a472dbab04d3dd8fe7fcdbfe81cd4f4981932765784f7f5232fab
@@ -99,6 +99,7 @@ Metrics/BlockLength:
99
99
  CountComments: true
100
100
  Max: 25
101
101
  Exclude:
102
+ - "**/*.gemspec"
102
103
  - spec/**/*
103
104
  Metrics/CyclomaticComplexity:
104
105
  Description: A complexity metric that is strongly correlated to the number of test
data/.rubocop_todo.yml CHANGED
@@ -1,27 +1,42 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2024-09-09 08:39:44 UTC using RuboCop version 1.66.1.
3
+ # on 2025-03-19 17:00:15 UTC using RuboCop version 1.74.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 5
9
+ # Offense count: 6
10
10
  # This cop supports safe autocorrection (--autocorrect).
11
- # Configuration parameters: EnforcedStyle, IndentationWidth.
12
- # SupportedStyles: with_first_argument, with_fixed_indentation
13
- Layout/ArgumentAlignment:
11
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
12
+ # SupportedHashRocketStyles: key, separator, table
13
+ # SupportedColonStyles: key, separator, table
14
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
15
+ Layout/HashAlignment:
14
16
  Exclude:
15
- - 'lib/sts/tbx_iso_tml/grammatical_gender.rb'
16
- - 'lib/sts/tbx_iso_tml/grammatical_number.rb'
17
- - 'lib/sts/tbx_iso_tml/normative_authorization.rb'
18
- - 'lib/sts/tbx_iso_tml/part_of_speech.rb'
19
- - 'lib/sts/tbx_iso_tml/term_type.rb'
17
+ - 'lib/sts/niso_sts/metadata_iso.rb'
18
+ - 'lib/sts/niso_sts/metadata_std.rb'
19
+ - 'lib/sts/niso_sts/standard_identification.rb'
20
+ - 'lib/sts/tbx_iso_tml/mfenced.rb'
20
21
 
21
- # Offense count: 1
22
+ # Offense count: 7
22
23
  # This cop supports safe autocorrection (--autocorrect).
23
- # Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
24
+ # Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
24
25
  # URISchemes: http, https
25
26
  Layout/LineLength:
26
27
  Exclude:
28
+ - 'lib/sts/niso_sts/metadata_iso.rb'
29
+ - 'lib/sts/niso_sts/metadata_std.rb'
30
+ - 'lib/sts/niso_sts/standard_identification.rb'
31
+ - 'lib/sts/tbx_iso_tml/mfenced.rb'
27
32
  - 'lib/sts/tbx_iso_tml/term_type.rb'
33
+
34
+ # Offense count: 6
35
+ # This cop supports safe autocorrection (--autocorrect).
36
+ # Configuration parameters: AllowInHeredoc.
37
+ Layout/TrailingWhitespace:
38
+ Exclude:
39
+ - 'lib/sts/niso_sts/metadata_iso.rb'
40
+ - 'lib/sts/niso_sts/metadata_std.rb'
41
+ - 'lib/sts/niso_sts/standard_identification.rb'
42
+ - 'lib/sts/tbx_iso_tml/mfenced.rb'
data/Gemfile CHANGED
@@ -5,16 +5,10 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in sts.gemspec
6
6
  gemspec
7
7
 
8
- gem "pry", "~> 0.14.0"
9
-
10
- gem "rake", "~> 13.0"
11
-
12
- gem "rspec", "~> 3.0"
13
-
14
- gem "rubocop", "~> 1.21"
15
-
16
- gem "rubocop-performance", "~> 1.19"
17
-
18
- gem "equivalent-xml", "~> 0.6"
19
-
8
+ gem "equivalent-xml"
9
+ gem "pry"
10
+ gem "rake"
11
+ gem "rspec"
12
+ gem "rubocop"
13
+ gem "rubocop-performance"
20
14
  gem "xml-c14n"
@@ -8,8 +8,8 @@ module Sts
8
8
  class Adoption < Lutaml::Model::Serializable
9
9
  attribute :front, AdoptionFront
10
10
  attribute :back, Back
11
- attribute :id, Lutaml::Model::Type::String
12
- attribute :lang, Lutaml::Model::Type::String
11
+ attribute :id, :string
12
+ attribute :lang, :string
13
13
  attribute :adoptions, Adoption, collection: true
14
14
  attribute :standard, Standard
15
15
 
@@ -16,10 +16,10 @@ module Sts
16
16
  class ReferenceList < Lutaml::Model::Serializable; end
17
17
 
18
18
  class App < Lutaml::Model::Serializable
19
- attribute :id, Lutaml::Model::Type::String
20
- attribute :content_type, Lutaml::Model::Type::String
19
+ attribute :id, :string
20
+ attribute :content_type, :string
21
21
  attribute :label, Label
22
- attribute :annex_type, Lutaml::Model::Type::String
22
+ attribute :annex_type, :string
23
23
  attribute :title, Title
24
24
  attribute :fig, Figure, collection: true
25
25
  attribute :sec, Section, collection: true
@@ -5,9 +5,9 @@ require "lutaml/model"
5
5
  module Sts
6
6
  module NisoSts
7
7
  class CustomMeta < Lutaml::Model::Serializable
8
- attribute :lang, Lutaml::Model::Type::String
9
- attribute :meta_name, Lutaml::Model::Type::String
10
- attribute :meta_value, Lutaml::Model::Type::String
8
+ attribute :lang, :string
9
+ attribute :meta_name, :string
10
+ attribute :meta_value, :string
11
11
 
12
12
  xml do
13
13
  root "custom-meta"
@@ -8,7 +8,7 @@ require_relative "../tbx_iso_tml/term"
8
8
  module Sts
9
9
  module NisoSts
10
10
  class DefItem < Lutaml::Model::Serializable
11
- attribute :specific_use, Lutaml::Model::Type::String
11
+ attribute :specific_use, :string
12
12
  attribute :term, TbxIsoTml::Term
13
13
  attribute :definition, Def
14
14
 
@@ -7,9 +7,9 @@ require_relative "def_item"
7
7
  module Sts
8
8
  module NisoSts
9
9
  class DefList < Lutaml::Model::Serializable
10
- attribute :title, Lutaml::Model::Type::String
11
- attribute :specific_use, Lutaml::Model::Type::String
12
- attribute :list_type, Lutaml::Model::Type::String
10
+ attribute :title, :string
11
+ attribute :specific_use, :string
12
+ attribute :list_type, :string
13
13
  attribute :def_item, DefItem, collection: true
14
14
  attribute :def_list, DefList
15
15
 
@@ -6,7 +6,7 @@ require_relative "../tbx_iso_tml/math"
6
6
  module Sts
7
7
  module NisoSts
8
8
  class DisplayFormula < Lutaml::Model::Serializable
9
- attribute :id, Lutaml::Model::Type::String
9
+ attribute :id, :string
10
10
  attribute :label, Label
11
11
  attribute :math, TbxIsoTml::Math
12
12
 
@@ -5,11 +5,11 @@ require "lutaml/model"
5
5
  module Sts
6
6
  module NisoSts
7
7
  class DocumentIdentification < Lutaml::Model::Serializable
8
- attribute :sdo, Lutaml::Model::Type::String
9
- attribute :proj_id, Lutaml::Model::Type::String
10
- attribute :language, Lutaml::Model::Type::String
11
- attribute :release_version, Lutaml::Model::Type::String
12
- attribute :urn, Lutaml::Model::Type::String
8
+ attribute :sdo, :string
9
+ attribute :proj_id, :string
10
+ attribute :language, :string
11
+ attribute :release_version, :string
12
+ attribute :urn, :string
13
13
 
14
14
  xml do
15
15
  root "doc-ident"
@@ -5,9 +5,9 @@ require "lutaml/model"
5
5
  module Sts
6
6
  module NisoSts
7
7
  class ExtLink < Lutaml::Model::Serializable
8
- attribute :ext_link_type, Lutaml::Model::Type::String
9
- attribute :href, Lutaml::Model::Type::String
10
- attribute :content, Lutaml::Model::Type::String
8
+ attribute :ext_link_type, :string
9
+ attribute :href, :string
10
+ attribute :content, :string
11
11
 
12
12
  xml do
13
13
  root "ext-link"
@@ -17,8 +17,8 @@ module Sts
17
17
  class Caption < Lutaml::Model::Serializable; end
18
18
 
19
19
  class Figure < Lutaml::Model::Serializable
20
- attribute :id, Lutaml::Model::Type::String
21
- attribute :orientation, Lutaml::Model::Type::String
20
+ attribute :id, :string
21
+ attribute :orientation, :string
22
22
  attribute :caption, Caption
23
23
  attribute :def_list, DefList
24
24
  attribute :label, Label
@@ -8,7 +8,7 @@ require_relative "paragraph"
8
8
  module Sts
9
9
  module NisoSts
10
10
  class Fn < Lutaml::Model::Serializable
11
- attribute :id, Lutaml::Model::Type::String
11
+ attribute :id, :string
12
12
  attribute :label, Label
13
13
  attribute :paragraph, Paragraph
14
14
 
@@ -13,7 +13,7 @@ require_relative "object_id"
13
13
  module Sts
14
14
  module NisoSts
15
15
  class Graphic < Lutaml::Model::Serializable
16
- attribute :href, Lutaml::Model::Type::String
16
+ attribute :href, :string
17
17
  attribute :object_id, ObjectId, collection: true
18
18
 
19
19
  xml do
@@ -7,7 +7,7 @@ require_relative "../tbx_iso_tml/sup"
7
7
  module Sts
8
8
  module NisoSts
9
9
  class Label < Lutaml::Model::Serializable
10
- attribute :content, Lutaml::Model::Type::String
10
+ attribute :content, :string
11
11
  attribute :sup, Sts::TbxIsoTml::Sup
12
12
 
13
13
  xml do
@@ -6,8 +6,8 @@ require "lutaml/model"
6
6
  module Sts
7
7
  module NisoSts
8
8
  class List < Lutaml::Model::Serializable
9
- attribute :text, Lutaml::Model::Type::String
10
- attribute :list_type, Lutaml::Model::Type::String
9
+ attribute :text, :string
10
+ attribute :list_type, :string
11
11
  attribute :list_item, ListItem, collection: true
12
12
 
13
13
  xml do
@@ -5,8 +5,8 @@ require "lutaml/model"
5
5
  module Sts
6
6
  module NisoSts
7
7
  class MetaDate < Lutaml::Model::Serializable
8
- attribute :content, Lutaml::Model::Type::String
9
- attribute :type, Lutaml::Model::Type::String
8
+ attribute :content, :string
9
+ attribute :type, :string
10
10
 
11
11
  xml do
12
12
  root "meta-date"
@@ -7,10 +7,10 @@ require_relative "paragraph"
7
7
  module Sts
8
8
  module NisoSts
9
9
  class MetaNote < Lutaml::Model::Serializable
10
- attribute :id, Lutaml::Model::Type::String
11
- attribute :content_type, Lutaml::Model::Type::String
10
+ attribute :id, :string
11
+ attribute :content_type, :string
12
12
  attribute :p, Paragraph, collection: true
13
- attribute :title, Lutaml::Model::Type::String
13
+ attribute :title, :string
14
14
 
15
15
  xml do
16
16
  root "meta-note", mixed: true
@@ -15,18 +15,18 @@ require_relative "title_wrap"
15
15
  module Sts
16
16
  module NisoSts
17
17
  class MetadataIso < Lutaml::Model::Serializable
18
- attribute :comm_ref, Lutaml::Model::Type::String
19
- attribute :content_language, Lutaml::Model::Type::String
18
+ attribute :comm_ref, :string
19
+ attribute :content_language, :string
20
20
  attribute :custom_meta_group, CustomMetaGroup
21
21
  attribute :doc_ident, DocumentIdentification
22
- attribute :doc_ref, Lutaml::Model::Type::String
23
- attribute :ics, Lutaml::Model::Type::String
22
+ attribute :doc_ref, :string
23
+ attribute :ics, :string
24
24
  attribute :meta_date, MetaDate
25
25
  attribute :page_count, PageCount
26
26
  attribute :permissions, Permissions
27
- attribute :pub_date, Lutaml::Model::Type::String
28
- attribute :release_date, Lutaml::Model::Type::String
29
- attribute :secretariat, Lutaml::Model::Type::String
27
+ attribute :pub_date, :string
28
+ attribute :release_date, :string
29
+ attribute :secretariat, :string
30
30
  attribute :std_ident, StandardIdentification
31
31
  attribute :std_ref, StandardRef
32
32
  attribute :std_xref, StdCrossReference
@@ -35,7 +35,8 @@ module Sts
35
35
  xml do
36
36
  root "iso-meta", mixed: true
37
37
 
38
- map_element "comm-ref", to: :comm_ref
38
+ map_element "comm-ref", to: :comm_ref,
39
+ value_map: { to: { empty: :empty } }
39
40
  map_element "content-language", to: :content_language
40
41
  map_element "custom-meta-group", to: :custom_meta_group
41
42
  map_element "doc-ident", to: :doc_ident
@@ -14,20 +14,20 @@ require_relative "permissions"
14
14
  module Sts
15
15
  module NisoSts
16
16
  class MetadataStd < Lutaml::Model::Serializable
17
- attribute :id, Lutaml::Model::Type::String
17
+ attribute :id, :string
18
18
  attribute :title_wrap, TitleWrap, collection: true
19
- attribute :content_language, Lutaml::Model::Type::String
19
+ attribute :content_language, :string
20
20
  attribute :std_ident, StandardIdentification
21
21
  attribute :doc_ident, DocumentIdentification
22
22
  attribute :std_ref, StandardRef, collection: true
23
- attribute :doc_ref, Lutaml::Model::Type::String
24
- attribute :pub_date, Lutaml::Model::Type::String
25
- attribute :release_date, Lutaml::Model::Type::String
26
- attribute :release_version, Lutaml::Model::Type::String
27
- attribute :comm_ref, Lutaml::Model::Type::String
28
- attribute :secretariat, Lutaml::Model::Type::String
23
+ attribute :doc_ref, :string
24
+ attribute :pub_date, :string
25
+ attribute :release_date, :string
26
+ attribute :release_version, :string
27
+ attribute :comm_ref, :string
28
+ attribute :secretariat, :string
29
29
  attribute :page_count, PageCount
30
- attribute :ics, Lutaml::Model::Type::String
30
+ attribute :ics, :string
31
31
  attribute :std_xref, StdCrossReference
32
32
  attribute :permissions, Permissions
33
33
  attribute :meta_note, MetaNote, collection: true
@@ -47,8 +47,10 @@ module Sts
47
47
  map_element "pub-date", to: :pub_date
48
48
  map_element "release-date", to: :release_date
49
49
  map_element "release-version", to: :release_version
50
- map_element "comm-ref", to: :comm_ref, render_nil: true
51
- map_element "secretariat", to: :secretariat, render_nil: true
50
+ map_element "comm-ref", to: :comm_ref,
51
+ value_map: { to: { empty: :empty } }
52
+ map_element "secretariat", to: :secretariat,
53
+ value_map: { to: { empty: :empty } }
52
54
  map_element "page-count", to: :page_count
53
55
  map_element "ics", to: :ics
54
56
  map_element "std-xref", to: :std_xref
@@ -8,10 +8,10 @@ require_relative "reference_standard"
8
8
  module Sts
9
9
  module NisoSts
10
10
  class MixedCitation < Lutaml::Model::Serializable
11
- attribute :content, Lutaml::Model::Type::String
12
- attribute :bold, Lutaml::Model::Type::String
13
- attribute :italic, Lutaml::Model::Type::String
14
- attribute :publication_type, Lutaml::Model::Type::String
11
+ attribute :content, :string
12
+ attribute :bold, :string
13
+ attribute :italic, :string
14
+ attribute :publication_type, :string
15
15
  attribute :std, ReferenceStandard, collection: true
16
16
  attribute :ext_link, ExtLink
17
17
 
@@ -9,7 +9,7 @@ module Sts
9
9
  class Paragraph < Lutaml::Model::Serializable; end
10
10
 
11
11
  class NonNormativeExample < Lutaml::Model::Serializable
12
- attribute :id, Lutaml::Model::Type::String
12
+ attribute :id, :string
13
13
  attribute :p, Paragraph
14
14
  attribute :label, Label
15
15
 
@@ -7,8 +7,8 @@ require_relative "paragraph"
7
7
  module Sts
8
8
  module NisoSts
9
9
  class NonNormativeNote < Lutaml::Model::Serializable
10
- attribute :id, Lutaml::Model::Type::String
11
- attribute :content_type, Lutaml::Model::Type::String
10
+ attribute :id, :string
11
+ attribute :content_type, :string
12
12
  attribute :p, Paragraph
13
13
  attribute :label, Label
14
14
 
@@ -9,8 +9,8 @@ require "lutaml/model"
9
9
  module Sts
10
10
  module NisoSts
11
11
  class ObjectId < Lutaml::Model::Serializable
12
- attribute :pub_id_type, Lutaml::Model::Type::String
13
- attribute :content, Lutaml::Model::Type::String
12
+ attribute :pub_id_type, :string
13
+ attribute :content, :string
14
14
 
15
15
  xml do
16
16
  root "object-id"
@@ -5,7 +5,7 @@ require "lutaml/model"
5
5
  module Sts
6
6
  module NisoSts
7
7
  class PageCount < Lutaml::Model::Serializable
8
- attribute :count, Lutaml::Model::Type::Integer
8
+ attribute :count, :integer
9
9
 
10
10
  xml do
11
11
  root "page-count"
@@ -19,11 +19,11 @@ module Sts
19
19
  class ReferenceStandard < Lutaml::Model::Serializable; end
20
20
 
21
21
  class Paragraph < Lutaml::Model::Serializable
22
- attribute :id, Lutaml::Model::Type::String
23
- attribute :text, Lutaml::Model::Type::String
24
- attribute :italic, Lutaml::Model::Type::String, collection: true
25
- attribute :bold, Lutaml::Model::Type::String, collection: true
26
- attribute :uri, Lutaml::Model::Type::String
22
+ attribute :id, :string
23
+ attribute :text, :string
24
+ attribute :italic, :string, collection: true
25
+ attribute :bold, :string, collection: true
26
+ attribute :uri, :string
27
27
  attribute :list, Sts::NisoSts::List
28
28
  attribute :def_list, DefList
29
29
  attribute :non_normative_note, NonNormativeNote
@@ -5,9 +5,9 @@ require "lutaml/model"
5
5
  module Sts
6
6
  module NisoSts
7
7
  class Permissions < Lutaml::Model::Serializable
8
- attribute :copyright_statement, Lutaml::Model::Type::String
9
- attribute :copyright_year, Lutaml::Model::Type::String
10
- attribute :copyright_holder, Lutaml::Model::Type::String
8
+ attribute :copyright_statement, :string
9
+ attribute :copyright_year, :string
10
+ attribute :copyright_holder, :string
11
11
 
12
12
  xml do
13
13
  root "permissions"
@@ -6,8 +6,8 @@ require_relative "mixed_citation"
6
6
  module Sts
7
7
  module NisoSts
8
8
  class Reference < Lutaml::Model::Serializable
9
- attribute :content_type, Lutaml::Model::Type::String
10
- attribute :id, Lutaml::Model::Type::String
9
+ attribute :content_type, :string
10
+ attribute :id, :string
11
11
  attribute :label, Label
12
12
  attribute :mixed_citation, MixedCitation
13
13
  attribute :std, ReferenceStandard, collection: true
@@ -5,10 +5,10 @@ require_relative "reference"
5
5
  module Sts
6
6
  module NisoSts
7
7
  class ReferenceList < Lutaml::Model::Serializable
8
- attribute :content_type, Lutaml::Model::Type::String
9
- attribute :id, Lutaml::Model::Type::String
10
- attribute :specific_use, Lutaml::Model::Type::String
11
- attribute :title, Lutaml::Model::Type::String
8
+ attribute :content_type, :string
9
+ attribute :id, :string
10
+ attribute :specific_use, :string
11
+ attribute :title, :string
12
12
  attribute :label, Label
13
13
  attribute :ref, Reference, collection: true
14
14
 
@@ -9,11 +9,11 @@ require_relative "../tbx_iso_tml/xref"
9
9
  module Sts
10
10
  module NisoSts
11
11
  class ReferenceStandard < Lutaml::Model::Serializable
12
- attribute :type, Lutaml::Model::Type::String
13
- attribute :std_id, Lutaml::Model::Type::String
14
- attribute :content, Lutaml::Model::Type::String
12
+ attribute :type, :string
13
+ attribute :std_id, :string
14
+ attribute :content, :string
15
15
  attribute :std_ref, StandardRef
16
- attribute :title, Lutaml::Model::Type::String
16
+ attribute :title, :string
17
17
  attribute :fn, Fn, collection: true
18
18
  attribute :std_id_group, StdIdGroup, collection: true
19
19
  attribute :xref, Sts::TbxIsoTml::Xref, collection: true
@@ -19,11 +19,11 @@ module Sts
19
19
  class Title < Lutaml::Model::Serializable; end
20
20
 
21
21
  class Section < Lutaml::Model::Serializable
22
- attribute :id, Lutaml::Model::Type::String
23
- attribute :specific_use, Lutaml::Model::Type::String
22
+ attribute :id, :string
23
+ attribute :specific_use, :string
24
24
  attribute :label, Label
25
25
  attribute :title, Title
26
- attribute :type, Lutaml::Model::Type::String
26
+ attribute :type, :string
27
27
  attribute :array, SectionArray
28
28
  attribute :paragraphs, Paragraph, collection: true
29
29
  attribute :list, List, collection: true
@@ -7,7 +7,7 @@ require_relative "../tbx_iso_tml/table"
7
7
  module Sts
8
8
  module NisoSts
9
9
  class SectionArray < Lutaml::Model::Serializable
10
- attribute :id, Lutaml::Model::Type::String
10
+ attribute :id, :string
11
11
  attribute :table, Sts::TbxIsoTml::Table
12
12
 
13
13
  xml do
@@ -10,11 +10,11 @@ module Sts
10
10
  attribute :front, Front
11
11
  attribute :body, Body
12
12
  attribute :back, Back
13
- attribute :id, Lutaml::Model::Type::String
14
- attribute :lang, Lutaml::Model::Type::String
15
- attribute :mml, Lutaml::Model::Type::String
16
- attribute :tbx, Lutaml::Model::Type::String
17
- attribute :xlink, Lutaml::Model::Type::String
13
+ attribute :id, :string
14
+ attribute :lang, :string
15
+ attribute :mml, :string
16
+ attribute :tbx, :string
17
+ attribute :xlink, :string
18
18
 
19
19
  xml do
20
20
  root "standard"
@@ -7,12 +7,12 @@ require_relative "std_id_group"
7
7
  module Sts
8
8
  module NisoSts
9
9
  class StandardIdentification < Lutaml::Model::Serializable
10
- attribute :originator, Lutaml::Model::Type::String
11
- attribute :doc_type, Lutaml::Model::Type::String
12
- attribute :doc_number, Lutaml::Model::Type::String
13
- attribute :edition, Lutaml::Model::Type::String
14
- attribute :version, Lutaml::Model::Type::String
15
- attribute :part_number, Lutaml::Model::Type::String
10
+ attribute :originator, :string
11
+ attribute :doc_type, :string
12
+ attribute :doc_number, :string
13
+ attribute :edition, :string
14
+ attribute :version, :string
15
+ attribute :part_number, :string
16
16
  attribute :std_id_group, StdIdGroup
17
17
 
18
18
  xml do
@@ -21,8 +21,10 @@ module Sts
21
21
  map_element "originator", to: :originator
22
22
  map_element "doc-type", to: :doc_type
23
23
  map_element "doc-number", to: :doc_number
24
- map_element "edition", to: :edition, render_nil: true
25
- map_element "version", to: :version, render_nil: true
24
+ map_element "edition", to: :edition,
25
+ value_map: { to: { empty: :empty } }
26
+ map_element "version", to: :version,
27
+ value_map: { to: { empty: :empty } }
26
28
  map_element "part-number", to: :part_number
27
29
  map_element "std-id-group", to: :std_id_group
28
30
  end
@@ -5,8 +5,8 @@ require "lutaml/model"
5
5
  module Sts
6
6
  module NisoSts
7
7
  class StandardRef < Lutaml::Model::Serializable
8
- attribute :type, Lutaml::Model::Type::String
9
- attribute :value, Lutaml::Model::Type::String
8
+ attribute :type, :string
9
+ attribute :value, :string
10
10
 
11
11
  xml do
12
12
  root "std-ref"
@@ -5,7 +5,7 @@ require "lutaml/model"
5
5
  module Sts
6
6
  module NisoSts
7
7
  class StdCrossReference < Lutaml::Model::Serializable
8
- attribute :type, Lutaml::Model::Type::String
8
+ attribute :type, :string
9
9
  attribute :std_ref, StandardRef, collection: true
10
10
 
11
11
  xml do
@@ -5,10 +5,10 @@ require "lutaml/model"
5
5
  module Sts
6
6
  module NisoSts
7
7
  class StdId < Lutaml::Model::Serializable
8
- attribute :std_id_link_type, Lutaml::Model::Type::String
9
- attribute :std_id_type, Lutaml::Model::Type::String
10
- attribute :specific_use, Lutaml::Model::Type::String
11
- attribute :content, Lutaml::Model::Type::String
8
+ attribute :std_id_link_type, :string
9
+ attribute :std_id_type, :string
10
+ attribute :specific_use, :string
11
+ attribute :content, :string
12
12
 
13
13
  xml do
14
14
  root "std-id"
@@ -9,8 +9,8 @@ require_relative "../tbx_iso_tml/term_entry"
9
9
  module Sts
10
10
  module NisoSts
11
11
  class TermSection < Lutaml::Model::Serializable
12
- attribute :id, Lutaml::Model::Type::String
13
- attribute :sec_type, Lutaml::Model::Type::String
12
+ attribute :id, :string
13
+ attribute :sec_type, :string
14
14
  attribute :label, Label
15
15
  attribute :term_entry, Sts::TbxIsoTml::TermEntry # , collection: true
16
16
  attribute :term_display, TermDisplay # , collection: true