sts 0.3.3 → 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-https---raw-githubusercontent-com-riboseinc-oss-guides-master-ci-rubocop-yml +1 -0
- data/.rubocop_todo.yml +12 -15
- data/Gemfile +9 -13
- data/lib/sts/namespaces.rb +13 -0
- data/lib/sts/niso_sts/adoption.rb +9 -13
- data/lib/sts/niso_sts/adoption_front.rb +1 -3
- data/lib/sts/niso_sts/app.rb +14 -25
- 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 +5 -9
- 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 +4 -9
- data/lib/sts/niso_sts/def_list.rb +6 -10
- data/lib/sts/niso_sts/display_formula.rb +5 -8
- data/lib/sts/niso_sts/document_identification.rb +6 -8
- data/lib/sts/niso_sts/ext_link.rb +5 -9
- data/lib/sts/niso_sts/figure.rb +8 -15
- data/lib/sts/niso_sts/fn.rb +4 -9
- 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 +2 -6
- data/lib/sts/niso_sts/list.rb +5 -8
- data/lib/sts/niso_sts/list_item.rb +8 -13
- data/lib/sts/niso_sts/meta_date.rb +3 -5
- data/lib/sts/niso_sts/meta_note.rb +6 -9
- data/lib/sts/niso_sts/metadata_iso.rb +20 -30
- data/lib/sts/niso_sts/metadata_std.rb +25 -30
- data/lib/sts/niso_sts/mixed_citation.rb +8 -12
- data/lib/sts/{tbx_iso_tml → niso_sts}/named_content.rb +4 -7
- data/lib/sts/niso_sts/non_normative_example.rb +5 -10
- data/lib/sts/niso_sts/non_normative_note.rb +6 -9
- data/lib/sts/niso_sts/object_id.rb +3 -5
- data/lib/sts/niso_sts/page_count.rb +2 -4
- data/lib/sts/niso_sts/paragraph.rb +20 -37
- data/lib/sts/niso_sts/permissions.rb +4 -6
- data/lib/sts/niso_sts/reference.rb +6 -9
- data/lib/sts/niso_sts/reference_list.rb +7 -9
- data/lib/sts/niso_sts/reference_standard.rb +14 -19
- data/lib/sts/niso_sts/section.rb +19 -32
- data/lib/sts/niso_sts/section_array.rb +3 -7
- data/lib/sts/niso_sts/standard.rb +15 -19
- data/lib/sts/niso_sts/standard_identification.rb +13 -14
- data/lib/sts/niso_sts/standard_ref.rb +3 -5
- data/lib/sts/niso_sts/std_cross_reference.rb +3 -5
- data/lib/sts/niso_sts/std_id.rb +5 -7
- 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 +8 -15
- data/lib/sts/niso_sts/title.rb +3 -7
- 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 +15 -20
- data/lib/sts/niso_sts.rb +56 -18
- data/lib/sts/tbx_iso_tml/bold.rb +2 -4
- data/lib/sts/tbx_iso_tml/caption.rb +2 -4
- data/lib/sts/tbx_iso_tml/col.rb +6 -8
- data/lib/sts/tbx_iso_tml/cross_reference.rb +17 -0
- data/lib/sts/tbx_iso_tml/definition.rb +16 -24
- data/lib/sts/tbx_iso_tml/entailed_term.rb +9 -13
- data/lib/sts/tbx_iso_tml/example.rb +8 -12
- data/lib/sts/tbx_iso_tml/external_graphic.rb +3 -5
- data/lib/sts/tbx_iso_tml/external_source.rb +4 -6
- data/lib/sts/tbx_iso_tml/fn.rb +4 -6
- data/lib/sts/tbx_iso_tml/fn_group.rb +2 -6
- data/lib/sts/tbx_iso_tml/geographical_usage.rb +3 -5
- data/lib/sts/tbx_iso_tml/grammatical_gender.rb +3 -5
- data/lib/sts/tbx_iso_tml/grammatical_number.rb +3 -5
- data/lib/sts/tbx_iso_tml/italic.rb +4 -5
- data/lib/sts/tbx_iso_tml/lang_set.rb +16 -30
- data/lib/sts/tbx_iso_tml/math.rb +19 -32
- data/lib/sts/tbx_iso_tml/mfenced.rb +16 -21
- data/lib/sts/tbx_iso_tml/mfrac.rb +9 -12
- data/lib/sts/tbx_iso_tml/mi.rb +3 -4
- data/lib/sts/tbx_iso_tml/mrow.rb +15 -20
- data/lib/sts/tbx_iso_tml/mspace.rb +3 -5
- data/lib/sts/tbx_iso_tml/mstyle.rb +9 -9
- data/lib/sts/tbx_iso_tml/msub.rb +10 -15
- data/lib/sts/tbx_iso_tml/msup.rb +6 -11
- data/lib/sts/tbx_iso_tml/munder.rb +3 -7
- data/lib/sts/tbx_iso_tml/munderover.rb +6 -9
- data/lib/sts/tbx_iso_tml/normative_authorization.rb +3 -5
- data/lib/sts/tbx_iso_tml/note.rb +20 -32
- data/lib/sts/tbx_iso_tml/part_of_speech.rb +3 -5
- data/lib/sts/tbx_iso_tml/pronunciation.rb +16 -0
- data/lib/sts/tbx_iso_tml/see.rb +4 -6
- data/lib/sts/tbx_iso_tml/semantics.rb +8 -12
- data/lib/sts/tbx_iso_tml/source.rb +6 -8
- data/lib/sts/tbx_iso_tml/subject_field.rb +17 -0
- data/lib/sts/tbx_iso_tml/sup.rb +4 -7
- data/lib/sts/tbx_iso_tml/table.rb +8 -14
- data/lib/sts/tbx_iso_tml/table_break.rb +0 -2
- data/lib/sts/tbx_iso_tml/table_wrap.rb +8 -14
- data/lib/sts/tbx_iso_tml/table_wrap_foot.rb +2 -6
- data/lib/sts/tbx_iso_tml/tbody.rb +6 -10
- data/lib/sts/tbx_iso_tml/td.rb +20 -31
- data/lib/sts/tbx_iso_tml/term.rb +18 -34
- data/lib/sts/tbx_iso_tml/term_entry.rb +6 -10
- data/lib/sts/tbx_iso_tml/term_information_group.rb +13 -22
- data/lib/sts/tbx_iso_tml/term_type.rb +3 -5
- data/lib/sts/tbx_iso_tml/th.rb +19 -27
- data/lib/sts/tbx_iso_tml/thead.rb +6 -10
- data/lib/sts/tbx_iso_tml/tr.rb +3 -8
- data/lib/sts/tbx_iso_tml/xref.rb +5 -6
- 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 +17 -10
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
|
-
require_relative "mspace"
|
|
5
4
|
|
|
6
5
|
module Sts
|
|
7
6
|
module TbxIsoTml
|
|
8
7
|
class Mstyle < Lutaml::Model::Serializable
|
|
9
|
-
attribute :mathvariant,
|
|
10
|
-
attribute :mstyle, Mstyle
|
|
11
|
-
attribute :mspace, Mspace, collection: true
|
|
12
|
-
attribute :mi,
|
|
13
|
-
attribute :mn,
|
|
14
|
-
attribute :mo,
|
|
8
|
+
attribute :mathvariant, :string
|
|
9
|
+
attribute :mstyle, ::Sts::TbxIsoTml::Mstyle
|
|
10
|
+
attribute :mspace, ::Sts::TbxIsoTml::Mspace, collection: true
|
|
11
|
+
attribute :mi, :string, collection: true
|
|
12
|
+
attribute :mn, :string, collection: true
|
|
13
|
+
attribute :mo, :string, collection: true
|
|
15
14
|
|
|
16
15
|
xml do
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
element "mstyle"
|
|
17
|
+
mixed_content
|
|
18
|
+
namespace ::Sts::Namespaces::MathmlNamespace
|
|
19
19
|
|
|
20
20
|
map_attribute "mathvariant", to: :mathvariant
|
|
21
21
|
map_element "mi", to: :mi
|
data/lib/sts/tbx_iso_tml/msub.rb
CHANGED
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "mstyle"
|
|
6
|
-
require_relative "mrow"
|
|
7
|
-
require_relative "mspace"
|
|
8
|
-
|
|
9
3
|
module Sts
|
|
10
4
|
module TbxIsoTml
|
|
11
5
|
class Msub < Lutaml::Model::Serializable
|
|
12
|
-
attribute :mstyle, Mstyle, collection: true
|
|
13
|
-
attribute :mrow, Mrow
|
|
14
|
-
attribute :mspace, Mspace
|
|
15
|
-
attribute :mo,
|
|
16
|
-
attribute :mi,
|
|
17
|
-
attribute :mn,
|
|
18
|
-
attribute :mtext,
|
|
6
|
+
attribute :mstyle, ::Sts::TbxIsoTml::Mstyle, collection: true
|
|
7
|
+
attribute :mrow, ::Sts::TbxIsoTml::Mrow
|
|
8
|
+
attribute :mspace, ::Sts::TbxIsoTml::Mspace
|
|
9
|
+
attribute :mo, :string, collection: true
|
|
10
|
+
attribute :mi, :string, collection: true
|
|
11
|
+
attribute :mn, :string, collection: true
|
|
12
|
+
attribute :mtext, :string, collection: true
|
|
19
13
|
|
|
20
14
|
xml do
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
element "msub"
|
|
16
|
+
mixed_content
|
|
17
|
+
namespace ::Sts::Namespaces::MathmlNamespace
|
|
23
18
|
|
|
24
19
|
map_element "mstyle", to: :mstyle
|
|
25
20
|
map_element "mo", to: :mo
|
data/lib/sts/tbx_iso_tml/msup.rb
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "mstyle"
|
|
6
|
-
require_relative "mrow"
|
|
7
|
-
|
|
8
3
|
module Sts
|
|
9
4
|
module TbxIsoTml
|
|
10
5
|
class Msup < Lutaml::Model::Serializable
|
|
11
|
-
attribute :mstyle, Mstyle
|
|
12
|
-
attribute :mrow, Mrow
|
|
13
|
-
attribute :mi,
|
|
14
|
-
attribute :mn,
|
|
6
|
+
attribute :mstyle, ::Sts::TbxIsoTml::Mstyle
|
|
7
|
+
attribute :mrow, ::Sts::TbxIsoTml::Mrow
|
|
8
|
+
attribute :mi, :string
|
|
9
|
+
attribute :mn, :string, collection: true
|
|
15
10
|
|
|
16
11
|
xml do
|
|
17
|
-
|
|
18
|
-
namespace
|
|
12
|
+
element "msup"
|
|
13
|
+
namespace ::Sts::Namespaces::MathmlNamespace
|
|
19
14
|
|
|
20
15
|
map_element "mstyle", to: :mstyle
|
|
21
16
|
map_element "mi", to: :mi
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "mrow"
|
|
6
|
-
|
|
7
3
|
module Sts
|
|
8
4
|
module TbxIsoTml
|
|
9
5
|
class Munder < Lutaml::Model::Serializable
|
|
10
|
-
attribute :mrow, Mrow, collection: true
|
|
6
|
+
attribute :mrow, ::Sts::TbxIsoTml::Mrow, collection: true
|
|
11
7
|
|
|
12
8
|
xml do
|
|
13
|
-
|
|
14
|
-
namespace
|
|
9
|
+
element "munder"
|
|
10
|
+
namespace ::Sts::Namespaces::MathmlNamespace
|
|
15
11
|
|
|
16
12
|
map_element "mrow", to: :mrow
|
|
17
13
|
end
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "mrow"
|
|
6
|
-
|
|
7
3
|
module Sts
|
|
8
4
|
module TbxIsoTml
|
|
9
5
|
class Munderover < Lutaml::Model::Serializable
|
|
10
|
-
attribute :mo,
|
|
11
|
-
attribute :mi,
|
|
12
|
-
attribute :mrow, Mrow, collection: true
|
|
6
|
+
attribute :mo, :string
|
|
7
|
+
attribute :mi, :string
|
|
8
|
+
attribute :mrow, ::Sts::TbxIsoTml::Mrow, collection: true
|
|
13
9
|
|
|
14
10
|
xml do
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
element "munderover"
|
|
12
|
+
mixed_content
|
|
13
|
+
namespace ::Sts::Namespaces::MathmlNamespace
|
|
17
14
|
|
|
18
15
|
map_element "mo", to: :mo
|
|
19
16
|
map_element "mi", to: :mi
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
3
|
module Sts
|
|
6
4
|
module TbxIsoTml
|
|
7
5
|
class NormativeAuthorization < Lutaml::Model::Serializable
|
|
8
|
-
attribute :value,
|
|
6
|
+
attribute :value, :string,
|
|
9
7
|
values: %w[admittedTerm preferredTerm deprecatedTerm]
|
|
10
8
|
|
|
11
9
|
xml do
|
|
12
|
-
|
|
13
|
-
namespace
|
|
10
|
+
element "normativeAuthorization"
|
|
11
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
14
12
|
|
|
15
13
|
map_attribute "value", to: :value
|
|
16
14
|
end
|
data/lib/sts/tbx_iso_tml/note.rb
CHANGED
|
@@ -1,46 +1,34 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "table_wrap"
|
|
6
|
-
require_relative "entailed_term"
|
|
7
|
-
require_relative "math"
|
|
8
|
-
require_relative "sup"
|
|
9
|
-
require_relative "italic"
|
|
10
|
-
require_relative "xref"
|
|
11
|
-
require_relative "../niso_sts/list"
|
|
12
|
-
require_relative "../niso_sts/reference_standard"
|
|
13
|
-
|
|
14
3
|
module Sts
|
|
15
4
|
module TbxIsoTml
|
|
16
5
|
class Note < Lutaml::Model::Serializable
|
|
17
|
-
attribute :id,
|
|
18
|
-
attribute :value,
|
|
19
|
-
attribute :table_wrap, Sts::TbxIsoTml::TableWrap
|
|
20
|
-
attribute :entailed_term, EntailedTerm, collection: true
|
|
21
|
-
attribute :math, Sts::TbxIsoTml::Math, collection: true
|
|
22
|
-
attribute :xref, Sts::TbxIsoTml::Xref
|
|
23
|
-
attribute :list, Sts::NisoSts::List
|
|
24
|
-
attribute :std, Sts::NisoSts::ReferenceStandard
|
|
25
|
-
attribute :sup, Sup
|
|
26
|
-
attribute :italic, Italic, collection: true
|
|
6
|
+
attribute :id, :string
|
|
7
|
+
attribute :value, :string
|
|
8
|
+
attribute :table_wrap, ::Sts::TbxIsoTml::TableWrap
|
|
9
|
+
attribute :entailed_term, ::Sts::TbxIsoTml::EntailedTerm, collection: true
|
|
10
|
+
attribute :math, ::Sts::TbxIsoTml::Math, collection: true
|
|
11
|
+
attribute :xref, ::Sts::TbxIsoTml::Xref
|
|
12
|
+
attribute :list, ::Sts::NisoSts::List
|
|
13
|
+
attribute :std, ::Sts::NisoSts::ReferenceStandard
|
|
14
|
+
attribute :sup, ::Sts::TbxIsoTml::Sup
|
|
15
|
+
attribute :italic, ::Sts::TbxIsoTml::Italic, collection: true
|
|
27
16
|
|
|
28
17
|
xml do
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
element "note"
|
|
19
|
+
mixed_content
|
|
20
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
31
21
|
|
|
32
22
|
map_attribute "id", to: :id
|
|
33
23
|
map_content to: :value
|
|
34
24
|
map_element "entailedTerm", to: :entailed_term
|
|
35
|
-
map_element "list", to: :list
|
|
36
|
-
map_element "table-wrap", to: :table_wrap
|
|
37
|
-
map_element "std", to: :std
|
|
38
|
-
map_element "sup", to: :sup
|
|
39
|
-
map_element "italic", to: :italic
|
|
40
|
-
map_element "xref", to: :xref
|
|
41
|
-
map_element "math", to: :math
|
|
42
|
-
namespace: "http://www.w3.org/1998/Math/MathML",
|
|
43
|
-
prefix: "mml"
|
|
25
|
+
map_element "list", to: :list
|
|
26
|
+
map_element "table-wrap", to: :table_wrap
|
|
27
|
+
map_element "std", to: :std
|
|
28
|
+
map_element "sup", to: :sup
|
|
29
|
+
map_element "italic", to: :italic
|
|
30
|
+
map_element "xref", to: :xref
|
|
31
|
+
map_element "math", to: :math
|
|
44
32
|
end
|
|
45
33
|
end
|
|
46
34
|
end
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
3
|
module Sts
|
|
6
4
|
module TbxIsoTml
|
|
7
5
|
class PartOfSpeech < Lutaml::Model::Serializable
|
|
8
|
-
attribute :value,
|
|
6
|
+
attribute :value, :string,
|
|
9
7
|
values: %w[noun verb adj adv]
|
|
10
8
|
|
|
11
9
|
xml do
|
|
12
|
-
|
|
13
|
-
namespace
|
|
10
|
+
element "partOfSpeech"
|
|
11
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
14
12
|
|
|
15
13
|
map_attribute "value", to: :value
|
|
16
14
|
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sts
|
|
4
|
+
module TbxIsoTml
|
|
5
|
+
class Pronunciation < Lutaml::Model::Serializable
|
|
6
|
+
attribute :value, :string
|
|
7
|
+
|
|
8
|
+
xml do
|
|
9
|
+
element "pronunciation"
|
|
10
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
11
|
+
|
|
12
|
+
map_content to: :value
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
data/lib/sts/tbx_iso_tml/see.rb
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
3
|
module Sts
|
|
6
4
|
module TbxIsoTml
|
|
7
5
|
class See < Lutaml::Model::Serializable
|
|
8
|
-
attribute :script,
|
|
9
|
-
attribute :value,
|
|
6
|
+
attribute :script, :string
|
|
7
|
+
attribute :value, :string
|
|
10
8
|
|
|
11
9
|
xml do
|
|
12
|
-
|
|
13
|
-
namespace
|
|
10
|
+
element "see"
|
|
11
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
14
12
|
|
|
15
13
|
map_attribute "script", to: :script
|
|
16
14
|
map_content to: :value
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "mrow"
|
|
6
|
-
require_relative "munder"
|
|
7
|
-
|
|
8
3
|
module Sts
|
|
9
4
|
module TbxIsoTml
|
|
10
5
|
class Semantics < Lutaml::Model::Serializable
|
|
11
|
-
attribute :mrow, Mrow, collection: true
|
|
12
|
-
attribute :mo,
|
|
13
|
-
attribute :mtext,
|
|
14
|
-
attribute :munder, Sts::TbxIsoTml::Munder
|
|
15
|
-
attribute :content,
|
|
6
|
+
attribute :mrow, ::Sts::TbxIsoTml::Mrow, collection: true
|
|
7
|
+
attribute :mo, :string
|
|
8
|
+
attribute :mtext, :string
|
|
9
|
+
attribute :munder, ::Sts::TbxIsoTml::Munder
|
|
10
|
+
attribute :content, :string
|
|
16
11
|
|
|
17
12
|
xml do
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
element "semantics"
|
|
14
|
+
mixed_content
|
|
15
|
+
namespace ::Sts::Namespaces::MathmlNamespace
|
|
20
16
|
|
|
21
17
|
map_element "mrow", to: :mrow
|
|
22
18
|
map_element "mo", to: :mo
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative "italic"
|
|
4
|
-
require "lutaml/model"
|
|
5
|
-
|
|
6
3
|
module Sts
|
|
7
4
|
module TbxIsoTml
|
|
8
5
|
class Source < Lutaml::Model::Serializable
|
|
9
|
-
attribute :value,
|
|
10
|
-
attribute :italic, Italic
|
|
6
|
+
attribute :value, :string
|
|
7
|
+
attribute :italic, ::Sts::TbxIsoTml::Italic
|
|
11
8
|
|
|
12
9
|
xml do
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
element "source"
|
|
11
|
+
mixed_content
|
|
12
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
15
13
|
|
|
16
14
|
map_content to: :value
|
|
17
|
-
map_element "italic", to: :italic
|
|
15
|
+
map_element "italic", to: :italic
|
|
18
16
|
end
|
|
19
17
|
end
|
|
20
18
|
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sts
|
|
4
|
+
module TbxIsoTml
|
|
5
|
+
class SubjectField < Lutaml::Model::Serializable
|
|
6
|
+
attribute :value, :string
|
|
7
|
+
|
|
8
|
+
xml do
|
|
9
|
+
element "subjectField"
|
|
10
|
+
mixed_content
|
|
11
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
12
|
+
|
|
13
|
+
map_content to: :value
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
data/lib/sts/tbx_iso_tml/sup.rb
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
|
-
require_relative "xref"
|
|
5
4
|
|
|
6
5
|
module Sts
|
|
7
6
|
module TbxIsoTml
|
|
8
|
-
class Xref < Lutaml::Model::Serializable; end
|
|
9
|
-
|
|
10
7
|
class Sup < Lutaml::Model::Serializable
|
|
11
|
-
attribute :value,
|
|
12
|
-
attribute :xref, Xref
|
|
8
|
+
attribute :value, :string
|
|
9
|
+
attribute :xref, ::Sts::TbxIsoTml::Xref
|
|
13
10
|
|
|
14
11
|
xml do
|
|
15
|
-
|
|
12
|
+
element "sup"
|
|
16
13
|
|
|
17
|
-
map_element "xref", to: :xref
|
|
14
|
+
map_element "xref", to: :xref
|
|
18
15
|
map_content to: :value
|
|
19
16
|
end
|
|
20
17
|
end
|
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "col"
|
|
6
|
-
require_relative "thead"
|
|
7
|
-
require_relative "tbody"
|
|
8
|
-
|
|
9
3
|
module Sts
|
|
10
4
|
module TbxIsoTml
|
|
11
5
|
class Table < Lutaml::Model::Serializable
|
|
12
|
-
attribute :col, Sts::TbxIsoTml::Col, collection: true
|
|
13
|
-
attribute :thead, Sts::TbxIsoTml::Thead
|
|
14
|
-
attribute :tbody, Sts::TbxIsoTml::Tbody
|
|
15
|
-
attribute :border,
|
|
16
|
-
attribute :rules,
|
|
17
|
-
attribute :frame,
|
|
18
|
-
attribute :width,
|
|
6
|
+
attribute :col, ::Sts::TbxIsoTml::Col, collection: true
|
|
7
|
+
attribute :thead, ::Sts::TbxIsoTml::Thead
|
|
8
|
+
attribute :tbody, ::Sts::TbxIsoTml::Tbody
|
|
9
|
+
attribute :border, :string
|
|
10
|
+
attribute :rules, :string
|
|
11
|
+
attribute :frame, :string
|
|
12
|
+
attribute :width, :string
|
|
19
13
|
|
|
20
14
|
xml do
|
|
21
|
-
|
|
15
|
+
element "table"
|
|
22
16
|
|
|
23
17
|
map_attribute "border", to: :border
|
|
24
18
|
map_attribute "rules", to: :rules
|
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "table"
|
|
6
|
-
require_relative "table_wrap_foot"
|
|
7
|
-
|
|
8
3
|
module Sts
|
|
9
4
|
module TbxIsoTml
|
|
10
5
|
class TableWrap < Lutaml::Model::Serializable
|
|
11
|
-
attribute :id,
|
|
12
|
-
attribute :orientation,
|
|
13
|
-
attribute :position,
|
|
14
|
-
attribute :label,
|
|
15
|
-
attribute :table, Sts::TbxIsoTml::Table, collection: true
|
|
16
|
-
attribute :table_wrap_foot, Sts::TbxIsoTml::TableWrapFoot
|
|
6
|
+
attribute :id, :string
|
|
7
|
+
attribute :orientation, :string
|
|
8
|
+
attribute :position, :string
|
|
9
|
+
attribute :label, :string
|
|
10
|
+
attribute :table, ::Sts::TbxIsoTml::Table, collection: true
|
|
11
|
+
attribute :table_wrap_foot, ::Sts::TbxIsoTml::TableWrapFoot
|
|
17
12
|
|
|
18
13
|
# TODO: This require will cause a loop when defined in header
|
|
19
|
-
|
|
20
|
-
attribute :caption, Sts::NisoSts::Caption
|
|
14
|
+
attribute :caption, ::Sts::NisoSts::Caption
|
|
21
15
|
|
|
22
16
|
xml do
|
|
23
|
-
|
|
17
|
+
element "table-wrap"
|
|
24
18
|
|
|
25
19
|
map_attribute "id", to: :id
|
|
26
20
|
map_attribute "orientation", to: :orientation
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "fn_group"
|
|
6
|
-
|
|
7
3
|
module Sts
|
|
8
4
|
module TbxIsoTml
|
|
9
5
|
class TableWrapFoot < Lutaml::Model::Serializable
|
|
10
|
-
attribute :fn_group, Sts::TbxIsoTml::FnGroup
|
|
6
|
+
attribute :fn_group, ::Sts::TbxIsoTml::FnGroup
|
|
11
7
|
|
|
12
8
|
xml do
|
|
13
|
-
|
|
9
|
+
element "table-wrap-foot"
|
|
14
10
|
|
|
15
11
|
map_element "fn-group", to: :fn_group
|
|
16
12
|
end
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "tr"
|
|
6
|
-
|
|
7
3
|
module Sts
|
|
8
4
|
module TbxIsoTml
|
|
9
5
|
class Tbody < Lutaml::Model::Serializable
|
|
10
|
-
attribute :tr, Sts::TbxIsoTml::Tr, collection: true
|
|
11
|
-
attribute :char,
|
|
12
|
-
attribute :charoff,
|
|
13
|
-
attribute :valign,
|
|
6
|
+
attribute :tr, ::Sts::TbxIsoTml::Tr, collection: true
|
|
7
|
+
attribute :char, :string
|
|
8
|
+
attribute :charoff, :string
|
|
9
|
+
attribute :valign, :string
|
|
14
10
|
|
|
15
11
|
xml do
|
|
16
|
-
|
|
12
|
+
element "tbody"
|
|
17
13
|
|
|
18
|
-
map_attribute "char", to: :char
|
|
14
|
+
map_attribute "char", to: :char, value_map: { to: { empty: :empty } }
|
|
19
15
|
map_attribute "charoff", to: :charoff
|
|
20
16
|
map_attribute "valign", to: :valign
|
|
21
17
|
|
data/lib/sts/tbx_iso_tml/td.rb
CHANGED
|
@@ -1,45 +1,34 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "italic"
|
|
6
|
-
require_relative "xref"
|
|
7
|
-
require_relative "bold"
|
|
8
|
-
require_relative "../niso_sts/reference_standard"
|
|
9
|
-
require_relative "../niso_sts/inline_formula"
|
|
10
|
-
require_relative "../niso_sts/non_normative_note"
|
|
11
|
-
require_relative "../niso_sts/graphic"
|
|
12
|
-
require_relative "../niso_sts/def_list"
|
|
13
|
-
require_relative "../niso_sts/paragraph"
|
|
14
|
-
|
|
15
3
|
module Sts
|
|
16
4
|
module TbxIsoTml
|
|
17
5
|
class Td < Lutaml::Model::Serializable
|
|
18
|
-
attribute :content,
|
|
19
|
-
attribute :align,
|
|
20
|
-
attribute :scope,
|
|
21
|
-
attribute :style,
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :align, :string
|
|
8
|
+
attribute :scope, :string
|
|
9
|
+
attribute :style, :string
|
|
22
10
|
attribute :bold, Bold
|
|
23
11
|
attribute :italic, Italic
|
|
24
|
-
attribute :content_type,
|
|
25
|
-
attribute :char,
|
|
26
|
-
attribute :charoff,
|
|
27
|
-
attribute :colspan,
|
|
28
|
-
attribute :rowspan,
|
|
29
|
-
attribute :valign,
|
|
30
|
-
attribute :inline_formula, Sts::NisoSts::InlineFormula, collection: true
|
|
12
|
+
attribute :content_type, :string
|
|
13
|
+
attribute :char, :string
|
|
14
|
+
attribute :charoff, :string
|
|
15
|
+
attribute :colspan, :string
|
|
16
|
+
attribute :rowspan, :string
|
|
17
|
+
attribute :valign, :string
|
|
18
|
+
attribute :inline_formula, ::Sts::NisoSts::InlineFormula, collection: true
|
|
31
19
|
attribute :non_normative_note,
|
|
32
|
-
Sts::NisoSts::NonNormativeNote,
|
|
20
|
+
::Sts::NisoSts::NonNormativeNote,
|
|
33
21
|
collection: true
|
|
34
|
-
attribute :list, Sts::NisoSts::List
|
|
22
|
+
attribute :list, ::Sts::NisoSts::List
|
|
35
23
|
attribute :xref, Xref, collection: true
|
|
36
|
-
attribute :std, Sts::NisoSts::ReferenceStandard
|
|
37
|
-
attribute :graphic, Sts::NisoSts::Graphic
|
|
38
|
-
attribute :def_list, Sts::NisoSts::DefList
|
|
39
|
-
attribute :paragraph, Sts::NisoSts::Paragraph
|
|
24
|
+
attribute :std, ::Sts::NisoSts::ReferenceStandard
|
|
25
|
+
attribute :graphic, ::Sts::NisoSts::Graphic
|
|
26
|
+
attribute :def_list, ::Sts::NisoSts::DefList
|
|
27
|
+
attribute :paragraph, ::Sts::NisoSts::Paragraph
|
|
40
28
|
|
|
41
29
|
xml do
|
|
42
|
-
|
|
30
|
+
element "td"
|
|
31
|
+
mixed_content
|
|
43
32
|
|
|
44
33
|
map_content to: :content
|
|
45
34
|
|
|
@@ -47,7 +36,7 @@ module Sts
|
|
|
47
36
|
map_attribute "scope", to: :scope
|
|
48
37
|
map_attribute "style", to: :style
|
|
49
38
|
map_attribute "content-type", to: :content_type
|
|
50
|
-
map_attribute "char", to: :char
|
|
39
|
+
map_attribute "char", to: :char, value_map: { to: { empty: :empty } }
|
|
51
40
|
map_attribute "charoff", to: :charoff
|
|
52
41
|
map_attribute "colspan", to: :colspan
|
|
53
42
|
map_attribute "rowspan", to: :rowspan
|