sts 0.6.2 → 0.6.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 (92) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +1 -0
  3. data/TODO.finalize/00-overview.md +56 -0
  4. data/TODO.finalize/01-investigation-findings.md +39 -0
  5. data/TODO.finalize/02-delete-tbxisotml-fn-fngroup.md +20 -0
  6. data/TODO.finalize/03-repoint-isosts-call-sites.md +27 -0
  7. data/TODO.finalize/04-repoint-tbxisotml-call-sites.md +24 -0
  8. data/TODO.finalize/05-sts-regression-specs.md +27 -0
  9. data/TODO.finalize/06-lutaml-model-element-builder-fix.md +45 -0
  10. data/TODO.finalize/07-lutaml-model-specs.md +12 -0
  11. data/TODO.finalize/08-sts-ruby-pr.md +20 -0
  12. data/TODO.finalize/09-lutaml-model-pr.md +5 -0
  13. data/TODO.finalize/10-audit-other-duplicates.md +29 -0
  14. data/TODO.finalize/11-strengthen-anti-patterns-spec.md +24 -0
  15. data/TODO.sts-refactor/00-overview.md +30 -18
  16. data/TODO.sts-refactor/03-namespace-coupling.md +50 -32
  17. data/lib/sts/iso_sts/abbrev.rb +41 -0
  18. data/lib/sts/iso_sts/annotation.rb +31 -0
  19. data/lib/sts/iso_sts/body.rb +2 -3
  20. data/lib/sts/iso_sts/bold.rb +1 -1
  21. data/lib/sts/iso_sts/copyright_holder.rb +6 -0
  22. data/lib/sts/iso_sts/copyright_statement.rb +6 -0
  23. data/lib/sts/iso_sts/copyright_year.rb +4 -0
  24. data/lib/sts/iso_sts/country.rb +26 -0
  25. data/lib/sts/iso_sts/day.rb +24 -0
  26. data/lib/sts/iso_sts/doc_number.rb +4 -1
  27. data/lib/sts/iso_sts/doc_type.rb +4 -1
  28. data/lib/sts/iso_sts/edition.rb +6 -0
  29. data/lib/sts/iso_sts/email.rb +37 -0
  30. data/lib/sts/iso_sts/etal.rb +22 -0
  31. data/lib/sts/iso_sts/ext_link.rb +10 -0
  32. data/lib/sts/iso_sts/fax.rb +22 -0
  33. data/lib/sts/iso_sts/fpage.rb +2 -0
  34. data/lib/sts/iso_sts/front.rb +0 -2
  35. data/lib/sts/iso_sts/graphic.rb +10 -0
  36. data/lib/sts/iso_sts/ics.rb +4 -1
  37. data/lib/sts/iso_sts/inline_graphic.rb +42 -0
  38. data/lib/sts/iso_sts/institution.rb +41 -0
  39. data/lib/sts/iso_sts/is_proof.rb +7 -2
  40. data/lib/sts/iso_sts/issue.rb +2 -0
  41. data/lib/sts/iso_sts/italic.rb +1 -1
  42. data/lib/sts/iso_sts/label.rb +4 -0
  43. data/lib/sts/iso_sts/lpage.rb +2 -0
  44. data/lib/sts/iso_sts/milestone_end.rb +25 -0
  45. data/lib/sts/iso_sts/milestone_start.rb +25 -0
  46. data/lib/sts/iso_sts/mixed_citation.rb +15 -3
  47. data/lib/sts/iso_sts/month.rb +24 -0
  48. data/lib/sts/iso_sts/named_content.rb +2 -0
  49. data/lib/sts/iso_sts/num.rb +24 -0
  50. data/lib/sts/iso_sts/object_id.rb +24 -0
  51. data/lib/sts/iso_sts/originator.rb +4 -1
  52. data/lib/sts/iso_sts/page_range.rb +2 -0
  53. data/lib/sts/iso_sts/paragraph.rb +1 -1
  54. data/lib/sts/iso_sts/part_number.rb +4 -1
  55. data/lib/sts/iso_sts/phone.rb +22 -0
  56. data/lib/sts/iso_sts/proj_id.rb +4 -1
  57. data/lib/sts/iso_sts/pub_date.rb +2 -0
  58. data/lib/sts/iso_sts/pub_id.rb +2 -0
  59. data/lib/sts/iso_sts/publisher.rb +23 -0
  60. data/lib/sts/iso_sts/publisher_loc.rb +29 -0
  61. data/lib/sts/iso_sts/publisher_name.rb +23 -0
  62. data/lib/sts/iso_sts/release_version.rb +4 -1
  63. data/lib/sts/iso_sts/sdo.rb +4 -1
  64. data/lib/sts/iso_sts/season.rb +24 -0
  65. data/lib/sts/iso_sts/sec.rb +2 -5
  66. data/lib/sts/iso_sts/secretariat.rb +4 -1
  67. data/lib/sts/iso_sts/standard.rb +2 -2
  68. data/lib/sts/iso_sts/std.rb +1 -1
  69. data/lib/sts/iso_sts/sub.rb +4 -0
  70. data/lib/sts/iso_sts/sup.rb +4 -0
  71. data/lib/sts/iso_sts/suppl_number.rb +4 -1
  72. data/lib/sts/iso_sts/suppl_type.rb +4 -1
  73. data/lib/sts/iso_sts/suppl_version.rb +4 -1
  74. data/lib/sts/iso_sts/td.rb +1 -1
  75. data/lib/sts/iso_sts/term_sec.rb +1 -1
  76. data/lib/sts/iso_sts/th.rb +1 -1
  77. data/lib/sts/iso_sts/title.rb +4 -0
  78. data/lib/sts/iso_sts/underline.rb +2 -0
  79. data/lib/sts/iso_sts/uri.rb +2 -0
  80. data/lib/sts/iso_sts/urn.rb +4 -1
  81. data/lib/sts/iso_sts/version.rb +4 -1
  82. data/lib/sts/iso_sts/volume.rb +2 -0
  83. data/lib/sts/iso_sts/year.rb +2 -0
  84. data/lib/sts/iso_sts.rb +23 -2
  85. data/lib/sts/tbx_iso_tml/table_wrap_foot.rb +2 -2
  86. data/lib/sts/tbx_iso_tml/td.rb +1 -1
  87. data/lib/sts/tbx_iso_tml/th.rb +1 -1
  88. data/lib/sts/tbx_iso_tml.rb +0 -2
  89. data/lib/sts/version.rb +1 -1
  90. metadata +32 -3
  91. data/lib/sts/tbx_iso_tml/fn.rb +0 -20
  92. data/lib/sts/tbx_iso_tml/fn_group.rb +0 -18
@@ -7,6 +7,7 @@ module Sts
7
7
  attribute :specific_use, :string
8
8
  attribute :xml_lang, :string
9
9
  attribute :xlink_href, :string
10
+ attribute :xlink_type, :string
10
11
  attribute :xlink_role, :string
11
12
  attribute :xlink_title, :string
12
13
  attribute :xlink_show, :string
@@ -21,6 +22,7 @@ module Sts
21
22
  map_attribute "specific-use", to: :specific_use
22
23
  map_attribute "xml:lang", to: :xml_lang
23
24
  map_attribute "xlink:href", to: :xlink_href
25
+ map_attribute "xlink:type", to: :xlink_type
24
26
  map_attribute "xlink:role", to: :xlink_role
25
27
  map_attribute "xlink:title", to: :xlink_title
26
28
  map_attribute "xlink:show", to: :xlink_show
@@ -2,14 +2,17 @@
2
2
 
3
3
  module Sts
4
4
  module IsoSts
5
- # ISOSTS declares <urn> as type="xs:string" -- no attributes.
5
+ # ISOSTS declares <urn> as type="xs:string". The @id follows the
6
+ # NisoSts convention established in 86948b9, not ISOSTS itself.
6
7
  class Urn < Lutaml::Model::Serializable
7
8
  attribute :content, :string
9
+ attribute :id, :string
8
10
 
9
11
  xml do
10
12
  element "urn"
11
13
 
12
14
  map_content to: :content
15
+ map_attribute "id", to: :id
13
16
  end
14
17
  end
15
18
  end
@@ -2,14 +2,17 @@
2
2
 
3
3
  module Sts
4
4
  module IsoSts
5
- # ISOSTS declares <version> as type="xs:string" -- no attributes.
5
+ # ISOSTS declares <version> as type="xs:string". The @id follows the
6
+ # NisoSts convention established in 86948b9, not ISOSTS itself.
6
7
  class Version < Lutaml::Model::Serializable
7
8
  attribute :content, :string
9
+ attribute :id, :string
8
10
 
9
11
  xml do
10
12
  element "version"
11
13
 
12
14
  map_content to: :content
15
+ map_attribute "id", to: :id
13
16
  end
14
17
  end
15
18
  end
@@ -8,6 +8,7 @@ module Sts
8
8
  attribute :seq, :string
9
9
  attribute :specific_use, :string
10
10
  attribute :xml_lang, :string
11
+ attribute :id, :string
11
12
 
12
13
  xml do
13
14
  element "volume"
@@ -17,6 +18,7 @@ module Sts
17
18
  map_attribute "seq", to: :seq
18
19
  map_attribute "specific-use", to: :specific_use
19
20
  map_attribute "xml:lang", to: :xml_lang
21
+ map_attribute "id", to: :id
20
22
  end
21
23
  end
22
24
  end
@@ -7,6 +7,7 @@ module Sts
7
7
  attribute :content_type, :string
8
8
  attribute :specific_use, :string
9
9
  attribute :xml_lang, :string
10
+ attribute :id, :string
10
11
 
11
12
  xml do
12
13
  element "year"
@@ -15,6 +16,7 @@ module Sts
15
16
  map_attribute "content-type", to: :content_type
16
17
  map_attribute "specific-use", to: :specific_use
17
18
  map_attribute "xml:lang", to: :xml_lang
19
+ map_attribute "id", to: :id
18
20
  end
19
21
  end
20
22
  end
data/lib/sts/iso_sts.rb CHANGED
@@ -96,6 +96,23 @@ module Sts
96
96
  autoload :Underline, "#{__dir__}/iso_sts/underline"
97
97
  autoload :Uri, "#{__dir__}/iso_sts/uri"
98
98
 
99
+ # Shared model foundations
100
+ autoload :Abbrev, "#{__dir__}/iso_sts/abbrev"
101
+ autoload :Annotation, "#{__dir__}/iso_sts/annotation"
102
+ autoload :Country, "#{__dir__}/iso_sts/country"
103
+ autoload :Day, "#{__dir__}/iso_sts/day"
104
+ autoload :Etal, "#{__dir__}/iso_sts/etal"
105
+ autoload :Fax, "#{__dir__}/iso_sts/fax"
106
+ autoload :InlineGraphic, "#{__dir__}/iso_sts/inline_graphic"
107
+ autoload :Institution, "#{__dir__}/iso_sts/institution"
108
+ autoload :MilestoneEnd, "#{__dir__}/iso_sts/milestone_end"
109
+ autoload :MilestoneStart, "#{__dir__}/iso_sts/milestone_start"
110
+ autoload :Month, "#{__dir__}/iso_sts/month"
111
+ autoload :Num, "#{__dir__}/iso_sts/num"
112
+ autoload :ObjectId, "#{__dir__}/iso_sts/object_id"
113
+ autoload :Phone, "#{__dir__}/iso_sts/phone"
114
+ autoload :Season, "#{__dir__}/iso_sts/season"
115
+
99
116
  # List elements
100
117
  autoload :List, "#{__dir__}/iso_sts/list"
101
118
  autoload :ListItem, "#{__dir__}/iso_sts/list_item"
@@ -124,9 +141,13 @@ module Sts
124
141
  autoload :Graphic, "#{__dir__}/iso_sts/graphic"
125
142
 
126
143
  # Reference elements
127
- autoload :RefList, "#{__dir__}/iso_sts/ref_list"
128
- autoload :Ref, "#{__dir__}/iso_sts/ref"
144
+ autoload :Email, "#{__dir__}/iso_sts/email"
129
145
  autoload :MixedCitation, "#{__dir__}/iso_sts/mixed_citation"
146
+ autoload :Publisher, "#{__dir__}/iso_sts/publisher"
147
+ autoload :PublisherLoc, "#{__dir__}/iso_sts/publisher_loc"
148
+ autoload :PublisherName, "#{__dir__}/iso_sts/publisher_name"
149
+ autoload :Ref, "#{__dir__}/iso_sts/ref"
150
+ autoload :RefList, "#{__dir__}/iso_sts/ref_list"
130
151
 
131
152
  # Back matter
132
153
  autoload :AppGroup, "#{__dir__}/iso_sts/app_group"
@@ -4,13 +4,13 @@ module Sts
4
4
  module TbxIsoTml
5
5
  class TableWrapFoot < Lutaml::Model::Serializable
6
6
  attribute :id, :string
7
- attribute :fn_group, ::Sts::TbxIsoTml::FnGroup
7
+ attribute :fn_group, ::Sts::NisoSts::FnGroup
8
8
  attribute :attrib, ::Sts::NisoSts::Attrib
9
9
  attribute :permissions, ::Sts::NisoSts::Permissions
10
10
  attribute :paragraph, ::Sts::NisoSts::Paragraph
11
11
  attribute :non_normative_note, ::Sts::NisoSts::NonNormativeNote
12
12
  attribute :non_normative_example, ::Sts::NisoSts::NonNormativeExample
13
- attribute :fn, ::Sts::TbxIsoTml::Fn
13
+ attribute :fn, ::Sts::NisoSts::Fn
14
14
 
15
15
  xml do
16
16
  element "table-wrap-foot"
@@ -91,7 +91,7 @@ module Sts
91
91
  attribute :preformat, ::Sts::NisoSts::Preformat, collection: true
92
92
 
93
93
  # simple-link.class
94
- attribute :fn, ::Sts::TbxIsoTml::Fn, collection: true
94
+ attribute :fn, ::Sts::NisoSts::Fn, collection: true
95
95
  attribute :target, ::Sts::NisoSts::Target, collection: true
96
96
  attribute :xref, ::Sts::TbxIsoTml::Xref, collection: true
97
97
 
@@ -92,7 +92,7 @@ module Sts
92
92
  attribute :preformat, ::Sts::NisoSts::Preformat, collection: true
93
93
 
94
94
  # simple-link.class
95
- attribute :fn, ::Sts::TbxIsoTml::Fn, collection: true
95
+ attribute :fn, ::Sts::NisoSts::Fn, collection: true
96
96
  attribute :target, ::Sts::NisoSts::Target, collection: true
97
97
  attribute :xref, ::Sts::TbxIsoTml::Xref, collection: true
98
98
 
@@ -11,8 +11,6 @@ module Sts
11
11
  autoload :Example, "#{__dir__}/tbx_iso_tml/example"
12
12
  autoload :ExternalGraphic, "#{__dir__}/tbx_iso_tml/external_graphic"
13
13
  autoload :ExternalSource, "#{__dir__}/tbx_iso_tml/external_source"
14
- autoload :Fn, "#{__dir__}/tbx_iso_tml/fn"
15
- autoload :FnGroup, "#{__dir__}/tbx_iso_tml/fn_group"
16
14
  autoload :GeographicalUsage, "#{__dir__}/tbx_iso_tml/geographical_usage"
17
15
  autoload :GrammaticalGender, "#{__dir__}/tbx_iso_tml/grammatical_gender"
18
16
  autoload :GrammaticalNumber, "#{__dir__}/tbx_iso_tml/grammatical_number"
data/lib/sts/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sts
4
- VERSION = "0.6.2"
4
+ VERSION = "0.6.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose
@@ -94,6 +94,18 @@ files:
94
94
  - Gemfile
95
95
  - README.adoc
96
96
  - Rakefile
97
+ - TODO.finalize/00-overview.md
98
+ - TODO.finalize/01-investigation-findings.md
99
+ - TODO.finalize/02-delete-tbxisotml-fn-fngroup.md
100
+ - TODO.finalize/03-repoint-isosts-call-sites.md
101
+ - TODO.finalize/04-repoint-tbxisotml-call-sites.md
102
+ - TODO.finalize/05-sts-regression-specs.md
103
+ - TODO.finalize/06-lutaml-model-element-builder-fix.md
104
+ - TODO.finalize/07-lutaml-model-specs.md
105
+ - TODO.finalize/08-sts-ruby-pr.md
106
+ - TODO.finalize/09-lutaml-model-pr.md
107
+ - TODO.finalize/10-audit-other-duplicates.md
108
+ - TODO.finalize/11-strengthen-anti-patterns-spec.md
97
109
  - TODO.sts-refactor/00-overview.md
98
110
  - TODO.sts-refactor/01-mathml-delegation.md
99
111
  - TODO.sts-refactor/02-type-resolution.md
@@ -108,8 +120,10 @@ files:
108
120
  - TODO.sts-refactor/11-duplicate-models.md
109
121
  - lib/sts.rb
110
122
  - lib/sts/iso_sts.rb
123
+ - lib/sts/iso_sts/abbrev.rb
111
124
  - lib/sts/iso_sts/alt_text.rb
112
125
  - lib/sts/iso_sts/annex_type.rb
126
+ - lib/sts/iso_sts/annotation.rb
113
127
  - lib/sts/iso_sts/app.rb
114
128
  - lib/sts/iso_sts/app_group.rb
115
129
  - lib/sts/iso_sts/array.rb
@@ -125,6 +139,8 @@ files:
125
139
  - lib/sts/iso_sts/copyright_holder.rb
126
140
  - lib/sts/iso_sts/copyright_statement.rb
127
141
  - lib/sts/iso_sts/copyright_year.rb
142
+ - lib/sts/iso_sts/country.rb
143
+ - lib/sts/iso_sts/day.rb
128
144
  - lib/sts/iso_sts/def.rb
129
145
  - lib/sts/iso_sts/def_item.rb
130
146
  - lib/sts/iso_sts/def_list.rb
@@ -134,7 +150,10 @@ files:
134
150
  - lib/sts/iso_sts/doc_type.rb
135
151
  - lib/sts/iso_sts/document_identification.rb
136
152
  - lib/sts/iso_sts/edition.rb
153
+ - lib/sts/iso_sts/email.rb
154
+ - lib/sts/iso_sts/etal.rb
137
155
  - lib/sts/iso_sts/ext_link.rb
156
+ - lib/sts/iso_sts/fax.rb
138
157
  - lib/sts/iso_sts/fig.rb
139
158
  - lib/sts/iso_sts/fn.rb
140
159
  - lib/sts/iso_sts/fn_group.rb
@@ -143,6 +162,8 @@ files:
143
162
  - lib/sts/iso_sts/graphic.rb
144
163
  - lib/sts/iso_sts/ics.rb
145
164
  - lib/sts/iso_sts/inline_formula.rb
165
+ - lib/sts/iso_sts/inline_graphic.rb
166
+ - lib/sts/iso_sts/institution.rb
146
167
  - lib/sts/iso_sts/is_proof.rb
147
168
  - lib/sts/iso_sts/iso_meta.rb
148
169
  - lib/sts/iso_sts/issue.rb
@@ -156,22 +177,31 @@ files:
156
177
  - lib/sts/iso_sts/mathml2.rb
157
178
  - lib/sts/iso_sts/mathml2/math.rb
158
179
  - lib/sts/iso_sts/meta_date.rb
180
+ - lib/sts/iso_sts/milestone_end.rb
181
+ - lib/sts/iso_sts/milestone_start.rb
159
182
  - lib/sts/iso_sts/mixed_citation.rb
160
183
  - lib/sts/iso_sts/monospace.rb
184
+ - lib/sts/iso_sts/month.rb
161
185
  - lib/sts/iso_sts/named_content.rb
162
186
  - lib/sts/iso_sts/nat_meta.rb
163
187
  - lib/sts/iso_sts/non_normative_example.rb
164
188
  - lib/sts/iso_sts/non_normative_note.rb
189
+ - lib/sts/iso_sts/num.rb
190
+ - lib/sts/iso_sts/object_id.rb
165
191
  - lib/sts/iso_sts/originator.rb
166
192
  - lib/sts/iso_sts/page_count.rb
167
193
  - lib/sts/iso_sts/page_range.rb
168
194
  - lib/sts/iso_sts/paragraph.rb
169
195
  - lib/sts/iso_sts/part_number.rb
170
196
  - lib/sts/iso_sts/permissions.rb
197
+ - lib/sts/iso_sts/phone.rb
171
198
  - lib/sts/iso_sts/preformat.rb
172
199
  - lib/sts/iso_sts/proj_id.rb
173
200
  - lib/sts/iso_sts/pub_date.rb
174
201
  - lib/sts/iso_sts/pub_id.rb
202
+ - lib/sts/iso_sts/publisher.rb
203
+ - lib/sts/iso_sts/publisher_loc.rb
204
+ - lib/sts/iso_sts/publisher_name.rb
175
205
  - lib/sts/iso_sts/ref.rb
176
206
  - lib/sts/iso_sts/ref_list.rb
177
207
  - lib/sts/iso_sts/reg_meta.rb
@@ -180,6 +210,7 @@ files:
180
210
  - lib/sts/iso_sts/release_version_id.rb
181
211
  - lib/sts/iso_sts/sc.rb
182
212
  - lib/sts/iso_sts/sdo.rb
213
+ - lib/sts/iso_sts/season.rb
183
214
  - lib/sts/iso_sts/sec.rb
184
215
  - lib/sts/iso_sts/secretariat.rb
185
216
  - lib/sts/iso_sts/standard.rb
@@ -561,8 +592,6 @@ files:
561
592
  - lib/sts/tbx_iso_tml/example.rb
562
593
  - lib/sts/tbx_iso_tml/external_graphic.rb
563
594
  - lib/sts/tbx_iso_tml/external_source.rb
564
- - lib/sts/tbx_iso_tml/fn.rb
565
- - lib/sts/tbx_iso_tml/fn_group.rb
566
595
  - lib/sts/tbx_iso_tml/geographical_usage.rb
567
596
  - lib/sts/tbx_iso_tml/grammatical_gender.rb
568
597
  - lib/sts/tbx_iso_tml/grammatical_number.rb
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Sts
4
- module TbxIsoTml
5
- class Fn < Lutaml::Model::Serializable
6
- attribute :id, :string
7
- attribute :label, ::Sts::NisoSts::Label
8
- attribute :p, ::Sts::NisoSts::Paragraph, collection: true
9
-
10
- xml do
11
- element "fn"
12
- ordered
13
-
14
- map_attribute "id", to: :id
15
- map_element "label", to: :label
16
- map_element "p", to: :p
17
- end
18
- end
19
- end
20
- end
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Sts
4
- module TbxIsoTml
5
- class FnGroup < Lutaml::Model::Serializable
6
- attribute :id, :string
7
- attribute :fn, ::Sts::TbxIsoTml::Fn, collection: true
8
-
9
- xml do
10
- element "fn-group"
11
-
12
- map_attribute "id", to: :id
13
-
14
- map_element "fn", to: :fn
15
- end
16
- end
17
- end
18
- end