sts 0.6.4 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c758f04c86a04df1adb4bc66d09aac7f31477d8ce6879bb9cd8935d86a7ae616
4
- data.tar.gz: 56893d54b3e2193926f95a8a988d0a12dc73b31a85d9223e90edfe46adf80b07
3
+ metadata.gz: 3b2dc3b9e743744a3b9abc12a0701c6f61fa1de79ae247779a0f479316b903d5
4
+ data.tar.gz: 87e8b2b99cf0c4fdbe0607169cfffd5843204f711d71b863fc213f4dac72d198
5
5
  SHA512:
6
- metadata.gz: e2444f3c73074bd001445a89a5712854e112b429180b7a96feff1e01e303dfd5791a7ab6e81eb27498ba859078a8a647793a8e40276ec6e2cab2d90c9b7a4517
7
- data.tar.gz: d3b0d7c1ba7721b108ae509b5847e1a21917d4cc5507581d7581af2d71a0f742d16b316fc53a3d8c263b11816ee074a6b5a17547b9773dd3f99e472959db9069
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→16 refs) | 01, 02 |
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→16 IsoSts→NisoSts references
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,12 +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 16 remaining refs split evenly between seven recursive
197
- roots and five child-bearing roots. The first 15 high-reuse dependency
198
- leaves are now modelled, reducing the unresolved closures to 78–84
199
- not-yet-modelled ISOSTS elements before existing IsoSts boundaries. The
200
- remaining work still needs an architecture decision for the recursive
201
- content core.
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.
202
203
  2. The remaining schema-conformance follow-up above — the 7 spurious attributes
203
204
  on 5 models and the 6 classes without `@id`. (The dropped-attribute data loss
204
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 → 16 references (GitHub issue #40)
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 16.
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
 
@@ -69,6 +70,16 @@ Non-`@id` attribute lists must be **generated** from the XSD, never hand-read:
69
70
  - **3 Niso-only child refs deleted** — `std-meta` from `Front` and
70
71
  `editing-instruction` from `Body` and `Sec`. Neither element exists in
71
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.
72
83
 
73
84
  ### Why classes and not plain `:string`
74
85
 
@@ -79,12 +90,13 @@ round-trip. For a scalar, `render_empty: :empty` recovers it; for a collection
79
90
  to `[]`, destroying the information at parse time before any render option
80
91
  applies. Content-only classes round-trip every case.
81
92
 
82
- ## Remaining — 16 refs
93
+ ## Remaining — 13 refs
83
94
 
84
- **8 refs to 7 recursive roots**: `ElementCitation`, `PersonGroup`, `Collab`,
85
- `Source`, `DispQuote`, `TermDisplay`, and `BoxedText`. Each reaches the same
86
- 78–79-element mutually-recursive core before existing IsoSts boundaries
87
- (`sec` → `p` `disp-quote` `p`). No direct one-file path remains.
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.
88
100
 
89
101
  **8 refs to 5 child-bearing roots**, now measured after the first dependency
90
102
  layer: `attrib` (:1082) reaches 78 not-yet-modelled ISOSTS elements before
@@ -22,7 +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::NisoSts::DispQuote, collection: true
25
+ attribute :disp_quote, ::Sts::IsoSts::DispQuote, collection: true
26
26
 
27
27
  xml do
28
28
  element "body"
@@ -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,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
@@ -33,9 +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::NisoSts::DispQuote, collection: true
36
+ attribute :disp_quote, ::Sts::IsoSts::DispQuote, collection: true
37
37
  attribute :fn, ::Sts::IsoSts::Fn, collection: true
38
- attribute :boxed_text, ::Sts::NisoSts::BoxedText, collection: true
38
+ attribute :boxed_text, ::Sts::IsoSts::BoxedText, collection: true
39
39
 
40
40
  xml do # rubocop:disable Metrics/BlockLength
41
41
  element "sec"
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"
data/lib/sts/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sts
4
- VERSION = "0.6.4"
4
+ VERSION = "0.6.5"
5
5
  end
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
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-24 00:00:00.000000000 Z
11
+ date: 2026-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal
@@ -130,6 +130,7 @@ files:
130
130
  - lib/sts/iso_sts/back.rb
131
131
  - lib/sts/iso_sts/body.rb
132
132
  - lib/sts/iso_sts/bold.rb
133
+ - lib/sts/iso_sts/boxed_text.rb
133
134
  - lib/sts/iso_sts/break.rb
134
135
  - lib/sts/iso_sts/caption.rb
135
136
  - lib/sts/iso_sts/col.rb
@@ -145,6 +146,7 @@ files:
145
146
  - lib/sts/iso_sts/def_item.rb
146
147
  - lib/sts/iso_sts/def_list.rb
147
148
  - lib/sts/iso_sts/disp_formula.rb
149
+ - lib/sts/iso_sts/disp_quote.rb
148
150
  - lib/sts/iso_sts/doc_number.rb
149
151
  - lib/sts/iso_sts/doc_ref.rb
150
152
  - lib/sts/iso_sts/doc_type.rb