sts 0.5.7 → 0.6.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 (68) hide show
  1. checksums.yaml +4 -4
  2. data/TODO.sts-refactor/00-overview.md +24 -4
  3. data/TODO.sts-refactor/03-namespace-coupling.md +108 -147
  4. data/lib/sts/iso_sts/alt_text.rb +23 -0
  5. data/lib/sts/iso_sts/app.rb +1 -1
  6. data/lib/sts/iso_sts/array.rb +1 -1
  7. data/lib/sts/iso_sts/disp_formula.rb +1 -1
  8. data/lib/sts/iso_sts/doc_number.rb +16 -0
  9. data/lib/sts/iso_sts/doc_type.rb +16 -0
  10. data/lib/sts/iso_sts/document_identification.rb +4 -4
  11. data/lib/sts/iso_sts/fpage.rb +23 -0
  12. data/lib/sts/iso_sts/graphic.rb +2 -2
  13. data/lib/sts/iso_sts/ics.rb +16 -0
  14. data/lib/sts/iso_sts/is_proof.rb +13 -0
  15. data/lib/sts/iso_sts/iso_meta.rb +3 -3
  16. data/lib/sts/iso_sts/issue.rb +23 -0
  17. data/lib/sts/iso_sts/long_desc.rb +23 -0
  18. data/lib/sts/iso_sts/lpage.rb +21 -0
  19. data/lib/sts/iso_sts/mixed_citation.rb +7 -7
  20. data/lib/sts/iso_sts/nat_meta.rb +3 -3
  21. data/lib/sts/iso_sts/originator.rb +16 -0
  22. data/lib/sts/iso_sts/page_range.rb +21 -0
  23. data/lib/sts/iso_sts/part_number.rb +16 -0
  24. data/lib/sts/iso_sts/proj_id.rb +16 -0
  25. data/lib/sts/iso_sts/pub_date.rb +17 -0
  26. data/lib/sts/iso_sts/pub_id.rb +19 -0
  27. data/lib/sts/iso_sts/reg_meta.rb +5 -5
  28. data/lib/sts/iso_sts/release_version.rb +16 -0
  29. data/lib/sts/{tbx_iso_tml/mi.rb → iso_sts/release_version_id.rb} +5 -7
  30. data/lib/sts/iso_sts/sdo.rb +16 -0
  31. data/lib/sts/iso_sts/secretariat.rb +3 -4
  32. data/lib/sts/iso_sts/standard.rb +1 -0
  33. data/lib/sts/iso_sts/standard_identification.rb +8 -8
  34. data/lib/sts/iso_sts/std_ref.rb +7 -7
  35. data/lib/sts/iso_sts/styled_content.rb +0 -2
  36. data/lib/sts/iso_sts/suppl_number.rb +16 -0
  37. data/lib/sts/iso_sts/suppl_type.rb +16 -0
  38. data/lib/sts/iso_sts/suppl_version.rb +16 -0
  39. data/lib/sts/iso_sts/table_wrap_foot.rb +1 -1
  40. data/lib/sts/iso_sts/tex_math.rb +23 -0
  41. data/lib/sts/iso_sts/urn.rb +16 -0
  42. data/lib/sts/iso_sts/version.rb +16 -0
  43. data/lib/sts/iso_sts/volume.rb +23 -0
  44. data/lib/sts/iso_sts/wi_number.rb +19 -0
  45. data/lib/sts/iso_sts/year.rb +21 -0
  46. data/lib/sts/iso_sts.rb +27 -0
  47. data/lib/sts/niso_sts/display_formula.rb +1 -3
  48. data/lib/sts/niso_sts/inline_formula.rb +1 -3
  49. data/lib/sts/niso_sts/standard.rb +1 -0
  50. data/lib/sts/tbx_iso_tml/definition.rb +1 -1
  51. data/lib/sts/tbx_iso_tml/note.rb +1 -1
  52. data/lib/sts/tbx_iso_tml/term.rb +1 -1
  53. data/lib/sts/tbx_iso_tml.rb +0 -12
  54. data/lib/sts/version.rb +1 -1
  55. data/lib/sts.rb +1 -1
  56. metadata +29 -15
  57. data/lib/sts/mathml.rb +0 -21
  58. data/lib/sts/tbx_iso_tml/math.rb +0 -49
  59. data/lib/sts/tbx_iso_tml/mfenced.rb +0 -40
  60. data/lib/sts/tbx_iso_tml/mfrac.rb +0 -30
  61. data/lib/sts/tbx_iso_tml/mrow.rb +0 -41
  62. data/lib/sts/tbx_iso_tml/mspace.rb +0 -18
  63. data/lib/sts/tbx_iso_tml/mstyle.rb +0 -29
  64. data/lib/sts/tbx_iso_tml/msub.rb +0 -31
  65. data/lib/sts/tbx_iso_tml/msup.rb +0 -25
  66. data/lib/sts/tbx_iso_tml/munder.rb +0 -19
  67. data/lib/sts/tbx_iso_tml/munderover.rb +0 -23
  68. data/lib/sts/tbx_iso_tml/semantics.rb +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64daa424e22276825a3caf3f99f1bbea673717e73f1930068331d4788e35a120
4
- data.tar.gz: af7065a03a76fe1fab29e481e89755fe503061438787c5accf2f2739d8925e83
3
+ metadata.gz: 13e2f7f08de69885f2e625b3e46d6d459116fe58692c735a5a003113e7a80a77
4
+ data.tar.gz: eb1de3ce704b4d955a89bce414ceea801ebd6d8c51ecb3c3bc73ec44b88eb6f2
5
5
  SHA512:
6
- metadata.gz: b703af39516ac606ed7b22071b452cbc2e2f854c70e9cb37e0ec52b8034ba858834050ec4855f750ee35b4a20669b40f663d00e0e6d76bcf693b323374f6e7ae
7
- data.tar.gz: f744a3a6fa44c147a6692660fd47f0130ceb4d82064998291916247be7c3f9d58715b0508ae1687e55a6de80eaca1ba3d879f8d231b5dd685cbe176c8a24c1d5
6
+ metadata.gz: 530f4e261194c92e8543cf8eb242e851be5aede2d365ff8ef7bef98f21d0f9a25e4d464632ae108b61bdbaa43d5bb77c583c8c1ec7e14bc355f78016690cc01f
7
+ data.tar.gz: 231aebbc44901782184e018394071dbfc98db1245960b5161158a301b32ab6640a6c1190b1f23a133059848e7dc0e977ac625a47e1ad6198520aa88caff7441b
@@ -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 | 01, 02 |
22
+ | 03 | `03-namespace-coupling.md` | Architecture | IN PROGRESS (63→20 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 |
@@ -140,7 +140,9 @@ grep -r "method_missing|respond_to_missing|Object.const_get|\.send" lib/
140
140
  ```
141
141
 
142
142
  ### IsoSts Namespace Independence (2026-05-07)
143
- - ARCHITECTURE DECISION: IsoSts and NisoSts must remain fully independent
143
+ - ARCHITECTURE DECISION: IsoSts must be independent **of NisoSts**. This is not
144
+ independence in general — `lib/sts/iso_sts/` still references `TbxIsoTml` and
145
+ MathML types directly, and those shared namespaces are outside this ADR.
144
146
  - ISOSTS is frozen legacy; NISO STS evolves — combining them violates OCP
145
147
  - Created 11 new IsoSts-specific types: Monospace, Sc, Strike, Underline, Uri,
146
148
  NamedContent, StandardRef, MetaDate, ContentLanguage (with autoloads)
@@ -164,9 +166,27 @@ grep -r "method_missing|respond_to_missing|Object.const_get|\.send" lib/
164
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
165
167
 
166
168
  ### Architectural Items (High Effort)
167
- - `03-namespace-coupling.md` — IN PROGRESS: 15763 IsoSts→NisoSts cross-references remaining
169
+ - `03-namespace-coupling.md` — IN PROGRESS: 6320 IsoSts→NisoSts references
170
+ remaining (issue #40). Source of truth is `ISOSTS.xsd`, NOT the NisoSts
171
+ models — they disagree on nearly every element.
168
172
  - `04-register-versioning.md` — Version the models via lutaml-model Registers
169
173
  - `11-duplicate-models.md` — 44 overlapping element resolution (depends on 03)
170
174
 
175
+ ### Known bugs — schema conformance (separate from 03)
176
+ The 2026-05-07 "@id added to all models (XSD-verified)" pass verified against
177
+ the **NISO** XSD and applied the result to IsoSts. ISOSTS disagrees:
178
+ - **16 IsoSts models silently drop ISOSTS attributes that exist** — real data
179
+ loss. `sub`/`sup` lose `arrange`+`specific-use`; `ext-link` loses 5 xlink
180
+ attrs; `mixed-citation` loses 6; `graphic`, `copyright-*`, `edition`,
181
+ `title`, `label`, `uri`, `named-content`, `underline`, `meta-date`, `body`
182
+ lose others.
183
+ - **25 IsoSts models carry an `@id` ISOSTS does not define** — harmless (never
184
+ populated on parse, never emitted on serialise), but dead surface.
185
+
171
186
  ## Next Action
172
- Proceed with `03-namespace-coupling.md` — audit and resolve 157+ IsoSts→NisoSts cross-references.
187
+ Two independent tracks:
188
+ 1. Finish `03` — the 20 remaining refs split into 11 deep-root refs (each
189
+ reaching a ~152-class recursive core) and 9 child-bearing refs whose closure
190
+ is unmeasured. Both need sizing before planning.
191
+ 2. File and fix the 16 lossy models above — real data loss, unrelated to
192
+ decoupling.
@@ -3,156 +3,117 @@
3
3
  **Priority**: HIGH
4
4
  **Category**: Architecture
5
5
  **Estimated Effort**: High
6
- **Files Affected**: `lib/sts/iso_sts/content_groups/highlight_elements.rb` (194+ references)
6
+ **Status**: Partially done — 63 → 20 references (GitHub issue #40)
7
7
 
8
8
  ## Problem
9
9
 
10
- `lib/sts/iso_sts/content_groups/highlight_elements.rb` contains 194+ references to `Sts::NisoSts::*` types:
11
-
12
- ```ruby
13
- # Examples from highlight_elements.rb
14
- [:sub, "Sts::NisoSts::Sub", "sub"]
15
- [:sup, "Sts::NisoSts::Sup", "sup"]
16
- [:italic, "Sts::NisoSts::Italic", "italic"]
17
- [:bold, "Sts::NisoSts::Bold", "bold"]
18
- # ... 190 more
19
- ```
20
-
21
- ### Why This Is Wrong
22
-
23
- 1. **Violation of namespace isolation**: IsoSts should not depend on NisoSts implementation
24
- 2. **Shared-namespace ambiguity**: These elements appear in both ISOSTS and NISO STS but with different attribute sets
25
- 3. **Tight coupling**: Changes to NisoSts can break IsoSts
26
- 4. **Schema divergence ignored**: `<p>` in ISOSTS has different attributes than `<p>` in NISO STS Extended
27
-
28
- ### Root Cause
29
-
30
- The schemas ARE different:
31
- - ISOSTS `<p>`: `@content-type, @id, @specific-use, @xml:lang`
32
- - NISO STS Extended `<p>`: `@content-type, @id, @originator, @specific-use, @style-type, @xml:base, @xml:lang`
33
-
34
- ## Solution: Three-Tier Architecture
35
-
36
- ### Tier 1: Shared Base Types
37
-
38
- Create shared types in `Sts::Base` that both namespaces inherit:
39
-
40
- ```ruby
41
- # lib/sts/base/text/emphasis.rb
42
- module Sts
43
- module Base
44
- module Text
45
- class Emphasis < Lutaml::Model::Serializable
46
- # Shared attributes/methods
47
- attribute :id, :string
48
- attribute :base_fontsize, :string
49
- attribute :baseline_shift, :string
50
- attribute :color, :string
51
-
52
- xml do
53
- map_attribute :id, to: :id
54
- # ...
55
- end
56
- end
57
-
58
- class Bold < Emphasis
59
- xml { element "bold" }
60
- end
61
-
62
- class Italic < Emphasis
63
- xml { element "italic" }
64
- end
65
-
66
- class Sub < Emphasis
67
- xml { element "sub" }
68
- end
69
-
70
- class Sup < Emphasis
71
- xml { element "sup" }
72
- end
73
- end
74
- end
75
- end
76
- ```
77
-
78
- ### Tier 2: IsoSts-Specific Extensions
79
-
80
- ```ruby
81
- # lib/sts/iso_sts/text/emphasis.rb
82
- module Sts
83
- module IsoSts
84
- module Text
85
- class Bold < ::Sts::Base::Text::Bold
86
- # Add IsoSts-specific attributes
87
- attribute :content_type, :string
88
-
89
- xml do
90
- # Override/add IsoSts-specific mapping
91
- map_attribute "content-type", to: :content_type
92
- end
93
- end
94
- end
95
- end
96
- end
97
- ```
98
-
99
- ### Tier 3: NisoSts-Specific Extensions
100
-
101
- ```ruby
102
- # lib/sts/niso_sts/text/emphasis.rb
103
- module Sts
104
- module NisoSts
105
- module Text
106
- class Bold < ::Sts::Base::Text::Bold
107
- # Add NisoSts-specific attributes
108
- attribute :originator, :string
109
- attribute :style_type, :string
110
-
111
- xml do
112
- map_attribute "originator", to: :originator
113
- map_attribute "style-type", to: :style_type
114
- end
115
- end
116
- end
117
- end
118
- end
119
- ```
120
-
121
- ## Implementation Strategy
122
-
123
- 1. **Phase 1**: Identify all shared element types (bold, italic, sub, sup, p, etc.)
124
- 2. **Phase 2**: Create base types with MINIMAL shared attributes
125
- 3. **Phase 3**: Refactor IsoSts to extend bases
126
- 4. **Phase 4**: Refactor NisoSts to extend bases
127
- 5. **Phase 5**: Delete `Sts::NisoSts::*` references from IsoSts content groups
128
-
129
- ## Files to Refactor
130
-
131
- Primary targets:
132
- - `lib/sts/iso_sts/content_groups/highlight_elements.rb`
133
- - `lib/sts/iso_sts/content_groups/emphasis_elements.rb` (if exists)
134
- - `lib/sts/niso_sts/content_groups/highlight_elements.rb`
10
+ `lib/sts/iso_sts/` references `Sts::NisoSts::*` types directly. IsoSts must be
11
+ independent of NisoSts (ADR 2026-05-07): ISOSTS is frozen legacy, NISO STS
12
+ evolves, so coupling them violates OCP.
13
+
14
+ PR #31 reduced this from 157 to 63 references. Issue #40 reduced it further,
15
+ from 63 to 20.
16
+
17
+ ## Source of truth: ISOSTS.xsd, NOT the NisoSts models
18
+
19
+ The obvious approach — duplicate each NisoSts class into IsoSts — produces
20
+ **schema-incorrect models**. The NisoSts models disagree with
21
+ `reference-docs/isosts-v1/xsd/ISOSTS.xsd` on nearly every element:
22
+
23
+ | Element | ISOSTS says | NisoSts model |
24
+ |---|---|---|
25
+ | `year` (:948) | `content-type`, `specific-use`, `xml:lang` no `@id` | `@id` only |
26
+ | `doc-type` (:6378) | `type="xs:string"` no attributes at all | `@id` + content |
27
+ | `ics` (:6373) | `type="xs:string"` | `@id` + `ics-desc` child |
28
+ | `fpage` | `content-type`, `seq`, `specific-use`, `xml:lang`; no children | `@id` + bold/italic |
29
+ | `license` (:51) | `license-type`, `specific-use`, `xml:lang` | `@id`, `xlink:href` |
30
+ | `ruby` | **not an ISOSTS element** | exists (NISO only) |
31
+
32
+ `feature_doc.xml` declares `<!DOCTYPE standard SYSTEM ".../ISOSTS.dtd">`, and
33
+ the ISOSTS DTD agrees with ISOSTS.xsd (both derive `bold`, `sub` etc. from the
34
+ JATS 0.4 modules). ISOSTS.xsd is a faithful conversion and is the authority.
35
+
36
+ **Round-tripping does not prove correctness.** A model that invents or drops an
37
+ attribute still parses and serialises symmetrically, so the suite stays green
38
+ while the model is wrong. Assert the exact attribute set per element instead.
39
+
40
+ Attribute lists must be **generated** from the XSD, never hand-read: `version`
41
+ on `tex-math` and `specific-use` on `pub-id` sit after long `xs:enumeration`
42
+ blocks and are invisible to a truncated read.
43
+
44
+ ## Done in issue #40 — 43 refs removed, 27 classes added
45
+
46
+ - **14 `xs:string` elements** (`originator`, `doc-type`, `doc-number`,
47
+ `part-number`, `version`, `suppl-type`, `suppl-number`, `suppl-version`,
48
+ `urn`, `sdo`, `proj-id`, `release-version`, `ics`, `secretariat`) — modelled
49
+ as content-only IsoSts classes with no attributes. 23 refs.
50
+ - **3 `permissions` refs** repointed to the existing `IsoSts::Permissions`.
51
+ - **`ruby` deleted** from `StyledContent` — ISOSTS defines no such element.
52
+ Behaviour change: `<ruby>` in `<styled-content>` no longer round-trips.
53
+ - **13 element classes** modelled from ISOSTS.xsd: `Year`, `PubDate`,
54
+ `ReleaseVersionId`, `IsProof`, `AltText`, `LongDesc`, `TexMath`, `PubId`,
55
+ `Volume`, `Issue`, `Fpage`, `Lpage`, `PageRange`. 16 refs.
56
+ - **`WiNumber` added** — ISOSTS gives `wi-number` an `@id`; it was typed as a
57
+ plain string, silently discarding that `@id`.
58
+
59
+ ### Why classes and not plain `:string`
60
+
61
+ `xs:string` elements look like they need no class. They do: an empty element
62
+ (`<sdo/>`, which `feature_doc.xml` contains) does not survive a `:string`
63
+ round-trip. For a scalar, `render_empty: :empty` recovers it; for a collection
64
+ (`secretariat`, `ics` — both `maxOccurs="unbounded"`) an empty element parses
65
+ to `[]`, destroying the information at parse time before any render option
66
+ applies. Content-only classes round-trip every case.
67
+
68
+ ## Remaining — 20 refs
69
+
70
+ **11 refs to 9 deep roots**: `MetadataStd`, `ElementCitation`, `PersonGroup`,
71
+ `Collab`, `Source`, `DispQuote`, `EditingInstruction`, `TermDisplay`,
72
+ `BoxedText`. Each reaches the same ~152-class mutually-recursive core
73
+ (`Section` → `Paragraph` → `DispQuote` → `Paragraph`). `DispQuote` has 3 direct
74
+ children but pulls all 152. No incremental path — needs its own decision.
75
+
76
+ **9 refs whose ISOSTS content models have real children**, closure not measured:
77
+ `attrib` (:1082), `term-head` (:4308), `article-title`, `license` → `license-p`
78
+ (:51), `publisher` `publisher-loc`, `custom-meta-group` → `custom-meta`.
79
+ `attrib` and `term-head` are **not** trivial leaves in ISOSTS despite what the
80
+ NisoSts models suggest; `license-p` reaches `array`/`alternatives`, so these may
81
+ not be cheap. Measure before planning.
82
+
83
+ ## Rejected: three-tier `Sts::Base` hierarchy
84
+
85
+ An earlier draft of this document proposed shared base types in `Sts::Base` that
86
+ both namespaces inherit. This contradicts the 2026-05-07 ADR, and the schemas
87
+ genuinely diverge — `IsoSts::Fig` has `title`/`alternatives` that
88
+ `NisoSts::Figure` lacks; `IsoSts::Ref` has `nlm-citation`/`citation-alternatives`
89
+ that `NisoSts::Reference` lacks. A shared base would fight the schemas.
90
+
91
+ That draft also targeted `lib/sts/iso_sts/content_groups/highlight_elements.rb`
92
+ and "194+ references" to emphasis types. That file was deleted as dead code; the
93
+ real work was metadata types, not highlight elements.
94
+
95
+ ## Naming trap (for the deferred work)
96
+
97
+ A mechanical `s/NisoSts::/IsoSts::/` is wrong. Nine elements already have
98
+ different class names per namespace, so a blind rename creates `IsoSts::Section`
99
+ alongside the existing `IsoSts::Sec` — two classes for one `sec` element:
100
+
101
+ `Section`/`Sec`, `Figure`/`Fig`, `Reference`/`Ref`, `ReferenceList`/`RefList`,
102
+ `SectionArray`/`Array`, `StdCrossReference`/`StandardCrossReference`,
103
+ `DisplayFormula`/`DispFormula`, `TermSection`/`TermSec`,
104
+ `ReferenceStandard`/`Std`.
105
+
106
+ Remap child references by **XML element name**, not class name.
107
+
108
+ ## Scope boundary
109
+
110
+ Independence from NisoSts is not independence in general: `lib/sts/iso_sts/`
111
+ still references 6 `TbxIsoTml` types directly, and much of the deferred closure
112
+ reaches `TbxIsoTml`/MathML. Those are shared namespaces, outside this ADR.
135
113
 
136
114
  ## Verification
137
115
 
138
- 1. No `Sts::NisoSts` references in `lib/sts/iso_sts/`
139
- 2. All round-trip tests pass
140
- 3. Schema validation against both ISOSTS DTD and NISO STS XSD passes
141
-
142
- ## Dependencies
143
-
144
- - `01-mathml-delegation.md` — uses similar patterns
145
- - `02-type-resolution.md` — must be clean first
146
-
147
- ## TODO Checklist
148
-
149
- - [ ] Audit all IsoSts → NisoSts references
150
- - [ ] Categorize by shared vs. truly namespace-specific
151
- - [ ] Design base type hierarchy
152
- - [ ] Create `lib/sts/base/` directory structure
153
- - [ ] Implement base types for shared elements
154
- - [ ] Refactor IsoSts to use base types
155
- - [ ] Refactor NisoSts to use base types
156
- - [ ] Remove cross-namespace references
157
- - [ ] Verify no circular dependencies
158
- - [ ] Run full test suite
116
+ 1. `grep -rho "Sts::NisoSts::" lib/sts/iso_sts/ | wc -l` → `20`
117
+ 2. Every attribute on an IsoSts model traces to a line in `ISOSTS.xsd`
118
+ 3. Autoload registry 1:1 with the directory (112/112)
119
+ 4. `bundle exec rspec` green; `bundle exec rubocop` clean
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class AltText < Lutaml::Model::Serializable
6
+ attribute :content, :string
7
+ attribute :id, :string
8
+ attribute :content_type, :string
9
+ attribute :specific_use, :string
10
+ attribute :xml_lang, :string
11
+
12
+ xml do
13
+ element "alt-text"
14
+
15
+ map_content to: :content
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
+ end
21
+ end
22
+ end
23
+ end
@@ -15,7 +15,7 @@ module Sts
15
15
  attribute :term_sec, ::Sts::IsoSts::TermSec, collection: true
16
16
  attribute :fn_group, ::Sts::IsoSts::FnGroup, collection: true
17
17
  attribute :ref_list, ::Sts::IsoSts::RefList, collection: true
18
- attribute :permissions, ::Sts::NisoSts::Permissions
18
+ attribute :permissions, ::Sts::IsoSts::Permissions
19
19
  attribute :non_normative_note, ::Sts::IsoSts::NonNormativeNote,
20
20
  collection: true
21
21
  attribute :non_normative_example, ::Sts::IsoSts::NonNormativeExample,
@@ -12,7 +12,7 @@ module Sts
12
12
  attribute :label, ::Sts::IsoSts::Label
13
13
  attribute :table, ::Sts::IsoSts::Table
14
14
  attribute :attrib, ::Sts::NisoSts::Attrib, collection: true
15
- attribute :permissions, ::Sts::NisoSts::Permissions, collection: true
15
+ attribute :permissions, ::Sts::IsoSts::Permissions, collection: true
16
16
 
17
17
  xml do
18
18
  element "array"
@@ -17,7 +17,7 @@ module Sts
17
17
  attribute :styled_content, ::Sts::IsoSts::StyledContent
18
18
  attribute :preformat, ::Sts::IsoSts::Preformat
19
19
  attribute :graphic, ::Sts::IsoSts::Graphic, collection: true
20
- attribute :tex_math, ::Sts::NisoSts::TexMath
20
+ attribute :tex_math, ::Sts::IsoSts::TexMath
21
21
 
22
22
  xml do
23
23
  element "disp-formula"
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ # ISOSTS declares <doc-number> as type="xs:string" -- no attributes.
6
+ class DocNumber < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+
9
+ xml do
10
+ element "doc-number"
11
+
12
+ map_content to: :content
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ # ISOSTS declares <doc-type> as type="xs:string" -- no attributes.
6
+ class DocType < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+
9
+ xml do
10
+ element "doc-type"
11
+
12
+ map_content to: :content
13
+ end
14
+ end
15
+ end
16
+ end
@@ -4,11 +4,11 @@ module Sts
4
4
  module IsoSts
5
5
  class DocumentIdentification < Lutaml::Model::Serializable
6
6
  attribute :id, :string
7
- attribute :sdo, ::Sts::NisoSts::Sdo
8
- attribute :proj_id, ::Sts::NisoSts::ProjId
7
+ attribute :sdo, ::Sts::IsoSts::Sdo
8
+ attribute :proj_id, ::Sts::IsoSts::ProjId
9
9
  attribute :language, ::Sts::IsoSts::Language
10
- attribute :release_version, ::Sts::NisoSts::ReleaseVersion
11
- attribute :urn, ::Sts::NisoSts::Urn
10
+ attribute :release_version, ::Sts::IsoSts::ReleaseVersion
11
+ attribute :urn, ::Sts::IsoSts::Urn
12
12
 
13
13
  xml do
14
14
  element "doc-ident"
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Fpage < Lutaml::Model::Serializable
6
+ attribute :content, :string
7
+ attribute :content_type, :string
8
+ attribute :seq, :string
9
+ attribute :specific_use, :string
10
+ attribute :xml_lang, :string
11
+
12
+ xml do
13
+ element "fpage"
14
+
15
+ map_content to: :content
16
+ map_attribute "content-type", to: :content_type
17
+ map_attribute "seq", to: :seq
18
+ map_attribute "specific-use", to: :specific_use
19
+ map_attribute "xml:lang", to: :xml_lang
20
+ end
21
+ end
22
+ end
23
+ end
@@ -16,8 +16,8 @@ module Sts
16
16
  attribute :graphic_type, :string
17
17
  attribute :label, ::Sts::IsoSts::Label
18
18
  attribute :caption, ::Sts::IsoSts::Caption
19
- attribute :alt_text, ::Sts::NisoSts::AltText
20
- attribute :long_desc, ::Sts::NisoSts::LongDesc
19
+ attribute :alt_text, ::Sts::IsoSts::AltText
20
+ attribute :long_desc, ::Sts::IsoSts::LongDesc
21
21
 
22
22
  xml do
23
23
  element "graphic"
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ # ISOSTS declares <ics> as type="xs:string" -- no attributes.
6
+ class Ics < Lutaml::Model::Serializable
7
+ attribute :content, :string
8
+
9
+ xml do
10
+ element "ics"
11
+
12
+ map_content to: :content
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ # ISOSTS declares <is-proof> as an empty complexType: its presence is the
6
+ # whole signal -- no attributes, no content.
7
+ class IsProof < Lutaml::Model::Serializable
8
+ xml do
9
+ element "is-proof"
10
+ end
11
+ end
12
+ end
13
+ end
@@ -14,7 +14,7 @@ module Sts
14
14
  attribute :release_date, ::Sts::IsoSts::ReleaseDate, collection: true
15
15
  attribute :comm_ref, ::Sts::IsoSts::CommRef
16
16
  attribute :secretariat, ::Sts::IsoSts::Secretariat, collection: true
17
- attribute :ics, ::Sts::NisoSts::Ics, collection: true
17
+ attribute :ics, ::Sts::IsoSts::Ics, collection: true
18
18
  attribute :page_count, ::Sts::IsoSts::PageCount
19
19
  attribute :permissions, ::Sts::IsoSts::Permissions, collection: true
20
20
  attribute :std_xref, ::Sts::IsoSts::StandardCrossReference,
@@ -22,8 +22,8 @@ module Sts
22
22
  attribute :custom_meta_group, ::Sts::NisoSts::CustomMetaGroup,
23
23
  collection: true
24
24
  attribute :meta_date, ::Sts::IsoSts::MetaDate, collection: true
25
- attribute :pub_date, ::Sts::NisoSts::PubDate
26
- attribute :is_proof, ::Sts::NisoSts::IsProof
25
+ attribute :pub_date, ::Sts::IsoSts::PubDate
26
+ attribute :is_proof, ::Sts::IsoSts::IsProof
27
27
 
28
28
  xml do
29
29
  element "iso-meta"
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Issue < Lutaml::Model::Serializable
6
+ attribute :content, :string
7
+ attribute :content_type, :string
8
+ attribute :seq, :string
9
+ attribute :specific_use, :string
10
+ attribute :xml_lang, :string
11
+
12
+ xml do
13
+ element "issue"
14
+
15
+ map_content to: :content
16
+ map_attribute "content-type", to: :content_type
17
+ map_attribute "seq", to: :seq
18
+ map_attribute "specific-use", to: :specific_use
19
+ map_attribute "xml:lang", to: :xml_lang
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class LongDesc < Lutaml::Model::Serializable
6
+ attribute :content, :string
7
+ attribute :id, :string
8
+ attribute :content_type, :string
9
+ attribute :specific_use, :string
10
+ attribute :xml_lang, :string
11
+
12
+ xml do
13
+ element "long-desc"
14
+
15
+ map_content to: :content
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
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module IsoSts
5
+ class Lpage < Lutaml::Model::Serializable
6
+ attribute :content, :string
7
+ attribute :content_type, :string
8
+ attribute :specific_use, :string
9
+ attribute :xml_lang, :string
10
+
11
+ xml do
12
+ element "lpage"
13
+
14
+ map_content to: :content
15
+ map_attribute "content-type", to: :content_type
16
+ map_attribute "specific-use", to: :specific_use
17
+ map_attribute "xml:lang", to: :xml_lang
18
+ end
19
+ end
20
+ end
21
+ end
@@ -24,16 +24,16 @@ module Sts
24
24
  attribute :break, ::Sts::IsoSts::Break, collection: true
25
25
  attribute :person_group, ::Sts::NisoSts::PersonGroup, collection: true
26
26
  attribute :collab, ::Sts::NisoSts::Collab, collection: true
27
- attribute :year, ::Sts::NisoSts::Year, collection: true
27
+ attribute :year, ::Sts::IsoSts::Year, collection: true
28
28
  attribute :source, ::Sts::NisoSts::Source
29
29
  attribute :article_title, ::Sts::NisoSts::ArticleTitle
30
- attribute :volume, ::Sts::NisoSts::Volume
31
- attribute :issue, ::Sts::NisoSts::Issue
32
- attribute :fpage, ::Sts::NisoSts::Fpage
33
- attribute :lpage, ::Sts::NisoSts::Lpage
34
- attribute :page_range, ::Sts::NisoSts::PageRange
30
+ attribute :volume, ::Sts::IsoSts::Volume
31
+ attribute :issue, ::Sts::IsoSts::Issue
32
+ attribute :fpage, ::Sts::IsoSts::Fpage
33
+ attribute :lpage, ::Sts::IsoSts::Lpage
34
+ attribute :page_range, ::Sts::IsoSts::PageRange
35
35
  attribute :publisher, ::Sts::NisoSts::Publisher
36
- attribute :pub_id, ::Sts::NisoSts::PubId, collection: true
36
+ attribute :pub_id, ::Sts::IsoSts::PubId, collection: true
37
37
 
38
38
  xml do
39
39
  element "mixed-citation"
@@ -14,8 +14,8 @@ module Sts
14
14
  attribute :doc_ref, :string
15
15
  attribute :release_date, ::Sts::IsoSts::ReleaseDate
16
16
  attribute :comm_ref, :string
17
- attribute :secretariat, ::Sts::NisoSts::Secretariat, collection: true
18
- attribute :ics, ::Sts::NisoSts::Ics, collection: true
17
+ attribute :secretariat, ::Sts::IsoSts::Secretariat, collection: true
18
+ attribute :ics, ::Sts::IsoSts::Ics, collection: true
19
19
  attribute :page_count, ::Sts::IsoSts::PageCount
20
20
  attribute :permissions, ::Sts::IsoSts::Permissions, collection: true
21
21
  attribute :std_xref, ::Sts::IsoSts::StandardCrossReference,
@@ -23,7 +23,7 @@ module Sts
23
23
  attribute :custom_meta_group, ::Sts::NisoSts::CustomMetaGroup,
24
24
  collection: true
25
25
  attribute :meta_date, ::Sts::IsoSts::MetaDate, collection: true
26
- attribute :pub_date, ::Sts::NisoSts::PubDate
26
+ attribute :pub_date, ::Sts::IsoSts::PubDate
27
27
 
28
28
  xml do
29
29
  element "nat-meta"