sts 0.5.1 → 0.5.3
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/.gitmodules +3 -0
- data/.rubocop.yml +3 -0
- data/.rubocop_todo.yml +17 -3
- data/CLAUDE.md +72 -0
- data/Gemfile +1 -1
- data/lib/sts/content_groups/helpers.rb +27 -0
- data/lib/sts/enum_values.rb +17 -0
- data/lib/sts/iso_sts/app.rb +26 -1
- data/lib/sts/iso_sts/app_group.rb +1 -0
- data/lib/sts/iso_sts/array.rb +1 -0
- data/lib/sts/iso_sts/back.rb +1 -0
- data/lib/sts/iso_sts/body.rb +4 -0
- data/lib/sts/iso_sts/bold.rb +23 -11
- data/lib/sts/iso_sts/caption.rb +1 -0
- data/lib/sts/iso_sts/content_groups/highlight_elements.rb +285 -0
- data/lib/sts/iso_sts/def.rb +1 -0
- data/lib/sts/iso_sts/def_item.rb +1 -0
- data/lib/sts/iso_sts/def_list.rb +1 -0
- data/lib/sts/iso_sts/disp_formula.rb +5 -1
- data/lib/sts/iso_sts/document_identification.rb +1 -0
- data/lib/sts/iso_sts/fig.rb +1 -0
- data/lib/sts/iso_sts/fn.rb +1 -0
- data/lib/sts/iso_sts/fn_group.rb +1 -0
- data/lib/sts/iso_sts/front.rb +3 -0
- data/lib/sts/iso_sts/graphic.rb +5 -0
- data/lib/sts/iso_sts/inline_formula.rb +1 -1
- data/lib/sts/iso_sts/iso_meta.rb +2 -1
- data/lib/sts/iso_sts/italic.rb +23 -11
- data/lib/sts/iso_sts/list.rb +1 -0
- data/lib/sts/iso_sts/list_item.rb +7 -4
- data/lib/sts/iso_sts/mathml2/math.rb +20 -18
- data/lib/sts/iso_sts/mixed_citation.rb +34 -10
- data/lib/sts/iso_sts/nat_meta.rb +1 -0
- data/lib/sts/iso_sts/non_normative_example.rb +5 -0
- data/lib/sts/iso_sts/non_normative_note.rb +1 -0
- data/lib/sts/iso_sts/paragraph.rb +32 -20
- data/lib/sts/iso_sts/permissions.rb +1 -0
- data/lib/sts/iso_sts/preformat.rb +8 -5
- data/lib/sts/iso_sts/ref.rb +1 -0
- data/lib/sts/iso_sts/ref_list.rb +1 -0
- data/lib/sts/iso_sts/reg_meta.rb +1 -0
- data/lib/sts/iso_sts/sec.rb +10 -0
- data/lib/sts/iso_sts/standard.rb +6 -0
- data/lib/sts/iso_sts/standard_cross_reference.rb +1 -0
- data/lib/sts/iso_sts/standard_identification.rb +1 -0
- data/lib/sts/iso_sts/std.rb +4 -4
- data/lib/sts/iso_sts/styled_content.rb +17 -15
- data/lib/sts/iso_sts/table.rb +1 -0
- data/lib/sts/iso_sts/table_wrap.rb +1 -0
- data/lib/sts/iso_sts/table_wrap_foot.rb +1 -0
- data/lib/sts/iso_sts/td.rb +32 -14
- data/lib/sts/iso_sts/term.rb +1 -1
- data/lib/sts/iso_sts/term_sec.rb +1 -0
- data/lib/sts/iso_sts/th.rb +32 -14
- data/lib/sts/iso_sts/title.rb +15 -7
- data/lib/sts/iso_sts/title_wrap.rb +1 -0
- data/lib/sts/iso_sts/tr.rb +1 -0
- data/lib/sts/iso_sts.rb +2 -0
- data/lib/sts/{niso_sts/mathml.rb → mathml.rb} +1 -3
- data/lib/sts/namespaces.rb +1 -0
- data/lib/sts/niso_sts/abstract.rb +1 -0
- data/lib/sts/niso_sts/ack.rb +1 -1
- data/lib/sts/niso_sts/address.rb +1 -0
- data/lib/sts/niso_sts/adoption.rb +1 -1
- data/lib/sts/niso_sts/adoption_front.rb +1 -0
- data/lib/sts/niso_sts/alternatives.rb +1 -4
- data/lib/sts/niso_sts/annotation.rb +1 -3
- data/lib/sts/niso_sts/app.rb +14 -1
- data/lib/sts/niso_sts/app_group.rb +5 -0
- data/lib/sts/niso_sts/author_comment.rb +1 -3
- data/lib/sts/niso_sts/author_notes.rb +1 -1
- data/lib/sts/niso_sts/award_group.rb +1 -0
- data/lib/sts/niso_sts/back.rb +5 -4
- data/lib/sts/niso_sts/bio.rb +1 -3
- data/lib/sts/niso_sts/body.rb +36 -0
- data/lib/sts/niso_sts/boxed_text.rb +5 -1
- data/lib/sts/niso_sts/break.rb +11 -0
- data/lib/sts/niso_sts/caption.rb +7 -1
- data/lib/sts/niso_sts/chem_struct_wrap.rb +1 -0
- data/lib/sts/niso_sts/citation_alternatives.rb +1 -0
- data/lib/sts/niso_sts/collab.rb +8 -0
- data/lib/sts/niso_sts/conference.rb +1 -0
- data/lib/sts/niso_sts/content_groups/body_elements.rb +50 -0
- data/lib/sts/niso_sts/content_groups/citation_elements.rb +74 -0
- data/lib/sts/niso_sts/content_groups/emphasized_text.rb +67 -0
- data/lib/sts/niso_sts/content_groups/highlight_elements.rb +51 -0
- data/lib/sts/niso_sts/content_groups/inside_cell.rb +116 -0
- data/lib/sts/niso_sts/content_groups/p_elements.rb +41 -0
- data/lib/sts/niso_sts/content_groups/para_level.rb +67 -0
- data/lib/sts/niso_sts/content_groups/styled_content_elements.rb +93 -0
- data/lib/sts/niso_sts/content_groups/table_group_attributes.rb +62 -0
- data/lib/sts/niso_sts/content_groups.rb +8 -0
- data/lib/sts/niso_sts/contrib.rb +1 -0
- data/lib/sts/niso_sts/contrib_group.rb +1 -0
- data/lib/sts/niso_sts/counts.rb +1 -0
- data/lib/sts/niso_sts/custom_meta.rb +1 -0
- data/lib/sts/niso_sts/date.rb +1 -0
- data/lib/sts/niso_sts/def_item.rb +9 -0
- data/lib/sts/niso_sts/def_list.rb +6 -1
- data/lib/sts/niso_sts/disp_formula_group.rb +3 -4
- data/lib/sts/niso_sts/disp_quote.rb +1 -1
- data/lib/sts/niso_sts/display_formula.rb +12 -0
- data/lib/sts/niso_sts/document_identification.rb +1 -0
- data/lib/sts/niso_sts/editing_instruction.rb +1 -3
- data/lib/sts/niso_sts/element_citation.rb +1 -1
- data/lib/sts/niso_sts/ext_link.rb +16 -2
- data/lib/sts/niso_sts/fig_group.rb +1 -0
- data/lib/sts/niso_sts/figure.rb +14 -1
- data/lib/sts/niso_sts/floats_group.rb +1 -4
- data/lib/sts/niso_sts/fn.rb +2 -1
- data/lib/sts/niso_sts/front.rb +1 -0
- data/lib/sts/niso_sts/funding_group.rb +1 -0
- data/lib/sts/niso_sts/glossary.rb +1 -1
- data/lib/sts/niso_sts/graphic.rb +2 -0
- data/lib/sts/niso_sts/ics.rb +2 -0
- data/lib/sts/niso_sts/index_term.rb +1 -0
- data/lib/sts/niso_sts/inline_formula.rb +11 -0
- data/lib/sts/niso_sts/institution_wrap.rb +1 -0
- data/lib/sts/niso_sts/kwd_group.rb +1 -0
- data/lib/sts/niso_sts/label.rb +3 -2
- data/lib/sts/niso_sts/list.rb +7 -2
- data/lib/sts/niso_sts/list_item.rb +7 -2
- data/lib/sts/niso_sts/media.rb +1 -0
- data/lib/sts/niso_sts/meta_note.rb +1 -1
- data/lib/sts/niso_sts/metadata_iso.rb +1 -1
- data/lib/sts/niso_sts/metadata_std.rb +16 -6
- data/lib/sts/niso_sts/milestone_end.rb +1 -3
- data/lib/sts/niso_sts/milestone_start.rb +1 -3
- data/lib/sts/niso_sts/mixed_citation.rb +22 -0
- data/lib/sts/niso_sts/monospace.rb +9 -0
- data/lib/sts/niso_sts/name.rb +1 -0
- data/lib/sts/niso_sts/nat_meta.rb +1 -0
- data/lib/sts/niso_sts/nested_kwd.rb +1 -0
- data/lib/sts/niso_sts/nlm_citation.rb +1 -1
- data/lib/sts/niso_sts/non_normative_example.rb +15 -2
- data/lib/sts/niso_sts/non_normative_note.rb +12 -2
- data/lib/sts/niso_sts/normative_example.rb +1 -1
- data/lib/sts/niso_sts/normative_note.rb +1 -1
- data/lib/sts/niso_sts/note.rb +1 -1
- data/lib/sts/niso_sts/notes.rb +1 -1
- data/lib/sts/niso_sts/notes_group.rb +1 -0
- data/lib/sts/niso_sts/open_access.rb +1 -4
- data/lib/sts/niso_sts/paragraph.rb +37 -7
- data/lib/sts/niso_sts/permissions.rb +1 -0
- data/lib/sts/niso_sts/preformat.rb +15 -0
- data/lib/sts/niso_sts/private_char.rb +1 -3
- data/lib/sts/niso_sts/pub_date.rb +2 -0
- data/lib/sts/niso_sts/publisher.rb +1 -0
- data/lib/sts/niso_sts/reference.rb +1 -0
- data/lib/sts/niso_sts/reference_list.rb +6 -1
- data/lib/sts/niso_sts/reference_standard.rb +2 -0
- data/lib/sts/niso_sts/reg_meta.rb +1 -0
- data/lib/sts/niso_sts/release_date.rb +9 -6
- data/lib/sts/niso_sts/ruby.rb +1 -0
- data/lib/sts/niso_sts/section.rb +39 -4
- data/lib/sts/niso_sts/speech.rb +1 -1
- data/lib/sts/niso_sts/standard.rb +3 -0
- data/lib/sts/niso_sts/standard_identification.rb +1 -1
- data/lib/sts/niso_sts/statement.rb +1 -1
- data/lib/sts/niso_sts/std_doc_meta.rb +1 -0
- data/lib/sts/niso_sts/std_org.rb +1 -0
- data/lib/sts/niso_sts/styled_content.rb +37 -0
- data/lib/sts/niso_sts/sub.rb +11 -0
- data/lib/sts/niso_sts/subj_group.rb +1 -0
- data/lib/sts/niso_sts/sup.rb +13 -0
- data/lib/sts/niso_sts/supplementary_material.rb +1 -0
- data/lib/sts/niso_sts/term_display.rb +1 -0
- data/lib/sts/niso_sts/term_section.rb +3 -3
- data/lib/sts/niso_sts/title.rb +20 -0
- data/lib/sts/niso_sts/trans_abstract.rb +1 -0
- data/lib/sts/niso_sts/underline.rb +5 -0
- data/lib/sts/niso_sts/uri.rb +2 -0
- data/lib/sts/niso_sts/verse_group.rb +1 -1
- data/lib/sts/niso_sts/volume_issue_group.rb +1 -4
- data/lib/sts/tbx_iso_tml/bold.rb +28 -2
- data/lib/sts/tbx_iso_tml/col.rb +10 -0
- data/lib/sts/tbx_iso_tml/definition.rb +16 -2
- data/lib/sts/tbx_iso_tml/example.rb +9 -1
- data/lib/sts/tbx_iso_tml/fn.rb +3 -2
- data/lib/sts/tbx_iso_tml/italic.rb +25 -2
- data/lib/sts/tbx_iso_tml/msup.rb +2 -1
- data/lib/sts/tbx_iso_tml/note.rb +11 -7
- data/lib/sts/tbx_iso_tml/source.rb +4 -0
- data/lib/sts/tbx_iso_tml/table.rb +1 -0
- data/lib/sts/tbx_iso_tml/table_wrap.rb +3 -0
- data/lib/sts/tbx_iso_tml/table_wrap_foot.rb +1 -0
- data/lib/sts/tbx_iso_tml/tbody.rb +9 -1
- data/lib/sts/tbx_iso_tml/td.rb +22 -8
- data/lib/sts/tbx_iso_tml/term.rb +9 -5
- data/lib/sts/tbx_iso_tml/tfoot.rb +5 -1
- data/lib/sts/tbx_iso_tml/th.rb +27 -6
- data/lib/sts/tbx_iso_tml/thead.rb +9 -1
- data/lib/sts/tbx_iso_tml/tr.rb +16 -0
- data/lib/sts/version.rb +1 -1
- data/lib/sts.rb +10 -0
- metadata +19 -3
data/lib/sts/iso_sts/td.rb
CHANGED
|
@@ -18,20 +18,30 @@ module Sts
|
|
|
18
18
|
attribute :valign, :string
|
|
19
19
|
attribute :content, :string, collection: true
|
|
20
20
|
attribute :paragraph, ::Sts::IsoSts::Paragraph, collection: true
|
|
21
|
-
attribute :fig, ::Sts::IsoSts::Fig
|
|
22
|
-
attribute :graphic, ::Sts::IsoSts::Graphic
|
|
23
|
-
attribute :disp_formula, ::Sts::IsoSts::DispFormula
|
|
24
|
-
attribute :list, ::Sts::IsoSts::List
|
|
25
|
-
attribute :def_list, ::Sts::IsoSts::DefList
|
|
26
|
-
attribute :math, ::
|
|
27
|
-
attribute :std, ::Sts::IsoSts::Std
|
|
28
|
-
attribute :fn, ::Sts::TbxIsoTml::Fn
|
|
29
|
-
attribute :xref, ::Sts::TbxIsoTml::Xref
|
|
30
|
-
attribute :bold, ::Sts::IsoSts::Bold
|
|
31
|
-
attribute :italic, ::Sts::IsoSts::Italic
|
|
32
|
-
attribute :non_normative_note, ::Sts::IsoSts::NonNormativeNote
|
|
33
|
-
|
|
34
|
-
attribute :
|
|
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 :list, ::Sts::IsoSts::List, collection: true
|
|
25
|
+
attribute :def_list, ::Sts::IsoSts::DefList, collection: true
|
|
26
|
+
attribute :math, Mml::V3::Math, collection: true
|
|
27
|
+
attribute :std, ::Sts::IsoSts::Std, collection: true
|
|
28
|
+
attribute :fn, ::Sts::TbxIsoTml::Fn, collection: true
|
|
29
|
+
attribute :xref, ::Sts::TbxIsoTml::Xref, collection: true
|
|
30
|
+
attribute :bold, ::Sts::IsoSts::Bold, collection: true
|
|
31
|
+
attribute :italic, ::Sts::IsoSts::Italic, collection: true
|
|
32
|
+
attribute :non_normative_note, ::Sts::IsoSts::NonNormativeNote,
|
|
33
|
+
collection: true
|
|
34
|
+
attribute :non_normative_example, ::Sts::IsoSts::NonNormativeExample,
|
|
35
|
+
collection: true
|
|
36
|
+
attribute :styled_content, ::Sts::IsoSts::StyledContent, collection: true
|
|
37
|
+
attribute :brk, ::Sts::IsoSts::Break, collection: true
|
|
38
|
+
attribute :underline, ::Sts::NisoSts::Underline, collection: true
|
|
39
|
+
attribute :sub, ::Sts::NisoSts::Sub, collection: true
|
|
40
|
+
attribute :sup, ::Sts::NisoSts::Sup, collection: true
|
|
41
|
+
attribute :ext_link, ::Sts::NisoSts::ExtLink, collection: true
|
|
42
|
+
attribute :monospace, ::Sts::NisoSts::Monospace, collection: true
|
|
43
|
+
attribute :sc, ::Sts::NisoSts::Sc, collection: true
|
|
44
|
+
attribute :strike, ::Sts::NisoSts::Strike, collection: true
|
|
35
45
|
|
|
36
46
|
xml do # rubocop:disable Metrics/BlockLength
|
|
37
47
|
element "td"
|
|
@@ -68,6 +78,14 @@ module Sts
|
|
|
68
78
|
map_element "non-normative-note", to: :non_normative_note
|
|
69
79
|
map_element "non-normative-example", to: :non_normative_example
|
|
70
80
|
map_element "styled-content", to: :styled_content
|
|
81
|
+
map_element "break", to: :brk
|
|
82
|
+
map_element "underline", to: :underline
|
|
83
|
+
map_element "sub", to: :sub
|
|
84
|
+
map_element "sup", to: :sup
|
|
85
|
+
map_element "ext-link", to: :ext_link
|
|
86
|
+
map_element "monospace", to: :monospace
|
|
87
|
+
map_element "sc", to: :sc
|
|
88
|
+
map_element "strike", to: :strike
|
|
71
89
|
end
|
|
72
90
|
end
|
|
73
91
|
end
|
data/lib/sts/iso_sts/term.rb
CHANGED
|
@@ -17,7 +17,7 @@ module Sts
|
|
|
17
17
|
attribute :uri, ::Sts::NisoSts::Uri
|
|
18
18
|
attribute :named_content, ::Sts::NisoSts::NamedContent
|
|
19
19
|
attribute :styled_content, ::Sts::IsoSts::StyledContent
|
|
20
|
-
attribute :math, ::
|
|
20
|
+
attribute :math, Mml::V3::Math
|
|
21
21
|
|
|
22
22
|
xml do
|
|
23
23
|
element "term"
|
data/lib/sts/iso_sts/term_sec.rb
CHANGED
data/lib/sts/iso_sts/th.rb
CHANGED
|
@@ -18,20 +18,30 @@ module Sts
|
|
|
18
18
|
attribute :valign, :string
|
|
19
19
|
attribute :content, :string, collection: true
|
|
20
20
|
attribute :paragraph, ::Sts::IsoSts::Paragraph, collection: true
|
|
21
|
-
attribute :fig, ::Sts::IsoSts::Fig
|
|
22
|
-
attribute :graphic, ::Sts::IsoSts::Graphic
|
|
23
|
-
attribute :disp_formula, ::Sts::IsoSts::DispFormula
|
|
24
|
-
attribute :list, ::Sts::IsoSts::List
|
|
25
|
-
attribute :def_list, ::Sts::IsoSts::DefList
|
|
26
|
-
attribute :math, ::
|
|
27
|
-
attribute :std, ::Sts::IsoSts::Std
|
|
28
|
-
attribute :fn, ::Sts::TbxIsoTml::Fn
|
|
29
|
-
attribute :xref, ::Sts::TbxIsoTml::Xref
|
|
30
|
-
attribute :bold, ::Sts::IsoSts::Bold
|
|
31
|
-
attribute :italic, ::Sts::IsoSts::Italic
|
|
32
|
-
attribute :non_normative_note, ::Sts::IsoSts::NonNormativeNote
|
|
33
|
-
|
|
34
|
-
attribute :
|
|
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 :list, ::Sts::IsoSts::List, collection: true
|
|
25
|
+
attribute :def_list, ::Sts::IsoSts::DefList, collection: true
|
|
26
|
+
attribute :math, Mml::V3::Math, collection: true
|
|
27
|
+
attribute :std, ::Sts::IsoSts::Std, collection: true
|
|
28
|
+
attribute :fn, ::Sts::TbxIsoTml::Fn, collection: true
|
|
29
|
+
attribute :xref, ::Sts::TbxIsoTml::Xref, collection: true
|
|
30
|
+
attribute :bold, ::Sts::IsoSts::Bold, collection: true
|
|
31
|
+
attribute :italic, ::Sts::IsoSts::Italic, collection: true
|
|
32
|
+
attribute :non_normative_note, ::Sts::IsoSts::NonNormativeNote,
|
|
33
|
+
collection: true
|
|
34
|
+
attribute :non_normative_example, ::Sts::IsoSts::NonNormativeExample,
|
|
35
|
+
collection: true
|
|
36
|
+
attribute :styled_content, ::Sts::IsoSts::StyledContent, collection: true
|
|
37
|
+
attribute :brk, ::Sts::IsoSts::Break, collection: true
|
|
38
|
+
attribute :underline, ::Sts::NisoSts::Underline, collection: true
|
|
39
|
+
attribute :sub, ::Sts::NisoSts::Sub, collection: true
|
|
40
|
+
attribute :sup, ::Sts::NisoSts::Sup, collection: true
|
|
41
|
+
attribute :ext_link, ::Sts::NisoSts::ExtLink, collection: true
|
|
42
|
+
attribute :monospace, ::Sts::NisoSts::Monospace, collection: true
|
|
43
|
+
attribute :sc, ::Sts::NisoSts::Sc, collection: true
|
|
44
|
+
attribute :strike, ::Sts::NisoSts::Strike, collection: true
|
|
35
45
|
|
|
36
46
|
xml do # rubocop:disable Metrics/BlockLength
|
|
37
47
|
element "th"
|
|
@@ -68,6 +78,14 @@ module Sts
|
|
|
68
78
|
map_element "non-normative-note", to: :non_normative_note
|
|
69
79
|
map_element "non-normative-example", to: :non_normative_example
|
|
70
80
|
map_element "styled-content", to: :styled_content
|
|
81
|
+
map_element "break", to: :brk
|
|
82
|
+
map_element "underline", to: :underline
|
|
83
|
+
map_element "sub", to: :sub
|
|
84
|
+
map_element "sup", to: :sup
|
|
85
|
+
map_element "ext-link", to: :ext_link
|
|
86
|
+
map_element "monospace", to: :monospace
|
|
87
|
+
map_element "sc", to: :sc
|
|
88
|
+
map_element "strike", to: :strike
|
|
71
89
|
end
|
|
72
90
|
end
|
|
73
91
|
end
|
data/lib/sts/iso_sts/title.rb
CHANGED
|
@@ -4,13 +4,17 @@ module Sts
|
|
|
4
4
|
module IsoSts
|
|
5
5
|
class Title < Lutaml::Model::Serializable
|
|
6
6
|
attribute :content, :string, collection: true
|
|
7
|
-
attribute :bold, ::Sts::IsoSts::Bold
|
|
8
|
-
attribute :italic, ::Sts::IsoSts::Italic
|
|
9
|
-
attribute :sub, ::Sts::NisoSts::Sub
|
|
10
|
-
attribute :sup, ::Sts::NisoSts::Sup
|
|
11
|
-
attribute :xref, ::Sts::TbxIsoTml::Xref
|
|
12
|
-
attribute :break, ::Sts::IsoSts::Break
|
|
13
|
-
attribute :styled_content, ::Sts::IsoSts::StyledContent
|
|
7
|
+
attribute :bold, ::Sts::IsoSts::Bold, collection: true
|
|
8
|
+
attribute :italic, ::Sts::IsoSts::Italic, collection: true
|
|
9
|
+
attribute :sub, ::Sts::NisoSts::Sub, collection: true
|
|
10
|
+
attribute :sup, ::Sts::NisoSts::Sup, collection: true
|
|
11
|
+
attribute :xref, ::Sts::TbxIsoTml::Xref, collection: true
|
|
12
|
+
attribute :break, ::Sts::IsoSts::Break, collection: true
|
|
13
|
+
attribute :styled_content, ::Sts::IsoSts::StyledContent, collection: true
|
|
14
|
+
attribute :monospace, ::Sts::NisoSts::Monospace, collection: true
|
|
15
|
+
attribute :sc, ::Sts::NisoSts::Sc, collection: true
|
|
16
|
+
attribute :inline_formula, ::Sts::IsoSts::InlineFormula, collection: true
|
|
17
|
+
attribute :std, ::Sts::IsoSts::Std, collection: true
|
|
14
18
|
|
|
15
19
|
xml do
|
|
16
20
|
element "title"
|
|
@@ -24,6 +28,10 @@ module Sts
|
|
|
24
28
|
map_element "xref", to: :xref
|
|
25
29
|
map_element "break", to: :break
|
|
26
30
|
map_element "styled-content", to: :styled_content
|
|
31
|
+
map_element "monospace", to: :monospace
|
|
32
|
+
map_element "sc", to: :sc
|
|
33
|
+
map_element "inline-formula", to: :inline_formula
|
|
34
|
+
map_element "std", to: :std
|
|
27
35
|
end
|
|
28
36
|
end
|
|
29
37
|
end
|
data/lib/sts/iso_sts/tr.rb
CHANGED
data/lib/sts/iso_sts.rb
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
|
+
require "mml"
|
|
4
5
|
|
|
5
6
|
module Sts
|
|
6
7
|
module Mathml
|
|
7
8
|
class Math < Lutaml::Model::Serializable
|
|
8
|
-
# Delegate to Mml::V3::Math for actual MathML handling
|
|
9
9
|
attribute :id, :string
|
|
10
10
|
attribute :display, :string
|
|
11
11
|
attribute :math, Mml::V3::Math
|
|
@@ -38,7 +38,6 @@ module Sts
|
|
|
38
38
|
math.display = value if math
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
# Forward missing methods to the underlying math object
|
|
42
41
|
def method_missing(method_name, *args, &block)
|
|
43
42
|
if math.respond_to?(method_name)
|
|
44
43
|
math.send(method_name, *args, &block)
|
|
@@ -56,7 +55,6 @@ module Sts
|
|
|
56
55
|
end
|
|
57
56
|
|
|
58
57
|
def self.from_xml(input)
|
|
59
|
-
# Parse the inner math element and wrap it
|
|
60
58
|
parsed = Mml::V3::Math.from_xml(input)
|
|
61
59
|
math = new
|
|
62
60
|
math.instance_variable_set(:@math, parsed)
|
data/lib/sts/namespaces.rb
CHANGED
data/lib/sts/niso_sts/ack.rb
CHANGED
data/lib/sts/niso_sts/address.rb
CHANGED
|
@@ -8,17 +8,15 @@ module Sts
|
|
|
8
8
|
attribute :xml_lang, :string
|
|
9
9
|
attribute :specific_use, :string
|
|
10
10
|
attribute :symbol, :string
|
|
11
|
-
attribute :content, :string, collection: true
|
|
12
11
|
xml do
|
|
13
12
|
element "annotation"
|
|
14
|
-
|
|
13
|
+
ordered
|
|
15
14
|
|
|
16
15
|
map_attribute "id", to: :id
|
|
17
16
|
map_attribute "content-type", to: :content_type
|
|
18
17
|
map_attribute "xml:lang", to: :xml_lang
|
|
19
18
|
map_attribute "specific-use", to: :specific_use
|
|
20
19
|
map_attribute "symbol", to: :symbol
|
|
21
|
-
map_content to: :content
|
|
22
20
|
end
|
|
23
21
|
end
|
|
24
22
|
end
|
data/lib/sts/niso_sts/app.rb
CHANGED
|
@@ -14,11 +14,18 @@ module Sts
|
|
|
14
14
|
attribute :ref_list, ::Sts::NisoSts::ReferenceList, collection: true
|
|
15
15
|
attribute :non_normative_note, ::Sts::NisoSts::NonNormativeNote,
|
|
16
16
|
collection: true
|
|
17
|
+
attribute :non_normative_example, ::Sts::NisoSts::NonNormativeExample,
|
|
18
|
+
collection: true
|
|
17
19
|
attribute :table_wrap, ::Sts::TbxIsoTml::TableWrap, collection: true
|
|
20
|
+
attribute :list, ::Sts::NisoSts::List, collection: true
|
|
21
|
+
attribute :array, ::Sts::NisoSts::SectionArray, collection: true
|
|
22
|
+
attribute :preformat, ::Sts::NisoSts::Preformat, collection: true
|
|
23
|
+
attribute :boxed_text, ::Sts::NisoSts::BoxedText, collection: true
|
|
24
|
+
attribute :graphic, ::Sts::NisoSts::Graphic, collection: true
|
|
18
25
|
|
|
19
26
|
xml do
|
|
20
27
|
element "app"
|
|
21
|
-
|
|
28
|
+
ordered
|
|
22
29
|
|
|
23
30
|
map_attribute "id", to: :id
|
|
24
31
|
map_attribute "content-type", to: :content_type
|
|
@@ -31,7 +38,13 @@ module Sts
|
|
|
31
38
|
map_element "p", to: :paragraph
|
|
32
39
|
map_element "ref-list", to: :ref_list
|
|
33
40
|
map_element "non-normative-note", to: :non_normative_note
|
|
41
|
+
map_element "non-normative-example", to: :non_normative_example
|
|
34
42
|
map_element "table-wrap", to: :table_wrap
|
|
43
|
+
map_element "list", to: :list
|
|
44
|
+
map_element "array", to: :array
|
|
45
|
+
map_element "preformat", to: :preformat
|
|
46
|
+
map_element "boxed-text", to: :boxed_text
|
|
47
|
+
map_element "graphic", to: :graphic
|
|
35
48
|
end
|
|
36
49
|
end
|
|
37
50
|
end
|
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
module Sts
|
|
4
4
|
module NisoSts
|
|
5
5
|
class AppGroup < Lutaml::Model::Serializable
|
|
6
|
+
attribute :id, :string
|
|
7
|
+
attribute :content_type, :string
|
|
6
8
|
attribute :app, Sts::NisoSts::App, collection: true
|
|
7
9
|
|
|
8
10
|
xml do
|
|
9
11
|
element "app-group"
|
|
12
|
+
ordered
|
|
10
13
|
|
|
14
|
+
map_attribute "id", to: :id
|
|
15
|
+
map_attribute "content-type", to: :content_type
|
|
11
16
|
map_element "app", to: :app
|
|
12
17
|
end
|
|
13
18
|
end
|
|
@@ -7,16 +7,14 @@ module Sts
|
|
|
7
7
|
attribute :content_type, :string
|
|
8
8
|
attribute :specific_use, :string
|
|
9
9
|
attribute :xml_lang, :string
|
|
10
|
-
attribute :content, :string, collection: true
|
|
11
10
|
xml do
|
|
12
11
|
element "author-comment"
|
|
13
|
-
|
|
12
|
+
ordered
|
|
14
13
|
|
|
15
14
|
map_attribute "id", to: :id
|
|
16
15
|
map_attribute "content-type", to: :content_type
|
|
17
16
|
map_attribute "specific-use", to: :specific_use
|
|
18
17
|
map_attribute "xml:lang", to: :xml_lang
|
|
19
|
-
map_content to: :content
|
|
20
18
|
end
|
|
21
19
|
end
|
|
22
20
|
end
|
data/lib/sts/niso_sts/back.rb
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
module Sts
|
|
4
4
|
module NisoSts
|
|
5
5
|
class Back < Lutaml::Model::Serializable
|
|
6
|
-
attribute :ref_list, ::Sts::NisoSts::ReferenceList
|
|
7
|
-
attribute :app_group, ::Sts::NisoSts::AppGroup
|
|
8
|
-
attribute :sec, ::Sts::NisoSts::Section
|
|
9
|
-
attribute :fn_group, ::Sts::NisoSts::FnGroup
|
|
6
|
+
attribute :ref_list, ::Sts::NisoSts::ReferenceList, collection: true
|
|
7
|
+
attribute :app_group, ::Sts::NisoSts::AppGroup, collection: true
|
|
8
|
+
attribute :sec, ::Sts::NisoSts::Section, collection: true
|
|
9
|
+
attribute :fn_group, ::Sts::NisoSts::FnGroup, collection: true
|
|
10
10
|
|
|
11
11
|
xml do
|
|
12
12
|
element "back"
|
|
13
|
+
ordered
|
|
13
14
|
|
|
14
15
|
map_element "ref-list", to: :ref_list
|
|
15
16
|
map_element "app-group", to: :app_group
|
data/lib/sts/niso_sts/bio.rb
CHANGED
|
@@ -4,17 +4,15 @@ module Sts
|
|
|
4
4
|
module NisoSts
|
|
5
5
|
class Bio < Lutaml::Model::Serializable
|
|
6
6
|
attribute :id, :string
|
|
7
|
-
attribute :content, :string, collection: true
|
|
8
7
|
attribute :bold, ::Sts::TbxIsoTml::Bold, collection: true
|
|
9
8
|
attribute :italic, ::Sts::TbxIsoTml::Italic, collection: true
|
|
10
9
|
attribute :paragraph, ::Sts::NisoSts::Paragraph, collection: true
|
|
11
10
|
|
|
12
11
|
xml do
|
|
13
12
|
element "bio"
|
|
14
|
-
|
|
13
|
+
ordered
|
|
15
14
|
|
|
16
15
|
map_attribute "id", to: :id
|
|
17
|
-
map_content to: :content
|
|
18
16
|
map_element "bold", to: :bold
|
|
19
17
|
map_element "italic", to: :italic
|
|
20
18
|
map_element "p", to: :paragraph
|
data/lib/sts/niso_sts/body.rb
CHANGED
|
@@ -4,10 +4,46 @@ module Sts
|
|
|
4
4
|
module NisoSts
|
|
5
5
|
class Body < Lutaml::Model::Serializable
|
|
6
6
|
attribute :sec, ::Sts::NisoSts::Section, collection: true
|
|
7
|
+
attribute :term_sec, ::Sts::NisoSts::TermSection, collection: true
|
|
8
|
+
attribute :paragraph, ::Sts::NisoSts::Paragraph, collection: true
|
|
9
|
+
attribute :list, ::Sts::NisoSts::List, collection: true
|
|
10
|
+
attribute :def_list, ::Sts::NisoSts::DefList, collection: true
|
|
11
|
+
attribute :table_wrap, ::Sts::TbxIsoTml::TableWrap, collection: true
|
|
12
|
+
attribute :fig, ::Sts::NisoSts::Figure, collection: true
|
|
13
|
+
attribute :non_normative_note, ::Sts::NisoSts::NonNormativeNote,
|
|
14
|
+
collection: true
|
|
15
|
+
attribute :non_normative_example, ::Sts::NisoSts::NonNormativeExample,
|
|
16
|
+
collection: true
|
|
17
|
+
attribute :preformat, ::Sts::NisoSts::Preformat, collection: true
|
|
18
|
+
attribute :styled_content, ::Sts::NisoSts::StyledContent, collection: true
|
|
19
|
+
attribute :array, ::Sts::NisoSts::SectionArray, collection: true
|
|
20
|
+
attribute :disp_formula, ::Sts::NisoSts::DisplayFormula, collection: true
|
|
21
|
+
attribute :disp_formula_group, ::Sts::NisoSts::DispFormulaGroup,
|
|
22
|
+
collection: true
|
|
23
|
+
attribute :editing_instruction, ::Sts::NisoSts::EditingInstruction,
|
|
24
|
+
collection: true
|
|
25
|
+
attribute :disp_quote, ::Sts::NisoSts::DispQuote, collection: true
|
|
7
26
|
|
|
8
27
|
xml do
|
|
9
28
|
element "body"
|
|
29
|
+
ordered
|
|
30
|
+
|
|
10
31
|
map_element "sec", to: :sec
|
|
32
|
+
map_element "term-sec", to: :term_sec
|
|
33
|
+
map_element "p", to: :paragraph
|
|
34
|
+
map_element "list", to: :list
|
|
35
|
+
map_element "def-list", to: :def_list
|
|
36
|
+
map_element "table-wrap", to: :table_wrap
|
|
37
|
+
map_element "fig", to: :fig
|
|
38
|
+
map_element "non-normative-note", to: :non_normative_note
|
|
39
|
+
map_element "non-normative-example", to: :non_normative_example
|
|
40
|
+
map_element "preformat", to: :preformat
|
|
41
|
+
map_element "styled-content", to: :styled_content
|
|
42
|
+
map_element "array", to: :array
|
|
43
|
+
map_element "disp-formula", to: :disp_formula
|
|
44
|
+
map_element "disp-formula-group", to: :disp_formula_group
|
|
45
|
+
map_element "editing-instruction", to: :editing_instruction
|
|
46
|
+
map_element "disp-quote", to: :disp_quote
|
|
11
47
|
end
|
|
12
48
|
end
|
|
13
49
|
end
|
|
@@ -11,10 +11,12 @@ module Sts
|
|
|
11
11
|
attribute :caption, ::Sts::NisoSts::Caption
|
|
12
12
|
attribute :label, ::Sts::NisoSts::Label
|
|
13
13
|
attribute :paragraphs, ::Sts::NisoSts::Paragraph, collection: true
|
|
14
|
+
attribute :preformat, ::Sts::NisoSts::Preformat, collection: true
|
|
15
|
+
attribute :list, ::Sts::NisoSts::List, collection: true
|
|
14
16
|
|
|
15
17
|
xml do
|
|
16
18
|
element "boxed-text"
|
|
17
|
-
|
|
19
|
+
ordered
|
|
18
20
|
|
|
19
21
|
map_attribute "id", to: :id
|
|
20
22
|
map_attribute "content-type", to: :content_type
|
|
@@ -25,6 +27,8 @@ module Sts
|
|
|
25
27
|
map_element "caption", to: :caption
|
|
26
28
|
map_element "label", to: :label
|
|
27
29
|
map_element "p", to: :paragraphs
|
|
30
|
+
map_element "preformat", to: :preformat
|
|
31
|
+
map_element "list", to: :list
|
|
28
32
|
end
|
|
29
33
|
end
|
|
30
34
|
end
|
data/lib/sts/niso_sts/caption.rb
CHANGED
|
@@ -29,14 +29,20 @@ module Sts
|
|
|
29
29
|
attribute :paragraphs, ::Sts::NisoSts::Paragraph, collection: true
|
|
30
30
|
attribute :non_normative_note, ::Sts::NisoSts::NonNormativeNote,
|
|
31
31
|
collection: true
|
|
32
|
+
attribute :label, ::Sts::NisoSts::Label
|
|
33
|
+
attribute :list, ::Sts::NisoSts::List, collection: true
|
|
34
|
+
attribute :def_list, ::Sts::NisoSts::DefList, collection: true
|
|
32
35
|
|
|
33
36
|
xml do
|
|
34
37
|
element "caption"
|
|
35
|
-
|
|
38
|
+
ordered
|
|
36
39
|
|
|
37
40
|
map_element "p", to: :paragraphs
|
|
38
41
|
map_element "non-normative-note", to: :non_normative_note
|
|
39
42
|
map_element "title", to: :title
|
|
43
|
+
map_element "label", to: :label
|
|
44
|
+
map_element "list", to: :list
|
|
45
|
+
map_element "def-list", to: :def_list
|
|
40
46
|
end
|
|
41
47
|
end
|
|
42
48
|
end
|
data/lib/sts/niso_sts/collab.rb
CHANGED
|
@@ -10,6 +10,10 @@ module Sts
|
|
|
10
10
|
attribute :id, :string
|
|
11
11
|
attribute :collab_alternatives, ::Sts::NisoSts::CollabAlternatives
|
|
12
12
|
attribute :on_behalf_of, :string
|
|
13
|
+
attribute :sc, ::Sts::NisoSts::Sc, collection: true
|
|
14
|
+
attribute :bold, ::Sts::TbxIsoTml::Bold, collection: true
|
|
15
|
+
attribute :italic, ::Sts::TbxIsoTml::Italic, collection: true
|
|
16
|
+
attribute :underline, ::Sts::NisoSts::Underline, collection: true
|
|
13
17
|
|
|
14
18
|
xml do
|
|
15
19
|
element "collab"
|
|
@@ -21,6 +25,10 @@ module Sts
|
|
|
21
25
|
map_attribute "id", to: :id
|
|
22
26
|
map_element "collab-alternatives", to: :collab_alternatives
|
|
23
27
|
map_element "on-behalf-of", to: :on_behalf_of
|
|
28
|
+
map_element "sc", to: :sc
|
|
29
|
+
map_element "bold", to: :bold
|
|
30
|
+
map_element "italic", to: :italic
|
|
31
|
+
map_element "underline", to: :underline
|
|
24
32
|
map_content to: :content
|
|
25
33
|
end
|
|
26
34
|
end
|