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
|
@@ -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,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 See < Lutaml::Model::Serializable
|
|
@@ -9,8 +7,8 @@ module Sts
|
|
|
9
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
|
|
6
|
+
attribute :mrow, ::Sts::TbxIsoTml::Mrow, collection: true
|
|
12
7
|
attribute :mo, :string
|
|
13
8
|
attribute :mtext, :string
|
|
14
|
-
attribute :munder, Sts::TbxIsoTml::Munder
|
|
9
|
+
attribute :munder, ::Sts::TbxIsoTml::Munder
|
|
15
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
6
|
attribute :value, :string
|
|
10
|
-
attribute :italic, Italic
|
|
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
8
|
attribute :value, :string
|
|
12
|
-
attribute :xref, Xref
|
|
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
|
|
6
|
+
attribute :col, ::Sts::TbxIsoTml::Col, collection: true
|
|
7
|
+
attribute :thead, ::Sts::TbxIsoTml::Thead
|
|
8
|
+
attribute :tbody, ::Sts::TbxIsoTml::Tbody
|
|
15
9
|
attribute :border, :string
|
|
16
10
|
attribute :rules, :string
|
|
17
11
|
attribute :frame, :string
|
|
18
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,10 +1,5 @@
|
|
|
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
|
|
@@ -12,15 +7,14 @@ module Sts
|
|
|
12
7
|
attribute :orientation, :string
|
|
13
8
|
attribute :position, :string
|
|
14
9
|
attribute :label, :string
|
|
15
|
-
attribute :table, Sts::TbxIsoTml::Table, collection: true
|
|
16
|
-
attribute :table_wrap_foot, Sts::TbxIsoTml::TableWrapFoot
|
|
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,19 +1,15 @@
|
|
|
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
|
|
6
|
+
attribute :tr, ::Sts::TbxIsoTml::Tr, collection: true
|
|
11
7
|
attribute :char, :string
|
|
12
8
|
attribute :charoff, :string
|
|
13
9
|
attribute :valign, :string
|
|
14
10
|
|
|
15
11
|
xml do
|
|
16
|
-
|
|
12
|
+
element "tbody"
|
|
17
13
|
|
|
18
14
|
map_attribute "char", to: :char, value_map: { to: { empty: :empty } }
|
|
19
15
|
map_attribute "charoff", to: :charoff
|
data/lib/sts/tbx_iso_tml/td.rb
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
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
|
|
@@ -27,19 +15,20 @@ module Sts
|
|
|
27
15
|
attribute :colspan, :string
|
|
28
16
|
attribute :rowspan, :string
|
|
29
17
|
attribute :valign, :string
|
|
30
|
-
attribute :inline_formula, Sts::NisoSts::InlineFormula, collection: true
|
|
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
|
|
data/lib/sts/tbx_iso_tml/term.rb
CHANGED
|
@@ -1,47 +1,31 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "italic"
|
|
6
|
-
require_relative "math"
|
|
7
|
-
require_relative "named_content"
|
|
8
|
-
require_relative "xref"
|
|
9
|
-
|
|
10
|
-
require_relative "../niso_sts/inline_formula"
|
|
11
|
-
|
|
12
3
|
module Sts
|
|
13
4
|
module TbxIsoTml
|
|
14
5
|
class Term < Lutaml::Model::Serializable
|
|
15
6
|
attribute :id, :string
|
|
16
7
|
attribute :script, :string
|
|
17
8
|
attribute :value, :string
|
|
18
|
-
attribute :italic, Sts::TbxIsoTml::Italic
|
|
9
|
+
attribute :italic, ::Sts::TbxIsoTml::Italic
|
|
19
10
|
attribute :bold, :string
|
|
20
11
|
attribute :sub, :string
|
|
21
|
-
attribute :math, Sts::TbxIsoTml::Math
|
|
22
|
-
attribute :xref, Sts::TbxIsoTml::Xref
|
|
23
|
-
attribute :inline_formula, Sts::NisoSts::InlineFormula, collection: true
|
|
24
|
-
attribute :named_content, Sts::TbxIsoTml::NamedContent
|
|
12
|
+
attribute :math, ::Sts::TbxIsoTml::Math
|
|
13
|
+
attribute :xref, ::Sts::TbxIsoTml::Xref
|
|
14
|
+
attribute :inline_formula, ::Sts::NisoSts::InlineFormula, collection: true
|
|
25
15
|
|
|
26
16
|
xml do
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
element "term"
|
|
18
|
+
mixed_content
|
|
19
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
29
20
|
|
|
30
21
|
map_attribute "id", to: :id
|
|
31
22
|
map_attribute "script", to: :script
|
|
32
|
-
map_element "inline-formula", to: :inline_formula
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
map_element "
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
map_element "italic", to: :italic, namespace: nil, prefix: nil
|
|
39
|
-
map_element "bold", to: :bold, namespace: nil, prefix: nil
|
|
40
|
-
map_element "sub", to: :sub, namespace: nil, prefix: nil
|
|
41
|
-
map_element "xref", to: :xref, namespace: nil, prefix: nil
|
|
42
|
-
map_element "math", to: :math,
|
|
43
|
-
namespace: "http://www.w3.org/1998/Math/MathML",
|
|
44
|
-
prefix: "mml"
|
|
23
|
+
map_element "inline-formula", to: :inline_formula
|
|
24
|
+
map_element "italic", to: :italic
|
|
25
|
+
map_element "bold", to: :bold
|
|
26
|
+
map_element "sub", to: :sub
|
|
27
|
+
map_element "xref", to: :xref
|
|
28
|
+
map_element "math", to: :math
|
|
45
29
|
map_content to: :value
|
|
46
30
|
end
|
|
47
31
|
end
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "lang_set"
|
|
6
|
-
require_relative "external_graphic"
|
|
7
|
-
|
|
8
3
|
module Sts
|
|
9
4
|
module TbxIsoTml
|
|
10
5
|
class TermEntry < Lutaml::Model::Serializable
|
|
11
6
|
attribute :id, :string
|
|
12
|
-
attribute :lang_set, LangSet, collection: true
|
|
13
|
-
attribute :x_graphic, ExternalGraphic, collection: true
|
|
7
|
+
attribute :lang_set, ::Sts::TbxIsoTml::LangSet, collection: true
|
|
8
|
+
attribute :x_graphic, ::Sts::TbxIsoTml::ExternalGraphic, collection: true
|
|
14
9
|
|
|
15
10
|
xml do
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
element "termEntry"
|
|
12
|
+
mixed_content
|
|
13
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
18
14
|
|
|
19
15
|
map_attribute "id", to: :id
|
|
20
16
|
map_element "langSet", to: :lang_set
|
|
@@ -1,32 +1,23 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "term"
|
|
6
|
-
require_relative "part_of_speech"
|
|
7
|
-
require_relative "normative_authorization"
|
|
8
|
-
require_relative "geographical_usage"
|
|
9
|
-
require_relative "grammatical_gender"
|
|
10
|
-
require_relative "grammatical_number"
|
|
11
|
-
require_relative "term_type"
|
|
12
|
-
|
|
13
3
|
module Sts
|
|
14
4
|
module TbxIsoTml
|
|
15
5
|
class TermInformationGroup < Lutaml::Model::Serializable
|
|
16
|
-
attribute :term, Term
|
|
17
|
-
attribute :pos, PartOfSpeech
|
|
6
|
+
attribute :term, ::Sts::TbxIsoTml::Term
|
|
7
|
+
attribute :pos, ::Sts::TbxIsoTml::PartOfSpeech
|
|
18
8
|
attribute :id, :string
|
|
19
9
|
attribute :usage_note, :string
|
|
20
|
-
attribute :normative_authorization, NormativeAuthorization
|
|
21
|
-
attribute :geographical_usage, GeographicalUsage
|
|
22
|
-
attribute :grammatical_gender, GrammaticalGender
|
|
23
|
-
attribute :grammatical_number, GrammaticalNumber
|
|
24
|
-
attribute :pronunciation,
|
|
25
|
-
attribute :term_type, TermType
|
|
10
|
+
attribute :normative_authorization, ::Sts::TbxIsoTml::NormativeAuthorization
|
|
11
|
+
attribute :geographical_usage, ::Sts::TbxIsoTml::GeographicalUsage
|
|
12
|
+
attribute :grammatical_gender, ::Sts::TbxIsoTml::GrammaticalGender
|
|
13
|
+
attribute :grammatical_number, ::Sts::TbxIsoTml::GrammaticalNumber
|
|
14
|
+
attribute :pronunciation, ::Sts::TbxIsoTml::Pronunciation
|
|
15
|
+
attribute :term_type, ::Sts::TbxIsoTml::TermType
|
|
26
16
|
|
|
27
17
|
xml do
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
element "tig"
|
|
19
|
+
mixed_content
|
|
20
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
30
21
|
|
|
31
22
|
map_attribute "id", to: :id
|
|
32
23
|
|
|
@@ -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 TermType < Lutaml::Model::Serializable
|
|
@@ -9,8 +7,8 @@ module Sts
|
|
|
9
7
|
values: %w[acronym abbreviation equation formula fullForm symbol variant]
|
|
10
8
|
|
|
11
9
|
xml do
|
|
12
|
-
|
|
13
|
-
namespace
|
|
10
|
+
element "termType"
|
|
11
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
14
12
|
|
|
15
13
|
map_attribute "value", to: :value
|
|
16
14
|
end
|
data/lib/sts/tbx_iso_tml/th.rb
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "bold"
|
|
6
|
-
require_relative "italic"
|
|
7
|
-
require_relative "table_break"
|
|
8
|
-
require_relative "xref"
|
|
9
|
-
require_relative "../niso_sts/reference_standard"
|
|
10
|
-
require_relative "../niso_sts/inline_formula"
|
|
11
|
-
|
|
12
3
|
module Sts
|
|
13
4
|
module TbxIsoTml
|
|
14
5
|
class Th < Lutaml::Model::Serializable
|
|
@@ -18,19 +9,20 @@ module Sts
|
|
|
18
9
|
attribute :scope, :string
|
|
19
10
|
attribute :style, :string
|
|
20
11
|
attribute :rowspan, :string
|
|
21
|
-
attribute :break, TableBreak
|
|
12
|
+
attribute :break, ::Sts::TbxIsoTml::TableBreak
|
|
22
13
|
attribute :content_type, :string
|
|
23
14
|
attribute :char, :string
|
|
24
15
|
attribute :charoff, :string
|
|
25
16
|
attribute :valign, :string
|
|
26
|
-
attribute :italic, Italic
|
|
27
|
-
attribute :bold, Bold
|
|
28
|
-
attribute :std, Sts::NisoSts::ReferenceStandard
|
|
29
|
-
attribute :xref, Xref
|
|
30
|
-
attribute :inline_formula, Sts::NisoSts::InlineFormula, collection: true
|
|
17
|
+
attribute :italic, ::Sts::TbxIsoTml::Italic
|
|
18
|
+
attribute :bold, ::Sts::TbxIsoTml::Bold
|
|
19
|
+
attribute :std, ::Sts::NisoSts::ReferenceStandard
|
|
20
|
+
attribute :xref, ::Sts::TbxIsoTml::Xref
|
|
21
|
+
attribute :inline_formula, ::Sts::NisoSts::InlineFormula, collection: true
|
|
31
22
|
|
|
32
23
|
xml do
|
|
33
|
-
|
|
24
|
+
element "th"
|
|
25
|
+
mixed_content
|
|
34
26
|
|
|
35
27
|
map_content to: :content
|
|
36
28
|
map_attribute "colspan", to: :colspan
|
|
@@ -1,19 +1,15 @@
|
|
|
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 Thead < Lutaml::Model::Serializable
|
|
10
|
-
attribute :tr, Sts::TbxIsoTml::Tr, collection: true
|
|
6
|
+
attribute :tr, ::Sts::TbxIsoTml::Tr, collection: true
|
|
11
7
|
attribute :char, :string
|
|
12
8
|
attribute :charoff, :string
|
|
13
9
|
attribute :valign, :string
|
|
14
10
|
|
|
15
11
|
xml do
|
|
16
|
-
|
|
12
|
+
element "thead"
|
|
17
13
|
|
|
18
14
|
map_attribute "char", to: :char, value_map: { to: { empty: :empty } }
|
|
19
15
|
map_attribute "charoff", to: :charoff
|
data/lib/sts/tbx_iso_tml/tr.rb
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "th"
|
|
6
|
-
require_relative "td"
|
|
7
|
-
|
|
8
3
|
module Sts
|
|
9
4
|
module TbxIsoTml
|
|
10
5
|
class Tr < Lutaml::Model::Serializable
|
|
11
|
-
attribute :th, Sts::TbxIsoTml::Th, collection: true
|
|
12
|
-
attribute :td, Sts::TbxIsoTml::Td, collection: true
|
|
6
|
+
attribute :th, ::Sts::TbxIsoTml::Th, collection: true
|
|
7
|
+
attribute :td, ::Sts::TbxIsoTml::Td, collection: true
|
|
13
8
|
|
|
14
9
|
xml do
|
|
15
|
-
|
|
10
|
+
element "tr"
|
|
16
11
|
|
|
17
12
|
map_element "th", to: :th
|
|
18
13
|
map_element "td", to: :td
|
data/lib/sts/tbx_iso_tml/xref.rb
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
|
-
require_relative "sup"
|
|
5
4
|
|
|
6
5
|
module Sts
|
|
7
6
|
module TbxIsoTml
|
|
@@ -9,10 +8,10 @@ module Sts
|
|
|
9
8
|
attribute :ref_type, :string
|
|
10
9
|
attribute :rid, :string
|
|
11
10
|
attribute :value, :string
|
|
12
|
-
attribute :sup, Sup
|
|
11
|
+
attribute :sup, ::Sts::TbxIsoTml::Sup
|
|
13
12
|
|
|
14
13
|
xml do
|
|
15
|
-
|
|
14
|
+
element "xref"
|
|
16
15
|
|
|
17
16
|
map_attribute "ref-type", to: :ref_type
|
|
18
17
|
map_attribute "rid", to: :rid
|
data/lib/sts/tbx_iso_tml.rb
CHANGED
|
@@ -2,30 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
module Sts
|
|
4
4
|
module TbxIsoTml
|
|
5
|
+
autoload :Bold, "#{__dir__}/tbx_iso_tml/bold"
|
|
6
|
+
autoload :Caption, "#{__dir__}/tbx_iso_tml/caption"
|
|
7
|
+
autoload :Col, "#{__dir__}/tbx_iso_tml/col"
|
|
8
|
+
autoload :CrossReference, "#{__dir__}/tbx_iso_tml/cross_reference"
|
|
9
|
+
autoload :Definition, "#{__dir__}/tbx_iso_tml/definition"
|
|
10
|
+
autoload :EntailedTerm, "#{__dir__}/tbx_iso_tml/entailed_term"
|
|
11
|
+
autoload :Example, "#{__dir__}/tbx_iso_tml/example"
|
|
12
|
+
autoload :ExternalGraphic, "#{__dir__}/tbx_iso_tml/external_graphic"
|
|
13
|
+
autoload :ExternalSource, "#{__dir__}/tbx_iso_tml/external_source"
|
|
14
|
+
autoload :Fn, "#{__dir__}/tbx_iso_tml/fn"
|
|
15
|
+
autoload :FnGroup, "#{__dir__}/tbx_iso_tml/fn_group"
|
|
16
|
+
autoload :GeographicalUsage, "#{__dir__}/tbx_iso_tml/geographical_usage"
|
|
17
|
+
autoload :GrammaticalGender, "#{__dir__}/tbx_iso_tml/grammatical_gender"
|
|
18
|
+
autoload :GrammaticalNumber, "#{__dir__}/tbx_iso_tml/grammatical_number"
|
|
19
|
+
autoload :Italic, "#{__dir__}/tbx_iso_tml/italic"
|
|
20
|
+
autoload :LangSet, "#{__dir__}/tbx_iso_tml/lang_set"
|
|
21
|
+
autoload :Math, "#{__dir__}/tbx_iso_tml/math"
|
|
22
|
+
autoload :Mfenced, "#{__dir__}/tbx_iso_tml/mfenced"
|
|
23
|
+
autoload :Mfrac, "#{__dir__}/tbx_iso_tml/mfrac"
|
|
24
|
+
autoload :Mi, "#{__dir__}/tbx_iso_tml/mi"
|
|
25
|
+
autoload :Mrow, "#{__dir__}/tbx_iso_tml/mrow"
|
|
26
|
+
autoload :Mspace, "#{__dir__}/tbx_iso_tml/mspace"
|
|
27
|
+
autoload :Mstyle, "#{__dir__}/tbx_iso_tml/mstyle"
|
|
28
|
+
autoload :Msub, "#{__dir__}/tbx_iso_tml/msub"
|
|
29
|
+
autoload :Msup, "#{__dir__}/tbx_iso_tml/msup"
|
|
30
|
+
autoload :Munder, "#{__dir__}/tbx_iso_tml/munder"
|
|
31
|
+
autoload :Munderover, "#{__dir__}/tbx_iso_tml/munderover"
|
|
32
|
+
autoload :NormativeAuthorization,
|
|
33
|
+
"#{__dir__}/tbx_iso_tml/normative_authorization"
|
|
34
|
+
autoload :Note, "#{__dir__}/tbx_iso_tml/note"
|
|
35
|
+
autoload :PartOfSpeech, "#{__dir__}/tbx_iso_tml/part_of_speech"
|
|
36
|
+
autoload :Pronunciation, "#{__dir__}/tbx_iso_tml/pronunciation"
|
|
37
|
+
autoload :See, "#{__dir__}/tbx_iso_tml/see"
|
|
38
|
+
autoload :Semantics, "#{__dir__}/tbx_iso_tml/semantics"
|
|
39
|
+
autoload :Source, "#{__dir__}/tbx_iso_tml/source"
|
|
40
|
+
autoload :SubjectField, "#{__dir__}/tbx_iso_tml/subject_field"
|
|
41
|
+
autoload :Sup, "#{__dir__}/tbx_iso_tml/sup"
|
|
42
|
+
autoload :Table, "#{__dir__}/tbx_iso_tml/table"
|
|
43
|
+
autoload :TableBreak, "#{__dir__}/tbx_iso_tml/table_break"
|
|
44
|
+
autoload :TableWrap, "#{__dir__}/tbx_iso_tml/table_wrap"
|
|
45
|
+
autoload :TableWrapFoot, "#{__dir__}/tbx_iso_tml/table_wrap_foot"
|
|
46
|
+
autoload :Tbody, "#{__dir__}/tbx_iso_tml/tbody"
|
|
47
|
+
autoload :Td, "#{__dir__}/tbx_iso_tml/td"
|
|
48
|
+
autoload :Term, "#{__dir__}/tbx_iso_tml/term"
|
|
49
|
+
autoload :TermEntry, "#{__dir__}/tbx_iso_tml/term_entry"
|
|
50
|
+
autoload :TermInformationGroup,
|
|
51
|
+
"#{__dir__}/tbx_iso_tml/term_information_group"
|
|
52
|
+
autoload :TermType, "#{__dir__}/tbx_iso_tml/term_type"
|
|
53
|
+
autoload :Th, "#{__dir__}/tbx_iso_tml/th"
|
|
54
|
+
autoload :Thead, "#{__dir__}/tbx_iso_tml/thead"
|
|
55
|
+
autoload :Tr, "#{__dir__}/tbx_iso_tml/tr"
|
|
56
|
+
autoload :Xref, "#{__dir__}/tbx_iso_tml/xref"
|
|
5
57
|
end
|
|
6
58
|
end
|
|
7
|
-
|
|
8
|
-
require_relative "tbx_iso_tml/caption"
|
|
9
|
-
require_relative "tbx_iso_tml/definition"
|
|
10
|
-
require_relative "tbx_iso_tml/entailed_term"
|
|
11
|
-
require_relative "tbx_iso_tml/example"
|
|
12
|
-
require_relative "tbx_iso_tml/external_graphic"
|
|
13
|
-
require_relative "tbx_iso_tml/external_source"
|
|
14
|
-
require_relative "tbx_iso_tml/geographical_usage"
|
|
15
|
-
require_relative "tbx_iso_tml/grammatical_gender"
|
|
16
|
-
require_relative "tbx_iso_tml/lang_set"
|
|
17
|
-
require_relative "tbx_iso_tml/normative_authorization"
|
|
18
|
-
require_relative "tbx_iso_tml/note"
|
|
19
|
-
require_relative "tbx_iso_tml/part_of_speech"
|
|
20
|
-
require_relative "tbx_iso_tml/see"
|
|
21
|
-
require_relative "tbx_iso_tml/source"
|
|
22
|
-
require_relative "tbx_iso_tml/table_wrap"
|
|
23
|
-
require_relative "tbx_iso_tml/table_wrap_foot"
|
|
24
|
-
require_relative "tbx_iso_tml/tbody"
|
|
25
|
-
require_relative "tbx_iso_tml/tr"
|
|
26
|
-
require_relative "tbx_iso_tml/th"
|
|
27
|
-
require_relative "tbx_iso_tml/td"
|
|
28
|
-
require_relative "tbx_iso_tml/term"
|
|
29
|
-
require_relative "tbx_iso_tml/term_entry"
|
|
30
|
-
require_relative "tbx_iso_tml/term_information_group"
|
|
31
|
-
require_relative "tbx_iso_tml/term_type"
|
data/lib/sts/version.rb
CHANGED