sts 0.3.4 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +7 -1
- data/.gitignore +2 -0
- data/.rubocop_todo.yml +10 -28
- data/Gemfile +4 -2
- data/lib/sts/namespaces.rb +13 -0
- data/lib/sts/niso_sts/adoption.rb +8 -12
- data/lib/sts/niso_sts/adoption_front.rb +1 -3
- data/lib/sts/niso_sts/app.rb +11 -22
- data/lib/sts/niso_sts/app_group.rb +1 -5
- data/lib/sts/niso_sts/back.rb +5 -12
- data/lib/sts/niso_sts/body.rb +2 -6
- data/lib/sts/niso_sts/caption.rb +6 -10
- data/lib/sts/niso_sts/custom_meta.rb +3 -7
- data/lib/sts/niso_sts/custom_meta_group.rb +2 -6
- data/lib/sts/niso_sts/def.rb +2 -6
- data/lib/sts/niso_sts/def_item.rb +3 -8
- data/lib/sts/niso_sts/def_list.rb +3 -7
- data/lib/sts/niso_sts/display_formula.rb +4 -7
- data/lib/sts/niso_sts/document_identification.rb +1 -3
- data/lib/sts/niso_sts/ext_link.rb +3 -7
- data/lib/sts/niso_sts/figure.rb +6 -13
- data/lib/sts/niso_sts/fn.rb +3 -8
- data/lib/sts/niso_sts/fn_group.rb +2 -6
- data/lib/sts/niso_sts/front.rb +4 -10
- data/lib/sts/niso_sts/graphic.rb +5 -11
- data/lib/sts/niso_sts/inline_formula.rb +3 -6
- data/lib/sts/niso_sts/label.rb +1 -5
- data/lib/sts/niso_sts/list.rb +3 -6
- data/lib/sts/niso_sts/list_item.rb +8 -13
- data/lib/sts/niso_sts/meta_date.rb +1 -3
- data/lib/sts/niso_sts/meta_note.rb +3 -6
- data/lib/sts/niso_sts/metadata_iso.rb +11 -22
- data/lib/sts/niso_sts/metadata_std.rb +12 -19
- data/lib/sts/niso_sts/mixed_citation.rb +4 -8
- data/lib/sts/{tbx_iso_tml → niso_sts}/named_content.rb +2 -5
- data/lib/sts/niso_sts/non_normative_example.rb +4 -9
- data/lib/sts/niso_sts/non_normative_note.rb +4 -7
- data/lib/sts/niso_sts/object_id.rb +1 -3
- data/lib/sts/niso_sts/page_count.rb +1 -3
- data/lib/sts/niso_sts/paragraph.rb +15 -32
- data/lib/sts/niso_sts/permissions.rb +1 -3
- data/lib/sts/niso_sts/reference.rb +4 -7
- data/lib/sts/niso_sts/reference_list.rb +3 -5
- data/lib/sts/niso_sts/reference_standard.rb +10 -15
- data/lib/sts/niso_sts/section.rb +16 -29
- data/lib/sts/niso_sts/section_array.rb +2 -6
- data/lib/sts/niso_sts/standard.rb +11 -15
- data/lib/sts/niso_sts/standard_identification.rb +3 -6
- data/lib/sts/niso_sts/standard_ref.rb +1 -3
- data/lib/sts/niso_sts/std_cross_reference.rb +2 -4
- data/lib/sts/niso_sts/std_id.rb +1 -3
- data/lib/sts/niso_sts/std_id_group.rb +2 -6
- data/lib/sts/niso_sts/term.rb +68 -0
- data/lib/sts/niso_sts/term_display.rb +4 -8
- data/lib/sts/niso_sts/term_section.rb +6 -13
- data/lib/sts/niso_sts/title.rb +2 -6
- data/lib/sts/niso_sts/title_compl.rb +14 -0
- data/lib/sts/niso_sts/title_full.rb +18 -0
- data/lib/sts/niso_sts/title_wrap.rb +12 -17
- data/lib/sts/niso_sts.rb +56 -18
- data/lib/sts/tbx_iso_tml/bold.rb +1 -3
- data/lib/sts/tbx_iso_tml/caption.rb +1 -3
- data/lib/sts/tbx_iso_tml/col.rb +1 -3
- data/lib/sts/tbx_iso_tml/cross_reference.rb +17 -0
- data/lib/sts/tbx_iso_tml/definition.rb +14 -22
- data/lib/sts/tbx_iso_tml/entailed_term.rb +6 -10
- data/lib/sts/tbx_iso_tml/example.rb +6 -10
- data/lib/sts/tbx_iso_tml/external_graphic.rb +2 -4
- data/lib/sts/tbx_iso_tml/external_source.rb +2 -4
- data/lib/sts/tbx_iso_tml/fn.rb +2 -4
- data/lib/sts/tbx_iso_tml/fn_group.rb +2 -6
- data/lib/sts/tbx_iso_tml/geographical_usage.rb +2 -4
- data/lib/sts/tbx_iso_tml/grammatical_gender.rb +2 -4
- data/lib/sts/tbx_iso_tml/grammatical_number.rb +2 -4
- data/lib/sts/tbx_iso_tml/italic.rb +2 -3
- data/lib/sts/tbx_iso_tml/lang_set.rb +16 -30
- data/lib/sts/tbx_iso_tml/math.rb +12 -25
- data/lib/sts/tbx_iso_tml/mfenced.rb +7 -13
- data/lib/sts/tbx_iso_tml/mfrac.rb +5 -8
- data/lib/sts/tbx_iso_tml/mi.rb +2 -3
- data/lib/sts/tbx_iso_tml/mrow.rb +10 -15
- data/lib/sts/tbx_iso_tml/mspace.rb +2 -4
- data/lib/sts/tbx_iso_tml/mstyle.rb +5 -5
- data/lib/sts/tbx_iso_tml/msub.rb +6 -11
- data/lib/sts/tbx_iso_tml/msup.rb +4 -9
- data/lib/sts/tbx_iso_tml/munder.rb +3 -7
- data/lib/sts/tbx_iso_tml/munderover.rb +4 -7
- data/lib/sts/tbx_iso_tml/normative_authorization.rb +2 -4
- data/lib/sts/tbx_iso_tml/note.rb +18 -30
- data/lib/sts/tbx_iso_tml/part_of_speech.rb +2 -4
- data/lib/sts/tbx_iso_tml/pronunciation.rb +16 -0
- data/lib/sts/tbx_iso_tml/see.rb +2 -4
- data/lib/sts/tbx_iso_tml/semantics.rb +5 -9
- data/lib/sts/tbx_iso_tml/source.rb +5 -7
- data/lib/sts/tbx_iso_tml/subject_field.rb +17 -0
- data/lib/sts/tbx_iso_tml/sup.rb +3 -6
- data/lib/sts/tbx_iso_tml/table.rb +4 -10
- data/lib/sts/tbx_iso_tml/table_break.rb +0 -2
- data/lib/sts/tbx_iso_tml/table_wrap.rb +4 -10
- data/lib/sts/tbx_iso_tml/table_wrap_foot.rb +2 -6
- data/lib/sts/tbx_iso_tml/tbody.rb +2 -6
- data/lib/sts/tbx_iso_tml/td.rb +9 -20
- data/lib/sts/tbx_iso_tml/term.rb +13 -29
- data/lib/sts/tbx_iso_tml/term_entry.rb +5 -9
- data/lib/sts/tbx_iso_tml/term_information_group.rb +11 -20
- data/lib/sts/tbx_iso_tml/term_type.rb +2 -4
- data/lib/sts/tbx_iso_tml/th.rb +8 -16
- data/lib/sts/tbx_iso_tml/thead.rb +2 -6
- data/lib/sts/tbx_iso_tml/tr.rb +3 -8
- data/lib/sts/tbx_iso_tml/xref.rb +2 -3
- data/lib/sts/tbx_iso_tml.rb +52 -25
- data/lib/sts/version.rb +1 -1
- data/lib/sts.rb +4 -12
- data/sts.gemspec +1 -1
- metadata +12 -5
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative "front"
|
|
4
|
-
require_relative "body"
|
|
5
|
-
require_relative "back"
|
|
6
|
-
|
|
7
3
|
module Sts
|
|
8
4
|
module NisoSts
|
|
9
5
|
class Standard < Lutaml::Model::Serializable
|
|
10
|
-
attribute :front, Front
|
|
11
|
-
attribute :body, Body
|
|
12
|
-
attribute :back, Back
|
|
6
|
+
attribute :front, ::Sts::NisoSts::Front
|
|
7
|
+
attribute :body, ::Sts::NisoSts::Body
|
|
8
|
+
attribute :back, ::Sts::NisoSts::Back
|
|
13
9
|
attribute :id, :string
|
|
14
|
-
attribute :lang,
|
|
10
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
15
11
|
attribute :mml, :string
|
|
16
12
|
attribute :tbx, :string
|
|
17
13
|
attribute :xlink, :string
|
|
18
14
|
|
|
19
15
|
xml do
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
element "standard"
|
|
17
|
+
namespace_scope [
|
|
18
|
+
::Sts::Namespaces::MathmlNamespace,
|
|
19
|
+
::Sts::Namespaces::TbxNamespace,
|
|
20
|
+
::Lutaml::Xml::W3c::XlinkNamespace,
|
|
21
|
+
]
|
|
24
22
|
|
|
25
23
|
map_attribute "id", to: :id
|
|
26
|
-
map_attribute "lang", to: :lang
|
|
27
|
-
namespace: "http://www.w3.org/XML/1998/namespace",
|
|
28
|
-
prefix: "xml"
|
|
24
|
+
map_attribute "lang", to: :lang
|
|
29
25
|
map_element "front", to: :front
|
|
30
26
|
map_element "body", to: :body
|
|
31
27
|
map_element "back", to: :back
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "std_id_group"
|
|
6
|
-
|
|
7
3
|
module Sts
|
|
8
4
|
module NisoSts
|
|
9
5
|
class StandardIdentification < Lutaml::Model::Serializable
|
|
@@ -13,10 +9,11 @@ module Sts
|
|
|
13
9
|
attribute :edition, :string
|
|
14
10
|
attribute :version, :string
|
|
15
11
|
attribute :part_number, :string
|
|
16
|
-
attribute :std_id_group, StdIdGroup
|
|
12
|
+
attribute :std_id_group, ::Sts::NisoSts::StdIdGroup
|
|
17
13
|
|
|
18
14
|
xml do
|
|
19
|
-
|
|
15
|
+
element "std-ident"
|
|
16
|
+
mixed_content
|
|
20
17
|
|
|
21
18
|
map_element "originator", to: :originator
|
|
22
19
|
map_element "doc-type", to: :doc_type
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
3
|
module Sts
|
|
6
4
|
module NisoSts
|
|
7
5
|
class StandardRef < Lutaml::Model::Serializable
|
|
@@ -9,7 +7,7 @@ module Sts
|
|
|
9
7
|
attribute :value, :string
|
|
10
8
|
|
|
11
9
|
xml do
|
|
12
|
-
|
|
10
|
+
element "std-ref"
|
|
13
11
|
map_attribute "type", to: :type
|
|
14
12
|
map_content to: :value
|
|
15
13
|
end
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
3
|
module Sts
|
|
6
4
|
module NisoSts
|
|
7
5
|
class StdCrossReference < Lutaml::Model::Serializable
|
|
8
6
|
attribute :type, :string
|
|
9
|
-
attribute :std_ref, StandardRef, collection: true
|
|
7
|
+
attribute :std_ref, ::Sts::NisoSts::StandardRef, collection: true
|
|
10
8
|
|
|
11
9
|
xml do
|
|
12
|
-
|
|
10
|
+
element "std-xref"
|
|
13
11
|
|
|
14
12
|
map_attribute "type", to: :type
|
|
15
13
|
map_element "std-ref", to: :std_ref
|
data/lib/sts/niso_sts/std_id.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
3
|
module Sts
|
|
6
4
|
module NisoSts
|
|
7
5
|
class StdId < Lutaml::Model::Serializable
|
|
@@ -11,7 +9,7 @@ module Sts
|
|
|
11
9
|
attribute :content, :string
|
|
12
10
|
|
|
13
11
|
xml do
|
|
14
|
-
|
|
12
|
+
element "std-id"
|
|
15
13
|
|
|
16
14
|
map_attribute "std-id-link-type", to: :std_id_link_type
|
|
17
15
|
map_attribute "std-id-type", to: :std_id_type
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "std_id"
|
|
6
|
-
|
|
7
3
|
module Sts
|
|
8
4
|
module NisoSts
|
|
9
5
|
class StdIdGroup < Lutaml::Model::Serializable
|
|
10
|
-
attribute :std_id, StdId, collection: true
|
|
6
|
+
attribute :std_id, ::Sts::NisoSts::StdId, collection: true
|
|
11
7
|
|
|
12
8
|
xml do
|
|
13
|
-
|
|
9
|
+
element "std-id-group"
|
|
14
10
|
|
|
15
11
|
map_element "std-id", to: :std_id
|
|
16
12
|
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sts
|
|
4
|
+
module NisoSts
|
|
5
|
+
class Term < Lutaml::Model::Serializable
|
|
6
|
+
attribute :id, :string
|
|
7
|
+
attribute :rid, :string
|
|
8
|
+
attribute :text, :string
|
|
9
|
+
attribute :italic, :string, collection: true
|
|
10
|
+
attribute :bold, :string, collection: true
|
|
11
|
+
attribute :uri, :string
|
|
12
|
+
attribute :list, ::Sts::NisoSts::List
|
|
13
|
+
attribute :def_list, ::Sts::NisoSts::DefList
|
|
14
|
+
attribute :non_normative_note, ::Sts::NisoSts::NonNormativeNote
|
|
15
|
+
attribute :non_normative_example, ::Sts::NisoSts::NonNormativeExample
|
|
16
|
+
attribute :inline_formula, ::Sts::NisoSts::InlineFormula, collection: true
|
|
17
|
+
attribute :disp_formula, ::Sts::NisoSts::DisplayFormula, collection: true
|
|
18
|
+
attribute :xref, ::Sts::TbxIsoTml::Xref, collection: true
|
|
19
|
+
attribute :std, ::Sts::NisoSts::ReferenceStandard, collection: true
|
|
20
|
+
attribute :ext_link, ::Sts::NisoSts::ExtLink
|
|
21
|
+
attribute :entailed_term, ::Sts::TbxIsoTml::EntailedTerm
|
|
22
|
+
attribute :specific_use, :string,
|
|
23
|
+
values: ["abbreviation", "acronym", "equation", "formula", "fullForm", "symbol", "variant"]
|
|
24
|
+
attribute :term_status, :string,
|
|
25
|
+
values: ["admitted", "non-preferred", "preferred"], collection: true
|
|
26
|
+
attribute :term_type, :string,
|
|
27
|
+
values: ["abbreviation", "acronym", "equation", "formula", "fullForm", "symbol", "variant"]
|
|
28
|
+
attribute :vocab, :string
|
|
29
|
+
attribute :vocab_identifier, :string
|
|
30
|
+
attribute :vocab_term, :string
|
|
31
|
+
attribute :vocab_term_identifier, :string
|
|
32
|
+
# attribute :lang, :string
|
|
33
|
+
attribute :named_content, ::Sts::NisoSts::NamedContent, collection: true
|
|
34
|
+
|
|
35
|
+
xml do
|
|
36
|
+
element "term"
|
|
37
|
+
mixed_content
|
|
38
|
+
|
|
39
|
+
map_attribute "id", to: :id
|
|
40
|
+
map_attribute "rid", to: :rid
|
|
41
|
+
map_attribute "specific-use", to: :specific_use
|
|
42
|
+
map_attribute "term-status", to: :term_status
|
|
43
|
+
map_attribute "term-type", to: :term_type
|
|
44
|
+
map_attribute "vocab", to: :vocab
|
|
45
|
+
map_attribute "vocab-identifier", to: :vocab_identifier
|
|
46
|
+
map_attribute "vocab-term", to: :vocab_term
|
|
47
|
+
map_attribute "vocab-term-identifier", to: :vocab_term_identifier
|
|
48
|
+
# map_attribute "xml:lang", to: :lang
|
|
49
|
+
|
|
50
|
+
map_content to: :text
|
|
51
|
+
map_element "bold", to: :bold
|
|
52
|
+
map_element "italic", to: :italic
|
|
53
|
+
map_element "list", to: :list
|
|
54
|
+
map_element "def-list", to: :def_list
|
|
55
|
+
map_element "named-content", to: :named_content
|
|
56
|
+
map_element "non-normative-note", to: :non_normative_note
|
|
57
|
+
map_element "non-normative-example", to: :non_normative_example
|
|
58
|
+
map_element "inline-formula", to: :inline_formula
|
|
59
|
+
map_element "disp-formula", to: :disp_formula
|
|
60
|
+
map_element "ext-link", to: :ext_link
|
|
61
|
+
map_element "entailedTerm", to: :entailed_term
|
|
62
|
+
map_element "uri", to: :uri
|
|
63
|
+
map_element "std", to: :std
|
|
64
|
+
map_element "xref", to: :xref
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "paragraph"
|
|
6
|
-
require_relative "non_normative_note"
|
|
7
|
-
|
|
8
3
|
module Sts
|
|
9
4
|
module NisoSts
|
|
10
5
|
class TermDisplay < Lutaml::Model::Serializable
|
|
11
|
-
attribute :p, Paragraph, collection: true
|
|
12
|
-
attribute :non_normative_note, NonNormativeNote,
|
|
6
|
+
attribute :p, ::Sts::NisoSts::Paragraph, collection: true
|
|
7
|
+
attribute :non_normative_note, ::Sts::NisoSts::NonNormativeNote,
|
|
8
|
+
collection: true
|
|
13
9
|
|
|
14
10
|
xml do
|
|
15
|
-
|
|
11
|
+
element "term-display"
|
|
16
12
|
|
|
17
13
|
map_element "p", to: :p
|
|
18
14
|
map_element "non-normative-note", to: :non_normative_note
|
|
@@ -1,30 +1,23 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "../tbx_iso_tml"
|
|
6
|
-
require_relative "term_display"
|
|
7
|
-
require_relative "../tbx_iso_tml/term_entry"
|
|
8
|
-
|
|
9
3
|
module Sts
|
|
10
4
|
module NisoSts
|
|
11
5
|
class TermSection < Lutaml::Model::Serializable
|
|
12
6
|
attribute :id, :string
|
|
13
7
|
attribute :sec_type, :string
|
|
14
|
-
attribute :label, Label
|
|
15
|
-
attribute :term_entry, Sts::TbxIsoTml::TermEntry # , collection: true
|
|
16
|
-
attribute :term_display, TermDisplay # , collection: true
|
|
8
|
+
attribute :label, ::Sts::NisoSts::Label
|
|
9
|
+
attribute :term_entry, ::Sts::TbxIsoTml::TermEntry # , collection: true
|
|
10
|
+
attribute :term_display, ::Sts::NisoSts::TermDisplay # , collection: true
|
|
17
11
|
|
|
18
12
|
xml do
|
|
19
|
-
|
|
13
|
+
element "term-sec"
|
|
14
|
+
mixed_content
|
|
20
15
|
map_attribute "id", to: :id
|
|
21
16
|
map_attribute "sec-type", to: :sec_type
|
|
22
17
|
|
|
23
18
|
map_element "label", to: :label
|
|
24
19
|
map_element "term-display", to: :term_display
|
|
25
|
-
map_element "termEntry", to: :term_entry
|
|
26
|
-
namespace: "urn:iso:std:iso:30042:ed-1",
|
|
27
|
-
prefix: "tbx"
|
|
20
|
+
map_element "termEntry", to: :term_entry
|
|
28
21
|
end
|
|
29
22
|
end
|
|
30
23
|
end
|
data/lib/sts/niso_sts/title.rb
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "section"
|
|
6
|
-
require_relative "inline_formula"
|
|
7
|
-
|
|
8
3
|
module Sts
|
|
9
4
|
module NisoSts
|
|
10
5
|
class Title < Lutaml::Model::Serializable
|
|
@@ -12,7 +7,8 @@ module Sts
|
|
|
12
7
|
attribute :inline_formula, Sts::NisoSts::InlineFormula, collection: true
|
|
13
8
|
|
|
14
9
|
xml do
|
|
15
|
-
|
|
10
|
+
element "title"
|
|
11
|
+
mixed_content
|
|
16
12
|
|
|
17
13
|
map_content to: :content
|
|
18
14
|
map_element "inline-formula", to: :inline_formula
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sts
|
|
4
|
+
module NisoSts
|
|
5
|
+
class TitleFull < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :std, ::Sts::NisoSts::ReferenceStandard
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
element "full"
|
|
11
|
+
mixed_content
|
|
12
|
+
|
|
13
|
+
map_content to: :content
|
|
14
|
+
map_element "std", to: :std
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -1,45 +1,40 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "reference_list"
|
|
6
|
-
require_relative "reference_standard"
|
|
7
|
-
|
|
8
3
|
module Sts
|
|
9
4
|
module NisoSts
|
|
10
5
|
class TitleFull < Lutaml::Model::Serializable
|
|
11
6
|
attribute :content, :string
|
|
12
|
-
attribute :std, ReferenceStandard
|
|
7
|
+
attribute :std, ::Sts::NisoSts::ReferenceStandard
|
|
13
8
|
|
|
14
9
|
xml do
|
|
15
|
-
|
|
10
|
+
element "full"
|
|
11
|
+
mixed_content
|
|
16
12
|
|
|
17
13
|
map_content to: :content
|
|
18
|
-
map_element "std", to: :std
|
|
14
|
+
map_element "std", to: :std
|
|
19
15
|
end
|
|
20
16
|
end
|
|
21
17
|
|
|
22
18
|
class TitleCompl < TitleFull
|
|
23
19
|
xml do
|
|
24
|
-
|
|
20
|
+
element "compl"
|
|
25
21
|
|
|
26
22
|
map_content to: :content
|
|
27
|
-
map_element "std", to: :std
|
|
23
|
+
map_element "std", to: :std
|
|
28
24
|
end
|
|
29
25
|
end
|
|
30
26
|
|
|
31
27
|
class TitleWrap < Lutaml::Model::Serializable
|
|
32
28
|
attribute :intro, :string
|
|
33
29
|
attribute :main, :string
|
|
34
|
-
attribute :full, TitleFull
|
|
35
|
-
attribute :compl, TitleCompl
|
|
36
|
-
attribute :lang,
|
|
30
|
+
attribute :full, ::Sts::NisoSts::TitleFull
|
|
31
|
+
attribute :compl, ::Sts::NisoSts::TitleCompl
|
|
32
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
37
33
|
|
|
38
34
|
xml do
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
prefix: "xml"
|
|
35
|
+
element "title-wrap"
|
|
36
|
+
mixed_content
|
|
37
|
+
map_attribute "lang", to: :lang
|
|
43
38
|
|
|
44
39
|
map_element "intro", to: :intro
|
|
45
40
|
map_element "main", to: :main
|
data/lib/sts/niso_sts.rb
CHANGED
|
@@ -2,23 +2,61 @@
|
|
|
2
2
|
|
|
3
3
|
module Sts
|
|
4
4
|
module NisoSts
|
|
5
|
+
autoload :Adoption, "#{__dir__}/niso_sts/adoption"
|
|
6
|
+
autoload :AdoptionFront, "#{__dir__}/niso_sts/adoption_front"
|
|
7
|
+
autoload :App, "#{__dir__}/niso_sts/app"
|
|
8
|
+
autoload :AppGroup, "#{__dir__}/niso_sts/app_group"
|
|
9
|
+
autoload :Back, "#{__dir__}/niso_sts/back"
|
|
10
|
+
autoload :Body, "#{__dir__}/niso_sts/body"
|
|
11
|
+
autoload :Caption, "#{__dir__}/niso_sts/caption"
|
|
12
|
+
autoload :CustomMeta, "#{__dir__}/niso_sts/custom_meta"
|
|
13
|
+
autoload :CustomMetaGroup, "#{__dir__}/niso_sts/custom_meta_group"
|
|
14
|
+
autoload :Def, "#{__dir__}/niso_sts/def"
|
|
15
|
+
autoload :DefItem, "#{__dir__}/niso_sts/def_item"
|
|
16
|
+
autoload :DefList, "#{__dir__}/niso_sts/def_list"
|
|
17
|
+
autoload :DisplayFormula, "#{__dir__}/niso_sts/display_formula"
|
|
18
|
+
autoload :DocumentIdentification,
|
|
19
|
+
"#{__dir__}/niso_sts/document_identification"
|
|
20
|
+
autoload :ExtLink, "#{__dir__}/niso_sts/ext_link"
|
|
21
|
+
autoload :Figure, "#{__dir__}/niso_sts/figure"
|
|
22
|
+
autoload :Fn, "#{__dir__}/niso_sts/fn"
|
|
23
|
+
autoload :FnGroup, "#{__dir__}/niso_sts/fn_group"
|
|
24
|
+
autoload :Front, "#{__dir__}/niso_sts/front"
|
|
25
|
+
autoload :Graphic, "#{__dir__}/niso_sts/graphic"
|
|
26
|
+
autoload :InlineFormula, "#{__dir__}/niso_sts/inline_formula"
|
|
27
|
+
autoload :Label, "#{__dir__}/niso_sts/label"
|
|
28
|
+
autoload :List, "#{__dir__}/niso_sts/list"
|
|
29
|
+
autoload :ListItem, "#{__dir__}/niso_sts/list_item"
|
|
30
|
+
autoload :MetadataIso, "#{__dir__}/niso_sts/metadata_iso"
|
|
31
|
+
autoload :MetadataStd, "#{__dir__}/niso_sts/metadata_std"
|
|
32
|
+
autoload :MetaDate, "#{__dir__}/niso_sts/meta_date"
|
|
33
|
+
autoload :MetaNote, "#{__dir__}/niso_sts/meta_note"
|
|
34
|
+
autoload :MixedCitation, "#{__dir__}/niso_sts/mixed_citation"
|
|
35
|
+
autoload :NamedContent, "#{__dir__}/niso_sts/named_content"
|
|
36
|
+
autoload :NonNormativeExample, "#{__dir__}/niso_sts/non_normative_example"
|
|
37
|
+
autoload :NonNormativeNote, "#{__dir__}/niso_sts/non_normative_note"
|
|
38
|
+
autoload :ObjectId, "#{__dir__}/niso_sts/object_id"
|
|
39
|
+
autoload :PageCount, "#{__dir__}/niso_sts/page_count"
|
|
40
|
+
autoload :Paragraph, "#{__dir__}/niso_sts/paragraph"
|
|
41
|
+
autoload :Permissions, "#{__dir__}/niso_sts/permissions"
|
|
42
|
+
autoload :Reference, "#{__dir__}/niso_sts/reference"
|
|
43
|
+
autoload :ReferenceList, "#{__dir__}/niso_sts/reference_list"
|
|
44
|
+
autoload :ReferenceStandard, "#{__dir__}/niso_sts/reference_standard"
|
|
45
|
+
autoload :Section, "#{__dir__}/niso_sts/section"
|
|
46
|
+
autoload :SectionArray, "#{__dir__}/niso_sts/section_array"
|
|
47
|
+
autoload :Standard, "#{__dir__}/niso_sts/standard"
|
|
48
|
+
autoload :StandardIdentification,
|
|
49
|
+
"#{__dir__}/niso_sts/standard_identification"
|
|
50
|
+
autoload :StandardRef, "#{__dir__}/niso_sts/standard_ref"
|
|
51
|
+
autoload :StdCrossReference, "#{__dir__}/niso_sts/std_cross_reference"
|
|
52
|
+
autoload :StdId, "#{__dir__}/niso_sts/std_id"
|
|
53
|
+
autoload :StdIdGroup, "#{__dir__}/niso_sts/std_id_group"
|
|
54
|
+
autoload :Term, "#{__dir__}/niso_sts/term"
|
|
55
|
+
autoload :TermDisplay, "#{__dir__}/niso_sts/term_display"
|
|
56
|
+
autoload :TermSection, "#{__dir__}/niso_sts/term_section"
|
|
57
|
+
autoload :Title, "#{__dir__}/niso_sts/title"
|
|
58
|
+
autoload :TitleCompl, "#{__dir__}/niso_sts/title_compl"
|
|
59
|
+
autoload :TitleFull, "#{__dir__}/niso_sts/title_full"
|
|
60
|
+
autoload :TitleWrap, "#{__dir__}/niso_sts/title_wrap"
|
|
5
61
|
end
|
|
6
62
|
end
|
|
7
|
-
|
|
8
|
-
require_relative "niso_sts/back"
|
|
9
|
-
require_relative "niso_sts/body"
|
|
10
|
-
require_relative "niso_sts/front"
|
|
11
|
-
require_relative "niso_sts/list"
|
|
12
|
-
require_relative "niso_sts/metadata_iso"
|
|
13
|
-
require_relative "niso_sts/non_normative_note"
|
|
14
|
-
require_relative "niso_sts/list_item"
|
|
15
|
-
require_relative "niso_sts/paragraph"
|
|
16
|
-
require_relative "niso_sts/reference"
|
|
17
|
-
require_relative "niso_sts/reference_list"
|
|
18
|
-
require_relative "niso_sts/reference_standard"
|
|
19
|
-
require_relative "niso_sts/section"
|
|
20
|
-
require_relative "niso_sts/standard"
|
|
21
|
-
require_relative "niso_sts/adoption"
|
|
22
|
-
require_relative "niso_sts/adoption_front"
|
|
23
|
-
require_relative "niso_sts/term_display"
|
|
24
|
-
require_relative "niso_sts/term_section"
|
data/lib/sts/tbx_iso_tml/bold.rb
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
3
|
module Sts
|
|
6
4
|
module TbxIsoTml
|
|
7
5
|
class Bold < Lutaml::Model::Serializable
|
|
8
6
|
attribute :value, :string
|
|
9
7
|
|
|
10
8
|
xml do
|
|
11
|
-
|
|
9
|
+
element "bold"
|
|
12
10
|
namespace nil, nil
|
|
13
11
|
|
|
14
12
|
map_content to: :value
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
3
|
module Sts
|
|
6
4
|
module TbxIsoTml
|
|
7
5
|
class Caption < Lutaml::Model::Serializable
|
|
8
6
|
attribute :p, :string
|
|
9
7
|
|
|
10
8
|
xml do
|
|
11
|
-
|
|
9
|
+
element "caption"
|
|
12
10
|
|
|
13
11
|
map_element "p", to: :p
|
|
14
12
|
end
|
data/lib/sts/tbx_iso_tml/col.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
3
|
module Sts
|
|
6
4
|
module TbxIsoTml
|
|
7
5
|
class Col < Lutaml::Model::Serializable
|
|
@@ -11,7 +9,7 @@ module Sts
|
|
|
11
9
|
attribute :span, :string
|
|
12
10
|
|
|
13
11
|
xml do
|
|
14
|
-
|
|
12
|
+
element "col"
|
|
15
13
|
|
|
16
14
|
map_attribute "width", to: :width
|
|
17
15
|
map_attribute "char", to: :char, value_map: { to: { empty: :empty } }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sts
|
|
4
|
+
module TbxIsoTml
|
|
5
|
+
class CrossReference < Lutaml::Model::Serializable
|
|
6
|
+
attribute :value, :string
|
|
7
|
+
|
|
8
|
+
xml do
|
|
9
|
+
element "crossReference"
|
|
10
|
+
mixed_content
|
|
11
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
12
|
+
|
|
13
|
+
map_content to: :value
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -1,38 +1,30 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative "entailed_term"
|
|
4
|
-
require_relative "note"
|
|
5
|
-
require_relative "italic"
|
|
6
|
-
require_relative "math"
|
|
7
|
-
require_relative "../niso_sts/list"
|
|
8
|
-
require_relative "../niso_sts/reference_standard"
|
|
9
|
-
|
|
10
3
|
module Sts
|
|
11
4
|
module TbxIsoTml
|
|
12
5
|
class Definition < Lutaml::Model::Serializable
|
|
13
|
-
attribute :entailed_term, EntailedTerm, collection: true
|
|
14
|
-
attribute :note, Note
|
|
6
|
+
attribute :entailed_term, ::Sts::TbxIsoTml::EntailedTerm, collection: true
|
|
7
|
+
attribute :note, ::Sts::TbxIsoTml::Note
|
|
15
8
|
attribute :value, :string
|
|
16
|
-
attribute :italic, Italic
|
|
17
|
-
attribute :math, Sts::TbxIsoTml::Math
|
|
9
|
+
attribute :italic, ::Sts::TbxIsoTml::Italic
|
|
10
|
+
attribute :math, ::Sts::TbxIsoTml::Math
|
|
18
11
|
attribute :sub, :string
|
|
19
|
-
attribute :list, Sts::NisoSts::List, collection: true
|
|
20
|
-
attribute :std, Sts::NisoSts::ReferenceStandard, collection: true
|
|
12
|
+
attribute :list, ::Sts::NisoSts::List, collection: true
|
|
13
|
+
attribute :std, ::Sts::NisoSts::ReferenceStandard, collection: true
|
|
21
14
|
|
|
22
15
|
xml do
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
element "definition"
|
|
17
|
+
mixed_content
|
|
18
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
25
19
|
|
|
26
20
|
map_content to: :value
|
|
27
21
|
map_element "entailedTerm", to: :entailed_term
|
|
28
22
|
map_element "note", to: :note
|
|
29
|
-
map_element "italic", to: :italic
|
|
30
|
-
map_element "sub", to: :sub
|
|
31
|
-
map_element "list", to: :list
|
|
32
|
-
map_element "std", to: :std
|
|
33
|
-
map_element "math", to: :math
|
|
34
|
-
namespace: "http://www.w3.org/1998/Math/MathML",
|
|
35
|
-
prefix: "mml"
|
|
23
|
+
map_element "italic", to: :italic
|
|
24
|
+
map_element "sub", to: :sub
|
|
25
|
+
map_element "list", to: :list
|
|
26
|
+
map_element "std", to: :std
|
|
27
|
+
map_element "math", to: :math
|
|
36
28
|
end
|
|
37
29
|
end
|
|
38
30
|
end
|
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
3
|
module Sts
|
|
6
4
|
module TbxIsoTml
|
|
7
5
|
class EntailedTerm < Lutaml::Model::Serializable
|
|
8
6
|
attribute :target, :string
|
|
9
7
|
attribute :xtarget, :string
|
|
10
|
-
attribute :lang,
|
|
8
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
11
9
|
attribute :value, :string
|
|
12
10
|
|
|
13
11
|
xml do
|
|
14
|
-
|
|
15
|
-
namespace
|
|
12
|
+
element "entailedTerm"
|
|
13
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
16
14
|
|
|
17
|
-
map_attribute
|
|
18
|
-
map_attribute
|
|
19
|
-
map_attribute
|
|
20
|
-
namespace: "http://www.w3.org/XML/1998/namespace",
|
|
21
|
-
prefix: "xml"
|
|
15
|
+
map_attribute "target", to: :target
|
|
16
|
+
map_attribute "xtarget", to: :xtarget
|
|
17
|
+
map_attribute "lang", to: :lang
|
|
22
18
|
map_content to: :value
|
|
23
19
|
end
|
|
24
20
|
end
|
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
|
-
require_relative "entailed_term"
|
|
5
|
-
|
|
6
|
-
require_relative "../niso_sts/inline_formula"
|
|
7
4
|
|
|
8
5
|
module Sts
|
|
9
6
|
module TbxIsoTml
|
|
10
7
|
class Example < Lutaml::Model::Serializable
|
|
11
8
|
attribute :id, :string
|
|
12
9
|
attribute :value, :string
|
|
13
|
-
attribute :entailed_term, EntailedTerm, collection: true
|
|
14
|
-
attribute :inline_formula, Sts::NisoSts::InlineFormula
|
|
10
|
+
attribute :entailed_term, ::Sts::TbxIsoTml::EntailedTerm, collection: true
|
|
11
|
+
attribute :inline_formula, ::Sts::NisoSts::InlineFormula
|
|
15
12
|
|
|
16
13
|
xml do
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
element "example"
|
|
15
|
+
mixed_content
|
|
16
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
19
17
|
|
|
20
18
|
map_content to: :value
|
|
21
19
|
|
|
22
20
|
map_attribute "id", to: :id
|
|
23
21
|
|
|
24
22
|
map_element "entailedTerm", to: :entailed_term
|
|
25
|
-
map_element "inline-formula", to: :inline_formula
|
|
26
|
-
namespace: nil,
|
|
27
|
-
prefix: nil
|
|
23
|
+
map_element "inline-formula", to: :inline_formula
|
|
28
24
|
end
|
|
29
25
|
end
|
|
30
26
|
end
|