sts 0.6.3 → 0.6.5
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 +9 -5
- data/TODO.sts-refactor/03-namespace-coupling.md +47 -19
- data/lib/sts/iso_sts/abbrev.rb +41 -0
- data/lib/sts/iso_sts/annotation.rb +31 -0
- data/lib/sts/iso_sts/body.rb +1 -4
- data/lib/sts/iso_sts/boxed_text.rb +69 -0
- data/lib/sts/iso_sts/country.rb +26 -0
- data/lib/sts/iso_sts/day.rb +24 -0
- data/lib/sts/iso_sts/disp_quote.rb +53 -0
- data/lib/sts/iso_sts/email.rb +37 -0
- data/lib/sts/iso_sts/etal.rb +22 -0
- data/lib/sts/iso_sts/fax.rb +22 -0
- data/lib/sts/iso_sts/front.rb +0 -2
- data/lib/sts/iso_sts/inline_graphic.rb +42 -0
- data/lib/sts/iso_sts/institution.rb +41 -0
- data/lib/sts/iso_sts/milestone_end.rb +25 -0
- data/lib/sts/iso_sts/milestone_start.rb +25 -0
- data/lib/sts/iso_sts/mixed_citation.rb +1 -1
- data/lib/sts/iso_sts/month.rb +24 -0
- data/lib/sts/iso_sts/num.rb +24 -0
- data/lib/sts/iso_sts/object_id.rb +24 -0
- data/lib/sts/iso_sts/phone.rb +22 -0
- data/lib/sts/iso_sts/publisher.rb +23 -0
- data/lib/sts/iso_sts/publisher_loc.rb +29 -0
- data/lib/sts/iso_sts/publisher_name.rb +23 -0
- data/lib/sts/iso_sts/season.rb +24 -0
- data/lib/sts/iso_sts/sec.rb +2 -5
- data/lib/sts/iso_sts.rb +25 -2
- data/lib/sts/version.rb +1 -1
- metadata +23 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b2dc3b9e743744a3b9abc12a0701c6f61fa1de79ae247779a0f479316b903d5
|
|
4
|
+
data.tar.gz: 87e8b2b99cf0c4fdbe0607169cfffd5843204f711d71b863fc213f4dac72d198
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3d627845f41f3e00cfd8f2c0448fab122eb3b46225924118f52adec2289dd86de0497a727986da0e7dbe0efabac7e061da39d0bb61f57bd1a396ae0886e7beb
|
|
7
|
+
data.tar.gz: abe325652f4622f140e7aa936ecf47695bdd4550bab690e61b29e0f0b46783f17f7c21852e7e4ff99118d54f229fd0665f93517a9652058eaf8ac346255a8d07
|
|
@@ -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→
|
|
22
|
+
| 03 | `03-namespace-coupling.md` | Architecture | IN PROGRESS (63→13 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→
|
|
169
|
+
- `03-namespace-coupling.md` — IN PROGRESS: 63→13 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,13 @@ 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
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
1. Finish `03` — the 13 remaining refs split across five recursive roots
|
|
197
|
+
(`ElementCitation`, `PersonGroup`, `Collab`, `Source`, `TermDisplay`) and
|
|
198
|
+
five child-bearing roots. `DispQuote` and `BoxedText` themselves are now
|
|
199
|
+
IsoSts classes. The first 15 high-reuse dependency leaves are modelled,
|
|
200
|
+
reducing the unresolved closures to 78–84 not-yet-modelled ISOSTS elements
|
|
201
|
+
before existing IsoSts boundaries. The remaining work still needs an
|
|
202
|
+
architecture decision for the recursive content core.
|
|
199
203
|
2. The remaining schema-conformance follow-up above — the 7 spurious attributes
|
|
200
204
|
on 5 models and the 6 classes without `@id`. (The dropped-attribute data loss
|
|
201
205
|
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 →
|
|
6
|
+
**Status**: Partially done — 63 → 13 references (GitHub issue #40)
|
|
7
7
|
|
|
8
8
|
## Problem
|
|
9
9
|
|
|
@@ -12,7 +12,8 @@ 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
|
|
15
|
+
from 63 to 16. The `IsoSts::DispQuote` / `IsoSts::BoxedText` addition then
|
|
16
|
+
reduced it from 16 to 13 (Body#disp_quote, Sec#disp_quote, Sec#boxed_text).
|
|
16
17
|
|
|
17
18
|
## Content models from ISOSTS.xsd; `@id` from the 86948b9 convention
|
|
18
19
|
|
|
@@ -40,7 +41,7 @@ Non-`@id` attribute lists must be **generated** from the XSD, never hand-read:
|
|
|
40
41
|
`version` on `tex-math` and `specific-use` on `pub-id` sit after long
|
|
41
42
|
`xs:enumeration` blocks and are invisible to a truncated read.
|
|
42
43
|
|
|
43
|
-
## Done in issue #40 —
|
|
44
|
+
## Done in issue #40 — 47 refs removed, 46 classes added
|
|
44
45
|
|
|
45
46
|
- **14 `xs:string` elements** (`originator`, `doc-type`, `doc-number`,
|
|
46
47
|
`part-number`, `version`, `suppl-type`, `suppl-number`, `suppl-version`,
|
|
@@ -56,6 +57,29 @@ Non-`@id` attribute lists must be **generated** from the XSD, never hand-read:
|
|
|
56
57
|
`Volume`, `Issue`, `Fpage`, `Lpage`, `PageRange`. 16 refs.
|
|
57
58
|
- **`WiNumber` added** — ISOSTS gives `wi-number` an `@id`; it was typed as a
|
|
58
59
|
plain string, silently discarding that `@id`.
|
|
60
|
+
- **`Publisher` closure added** — `Publisher`, `PublisherName`, `PublisherLoc`,
|
|
61
|
+
and `Email` are modelled from ISOSTS.xsd; `PublisherLoc` reuses the existing
|
|
62
|
+
IsoSts `ExtLink` and `Uri` boundary models. All four retain the
|
|
63
|
+
project-mandated `@id` model surface. 1 ref.
|
|
64
|
+
- **15 reusable dependency leaves added** — `Abbrev`, `Annotation`, `Country`,
|
|
65
|
+
`Day`, `Etal`, `Fax`, `InlineGraphic`, `Institution`, `MilestoneEnd`,
|
|
66
|
+
`MilestoneStart`, `Month`, `Num`, `ObjectId`, `Phone`, and `Season` are
|
|
67
|
+
modelled from ISOSTS.xsd and close entirely on existing IsoSts types. They
|
|
68
|
+
remove no direct reference yet, but establish the first shared dependency
|
|
69
|
+
layer for the remaining recursive roots.
|
|
70
|
+
- **3 Niso-only child refs deleted** — `std-meta` from `Front` and
|
|
71
|
+
`editing-instruction` from `Body` and `Sec`. Neither element exists in
|
|
72
|
+
ISOSTS.xsd, so adding IsoSts equivalents would incorrectly expand the schema.
|
|
73
|
+
- **`DispQuote` and `BoxedText` added** — modelled from ISOSTS.xsd (not copied
|
|
74
|
+
from NisoSts, which disagrees: `NisoSts::DispQuote` lacks `xml_lang` and
|
|
75
|
+
`title`; `NisoSts::BoxedText` carries `form_type`/`is_form` that ISOSTS does
|
|
76
|
+
not define). Children limited to existing IsoSts types; omitted children
|
|
77
|
+
(`attrib`, `speech`, `statement`, `verse-group`, `address`, `alternatives`,
|
|
78
|
+
`array`, `chem-struct-wrap`, `fig-group`, `media`, `supplementary-material`,
|
|
79
|
+
`table-wrap`, `table-wrap-group`, `disp-formula-group`, `mml:math`,
|
|
80
|
+
`related-article`, `related-object`, `glossary`) are tracked below.
|
|
81
|
+
`BoxedText#sts_object_id` (not `:object_id`) follows the `NisoSts::Graphic`
|
|
82
|
+
convention to avoid clashing with `Object#object_id`. 3 refs.
|
|
59
83
|
|
|
60
84
|
### Why classes and not plain `:string`
|
|
61
85
|
|
|
@@ -66,20 +90,24 @@ round-trip. For a scalar, `render_empty: :empty` recovers it; for a collection
|
|
|
66
90
|
to `[]`, destroying the information at parse time before any render option
|
|
67
91
|
applies. Content-only classes round-trip every case.
|
|
68
92
|
|
|
69
|
-
## Remaining —
|
|
70
|
-
|
|
71
|
-
**
|
|
72
|
-
`
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
**
|
|
78
|
-
`attrib` (:1082)
|
|
79
|
-
|
|
80
|
-
`
|
|
81
|
-
|
|
82
|
-
|
|
93
|
+
## Remaining — 13 refs
|
|
94
|
+
|
|
95
|
+
**5 refs to 5 recursive roots**: `ElementCitation`, `PersonGroup`, `Collab`,
|
|
96
|
+
`Source`, `TermDisplay`. Each reaches the same 78–79-element
|
|
97
|
+
mutually-recursive core before existing IsoSts boundaries (`sec` → `p` →
|
|
98
|
+
`disp-quote` → `p`). `DispQuote` and `BoxedText` themselves are now IsoSts
|
|
99
|
+
classes and no longer in this list.
|
|
100
|
+
|
|
101
|
+
**8 refs to 5 child-bearing roots**, now measured after the first dependency
|
|
102
|
+
layer: `attrib` (:1082) reaches 78 not-yet-modelled ISOSTS elements before
|
|
103
|
+
existing IsoSts boundaries, `term-head` (:4308) reaches 79, `article-title`
|
|
104
|
+
reaches 78, `license` → `license-p` (:51) reaches 84, and
|
|
105
|
+
`custom-meta-group` → `custom-meta` reaches 82. They converge on the same
|
|
106
|
+
recursive content core as the deep roots, so none is another bounded model
|
|
107
|
+
batch. `publisher` was the only exception: its four-element closure
|
|
108
|
+
(`publisher`, `publisher-name`, `publisher-loc`, `email`) is complete.
|
|
109
|
+
The Niso `Attrib` class is only 17 lines because it omits all 37 ISOSTS child
|
|
110
|
+
types; copying it would silently drop valid ISO content rather than decouple it.
|
|
83
111
|
|
|
84
112
|
## Rejected: three-tier `Sts::Base` hierarchy
|
|
85
113
|
|
|
@@ -114,8 +142,8 @@ reaches `TbxIsoTml`/MathML. Those are shared namespaces, outside this ADR.
|
|
|
114
142
|
|
|
115
143
|
## Verification
|
|
116
144
|
|
|
117
|
-
1. `grep -rho "Sts::NisoSts::" lib/sts/iso_sts/ | wc -l` → `
|
|
145
|
+
1. `grep -rho "Sts::NisoSts::" lib/sts/iso_sts/ | wc -l` → `16`
|
|
118
146
|
2. Every *non-`@id`* attribute on an IsoSts model traces to a line in
|
|
119
147
|
`ISOSTS.xsd`; `@id` follows the 86948b9 convention
|
|
120
|
-
3. Autoload registry 1:1 with the directory (
|
|
148
|
+
3. Autoload registry 1:1 with the directory (131/131)
|
|
121
149
|
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
|
data/lib/sts/iso_sts/body.rb
CHANGED
|
@@ -22,9 +22,7 @@ module Sts
|
|
|
22
22
|
attribute :styled_content, ::Sts::IsoSts::StyledContent, collection: true
|
|
23
23
|
attribute :array, ::Sts::IsoSts::Array, collection: true
|
|
24
24
|
attribute :ref_list, ::Sts::IsoSts::RefList, collection: true
|
|
25
|
-
attribute :disp_quote, ::Sts::
|
|
26
|
-
attribute :editing_instruction, ::Sts::NisoSts::EditingInstruction,
|
|
27
|
-
collection: true
|
|
25
|
+
attribute :disp_quote, ::Sts::IsoSts::DispQuote, 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,69 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sts
|
|
4
|
+
module IsoSts
|
|
5
|
+
class BoxedText < Lutaml::Model::Serializable
|
|
6
|
+
attribute :id, :string
|
|
7
|
+
attribute :position, :string
|
|
8
|
+
attribute :orientation, :string
|
|
9
|
+
attribute :specific_use, :string
|
|
10
|
+
attribute :xml_lang, :string
|
|
11
|
+
attribute :content_type, :string
|
|
12
|
+
attribute :originator, :string
|
|
13
|
+
attribute :sts_object_id, ::Sts::IsoSts::ObjectId, collection: true
|
|
14
|
+
attribute :label, ::Sts::IsoSts::Label
|
|
15
|
+
attribute :caption, ::Sts::IsoSts::Caption
|
|
16
|
+
attribute :paragraph, ::Sts::IsoSts::Paragraph, collection: true
|
|
17
|
+
attribute :list, ::Sts::IsoSts::List, collection: true
|
|
18
|
+
attribute :def_list, ::Sts::IsoSts::DefList, collection: true
|
|
19
|
+
attribute :non_normative_note, ::Sts::IsoSts::NonNormativeNote,
|
|
20
|
+
collection: true
|
|
21
|
+
attribute :non_normative_example, ::Sts::IsoSts::NonNormativeExample,
|
|
22
|
+
collection: true
|
|
23
|
+
attribute :preformat, ::Sts::IsoSts::Preformat, collection: true
|
|
24
|
+
attribute :fig, ::Sts::IsoSts::Fig, collection: true
|
|
25
|
+
attribute :graphic, ::Sts::IsoSts::Graphic, collection: true
|
|
26
|
+
attribute :disp_formula, ::Sts::IsoSts::DispFormula, collection: true
|
|
27
|
+
attribute :disp_quote, ::Sts::IsoSts::DispQuote, collection: true
|
|
28
|
+
attribute :boxed_text, ::Sts::IsoSts::BoxedText, collection: true
|
|
29
|
+
attribute :sec, ::Sts::IsoSts::Sec, collection: true
|
|
30
|
+
attribute :term_sec, ::Sts::IsoSts::TermSec, collection: true
|
|
31
|
+
attribute :fn_group, ::Sts::IsoSts::FnGroup, collection: true
|
|
32
|
+
attribute :ref_list, ::Sts::IsoSts::RefList, collection: true
|
|
33
|
+
attribute :permissions, ::Sts::IsoSts::Permissions, collection: true
|
|
34
|
+
|
|
35
|
+
xml do # rubocop:disable Metrics/BlockLength
|
|
36
|
+
element "boxed-text"
|
|
37
|
+
ordered
|
|
38
|
+
|
|
39
|
+
map_attribute "id", to: :id
|
|
40
|
+
map_attribute "position", to: :position
|
|
41
|
+
map_attribute "orientation", to: :orientation
|
|
42
|
+
map_attribute "specific-use", to: :specific_use
|
|
43
|
+
map_attribute "xml:lang", to: :xml_lang
|
|
44
|
+
map_attribute "content-type", to: :content_type
|
|
45
|
+
map_attribute "originator", to: :originator
|
|
46
|
+
|
|
47
|
+
map_element "object-id", to: :sts_object_id
|
|
48
|
+
map_element "label", to: :label
|
|
49
|
+
map_element "caption", to: :caption
|
|
50
|
+
map_element "p", to: :paragraph
|
|
51
|
+
map_element "list", to: :list
|
|
52
|
+
map_element "def-list", to: :def_list
|
|
53
|
+
map_element "non-normative-note", to: :non_normative_note
|
|
54
|
+
map_element "non-normative-example", to: :non_normative_example
|
|
55
|
+
map_element "preformat", to: :preformat
|
|
56
|
+
map_element "fig", to: :fig
|
|
57
|
+
map_element "graphic", to: :graphic
|
|
58
|
+
map_element "disp-formula", to: :disp_formula
|
|
59
|
+
map_element "disp-quote", to: :disp_quote
|
|
60
|
+
map_element "boxed-text", to: :boxed_text
|
|
61
|
+
map_element "sec", to: :sec
|
|
62
|
+
map_element "term-sec", to: :term_sec
|
|
63
|
+
map_element "fn-group", to: :fn_group
|
|
64
|
+
map_element "ref-list", to: :ref_list
|
|
65
|
+
map_element "permissions", to: :permissions
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
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,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sts
|
|
4
|
+
module IsoSts
|
|
5
|
+
class DispQuote < Lutaml::Model::Serializable
|
|
6
|
+
attribute :id, :string
|
|
7
|
+
attribute :content_type, :string
|
|
8
|
+
attribute :specific_use, :string
|
|
9
|
+
attribute :xml_lang, :string
|
|
10
|
+
attribute :originator, :string
|
|
11
|
+
attribute :label, ::Sts::IsoSts::Label
|
|
12
|
+
attribute :title, ::Sts::IsoSts::Title
|
|
13
|
+
attribute :paragraph, ::Sts::IsoSts::Paragraph, collection: true
|
|
14
|
+
attribute :list, ::Sts::IsoSts::List, collection: true
|
|
15
|
+
attribute :def_list, ::Sts::IsoSts::DefList, collection: true
|
|
16
|
+
attribute :non_normative_note, ::Sts::IsoSts::NonNormativeNote,
|
|
17
|
+
collection: true
|
|
18
|
+
attribute :non_normative_example, ::Sts::IsoSts::NonNormativeExample,
|
|
19
|
+
collection: true
|
|
20
|
+
attribute :preformat, ::Sts::IsoSts::Preformat, collection: true
|
|
21
|
+
attribute :fig, ::Sts::IsoSts::Fig, collection: true
|
|
22
|
+
attribute :graphic, ::Sts::IsoSts::Graphic, collection: true
|
|
23
|
+
attribute :disp_formula, ::Sts::IsoSts::DispFormula, collection: true
|
|
24
|
+
attribute :disp_quote, ::Sts::IsoSts::DispQuote, collection: true
|
|
25
|
+
attribute :permissions, ::Sts::IsoSts::Permissions, collection: true
|
|
26
|
+
|
|
27
|
+
xml do
|
|
28
|
+
element "disp-quote"
|
|
29
|
+
ordered
|
|
30
|
+
|
|
31
|
+
map_attribute "id", to: :id
|
|
32
|
+
map_attribute "content-type", to: :content_type
|
|
33
|
+
map_attribute "specific-use", to: :specific_use
|
|
34
|
+
map_attribute "xml:lang", to: :xml_lang
|
|
35
|
+
map_attribute "originator", to: :originator
|
|
36
|
+
|
|
37
|
+
map_element "label", to: :label
|
|
38
|
+
map_element "title", to: :title
|
|
39
|
+
map_element "p", to: :paragraph
|
|
40
|
+
map_element "list", to: :list
|
|
41
|
+
map_element "def-list", to: :def_list
|
|
42
|
+
map_element "non-normative-note", to: :non_normative_note
|
|
43
|
+
map_element "non-normative-example", to: :non_normative_example
|
|
44
|
+
map_element "preformat", to: :preformat
|
|
45
|
+
map_element "fig", to: :fig
|
|
46
|
+
map_element "graphic", to: :graphic
|
|
47
|
+
map_element "disp-formula", to: :disp_formula
|
|
48
|
+
map_element "disp-quote", to: :disp_quote
|
|
49
|
+
map_element "permissions", to: :permissions
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
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
|
data/lib/sts/iso_sts/front.rb
CHANGED
|
@@ -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::
|
|
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
|
data/lib/sts/iso_sts/sec.rb
CHANGED
|
@@ -33,11 +33,9 @@ module Sts
|
|
|
33
33
|
attribute :uri, ::Sts::IsoSts::Uri, collection: true
|
|
34
34
|
attribute :sec, ::Sts::IsoSts::Sec, collection: true
|
|
35
35
|
attribute :term_sec, ::Sts::IsoSts::TermSec, collection: true
|
|
36
|
-
attribute :disp_quote, ::Sts::
|
|
36
|
+
attribute :disp_quote, ::Sts::IsoSts::DispQuote, collection: true
|
|
37
37
|
attribute :fn, ::Sts::IsoSts::Fn, collection: true
|
|
38
|
-
attribute :
|
|
39
|
-
collection: true
|
|
40
|
-
attribute :boxed_text, ::Sts::NisoSts::BoxedText, collection: true
|
|
38
|
+
attribute :boxed_text, ::Sts::IsoSts::BoxedText, collection: true
|
|
41
39
|
|
|
42
40
|
xml do # rubocop:disable Metrics/BlockLength
|
|
43
41
|
element "sec"
|
|
@@ -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
|
@@ -88,6 +88,8 @@ module Sts
|
|
|
88
88
|
autoload :Label, "#{__dir__}/iso_sts/label"
|
|
89
89
|
autoload :Title, "#{__dir__}/iso_sts/title"
|
|
90
90
|
autoload :Bold, "#{__dir__}/iso_sts/bold"
|
|
91
|
+
autoload :BoxedText, "#{__dir__}/iso_sts/boxed_text"
|
|
92
|
+
autoload :DispQuote, "#{__dir__}/iso_sts/disp_quote"
|
|
91
93
|
autoload :Italic, "#{__dir__}/iso_sts/italic"
|
|
92
94
|
autoload :Monospace, "#{__dir__}/iso_sts/monospace"
|
|
93
95
|
autoload :NamedContent, "#{__dir__}/iso_sts/named_content"
|
|
@@ -96,6 +98,23 @@ module Sts
|
|
|
96
98
|
autoload :Underline, "#{__dir__}/iso_sts/underline"
|
|
97
99
|
autoload :Uri, "#{__dir__}/iso_sts/uri"
|
|
98
100
|
|
|
101
|
+
# Shared model foundations
|
|
102
|
+
autoload :Abbrev, "#{__dir__}/iso_sts/abbrev"
|
|
103
|
+
autoload :Annotation, "#{__dir__}/iso_sts/annotation"
|
|
104
|
+
autoload :Country, "#{__dir__}/iso_sts/country"
|
|
105
|
+
autoload :Day, "#{__dir__}/iso_sts/day"
|
|
106
|
+
autoload :Etal, "#{__dir__}/iso_sts/etal"
|
|
107
|
+
autoload :Fax, "#{__dir__}/iso_sts/fax"
|
|
108
|
+
autoload :InlineGraphic, "#{__dir__}/iso_sts/inline_graphic"
|
|
109
|
+
autoload :Institution, "#{__dir__}/iso_sts/institution"
|
|
110
|
+
autoload :MilestoneEnd, "#{__dir__}/iso_sts/milestone_end"
|
|
111
|
+
autoload :MilestoneStart, "#{__dir__}/iso_sts/milestone_start"
|
|
112
|
+
autoload :Month, "#{__dir__}/iso_sts/month"
|
|
113
|
+
autoload :Num, "#{__dir__}/iso_sts/num"
|
|
114
|
+
autoload :ObjectId, "#{__dir__}/iso_sts/object_id"
|
|
115
|
+
autoload :Phone, "#{__dir__}/iso_sts/phone"
|
|
116
|
+
autoload :Season, "#{__dir__}/iso_sts/season"
|
|
117
|
+
|
|
99
118
|
# List elements
|
|
100
119
|
autoload :List, "#{__dir__}/iso_sts/list"
|
|
101
120
|
autoload :ListItem, "#{__dir__}/iso_sts/list_item"
|
|
@@ -124,9 +143,13 @@ module Sts
|
|
|
124
143
|
autoload :Graphic, "#{__dir__}/iso_sts/graphic"
|
|
125
144
|
|
|
126
145
|
# Reference elements
|
|
127
|
-
autoload :
|
|
128
|
-
autoload :Ref, "#{__dir__}/iso_sts/ref"
|
|
146
|
+
autoload :Email, "#{__dir__}/iso_sts/email"
|
|
129
147
|
autoload :MixedCitation, "#{__dir__}/iso_sts/mixed_citation"
|
|
148
|
+
autoload :Publisher, "#{__dir__}/iso_sts/publisher"
|
|
149
|
+
autoload :PublisherLoc, "#{__dir__}/iso_sts/publisher_loc"
|
|
150
|
+
autoload :PublisherName, "#{__dir__}/iso_sts/publisher_name"
|
|
151
|
+
autoload :Ref, "#{__dir__}/iso_sts/ref"
|
|
152
|
+
autoload :RefList, "#{__dir__}/iso_sts/ref_list"
|
|
130
153
|
|
|
131
154
|
# Back matter
|
|
132
155
|
autoload :AppGroup, "#{__dir__}/iso_sts/app_group"
|
data/lib/sts/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sts
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bigdecimal
|
|
@@ -120,14 +120,17 @@ 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
|
|
128
130
|
- lib/sts/iso_sts/back.rb
|
|
129
131
|
- lib/sts/iso_sts/body.rb
|
|
130
132
|
- lib/sts/iso_sts/bold.rb
|
|
133
|
+
- lib/sts/iso_sts/boxed_text.rb
|
|
131
134
|
- lib/sts/iso_sts/break.rb
|
|
132
135
|
- lib/sts/iso_sts/caption.rb
|
|
133
136
|
- lib/sts/iso_sts/col.rb
|
|
@@ -137,16 +140,22 @@ files:
|
|
|
137
140
|
- lib/sts/iso_sts/copyright_holder.rb
|
|
138
141
|
- lib/sts/iso_sts/copyright_statement.rb
|
|
139
142
|
- lib/sts/iso_sts/copyright_year.rb
|
|
143
|
+
- lib/sts/iso_sts/country.rb
|
|
144
|
+
- lib/sts/iso_sts/day.rb
|
|
140
145
|
- lib/sts/iso_sts/def.rb
|
|
141
146
|
- lib/sts/iso_sts/def_item.rb
|
|
142
147
|
- lib/sts/iso_sts/def_list.rb
|
|
143
148
|
- lib/sts/iso_sts/disp_formula.rb
|
|
149
|
+
- lib/sts/iso_sts/disp_quote.rb
|
|
144
150
|
- lib/sts/iso_sts/doc_number.rb
|
|
145
151
|
- lib/sts/iso_sts/doc_ref.rb
|
|
146
152
|
- lib/sts/iso_sts/doc_type.rb
|
|
147
153
|
- lib/sts/iso_sts/document_identification.rb
|
|
148
154
|
- lib/sts/iso_sts/edition.rb
|
|
155
|
+
- lib/sts/iso_sts/email.rb
|
|
156
|
+
- lib/sts/iso_sts/etal.rb
|
|
149
157
|
- lib/sts/iso_sts/ext_link.rb
|
|
158
|
+
- lib/sts/iso_sts/fax.rb
|
|
150
159
|
- lib/sts/iso_sts/fig.rb
|
|
151
160
|
- lib/sts/iso_sts/fn.rb
|
|
152
161
|
- lib/sts/iso_sts/fn_group.rb
|
|
@@ -155,6 +164,8 @@ files:
|
|
|
155
164
|
- lib/sts/iso_sts/graphic.rb
|
|
156
165
|
- lib/sts/iso_sts/ics.rb
|
|
157
166
|
- lib/sts/iso_sts/inline_formula.rb
|
|
167
|
+
- lib/sts/iso_sts/inline_graphic.rb
|
|
168
|
+
- lib/sts/iso_sts/institution.rb
|
|
158
169
|
- lib/sts/iso_sts/is_proof.rb
|
|
159
170
|
- lib/sts/iso_sts/iso_meta.rb
|
|
160
171
|
- lib/sts/iso_sts/issue.rb
|
|
@@ -168,22 +179,31 @@ files:
|
|
|
168
179
|
- lib/sts/iso_sts/mathml2.rb
|
|
169
180
|
- lib/sts/iso_sts/mathml2/math.rb
|
|
170
181
|
- lib/sts/iso_sts/meta_date.rb
|
|
182
|
+
- lib/sts/iso_sts/milestone_end.rb
|
|
183
|
+
- lib/sts/iso_sts/milestone_start.rb
|
|
171
184
|
- lib/sts/iso_sts/mixed_citation.rb
|
|
172
185
|
- lib/sts/iso_sts/monospace.rb
|
|
186
|
+
- lib/sts/iso_sts/month.rb
|
|
173
187
|
- lib/sts/iso_sts/named_content.rb
|
|
174
188
|
- lib/sts/iso_sts/nat_meta.rb
|
|
175
189
|
- lib/sts/iso_sts/non_normative_example.rb
|
|
176
190
|
- lib/sts/iso_sts/non_normative_note.rb
|
|
191
|
+
- lib/sts/iso_sts/num.rb
|
|
192
|
+
- lib/sts/iso_sts/object_id.rb
|
|
177
193
|
- lib/sts/iso_sts/originator.rb
|
|
178
194
|
- lib/sts/iso_sts/page_count.rb
|
|
179
195
|
- lib/sts/iso_sts/page_range.rb
|
|
180
196
|
- lib/sts/iso_sts/paragraph.rb
|
|
181
197
|
- lib/sts/iso_sts/part_number.rb
|
|
182
198
|
- lib/sts/iso_sts/permissions.rb
|
|
199
|
+
- lib/sts/iso_sts/phone.rb
|
|
183
200
|
- lib/sts/iso_sts/preformat.rb
|
|
184
201
|
- lib/sts/iso_sts/proj_id.rb
|
|
185
202
|
- lib/sts/iso_sts/pub_date.rb
|
|
186
203
|
- lib/sts/iso_sts/pub_id.rb
|
|
204
|
+
- lib/sts/iso_sts/publisher.rb
|
|
205
|
+
- lib/sts/iso_sts/publisher_loc.rb
|
|
206
|
+
- lib/sts/iso_sts/publisher_name.rb
|
|
187
207
|
- lib/sts/iso_sts/ref.rb
|
|
188
208
|
- lib/sts/iso_sts/ref_list.rb
|
|
189
209
|
- lib/sts/iso_sts/reg_meta.rb
|
|
@@ -192,6 +212,7 @@ files:
|
|
|
192
212
|
- lib/sts/iso_sts/release_version_id.rb
|
|
193
213
|
- lib/sts/iso_sts/sc.rb
|
|
194
214
|
- lib/sts/iso_sts/sdo.rb
|
|
215
|
+
- lib/sts/iso_sts/season.rb
|
|
195
216
|
- lib/sts/iso_sts/sec.rb
|
|
196
217
|
- lib/sts/iso_sts/secretariat.rb
|
|
197
218
|
- lib/sts/iso_sts/standard.rb
|