sts 0.5.2 → 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 -1
- 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 -1
- 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/niso_sts/date.rb
CHANGED
|
@@ -6,13 +6,22 @@ module Sts
|
|
|
6
6
|
attribute :specific_use, :string
|
|
7
7
|
attribute :term, ::Sts::NisoSts::Term
|
|
8
8
|
attribute :definition, ::Sts::NisoSts::Def
|
|
9
|
+
attribute :xref, ::Sts::TbxIsoTml::Xref, collection: true
|
|
10
|
+
attribute :see, ::Sts::NisoSts::See
|
|
11
|
+
attribute :see_also, ::Sts::NisoSts::SeeAlso
|
|
12
|
+
attribute :second, ::Sts::NisoSts::Term
|
|
9
13
|
|
|
10
14
|
xml do
|
|
11
15
|
element "def-item"
|
|
16
|
+
ordered
|
|
12
17
|
|
|
13
18
|
map_attribute "specific-use", to: :specific_use
|
|
14
19
|
map_element "term", to: :term, render_nil: true
|
|
15
20
|
map_element "def", to: :definition
|
|
21
|
+
map_element "xref", to: :xref
|
|
22
|
+
map_element "see", to: :see
|
|
23
|
+
map_element "see-also", to: :see_also
|
|
24
|
+
map_element "second", to: :second
|
|
16
25
|
end
|
|
17
26
|
end
|
|
18
27
|
end
|
|
@@ -3,21 +3,26 @@
|
|
|
3
3
|
module Sts
|
|
4
4
|
module NisoSts
|
|
5
5
|
class DefList < Lutaml::Model::Serializable
|
|
6
|
+
attribute :id, :string
|
|
6
7
|
attribute :title, :string
|
|
7
8
|
attribute :specific_use, :string
|
|
8
9
|
attribute :list_type, :string
|
|
9
10
|
attribute :def_item, ::Sts::NisoSts::DefItem, collection: true
|
|
10
|
-
attribute :def_list, ::Sts::NisoSts::DefList
|
|
11
|
+
attribute :def_list, ::Sts::NisoSts::DefList, collection: true
|
|
12
|
+
attribute :label, ::Sts::NisoSts::Label
|
|
11
13
|
|
|
12
14
|
xml do
|
|
13
15
|
element "def-list"
|
|
16
|
+
ordered
|
|
14
17
|
|
|
18
|
+
map_attribute "id", to: :id
|
|
15
19
|
map_attribute "list-type", to: :list_type
|
|
16
20
|
map_attribute "specific-use", to: :specific_use
|
|
17
21
|
|
|
18
22
|
map_element "title", to: :title
|
|
19
23
|
map_element "def-item", to: :def_item
|
|
20
24
|
map_element "def-list", to: :def_list
|
|
25
|
+
map_element "label", to: :label
|
|
21
26
|
end
|
|
22
27
|
end
|
|
23
28
|
end
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
3
5
|
module Sts
|
|
4
6
|
module NisoSts
|
|
5
7
|
class DispFormulaGroup < Lutaml::Model::Serializable
|
|
6
8
|
attribute :id, :string
|
|
7
9
|
attribute :content_type, :string
|
|
8
|
-
attribute :specific_use, :string
|
|
9
10
|
attribute :label, ::Sts::NisoSts::Label
|
|
10
|
-
attribute :caption, ::Sts::NisoSts::Caption
|
|
11
11
|
attribute :disp_formula, ::Sts::NisoSts::DisplayFormula, collection: true
|
|
12
12
|
|
|
13
13
|
xml do
|
|
14
14
|
element "disp-formula-group"
|
|
15
|
+
ordered
|
|
15
16
|
|
|
16
17
|
map_attribute "id", to: :id
|
|
17
18
|
map_attribute "content-type", to: :content_type
|
|
18
|
-
map_attribute "specific-use", to: :specific_use
|
|
19
19
|
|
|
20
20
|
map_element "label", to: :label
|
|
21
|
-
map_element "caption", to: :caption
|
|
22
21
|
map_element "disp-formula", to: :disp_formula
|
|
23
22
|
end
|
|
24
23
|
end
|
|
@@ -6,16 +6,28 @@ module Sts
|
|
|
6
6
|
module NisoSts
|
|
7
7
|
class DisplayFormula < Lutaml::Model::Serializable
|
|
8
8
|
attribute :id, :string
|
|
9
|
+
attribute :content_type, :string
|
|
10
|
+
attribute :specific_use, :string
|
|
9
11
|
attribute :label, ::Sts::NisoSts::Label
|
|
10
12
|
attribute :math, ::Sts::TbxIsoTml::Math
|
|
13
|
+
attribute :preformat, ::Sts::NisoSts::Preformat
|
|
14
|
+
attribute :tex_math, ::Sts::NisoSts::TexMath
|
|
15
|
+
attribute :graphic, ::Sts::NisoSts::Graphic, collection: true
|
|
16
|
+
attribute :alternatives, ::Sts::NisoSts::Alternatives
|
|
11
17
|
|
|
12
18
|
xml do
|
|
13
19
|
element "disp-formula"
|
|
14
20
|
|
|
15
21
|
map_attribute "id", to: :id
|
|
22
|
+
map_attribute "content-type", to: :content_type
|
|
23
|
+
map_attribute "specific-use", to: :specific_use
|
|
16
24
|
|
|
17
25
|
map_element "label", to: :label
|
|
18
26
|
map_element "math", to: :math
|
|
27
|
+
map_element "preformat", to: :preformat
|
|
28
|
+
map_element "tex-math", to: :tex_math
|
|
29
|
+
map_element "graphic", to: :graphic
|
|
30
|
+
map_element "alternatives", to: :alternatives
|
|
19
31
|
end
|
|
20
32
|
end
|
|
21
33
|
end
|
|
@@ -6,17 +6,15 @@ module Sts
|
|
|
6
6
|
attribute :id, :string
|
|
7
7
|
attribute :xml_lang, :string
|
|
8
8
|
attribute :specific_use, :string
|
|
9
|
-
attribute :content, :string, collection: true
|
|
10
9
|
attribute :label, ::Sts::NisoSts::Label
|
|
11
10
|
|
|
12
11
|
xml do
|
|
13
12
|
element "editing-instruction"
|
|
14
|
-
|
|
13
|
+
ordered
|
|
15
14
|
|
|
16
15
|
map_attribute "id", to: :id
|
|
17
16
|
map_attribute "xml:lang", to: :xml_lang
|
|
18
17
|
map_attribute "specific-use", to: :specific_use
|
|
19
|
-
map_content to: :content
|
|
20
18
|
map_element "label", to: :label
|
|
21
19
|
end
|
|
22
20
|
end
|
|
@@ -1,19 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Sts
|
|
4
4
|
module NisoSts
|
|
5
5
|
class ExtLink < Lutaml::Model::Serializable
|
|
6
6
|
attribute :ext_link_type, :string
|
|
7
7
|
attribute :href, :xlink_href
|
|
8
|
-
attribute :
|
|
8
|
+
attribute :xlink_type, :string
|
|
9
|
+
attribute :content, :string, collection: true
|
|
10
|
+
attribute :bold, ::Sts::TbxIsoTml::Bold, collection: true
|
|
11
|
+
attribute :italic, ::Sts::TbxIsoTml::Italic, collection: true
|
|
12
|
+
attribute :sub, ::Sts::NisoSts::Sub, collection: true
|
|
13
|
+
attribute :sup, ::Sts::NisoSts::Sup, collection: true
|
|
14
|
+
attribute :inline_formula, ::Sts::NisoSts::InlineFormula, collection: true
|
|
9
15
|
|
|
10
16
|
xml do
|
|
11
17
|
element "ext-link"
|
|
18
|
+
mixed_content
|
|
12
19
|
|
|
13
20
|
map_content to: :content
|
|
14
21
|
|
|
15
22
|
map_attribute "ext-link-type", to: :ext_link_type
|
|
16
23
|
map_attribute "href", to: :href
|
|
24
|
+
map_attribute "xlink:type", to: :xlink_type
|
|
25
|
+
|
|
26
|
+
map_element "bold", to: :bold
|
|
27
|
+
map_element "italic", to: :italic
|
|
28
|
+
map_element "sub", to: :sub
|
|
29
|
+
map_element "sup", to: :sup
|
|
30
|
+
map_element "inline-formula", to: :inline_formula
|
|
17
31
|
end
|
|
18
32
|
end
|
|
19
33
|
end
|
data/lib/sts/niso_sts/figure.rb
CHANGED
|
@@ -11,22 +11,35 @@ module Sts
|
|
|
11
11
|
class Figure < Lutaml::Model::Serializable
|
|
12
12
|
attribute :id, :string
|
|
13
13
|
attribute :orientation, :string
|
|
14
|
+
attribute :fig_type, :string
|
|
14
15
|
attribute :caption, ::Sts::NisoSts::Caption
|
|
15
16
|
attribute :def_list, ::Sts::NisoSts::DefList
|
|
16
17
|
attribute :label, ::Sts::NisoSts::Label
|
|
17
18
|
attribute :graphic, ::Sts::NisoSts::Graphic, collection: true
|
|
19
|
+
attribute :title, ::Sts::NisoSts::Title
|
|
20
|
+
attribute :paragraph, ::Sts::NisoSts::Paragraph, collection: true
|
|
21
|
+
attribute :alternatives, ::Sts::NisoSts::Alternatives
|
|
22
|
+
attribute :non_normative_note, ::Sts::NisoSts::NonNormativeNote,
|
|
23
|
+
collection: true
|
|
24
|
+
attribute :table_wrap, ::Sts::TbxIsoTml::TableWrap, collection: true
|
|
18
25
|
|
|
19
26
|
xml do
|
|
20
27
|
element "fig"
|
|
21
|
-
|
|
28
|
+
ordered
|
|
22
29
|
|
|
23
30
|
map_attribute "id", to: :id
|
|
24
31
|
map_attribute "orientation", to: :orientation
|
|
32
|
+
map_attribute "fig-type", to: :fig_type
|
|
25
33
|
|
|
26
34
|
map_element "label", to: :label
|
|
27
35
|
map_element "caption", to: :caption
|
|
28
36
|
map_element "graphic", to: :graphic
|
|
29
37
|
map_element "def-list", to: :def_list
|
|
38
|
+
map_element "title", to: :title
|
|
39
|
+
map_element "p", to: :paragraph
|
|
40
|
+
map_element "alternatives", to: :alternatives
|
|
41
|
+
map_element "non-normative-note", to: :non_normative_note
|
|
42
|
+
map_element "table-wrap", to: :table_wrap
|
|
30
43
|
end
|
|
31
44
|
end
|
|
32
45
|
end
|
data/lib/sts/niso_sts/fn.rb
CHANGED
|
@@ -5,10 +5,11 @@ module Sts
|
|
|
5
5
|
class Fn < Lutaml::Model::Serializable
|
|
6
6
|
attribute :id, :string
|
|
7
7
|
attribute :label, ::Sts::NisoSts::Label
|
|
8
|
-
attribute :paragraph, ::Sts::NisoSts::Paragraph
|
|
8
|
+
attribute :paragraph, ::Sts::NisoSts::Paragraph, collection: true
|
|
9
9
|
|
|
10
10
|
xml do
|
|
11
11
|
element "fn"
|
|
12
|
+
ordered
|
|
12
13
|
|
|
13
14
|
map_attribute "id", to: :id
|
|
14
15
|
|
data/lib/sts/niso_sts/front.rb
CHANGED
data/lib/sts/niso_sts/graphic.rb
CHANGED
|
@@ -10,12 +10,14 @@ module Sts
|
|
|
10
10
|
module NisoSts
|
|
11
11
|
class Graphic < Lutaml::Model::Serializable
|
|
12
12
|
attribute :href, :xlink_href
|
|
13
|
+
attribute :xlink_type, :string
|
|
13
14
|
attribute :sts_object_id, ::Sts::NisoSts::ObjectId, collection: true
|
|
14
15
|
|
|
15
16
|
xml do
|
|
16
17
|
element "graphic"
|
|
17
18
|
|
|
18
19
|
map_attribute "href", to: :href
|
|
20
|
+
map_attribute "xlink:type", to: :xlink_type
|
|
19
21
|
map_element "object-id", to: :sts_object_id
|
|
20
22
|
end
|
|
21
23
|
end
|
data/lib/sts/niso_sts/ics.rb
CHANGED
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
module Sts
|
|
4
4
|
module NisoSts
|
|
5
5
|
class Ics < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
6
7
|
attribute :ics_desc, ::Sts::NisoSts::IcsDesc
|
|
7
8
|
|
|
8
9
|
xml do
|
|
9
10
|
element "ics"
|
|
10
11
|
|
|
12
|
+
map_content to: :content
|
|
11
13
|
map_element "ics-desc", to: :ics_desc
|
|
12
14
|
end
|
|
13
15
|
end
|
|
@@ -5,12 +5,23 @@ require "lutaml/model"
|
|
|
5
5
|
module Sts
|
|
6
6
|
module NisoSts
|
|
7
7
|
class InlineFormula < Lutaml::Model::Serializable
|
|
8
|
+
attribute :id, :string
|
|
9
|
+
attribute :content_type, :string
|
|
10
|
+
attribute :specific_use, :string
|
|
8
11
|
attribute :math, ::Sts::TbxIsoTml::Math
|
|
12
|
+
attribute :alternatives, ::Sts::NisoSts::Alternatives
|
|
13
|
+
attribute :preformat, ::Sts::NisoSts::Preformat
|
|
9
14
|
|
|
10
15
|
xml do
|
|
11
16
|
element "inline-formula"
|
|
12
17
|
|
|
18
|
+
map_attribute "id", to: :id
|
|
19
|
+
map_attribute "content-type", to: :content_type
|
|
20
|
+
map_attribute "specific-use", to: :specific_use
|
|
21
|
+
|
|
13
22
|
map_element "math", to: :math
|
|
23
|
+
map_element "alternatives", to: :alternatives
|
|
24
|
+
map_element "preformat", to: :preformat
|
|
14
25
|
end
|
|
15
26
|
end
|
|
16
27
|
end
|
data/lib/sts/niso_sts/label.rb
CHANGED
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
module Sts
|
|
4
4
|
module NisoSts
|
|
5
5
|
class Label < Lutaml::Model::Serializable
|
|
6
|
-
attribute :content, :string
|
|
7
|
-
attribute :sup, Sts::TbxIsoTml::Sup
|
|
6
|
+
attribute :content, :string, collection: true
|
|
7
|
+
attribute :sup, Sts::TbxIsoTml::Sup, collection: true
|
|
8
8
|
|
|
9
9
|
xml do
|
|
10
10
|
element "label"
|
|
11
|
+
mixed_content
|
|
11
12
|
|
|
12
13
|
map_content to: :content
|
|
13
14
|
map_element "sup", to: :sup
|
data/lib/sts/niso_sts/list.rb
CHANGED
|
@@ -3,15 +3,20 @@
|
|
|
3
3
|
module Sts
|
|
4
4
|
module NisoSts
|
|
5
5
|
class List < Lutaml::Model::Serializable
|
|
6
|
-
attribute :
|
|
6
|
+
attribute :id, :string
|
|
7
7
|
attribute :list_type, :string
|
|
8
|
+
attribute :content_type, :string
|
|
9
|
+
attribute :specific_use, :string
|
|
8
10
|
attribute :list_item, ::Sts::NisoSts::ListItem, collection: true
|
|
9
11
|
|
|
10
12
|
xml do
|
|
11
13
|
element "list"
|
|
14
|
+
ordered
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
map_attribute "id", to: :id
|
|
14
17
|
map_attribute "list-type", to: :list_type
|
|
18
|
+
map_attribute "content-type", to: :content_type
|
|
19
|
+
map_attribute "specific-use", to: :specific_use
|
|
15
20
|
map_element "list-item", to: :list_item
|
|
16
21
|
end
|
|
17
22
|
end
|
|
@@ -6,16 +6,21 @@ module Sts
|
|
|
6
6
|
module NisoSts
|
|
7
7
|
class ListItem < Lutaml::Model::Serializable
|
|
8
8
|
attribute :label, ::Sts::NisoSts::Label
|
|
9
|
-
attribute :list, ::Sts::NisoSts::List
|
|
10
|
-
attribute :non_normative_example, ::Sts::NisoSts::NonNormativeExample
|
|
9
|
+
attribute :list, ::Sts::NisoSts::List, collection: true
|
|
10
|
+
attribute :non_normative_example, ::Sts::NisoSts::NonNormativeExample,
|
|
11
|
+
collection: true
|
|
12
|
+
attribute :non_normative_note, ::Sts::NisoSts::NonNormativeNote,
|
|
13
|
+
collection: true
|
|
11
14
|
attribute :p, ::Sts::NisoSts::Paragraph, collection: true
|
|
12
15
|
|
|
13
16
|
xml do
|
|
14
17
|
element "list-item"
|
|
18
|
+
ordered
|
|
15
19
|
|
|
16
20
|
map_element "label", to: :label
|
|
17
21
|
map_element "list", to: :list
|
|
18
22
|
map_element "non-normative-example", to: :non_normative_example
|
|
23
|
+
map_element "non-normative-note", to: :non_normative_note
|
|
19
24
|
map_element "p", to: :p
|
|
20
25
|
end
|
|
21
26
|
end
|
data/lib/sts/niso_sts/media.rb
CHANGED
|
@@ -6,6 +6,7 @@ module Sts
|
|
|
6
6
|
module NisoSts
|
|
7
7
|
class MetadataStd < Lutaml::Model::Serializable
|
|
8
8
|
attribute :id, :string
|
|
9
|
+
attribute :std_meta_type, :string
|
|
9
10
|
attribute :title_wrap, ::Sts::NisoSts::TitleWrap, collection: true
|
|
10
11
|
attribute :content_language, :string
|
|
11
12
|
attribute :std_ident, ::Sts::NisoSts::StandardIdentification
|
|
@@ -13,23 +14,28 @@ module Sts
|
|
|
13
14
|
attribute :std_ref, ::Sts::NisoSts::StandardRef, collection: true
|
|
14
15
|
attribute :doc_ref, :string
|
|
15
16
|
attribute :pub_date, :string
|
|
16
|
-
attribute :
|
|
17
|
-
attribute :
|
|
17
|
+
attribute :proj_id, ::Sts::NisoSts::ProjId
|
|
18
|
+
attribute :release_date, ::Sts::NisoSts::ReleaseDate, collection: true
|
|
19
|
+
attribute :release_version, ::Sts::NisoSts::ReleaseVersion
|
|
20
|
+
attribute :std_org, ::Sts::NisoSts::StdOrg, collection: true
|
|
21
|
+
attribute :std_org_group, ::Sts::NisoSts::StdOrgGroup
|
|
18
22
|
attribute :comm_ref, :string
|
|
19
23
|
attribute :secretariat, :string
|
|
24
|
+
attribute :ics, :string, collection: true
|
|
20
25
|
attribute :page_count, ::Sts::NisoSts::PageCount
|
|
21
|
-
attribute :
|
|
22
|
-
attribute :std_xref, ::Sts::NisoSts::StdCrossReference
|
|
26
|
+
attribute :std_xref, ::Sts::NisoSts::StdCrossReference, collection: true
|
|
23
27
|
attribute :permissions, ::Sts::NisoSts::Permissions
|
|
28
|
+
attribute :self_uri, ::Sts::NisoSts::SelfUri
|
|
24
29
|
attribute :meta_note, ::Sts::NisoSts::MetaNote, collection: true
|
|
25
30
|
attribute :custom_meta_group, ::Sts::NisoSts::CustomMetaGroup,
|
|
26
31
|
collection: true
|
|
27
32
|
|
|
28
33
|
xml do
|
|
29
34
|
element "std-meta"
|
|
30
|
-
|
|
35
|
+
ordered
|
|
31
36
|
|
|
32
37
|
map_attribute "id", to: :id
|
|
38
|
+
map_attribute "std-meta-type", to: :std_meta_type
|
|
33
39
|
|
|
34
40
|
map_element "title-wrap", to: :title_wrap
|
|
35
41
|
map_element "content-language", to: :content_language
|
|
@@ -38,16 +44,20 @@ module Sts
|
|
|
38
44
|
map_element "std-ref", to: :std_ref
|
|
39
45
|
map_element "doc-ref", to: :doc_ref
|
|
40
46
|
map_element "pub-date", to: :pub_date
|
|
47
|
+
map_element "proj-id", to: :proj_id
|
|
41
48
|
map_element "release-date", to: :release_date
|
|
42
49
|
map_element "release-version", to: :release_version
|
|
50
|
+
map_element "std-org", to: :std_org
|
|
51
|
+
map_element "std-org-group", to: :std_org_group
|
|
43
52
|
map_element "comm-ref", to: :comm_ref,
|
|
44
53
|
value_map: { to: { empty: :empty } }
|
|
45
54
|
map_element "secretariat", to: :secretariat,
|
|
46
55
|
value_map: { to: { empty: :empty } }
|
|
47
|
-
map_element "page-count", to: :page_count
|
|
48
56
|
map_element "ics", to: :ics
|
|
57
|
+
map_element "page-count", to: :page_count
|
|
49
58
|
map_element "std-xref", to: :std_xref
|
|
50
59
|
map_element "permissions", to: :permissions
|
|
60
|
+
map_element "self-uri", to: :self_uri
|
|
51
61
|
map_element "meta-note", to: :meta_note
|
|
52
62
|
map_element "custom-meta-group", to: :custom_meta_group
|
|
53
63
|
end
|
|
@@ -8,17 +8,15 @@ module Sts
|
|
|
8
8
|
attribute :content_type, :string
|
|
9
9
|
attribute :rationale, :string
|
|
10
10
|
attribute :specific_use, :string
|
|
11
|
-
attribute :content, :string, collection: true
|
|
12
11
|
xml do
|
|
13
12
|
element "milestone-end"
|
|
14
|
-
|
|
13
|
+
ordered
|
|
15
14
|
|
|
16
15
|
map_attribute "id", to: :id
|
|
17
16
|
map_attribute "rid", to: :rid
|
|
18
17
|
map_attribute "content-type", to: :content_type
|
|
19
18
|
map_attribute "rationale", to: :rationale
|
|
20
19
|
map_attribute "specific-use", to: :specific_use
|
|
21
|
-
map_content to: :content
|
|
22
20
|
end
|
|
23
21
|
end
|
|
24
22
|
end
|
|
@@ -7,16 +7,14 @@ module Sts
|
|
|
7
7
|
attribute :content_type, :string
|
|
8
8
|
attribute :rationale, :string
|
|
9
9
|
attribute :specific_use, :string
|
|
10
|
-
attribute :content, :string, collection: true
|
|
11
10
|
xml do
|
|
12
11
|
element "milestone-start"
|
|
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 "rationale", to: :rationale
|
|
18
17
|
map_attribute "specific-use", to: :specific_use
|
|
19
|
-
map_content to: :content
|
|
20
18
|
end
|
|
21
19
|
end
|
|
22
20
|
end
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
module Sts
|
|
5
5
|
module NisoSts
|
|
6
6
|
class MixedCitation < Lutaml::Model::Serializable
|
|
7
|
+
attribute :id, :string
|
|
7
8
|
attribute :content, :string, collection: true
|
|
8
9
|
attribute :publication_type, :string
|
|
10
|
+
attribute :xlink_type, :string
|
|
9
11
|
attribute :bold, ::Sts::TbxIsoTml::Bold, collection: true
|
|
10
12
|
attribute :italic, ::Sts::TbxIsoTml::Italic, collection: true
|
|
11
13
|
attribute :std, ::Sts::NisoSts::ReferenceStandard, collection: true
|
|
@@ -56,13 +58,24 @@ module Sts
|
|
|
56
58
|
attribute :institution, ::Sts::NisoSts::Institution, collection: true
|
|
57
59
|
attribute :publisher, ::Sts::NisoSts::Publisher
|
|
58
60
|
attribute :price, :string
|
|
61
|
+
attribute :year, ::Sts::NisoSts::Year, collection: true
|
|
62
|
+
attribute :fn, ::Sts::NisoSts::Fn, collection: true
|
|
63
|
+
attribute :sc, ::Sts::NisoSts::Sc, collection: true
|
|
64
|
+
attribute :sup, ::Sts::NisoSts::Sup, collection: true
|
|
65
|
+
attribute :sub, ::Sts::NisoSts::Sub, collection: true
|
|
66
|
+
attribute :xref, ::Sts::TbxIsoTml::Xref, collection: true
|
|
67
|
+
attribute :uri, ::Sts::NisoSts::Uri, collection: true
|
|
68
|
+
attribute :underline, ::Sts::NisoSts::Underline, collection: true
|
|
69
|
+
attribute :break, ::Sts::NisoSts::Break, collection: true
|
|
59
70
|
|
|
60
71
|
xml do
|
|
61
72
|
element "mixed-citation"
|
|
62
73
|
mixed_content
|
|
63
74
|
|
|
64
75
|
map_content to: :content
|
|
76
|
+
map_attribute "id", to: :id
|
|
65
77
|
map_attribute "publication-type", to: :publication_type
|
|
78
|
+
map_attribute "xlink:type", to: :xlink_type
|
|
66
79
|
|
|
67
80
|
map_element "bold", to: :bold
|
|
68
81
|
map_element "italic", to: :italic
|
|
@@ -114,6 +127,15 @@ module Sts
|
|
|
114
127
|
map_element "institution", to: :institution
|
|
115
128
|
map_element "publisher", to: :publisher
|
|
116
129
|
map_element "price", to: :price
|
|
130
|
+
map_element "year", to: :year
|
|
131
|
+
map_element "fn", to: :fn
|
|
132
|
+
map_element "sc", to: :sc
|
|
133
|
+
map_element "sup", to: :sup
|
|
134
|
+
map_element "sub", to: :sub
|
|
135
|
+
map_element "xref", to: :xref
|
|
136
|
+
map_element "uri", to: :uri
|
|
137
|
+
map_element "underline", to: :underline
|
|
138
|
+
map_element "break", to: :break
|
|
117
139
|
end
|
|
118
140
|
end
|
|
119
141
|
end
|