sts 0.6.3 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27e3b4850a13bbff3b16e63ad2293589079e4c29b4f25d2fa120a797b9f6ff7c
4
- data.tar.gz: 572e19d6b4e428dca7a277d836f73b6121627d094fd1d0e492ef0ba4b82b905c
3
+ metadata.gz: c758f04c86a04df1adb4bc66d09aac7f31477d8ce6879bb9cd8935d86a7ae616
4
+ data.tar.gz: 56893d54b3e2193926f95a8a988d0a12dc73b31a85d9223e90edfe46adf80b07
5
5
  SHA512:
6
- metadata.gz: ab688a012341d43a0daa2a2b79d7e68b7e2b10a9e4ee4f30824d357e1c3329721ccfe6fe071e331265ca79de26dc6d9deb54ad269519bc1a6e164f38d76bbd41
7
- data.tar.gz: 1cd96829661efa371b501e25dac9f56e5aeb9b6ba3cac72c5de47e1b6d6377c2193eaf29842c36ae68a70321796ceb06079671df81ed848d2805c66256aed3e4
6
+ metadata.gz: e2444f3c73074bd001445a89a5712854e112b429180b7a96feff1e01e303dfd5791a7ab6e81eb27498ba859078a8a647793a8e40276ec6e2cab2d90c9b7a4517
7
+ data.tar.gz: d3b0d7c1ba7721b108ae509b5847e1a21917d4cc5507581d7581af2d71a0f742d16b316fc53a3d8c263b11816ee074a6b5a17547b9773dd3f99e472959db9069
@@ -19,7 +19,7 @@
19
19
  |---|------|----------|----------|--------------|
20
20
  | 01 | `01-mathml-delegation.md` | Anti-Pattern Fix | DONE | — |
21
21
  | 02 | `02-type-resolution.md` | Anti-Pattern Fix | DONE | — |
22
- | 03 | `03-namespace-coupling.md` | Architecture | IN PROGRESS (63→20 refs) | 01, 02 |
22
+ | 03 | `03-namespace-coupling.md` | Architecture | IN PROGRESS (63→16 refs) | 01, 02 |
23
23
  | 04 | `04-register-versioning.md` | Architecture | HIGH | 01, 02 |
24
24
  | 05 | `05-missing-elements.md` | Feature Gap | MOSTLY DONE | 04 |
25
25
  | 06 | `06-missing-attributes.md` | Feature Gap | DONE | 04 |
@@ -166,7 +166,7 @@ grep -r "method_missing|respond_to_missing|Object.const_get|\.send" lib/
166
166
  - ~~Expand StringName usage (in contrib, element-citation, related-article — NISO STS 1.2)~~ → DONE: added to name-alternatives; already in person-group and mixed-citation
167
167
 
168
168
  ### Architectural Items (High Effort)
169
- - `03-namespace-coupling.md` — IN PROGRESS: 63→20 IsoSts→NisoSts references
169
+ - `03-namespace-coupling.md` — IN PROGRESS: 63→16 IsoSts→NisoSts references
170
170
  remaining (issue #40). ISOSTS.xsd governs content models and all non-`@id`
171
171
  attributes; the `@id` follows the 86948b9 convention.
172
172
  - `04-register-versioning.md` — Version the models via lutaml-model Registers
@@ -193,9 +193,12 @@ the **NISO** XSD and applied the result to IsoSts.
193
193
 
194
194
  ## Next Action
195
195
  Two independent tracks:
196
- 1. Finish `03` — the 20 remaining refs split into 11 deep-root refs (each
197
- reaching a ~152-class recursive core) and 9 child-bearing refs whose closure
198
- is unmeasured. Both need sizing before planning.
196
+ 1. Finish `03` — the 16 remaining refs split evenly between seven recursive
197
+ roots and five child-bearing roots. The first 15 high-reuse dependency
198
+ leaves are now modelled, reducing the unresolved closures to 78–84
199
+ not-yet-modelled ISOSTS elements before existing IsoSts boundaries. The
200
+ remaining work still needs an architecture decision for the recursive
201
+ content core.
199
202
  2. The remaining schema-conformance follow-up above — the 7 spurious attributes
200
203
  on 5 models and the 6 classes without `@id`. (The dropped-attribute data loss
201
204
  is now fixed.)
@@ -3,7 +3,7 @@
3
3
  **Priority**: HIGH
4
4
  **Category**: Architecture
5
5
  **Estimated Effort**: High
6
- **Status**: Partially done — 63 → 20 references (GitHub issue #40)
6
+ **Status**: Partially done — 63 → 16 references (GitHub issue #40)
7
7
 
8
8
  ## Problem
9
9
 
@@ -12,7 +12,7 @@ independent of NisoSts (ADR 2026-05-07): ISOSTS is frozen legacy, NISO STS
12
12
  evolves, so coupling them violates OCP.
13
13
 
14
14
  PR #31 reduced this from 157 to 63 references. Issue #40 reduced it further,
15
- from 63 to 20.
15
+ from 63 to 16.
16
16
 
17
17
  ## Content models from ISOSTS.xsd; `@id` from the 86948b9 convention
18
18
 
@@ -40,7 +40,7 @@ Non-`@id` attribute lists must be **generated** from the XSD, never hand-read:
40
40
  `version` on `tex-math` and `specific-use` on `pub-id` sit after long
41
41
  `xs:enumeration` blocks and are invisible to a truncated read.
42
42
 
43
- ## Done in issue #40 — 43 refs removed, 27 classes added
43
+ ## Done in issue #40 — 47 refs removed, 46 classes added
44
44
 
45
45
  - **14 `xs:string` elements** (`originator`, `doc-type`, `doc-number`,
46
46
  `part-number`, `version`, `suppl-type`, `suppl-number`, `suppl-version`,
@@ -56,6 +56,19 @@ Non-`@id` attribute lists must be **generated** from the XSD, never hand-read:
56
56
  `Volume`, `Issue`, `Fpage`, `Lpage`, `PageRange`. 16 refs.
57
57
  - **`WiNumber` added** — ISOSTS gives `wi-number` an `@id`; it was typed as a
58
58
  plain string, silently discarding that `@id`.
59
+ - **`Publisher` closure added** — `Publisher`, `PublisherName`, `PublisherLoc`,
60
+ and `Email` are modelled from ISOSTS.xsd; `PublisherLoc` reuses the existing
61
+ IsoSts `ExtLink` and `Uri` boundary models. All four retain the
62
+ project-mandated `@id` model surface. 1 ref.
63
+ - **15 reusable dependency leaves added** — `Abbrev`, `Annotation`, `Country`,
64
+ `Day`, `Etal`, `Fax`, `InlineGraphic`, `Institution`, `MilestoneEnd`,
65
+ `MilestoneStart`, `Month`, `Num`, `ObjectId`, `Phone`, and `Season` are
66
+ modelled from ISOSTS.xsd and close entirely on existing IsoSts types. They
67
+ remove no direct reference yet, but establish the first shared dependency
68
+ layer for the remaining recursive roots.
69
+ - **3 Niso-only child refs deleted** — `std-meta` from `Front` and
70
+ `editing-instruction` from `Body` and `Sec`. Neither element exists in
71
+ ISOSTS.xsd, so adding IsoSts equivalents would incorrectly expand the schema.
59
72
 
60
73
  ### Why classes and not plain `:string`
61
74
 
@@ -66,20 +79,23 @@ round-trip. For a scalar, `render_empty: :empty` recovers it; for a collection
66
79
  to `[]`, destroying the information at parse time before any render option
67
80
  applies. Content-only classes round-trip every case.
68
81
 
69
- ## Remaining — 20 refs
82
+ ## Remaining — 16 refs
70
83
 
71
- **11 refs to 9 deep roots**: `MetadataStd`, `ElementCitation`, `PersonGroup`,
72
- `Collab`, `Source`, `DispQuote`, `EditingInstruction`, `TermDisplay`,
73
- `BoxedText`. Each reaches the same ~152-class mutually-recursive core
74
- (`Section` → `Paragraph` → `DispQuote` → `Paragraph`). `DispQuote` has 3 direct
75
- children but pulls all 152. No incremental path — needs its own decision.
84
+ **8 refs to 7 recursive roots**: `ElementCitation`, `PersonGroup`, `Collab`,
85
+ `Source`, `DispQuote`, `TermDisplay`, and `BoxedText`. Each reaches the same
86
+ 78–79-element mutually-recursive core before existing IsoSts boundaries
87
+ (`sec` → `p` → `disp-quote` → `p`). No direct one-file path remains.
76
88
 
77
- **9 refs whose ISOSTS content models have real children**, closure not measured:
78
- `attrib` (:1082), `term-head` (:4308), `article-title`, `license` `license-p`
79
- (:51), `publisher` `publisher-loc`, `custom-meta-group` → `custom-meta`.
80
- `attrib` and `term-head` are **not** trivial leaves in ISOSTS despite what the
81
- NisoSts models suggest; `license-p` reaches `array`/`alternatives`, so these may
82
- not be cheap. Measure before planning.
89
+ **8 refs to 5 child-bearing roots**, now measured after the first dependency
90
+ layer: `attrib` (:1082) reaches 78 not-yet-modelled ISOSTS elements before
91
+ existing IsoSts boundaries, `term-head` (:4308) reaches 79, `article-title`
92
+ reaches 78, `license` `license-p` (:51) reaches 84, and
93
+ `custom-meta-group` `custom-meta` reaches 82. They converge on the same
94
+ recursive content core as the deep roots, so none is another bounded model
95
+ batch. `publisher` was the only exception: its four-element closure
96
+ (`publisher`, `publisher-name`, `publisher-loc`, `email`) is complete.
97
+ The Niso `Attrib` class is only 17 lines because it omits all 37 ISOSTS child
98
+ types; copying it would silently drop valid ISO content rather than decouple it.
83
99
 
84
100
  ## Rejected: three-tier `Sts::Base` hierarchy
85
101
 
@@ -114,8 +130,8 @@ reaches `TbxIsoTml`/MathML. Those are shared namespaces, outside this ADR.
114
130
 
115
131
  ## Verification
116
132
 
117
- 1. `grep -rho "Sts::NisoSts::" lib/sts/iso_sts/ | wc -l` → `20`
133
+ 1. `grep -rho "Sts::NisoSts::" lib/sts/iso_sts/ | wc -l` → `16`
118
134
  2. Every *non-`@id`* attribute on an IsoSts model traces to a line in
119
135
  `ISOSTS.xsd`; `@id` follows the 86948b9 convention
120
- 3. Autoload registry 1:1 with the directory (112/112)
136
+ 3. Autoload registry 1:1 with the directory (131/131)
121
137
  4. `bundle exec rspec` green; `bundle exec rubocop` clean
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Abbrev < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :content_type, :string
8
+ attribute :specific_use, :string
9
+ attribute :alt, :string
10
+ attribute :xml_lang, :string
11
+ attribute :xlink_type, :string
12
+ attribute :xlink_href, :string
13
+ attribute :xlink_role, :string
14
+ attribute :xlink_title, :string
15
+ attribute :xlink_show, :string
16
+ attribute :xlink_actuate, :string
17
+ attribute :content, :string, collection: true
18
+ attribute :def, ::Sts::IsoSts::Def, collection: true
19
+
20
+ xml do
21
+ element "abbrev"
22
+ mixed_content
23
+
24
+ map_attribute "id", to: :id
25
+ map_attribute "content-type", to: :content_type
26
+ map_attribute "specific-use", to: :specific_use
27
+ map_attribute "alt", to: :alt
28
+ map_attribute "xml:lang", to: :xml_lang
29
+ map_attribute "xlink:type", to: :xlink_type
30
+ map_attribute "xlink:href", to: :xlink_href
31
+ map_attribute "xlink:role", to: :xlink_role
32
+ map_attribute "xlink:title", to: :xlink_title
33
+ map_attribute "xlink:show", to: :xlink_show
34
+ map_attribute "xlink:actuate", to: :xlink_actuate
35
+
36
+ map_content to: :content
37
+ map_element "def", to: :def
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Annotation < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :content_type, :string
8
+ attribute :specific_use, :string
9
+ attribute :xml_lang, :string
10
+ attribute :paragraph, ::Sts::IsoSts::Paragraph, collection: true
11
+ attribute :non_normative_note, ::Sts::IsoSts::NonNormativeNote,
12
+ collection: true
13
+ attribute :non_normative_example, ::Sts::IsoSts::NonNormativeExample,
14
+ collection: true
15
+
16
+ xml do
17
+ element "annotation"
18
+ ordered
19
+
20
+ map_attribute "id", to: :id
21
+ map_attribute "content-type", to: :content_type
22
+ map_attribute "specific-use", to: :specific_use
23
+ map_attribute "xml:lang", to: :xml_lang
24
+
25
+ map_element "p", to: :paragraph
26
+ map_element "non-normative-note", to: :non_normative_note
27
+ map_element "non-normative-example", to: :non_normative_example
28
+ end
29
+ end
30
+ end
31
+ end
@@ -23,8 +23,6 @@ module Sts
23
23
  attribute :array, ::Sts::IsoSts::Array, collection: true
24
24
  attribute :ref_list, ::Sts::IsoSts::RefList, collection: true
25
25
  attribute :disp_quote, ::Sts::NisoSts::DispQuote, collection: true
26
- attribute :editing_instruction, ::Sts::NisoSts::EditingInstruction,
27
- collection: true
28
26
 
29
27
  xml do
30
28
  element "body"
@@ -49,7 +47,6 @@ module Sts
49
47
  map_element "array", to: :array
50
48
  map_element "ref-list", to: :ref_list
51
49
  map_element "disp-quote", to: :disp_quote
52
- map_element "editing-instruction", to: :editing_instruction
53
50
  end
54
51
  end
55
52
  end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Country < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :content_type, :string
8
+ attribute :country, :string
9
+ attribute :specific_use, :string
10
+ attribute :xml_lang, :string
11
+ attribute :content, :string, collection: true
12
+
13
+ xml do
14
+ element "country"
15
+ mixed_content
16
+
17
+ map_attribute "id", to: :id
18
+ map_attribute "content-type", to: :content_type
19
+ map_attribute "country", to: :country
20
+ map_attribute "specific-use", to: :specific_use
21
+ map_attribute "xml:lang", to: :xml_lang
22
+ map_content to: :content
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Day < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :content_type, :string
8
+ attribute :specific_use, :string
9
+ attribute :xml_lang, :string
10
+ attribute :content, :string, collection: true
11
+
12
+ xml do
13
+ element "day"
14
+ mixed_content
15
+
16
+ map_attribute "id", to: :id
17
+ map_attribute "content-type", to: :content_type
18
+ map_attribute "specific-use", to: :specific_use
19
+ map_attribute "xml:lang", to: :xml_lang
20
+ map_content to: :content
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Email < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :content_type, :string
8
+ attribute :specific_use, :string
9
+ attribute :xml_lang, :string
10
+ attribute :xlink_type, :string
11
+ attribute :xlink_href, :string
12
+ attribute :xlink_role, :string
13
+ attribute :xlink_title, :string
14
+ attribute :xlink_show, :string
15
+ attribute :xlink_actuate, :string
16
+ attribute :content, :string, collection: true
17
+
18
+ xml do
19
+ element "email"
20
+ mixed_content
21
+
22
+ map_attribute "id", to: :id
23
+ map_attribute "content-type", to: :content_type
24
+ map_attribute "specific-use", to: :specific_use
25
+ map_attribute "xml:lang", to: :xml_lang
26
+ map_attribute "xlink:type", to: :xlink_type
27
+ map_attribute "xlink:href", to: :xlink_href
28
+ map_attribute "xlink:role", to: :xlink_role
29
+ map_attribute "xlink:title", to: :xlink_title
30
+ map_attribute "xlink:show", to: :xlink_show
31
+ map_attribute "xlink:actuate", to: :xlink_actuate
32
+
33
+ map_content to: :content
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Etal < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :specific_use, :string
8
+ attribute :xml_lang, :string
9
+ attribute :content, :string, collection: true
10
+
11
+ xml do
12
+ element "etal"
13
+ mixed_content
14
+
15
+ map_attribute "id", to: :id
16
+ map_attribute "specific-use", to: :specific_use
17
+ map_attribute "xml:lang", to: :xml_lang
18
+ map_content to: :content
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Fax < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :content_type, :string
8
+ attribute :specific_use, :string
9
+ attribute :content, :string, collection: true
10
+
11
+ xml do
12
+ element "fax"
13
+ mixed_content
14
+
15
+ map_attribute "id", to: :id
16
+ map_attribute "content-type", to: :content_type
17
+ map_attribute "specific-use", to: :specific_use
18
+ map_content to: :content
19
+ end
20
+ end
21
+ end
22
+ end
@@ -4,7 +4,6 @@ module Sts
4
4
  module IsoSts
5
5
  class Front < Lutaml::Model::Serializable
6
6
  attribute :id, :string
7
- attribute :std_meta, ::Sts::NisoSts::MetadataStd
8
7
  attribute :iso_meta, ::Sts::IsoSts::IsoMeta
9
8
  attribute :reg_meta, ::Sts::IsoSts::RegMeta, collection: true
10
9
  attribute :nat_meta, ::Sts::IsoSts::NatMeta, collection: true
@@ -15,7 +14,6 @@ module Sts
15
14
  map_attribute "id", to: :id
16
15
  ordered
17
16
 
18
- map_element "std-meta", to: :std_meta
19
17
  map_element "iso-meta", to: :iso_meta
20
18
  map_element "reg-meta", to: :reg_meta
21
19
  map_element "nat-meta", to: :nat_meta
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class InlineGraphic < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :content_type, :string
8
+ attribute :baseline_shift, :string
9
+ attribute :mimetype, :string
10
+ attribute :mime_subtype, :string
11
+ attribute :specific_use, :string
12
+ attribute :xml_lang, :string
13
+ attribute :xlink_type, :string
14
+ attribute :xlink_href, :string
15
+ attribute :xlink_role, :string
16
+ attribute :xlink_title, :string
17
+ attribute :xlink_show, :string
18
+ attribute :xlink_actuate, :string
19
+ attribute :alt_text, ::Sts::IsoSts::AltText
20
+
21
+ xml do
22
+ element "inline-graphic"
23
+
24
+ map_attribute "id", to: :id
25
+ map_attribute "content-type", to: :content_type
26
+ map_attribute "baseline-shift", to: :baseline_shift
27
+ map_attribute "mimetype", to: :mimetype
28
+ map_attribute "mime-subtype", to: :mime_subtype
29
+ map_attribute "specific-use", to: :specific_use
30
+ map_attribute "xml:lang", to: :xml_lang
31
+ map_attribute "xlink:type", to: :xlink_type
32
+ map_attribute "xlink:href", to: :xlink_href
33
+ map_attribute "xlink:role", to: :xlink_role
34
+ map_attribute "xlink:title", to: :xlink_title
35
+ map_attribute "xlink:show", to: :xlink_show
36
+ map_attribute "xlink:actuate", to: :xlink_actuate
37
+
38
+ map_element "alt-text", to: :alt_text
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Institution < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :content_type, :string
8
+ attribute :specific_use, :string
9
+ attribute :xml_lang, :string
10
+ attribute :xlink_type, :string
11
+ attribute :xlink_href, :string
12
+ attribute :xlink_role, :string
13
+ attribute :xlink_title, :string
14
+ attribute :xlink_show, :string
15
+ attribute :xlink_actuate, :string
16
+ attribute :content, :string, collection: true
17
+ attribute :sub, ::Sts::IsoSts::Sub, collection: true
18
+ attribute :sup, ::Sts::IsoSts::Sup, collection: true
19
+
20
+ xml do
21
+ element "institution"
22
+ mixed_content
23
+
24
+ map_attribute "id", to: :id
25
+ map_attribute "content-type", to: :content_type
26
+ map_attribute "specific-use", to: :specific_use
27
+ map_attribute "xml:lang", to: :xml_lang
28
+ map_attribute "xlink:type", to: :xlink_type
29
+ map_attribute "xlink:href", to: :xlink_href
30
+ map_attribute "xlink:role", to: :xlink_role
31
+ map_attribute "xlink:title", to: :xlink_title
32
+ map_attribute "xlink:show", to: :xlink_show
33
+ map_attribute "xlink:actuate", to: :xlink_actuate
34
+
35
+ map_content to: :content
36
+ map_element "sub", to: :sub
37
+ map_element "sup", to: :sup
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class MilestoneEnd < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :rid, :string
8
+ attribute :content_type, :string
9
+ attribute :rationale, :string
10
+ attribute :specific_use, :string
11
+ attribute :xml_lang, :string
12
+
13
+ xml do
14
+ element "milestone-end"
15
+
16
+ map_attribute "id", to: :id
17
+ map_attribute "rid", to: :rid
18
+ map_attribute "content-type", to: :content_type
19
+ map_attribute "rationale", to: :rationale
20
+ map_attribute "specific-use", to: :specific_use
21
+ map_attribute "xml:lang", to: :xml_lang
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class MilestoneStart < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :rid, :string
8
+ attribute :content_type, :string
9
+ attribute :rationale, :string
10
+ attribute :specific_use, :string
11
+ attribute :xml_lang, :string
12
+
13
+ xml do
14
+ element "milestone-start"
15
+
16
+ map_attribute "id", to: :id
17
+ map_attribute "rid", to: :rid
18
+ map_attribute "content-type", to: :content_type
19
+ map_attribute "rationale", to: :rationale
20
+ map_attribute "specific-use", to: :specific_use
21
+ map_attribute "xml:lang", to: :xml_lang
22
+ end
23
+ end
24
+ end
25
+ end
@@ -38,7 +38,7 @@ module Sts
38
38
  attribute :fpage, ::Sts::IsoSts::Fpage
39
39
  attribute :lpage, ::Sts::IsoSts::Lpage
40
40
  attribute :page_range, ::Sts::IsoSts::PageRange
41
- attribute :publisher, ::Sts::NisoSts::Publisher
41
+ attribute :publisher, ::Sts::IsoSts::Publisher
42
42
  attribute :pub_id, ::Sts::IsoSts::PubId, collection: true
43
43
 
44
44
  xml do # rubocop:disable Metrics/BlockLength
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Month < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :content_type, :string
8
+ attribute :specific_use, :string
9
+ attribute :xml_lang, :string
10
+ attribute :content, :string, collection: true
11
+
12
+ xml do
13
+ element "month"
14
+ mixed_content
15
+
16
+ map_attribute "id", to: :id
17
+ map_attribute "content-type", to: :content_type
18
+ map_attribute "specific-use", to: :specific_use
19
+ map_attribute "xml:lang", to: :xml_lang
20
+ map_content to: :content
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Num < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :dsep, :string
8
+ attribute :gsep, :string
9
+ attribute :specific_use, :string
10
+ attribute :content, :string, collection: true
11
+
12
+ xml do
13
+ element "num"
14
+ mixed_content
15
+
16
+ map_attribute "id", to: :id
17
+ map_attribute "dsep", to: :dsep
18
+ map_attribute "gsep", to: :gsep
19
+ map_attribute "specific-use", to: :specific_use
20
+ map_content to: :content
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class ObjectId < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :pub_id_type, :string
8
+ attribute :content_type, :string
9
+ attribute :specific_use, :string
10
+ attribute :content, :string, collection: true
11
+
12
+ xml do
13
+ element "object-id"
14
+ mixed_content
15
+
16
+ map_attribute "id", to: :id
17
+ map_attribute "pub-id-type", to: :pub_id_type
18
+ map_attribute "content-type", to: :content_type
19
+ map_attribute "specific-use", to: :specific_use
20
+ map_content to: :content
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Phone < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :content_type, :string
8
+ attribute :specific_use, :string
9
+ attribute :content, :string, collection: true
10
+
11
+ xml do
12
+ element "phone"
13
+ mixed_content
14
+
15
+ map_attribute "id", to: :id
16
+ map_attribute "content-type", to: :content_type
17
+ map_attribute "specific-use", to: :specific_use
18
+ map_content to: :content
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Publisher < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :content_type, :string
8
+ attribute :publisher_name, ::Sts::IsoSts::PublisherName, collection: true
9
+ attribute :publisher_loc, ::Sts::IsoSts::PublisherLoc, collection: true
10
+
11
+ xml do
12
+ element "publisher"
13
+ ordered
14
+
15
+ map_attribute "id", to: :id
16
+ map_attribute "content-type", to: :content_type
17
+
18
+ map_element "publisher-name", to: :publisher_name
19
+ map_element "publisher-loc", to: :publisher_loc
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class PublisherLoc < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :specific_use, :string
8
+ attribute :xml_lang, :string
9
+ attribute :content, :string, collection: true
10
+ attribute :email, ::Sts::IsoSts::Email, collection: true
11
+ attribute :ext_link, ::Sts::IsoSts::ExtLink, collection: true
12
+ attribute :uri, ::Sts::IsoSts::Uri, collection: true
13
+
14
+ xml do
15
+ element "publisher-loc"
16
+ mixed_content
17
+
18
+ map_attribute "id", to: :id
19
+ map_attribute "specific-use", to: :specific_use
20
+ map_attribute "xml:lang", to: :xml_lang
21
+
22
+ map_content to: :content
23
+ map_element "email", to: :email
24
+ map_element "ext-link", to: :ext_link
25
+ map_element "uri", to: :uri
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class PublisherName < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :specific_use, :string
8
+ attribute :xml_lang, :string
9
+ attribute :content, :string, collection: true
10
+
11
+ xml do
12
+ element "publisher-name"
13
+ mixed_content
14
+
15
+ map_attribute "id", to: :id
16
+ map_attribute "specific-use", to: :specific_use
17
+ map_attribute "xml:lang", to: :xml_lang
18
+
19
+ map_content to: :content
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Season < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :content_type, :string
8
+ attribute :specific_use, :string
9
+ attribute :xml_lang, :string
10
+ attribute :content, :string, collection: true
11
+
12
+ xml do
13
+ element "season"
14
+ mixed_content
15
+
16
+ map_attribute "id", to: :id
17
+ map_attribute "content-type", to: :content_type
18
+ map_attribute "specific-use", to: :specific_use
19
+ map_attribute "xml:lang", to: :xml_lang
20
+ map_content to: :content
21
+ end
22
+ end
23
+ end
24
+ end
@@ -35,8 +35,6 @@ module Sts
35
35
  attribute :term_sec, ::Sts::IsoSts::TermSec, collection: true
36
36
  attribute :disp_quote, ::Sts::NisoSts::DispQuote, collection: true
37
37
  attribute :fn, ::Sts::IsoSts::Fn, collection: true
38
- attribute :editing_instruction, ::Sts::NisoSts::EditingInstruction,
39
- collection: true
40
38
  attribute :boxed_text, ::Sts::NisoSts::BoxedText, collection: true
41
39
 
42
40
  xml do # rubocop:disable Metrics/BlockLength
@@ -74,7 +72,6 @@ module Sts
74
72
  map_element "term-sec", to: :term_sec
75
73
  map_element "disp-quote", to: :disp_quote
76
74
  map_element "fn", to: :fn
77
- map_element "editing-instruction", to: :editing_instruction
78
75
  map_element "boxed-text", to: :boxed_text
79
76
  end
80
77
  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"
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.3"
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.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose
@@ -120,8 +120,10 @@ files:
120
120
  - TODO.sts-refactor/11-duplicate-models.md
121
121
  - lib/sts.rb
122
122
  - lib/sts/iso_sts.rb
123
+ - lib/sts/iso_sts/abbrev.rb
123
124
  - lib/sts/iso_sts/alt_text.rb
124
125
  - lib/sts/iso_sts/annex_type.rb
126
+ - lib/sts/iso_sts/annotation.rb
125
127
  - lib/sts/iso_sts/app.rb
126
128
  - lib/sts/iso_sts/app_group.rb
127
129
  - lib/sts/iso_sts/array.rb
@@ -137,6 +139,8 @@ files:
137
139
  - lib/sts/iso_sts/copyright_holder.rb
138
140
  - lib/sts/iso_sts/copyright_statement.rb
139
141
  - lib/sts/iso_sts/copyright_year.rb
142
+ - lib/sts/iso_sts/country.rb
143
+ - lib/sts/iso_sts/day.rb
140
144
  - lib/sts/iso_sts/def.rb
141
145
  - lib/sts/iso_sts/def_item.rb
142
146
  - lib/sts/iso_sts/def_list.rb
@@ -146,7 +150,10 @@ files:
146
150
  - lib/sts/iso_sts/doc_type.rb
147
151
  - lib/sts/iso_sts/document_identification.rb
148
152
  - lib/sts/iso_sts/edition.rb
153
+ - lib/sts/iso_sts/email.rb
154
+ - lib/sts/iso_sts/etal.rb
149
155
  - lib/sts/iso_sts/ext_link.rb
156
+ - lib/sts/iso_sts/fax.rb
150
157
  - lib/sts/iso_sts/fig.rb
151
158
  - lib/sts/iso_sts/fn.rb
152
159
  - lib/sts/iso_sts/fn_group.rb
@@ -155,6 +162,8 @@ files:
155
162
  - lib/sts/iso_sts/graphic.rb
156
163
  - lib/sts/iso_sts/ics.rb
157
164
  - lib/sts/iso_sts/inline_formula.rb
165
+ - lib/sts/iso_sts/inline_graphic.rb
166
+ - lib/sts/iso_sts/institution.rb
158
167
  - lib/sts/iso_sts/is_proof.rb
159
168
  - lib/sts/iso_sts/iso_meta.rb
160
169
  - lib/sts/iso_sts/issue.rb
@@ -168,22 +177,31 @@ files:
168
177
  - lib/sts/iso_sts/mathml2.rb
169
178
  - lib/sts/iso_sts/mathml2/math.rb
170
179
  - lib/sts/iso_sts/meta_date.rb
180
+ - lib/sts/iso_sts/milestone_end.rb
181
+ - lib/sts/iso_sts/milestone_start.rb
171
182
  - lib/sts/iso_sts/mixed_citation.rb
172
183
  - lib/sts/iso_sts/monospace.rb
184
+ - lib/sts/iso_sts/month.rb
173
185
  - lib/sts/iso_sts/named_content.rb
174
186
  - lib/sts/iso_sts/nat_meta.rb
175
187
  - lib/sts/iso_sts/non_normative_example.rb
176
188
  - lib/sts/iso_sts/non_normative_note.rb
189
+ - lib/sts/iso_sts/num.rb
190
+ - lib/sts/iso_sts/object_id.rb
177
191
  - lib/sts/iso_sts/originator.rb
178
192
  - lib/sts/iso_sts/page_count.rb
179
193
  - lib/sts/iso_sts/page_range.rb
180
194
  - lib/sts/iso_sts/paragraph.rb
181
195
  - lib/sts/iso_sts/part_number.rb
182
196
  - lib/sts/iso_sts/permissions.rb
197
+ - lib/sts/iso_sts/phone.rb
183
198
  - lib/sts/iso_sts/preformat.rb
184
199
  - lib/sts/iso_sts/proj_id.rb
185
200
  - lib/sts/iso_sts/pub_date.rb
186
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
187
205
  - lib/sts/iso_sts/ref.rb
188
206
  - lib/sts/iso_sts/ref_list.rb
189
207
  - lib/sts/iso_sts/reg_meta.rb
@@ -192,6 +210,7 @@ files:
192
210
  - lib/sts/iso_sts/release_version_id.rb
193
211
  - lib/sts/iso_sts/sc.rb
194
212
  - lib/sts/iso_sts/sdo.rb
213
+ - lib/sts/iso_sts/season.rb
195
214
  - lib/sts/iso_sts/sec.rb
196
215
  - lib/sts/iso_sts/secretariat.rb
197
216
  - lib/sts/iso_sts/standard.rb