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.
- checksums.yaml +4 -4
- data/TODO.sts-refactor/00-overview.md +24 -4
- data/TODO.sts-refactor/03-namespace-coupling.md +108 -147
- data/lib/sts/iso_sts/alt_text.rb +23 -0
- data/lib/sts/iso_sts/app.rb +1 -1
- data/lib/sts/iso_sts/array.rb +1 -1
- data/lib/sts/iso_sts/disp_formula.rb +1 -1
- data/lib/sts/iso_sts/doc_number.rb +16 -0
- data/lib/sts/iso_sts/doc_type.rb +16 -0
- data/lib/sts/iso_sts/document_identification.rb +4 -4
- data/lib/sts/iso_sts/fpage.rb +23 -0
- data/lib/sts/iso_sts/graphic.rb +2 -2
- data/lib/sts/iso_sts/ics.rb +16 -0
- data/lib/sts/iso_sts/is_proof.rb +13 -0
- data/lib/sts/iso_sts/iso_meta.rb +3 -3
- data/lib/sts/iso_sts/issue.rb +23 -0
- data/lib/sts/iso_sts/long_desc.rb +23 -0
- data/lib/sts/iso_sts/lpage.rb +21 -0
- data/lib/sts/iso_sts/mixed_citation.rb +7 -7
- data/lib/sts/iso_sts/nat_meta.rb +3 -3
- data/lib/sts/iso_sts/originator.rb +16 -0
- data/lib/sts/iso_sts/page_range.rb +21 -0
- data/lib/sts/iso_sts/part_number.rb +16 -0
- data/lib/sts/iso_sts/proj_id.rb +16 -0
- data/lib/sts/iso_sts/pub_date.rb +17 -0
- data/lib/sts/iso_sts/pub_id.rb +19 -0
- data/lib/sts/iso_sts/reg_meta.rb +5 -5
- data/lib/sts/iso_sts/release_version.rb +16 -0
- data/lib/sts/{tbx_iso_tml/mi.rb → iso_sts/release_version_id.rb} +5 -7
- data/lib/sts/iso_sts/sdo.rb +16 -0
- data/lib/sts/iso_sts/secretariat.rb +3 -4
- data/lib/sts/iso_sts/standard.rb +1 -0
- data/lib/sts/iso_sts/standard_identification.rb +8 -8
- data/lib/sts/iso_sts/std_ref.rb +7 -7
- data/lib/sts/iso_sts/styled_content.rb +0 -2
- data/lib/sts/iso_sts/suppl_number.rb +16 -0
- data/lib/sts/iso_sts/suppl_type.rb +16 -0
- data/lib/sts/iso_sts/suppl_version.rb +16 -0
- data/lib/sts/iso_sts/table_wrap_foot.rb +1 -1
- data/lib/sts/iso_sts/tex_math.rb +23 -0
- data/lib/sts/iso_sts/urn.rb +16 -0
- data/lib/sts/iso_sts/version.rb +16 -0
- data/lib/sts/iso_sts/volume.rb +23 -0
- data/lib/sts/iso_sts/wi_number.rb +19 -0
- data/lib/sts/iso_sts/year.rb +21 -0
- data/lib/sts/iso_sts.rb +27 -0
- data/lib/sts/niso_sts/display_formula.rb +1 -3
- data/lib/sts/niso_sts/inline_formula.rb +1 -3
- data/lib/sts/niso_sts/standard.rb +1 -0
- data/lib/sts/tbx_iso_tml/definition.rb +1 -1
- data/lib/sts/tbx_iso_tml/note.rb +1 -1
- data/lib/sts/tbx_iso_tml/term.rb +1 -1
- data/lib/sts/tbx_iso_tml.rb +0 -12
- data/lib/sts/version.rb +1 -1
- data/lib/sts.rb +1 -1
- metadata +29 -15
- data/lib/sts/mathml.rb +0 -21
- data/lib/sts/tbx_iso_tml/math.rb +0 -49
- data/lib/sts/tbx_iso_tml/mfenced.rb +0 -40
- data/lib/sts/tbx_iso_tml/mfrac.rb +0 -30
- data/lib/sts/tbx_iso_tml/mrow.rb +0 -41
- data/lib/sts/tbx_iso_tml/mspace.rb +0 -18
- data/lib/sts/tbx_iso_tml/mstyle.rb +0 -29
- data/lib/sts/tbx_iso_tml/msub.rb +0 -31
- data/lib/sts/tbx_iso_tml/msup.rb +0 -25
- data/lib/sts/tbx_iso_tml/munder.rb +0 -19
- data/lib/sts/tbx_iso_tml/munderover.rb +0 -23
- 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 13e2f7f08de69885f2e625b3e46d6d459116fe58692c735a5a003113e7a80a77
|
|
4
|
+
data.tar.gz: eb1de3ce704b4d955a89bce414ceea801ebd6d8c51ecb3c3bc73ec44b88eb6f2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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:
|
|
169
|
+
- `03-namespace-coupling.md` — IN PROGRESS: 63→20 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
|
-
|
|
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
|
-
**
|
|
6
|
+
**Status**: Partially done — 63 → 20 references (GitHub issue #40)
|
|
7
7
|
|
|
8
8
|
## Problem
|
|
9
9
|
|
|
10
|
-
`lib/sts/iso_sts
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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.
|
|
139
|
-
2.
|
|
140
|
-
3.
|
|
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
|
data/lib/sts/iso_sts/app.rb
CHANGED
|
@@ -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::
|
|
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,
|
data/lib/sts/iso_sts/array.rb
CHANGED
|
@@ -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::
|
|
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::
|
|
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::
|
|
8
|
-
attribute :proj_id, ::Sts::
|
|
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::
|
|
11
|
-
attribute :urn, ::Sts::
|
|
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
|
data/lib/sts/iso_sts/graphic.rb
CHANGED
|
@@ -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::
|
|
20
|
-
attribute :long_desc, ::Sts::
|
|
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
|
data/lib/sts/iso_sts/iso_meta.rb
CHANGED
|
@@ -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::
|
|
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::
|
|
26
|
-
attribute :is_proof, ::Sts::
|
|
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::
|
|
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::
|
|
31
|
-
attribute :issue, ::Sts::
|
|
32
|
-
attribute :fpage, ::Sts::
|
|
33
|
-
attribute :lpage, ::Sts::
|
|
34
|
-
attribute :page_range, ::Sts::
|
|
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::
|
|
36
|
+
attribute :pub_id, ::Sts::IsoSts::PubId, collection: true
|
|
37
37
|
|
|
38
38
|
xml do
|
|
39
39
|
element "mixed-citation"
|
data/lib/sts/iso_sts/nat_meta.rb
CHANGED
|
@@ -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::
|
|
18
|
-
attribute :ics, ::Sts::
|
|
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::
|
|
26
|
+
attribute :pub_date, ::Sts::IsoSts::PubDate
|
|
27
27
|
|
|
28
28
|
xml do
|
|
29
29
|
element "nat-meta"
|