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,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
|
-
attribute :p,
|
|
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,20 +1,18 @@
|
|
|
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
|
|
8
|
-
attribute :width,
|
|
9
|
-
attribute :char,
|
|
10
|
-
attribute :charoff,
|
|
11
|
-
attribute :span,
|
|
6
|
+
attribute :width, :string
|
|
7
|
+
attribute :char, :string
|
|
8
|
+
attribute :charoff, :string
|
|
9
|
+
attribute :span, :string
|
|
12
10
|
|
|
13
11
|
xml do
|
|
14
|
-
|
|
12
|
+
element "col"
|
|
15
13
|
|
|
16
14
|
map_attribute "width", to: :width
|
|
17
|
-
map_attribute "char", to: :char
|
|
15
|
+
map_attribute "char", to: :char, value_map: { to: { empty: :empty } }
|
|
18
16
|
map_attribute "charoff", to: :charoff
|
|
19
17
|
map_attribute "span", to: :span
|
|
20
18
|
end
|
|
@@ -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
|
|
15
|
-
attribute :value,
|
|
16
|
-
attribute :italic, Italic
|
|
17
|
-
attribute :math, Sts::TbxIsoTml::Math
|
|
18
|
-
attribute :sub,
|
|
19
|
-
attribute :list, Sts::NisoSts::List, collection: true
|
|
20
|
-
attribute :std, Sts::NisoSts::ReferenceStandard, collection: true
|
|
6
|
+
attribute :entailed_term, ::Sts::TbxIsoTml::EntailedTerm, collection: true
|
|
7
|
+
attribute :note, ::Sts::TbxIsoTml::Note
|
|
8
|
+
attribute :value, :string
|
|
9
|
+
attribute :italic, ::Sts::TbxIsoTml::Italic
|
|
10
|
+
attribute :math, ::Sts::TbxIsoTml::Math
|
|
11
|
+
attribute :sub, :string
|
|
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
|
-
attribute :target,
|
|
9
|
-
attribute :xtarget,
|
|
10
|
-
attribute :lang, Lutaml::
|
|
11
|
-
attribute :value,
|
|
6
|
+
attribute :target, :string
|
|
7
|
+
attribute :xtarget, :string
|
|
8
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
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
|
-
attribute :id,
|
|
12
|
-
attribute :value,
|
|
13
|
-
attribute :entailed_term, EntailedTerm, collection: true
|
|
14
|
-
attribute :inline_formula, Sts::NisoSts::InlineFormula
|
|
8
|
+
attribute :id, :string
|
|
9
|
+
attribute :value, :string
|
|
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
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
3
|
module Sts
|
|
6
4
|
module TbxIsoTml
|
|
7
5
|
class ExternalGraphic < Lutaml::Model::Serializable
|
|
8
|
-
attribute :target,
|
|
6
|
+
attribute :target, :string
|
|
9
7
|
|
|
10
8
|
xml do
|
|
11
|
-
|
|
12
|
-
namespace
|
|
9
|
+
element "xGraphic"
|
|
10
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
13
11
|
|
|
14
12
|
map_attribute "xtarget", to: :target
|
|
15
13
|
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 ExternalSource < Lutaml::Model::Serializable
|
|
8
|
-
attribute :target,
|
|
9
|
-
attribute :value,
|
|
6
|
+
attribute :target, :string
|
|
7
|
+
attribute :value, :string
|
|
10
8
|
|
|
11
9
|
xml do
|
|
12
|
-
|
|
13
|
-
namespace
|
|
10
|
+
element "xSource"
|
|
11
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
14
12
|
|
|
15
13
|
map_attribute "xtarget", to: :target
|
|
16
14
|
map_content to: :value
|
data/lib/sts/tbx_iso_tml/fn.rb
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative "../niso_sts/paragraph"
|
|
4
|
-
|
|
5
3
|
module Sts
|
|
6
4
|
module TbxIsoTml
|
|
7
5
|
class Fn < Lutaml::Model::Serializable
|
|
8
|
-
attribute :id,
|
|
9
|
-
attribute :label,
|
|
10
|
-
attribute :p, Sts::NisoSts::Paragraph
|
|
6
|
+
attribute :id, :string
|
|
7
|
+
attribute :label, :string
|
|
8
|
+
attribute :p, ::Sts::NisoSts::Paragraph
|
|
11
9
|
|
|
12
10
|
xml do
|
|
13
|
-
|
|
11
|
+
element "fn"
|
|
14
12
|
|
|
15
13
|
map_attribute "id", to: :id
|
|
16
14
|
map_element "label", to: :label
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "fn"
|
|
6
|
-
|
|
7
3
|
module Sts
|
|
8
4
|
module TbxIsoTml
|
|
9
5
|
class FnGroup < Lutaml::Model::Serializable
|
|
10
|
-
attribute :fn, Sts::TbxIsoTml::Fn, collection: true
|
|
6
|
+
attribute :fn, ::Sts::TbxIsoTml::Fn, collection: true
|
|
11
7
|
|
|
12
8
|
xml do
|
|
13
|
-
|
|
9
|
+
element "fn-group"
|
|
14
10
|
|
|
15
11
|
map_element "fn", to: :fn
|
|
16
12
|
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 TbxIsoTml
|
|
7
5
|
class GeographicalUsage < Lutaml::Model::Serializable
|
|
8
|
-
attribute :value,
|
|
6
|
+
attribute :value, :string
|
|
9
7
|
|
|
10
8
|
xml do
|
|
11
|
-
|
|
12
|
-
namespace
|
|
9
|
+
element "geographicalUsage"
|
|
10
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
13
11
|
|
|
14
12
|
map_content to: :value
|
|
15
13
|
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 GrammaticalGender < Lutaml::Model::Serializable
|
|
8
|
-
attribute :value,
|
|
6
|
+
attribute :value, :string,
|
|
9
7
|
values: %w[masculine feminine neuter]
|
|
10
8
|
|
|
11
9
|
xml do
|
|
12
|
-
|
|
13
|
-
namespace
|
|
10
|
+
element "grammaticalGender"
|
|
11
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
14
12
|
|
|
15
13
|
map_attribute "value", to: :value
|
|
16
14
|
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 GrammaticalNumber < Lutaml::Model::Serializable
|
|
8
|
-
attribute :value,
|
|
6
|
+
attribute :value, :string,
|
|
9
7
|
values: %w[singular plural]
|
|
10
8
|
|
|
11
9
|
xml do
|
|
12
|
-
|
|
13
|
-
namespace
|
|
10
|
+
element "grammaticalNumber"
|
|
11
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
14
12
|
|
|
15
13
|
map_attribute "value", to: :value
|
|
16
14
|
end
|
|
@@ -1,15 +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 Italic < Lutaml::Model::Serializable
|
|
8
|
-
attribute :value,
|
|
9
|
-
attribute :sub,
|
|
6
|
+
attribute :value, :string
|
|
7
|
+
attribute :sub, :string
|
|
10
8
|
|
|
11
9
|
xml do
|
|
12
|
-
|
|
10
|
+
element "italic"
|
|
11
|
+
mixed_content
|
|
13
12
|
namespace nil, nil
|
|
14
13
|
|
|
15
14
|
map_content to: :value
|
|
@@ -1,41 +1,27 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "note"
|
|
6
|
-
require_relative "example"
|
|
7
|
-
require_relative "definition"
|
|
8
|
-
require_relative "see"
|
|
9
|
-
require_relative "source"
|
|
10
|
-
require_relative "external_source"
|
|
11
|
-
require_relative "term_information_group"
|
|
12
|
-
|
|
13
3
|
module Sts
|
|
14
4
|
module TbxIsoTml
|
|
15
|
-
class Definition < Lutaml::Model::Serializable; end
|
|
16
|
-
class Note < Lutaml::Model::Serializable; end
|
|
17
|
-
class Caption < Lutaml::Model::Serializable; end
|
|
18
|
-
|
|
19
5
|
class LangSet < Lutaml::Model::Serializable
|
|
20
|
-
attribute :lang, Lutaml::
|
|
21
|
-
attribute :definition, Sts::TbxIsoTml::Definition, collection: true
|
|
22
|
-
attribute :note, Note, collection: true
|
|
23
|
-
attribute :example, Example, collection: true
|
|
24
|
-
attribute :tig, TermInformationGroup, collection: true
|
|
25
|
-
attribute :see, See, collection: true
|
|
26
|
-
attribute :source, Source, collection: true
|
|
27
|
-
attribute :x_source, ExternalSource, collection: true
|
|
28
|
-
attribute :cross_reference,
|
|
29
|
-
|
|
30
|
-
|
|
6
|
+
attribute :lang, Lutaml::Xml::W3c::XmlLangType
|
|
7
|
+
attribute :definition, ::Sts::TbxIsoTml::Definition, collection: true
|
|
8
|
+
attribute :note, ::Sts::TbxIsoTml::Note, collection: true
|
|
9
|
+
attribute :example, ::Sts::TbxIsoTml::Example, collection: true
|
|
10
|
+
attribute :tig, ::Sts::TbxIsoTml::TermInformationGroup, collection: true
|
|
11
|
+
attribute :see, ::Sts::TbxIsoTml::See, collection: true
|
|
12
|
+
attribute :source, ::Sts::TbxIsoTml::Source, collection: true
|
|
13
|
+
attribute :x_source, ::Sts::TbxIsoTml::ExternalSource, collection: true
|
|
14
|
+
attribute :cross_reference, ::Sts::TbxIsoTml::CrossReference,
|
|
15
|
+
collection: true
|
|
16
|
+
attribute :subject_field, ::Sts::TbxIsoTml::SubjectField, collection: true
|
|
17
|
+
# attribute :x_graphic, ::Sts::TbxIsoTml::ExternalGraphic, collection: true
|
|
31
18
|
|
|
32
19
|
xml do
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
element "langSet"
|
|
21
|
+
mixed_content
|
|
22
|
+
namespace ::Sts::Namespaces::TbxNamespace
|
|
35
23
|
|
|
36
|
-
map_attribute "lang", to: :lang
|
|
37
|
-
namespace: "http://www.w3.org/XML/1998/namespace",
|
|
38
|
-
prefix: "xml"
|
|
24
|
+
map_attribute "lang", to: :lang
|
|
39
25
|
map_element "definition", to: :definition
|
|
40
26
|
map_element "source", to: :source
|
|
41
27
|
map_element "example", to: :example
|
data/lib/sts/tbx_iso_tml/math.rb
CHANGED
|
@@ -1,42 +1,29 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "semantics"
|
|
6
|
-
require_relative "mrow"
|
|
7
|
-
require_relative "msub"
|
|
8
|
-
require_relative "msup"
|
|
9
|
-
require_relative "mstyle"
|
|
10
|
-
require_relative "mspace"
|
|
11
|
-
require_relative "mfrac"
|
|
12
|
-
require_relative "mfenced"
|
|
13
|
-
require_relative "munderover"
|
|
14
|
-
|
|
15
3
|
module Sts
|
|
16
4
|
module TbxIsoTml
|
|
17
|
-
class Mfenced < Lutaml::Model::Serializable; end
|
|
18
|
-
|
|
19
5
|
class Math < Lutaml::Model::Serializable
|
|
20
|
-
attribute :id,
|
|
21
|
-
attribute :content,
|
|
22
|
-
attribute :display,
|
|
23
|
-
attribute :mrow, Mrow
|
|
24
|
-
attribute :msub, Msub, collection: true
|
|
25
|
-
attribute :msup, Msup
|
|
26
|
-
attribute :mn,
|
|
27
|
-
attribute :mo,
|
|
28
|
-
attribute :mi,
|
|
29
|
-
attribute :mtext,
|
|
30
|
-
attribute :semantics, Semantics
|
|
31
|
-
attribute :mstyle, Mstyle, collection: true
|
|
32
|
-
attribute :mfenced, Mfenced, collection: true
|
|
33
|
-
attribute :mspace, Mspace, collection: true
|
|
34
|
-
attribute :mfrac, Mfrac, collection: true
|
|
35
|
-
attribute :munderover, Munderover, collection: true
|
|
6
|
+
attribute :id, :string
|
|
7
|
+
attribute :content, :string
|
|
8
|
+
attribute :display, :string
|
|
9
|
+
attribute :mrow, ::Sts::TbxIsoTml::Mrow
|
|
10
|
+
attribute :msub, ::Sts::TbxIsoTml::Msub, collection: true
|
|
11
|
+
attribute :msup, ::Sts::TbxIsoTml::Msup
|
|
12
|
+
attribute :mn, :string, collection: true
|
|
13
|
+
attribute :mo, :string, collection: true
|
|
14
|
+
attribute :mi, :string
|
|
15
|
+
attribute :mtext, :string
|
|
16
|
+
attribute :semantics, ::Sts::TbxIsoTml::Semantics
|
|
17
|
+
attribute :mstyle, ::Sts::TbxIsoTml::Mstyle, collection: true
|
|
18
|
+
attribute :mfenced, ::Sts::TbxIsoTml::Mfenced, collection: true
|
|
19
|
+
attribute :mspace, ::Sts::TbxIsoTml::Mspace, collection: true
|
|
20
|
+
attribute :mfrac, ::Sts::TbxIsoTml::Mfrac, collection: true
|
|
21
|
+
attribute :munderover, ::Sts::TbxIsoTml::Munderover, collection: true
|
|
36
22
|
|
|
37
23
|
xml do
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
element "math"
|
|
25
|
+
mixed_content
|
|
26
|
+
namespace ::Sts::Namespaces::MathmlNamespace
|
|
40
27
|
|
|
41
28
|
map_attribute "id", to: :id
|
|
42
29
|
|
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
require_relative "mspace"
|
|
6
|
-
require_relative "msub"
|
|
7
|
-
require_relative "mstyle"
|
|
8
|
-
require_relative "mfrac"
|
|
9
|
-
|
|
10
3
|
module Sts
|
|
11
4
|
module TbxIsoTml
|
|
12
5
|
class Mfenced < Lutaml::Model::Serializable
|
|
13
|
-
attribute :separators,
|
|
14
|
-
attribute :open,
|
|
15
|
-
attribute :close,
|
|
16
|
-
attribute :mo,
|
|
17
|
-
attribute :mn,
|
|
18
|
-
attribute :mi,
|
|
19
|
-
attribute :mtext,
|
|
20
|
-
attribute :mspace, Mspace, collection: true
|
|
21
|
-
attribute :msub, Msub, collection: true
|
|
22
|
-
attribute :mstyle, Mstyle, collection: true
|
|
23
|
-
attribute :mfrac, Mfrac, collection: true
|
|
6
|
+
attribute :separators, :string
|
|
7
|
+
attribute :open, :string
|
|
8
|
+
attribute :close, :string
|
|
9
|
+
attribute :mo, :string, collection: true
|
|
10
|
+
attribute :mn, :string, collection: true
|
|
11
|
+
attribute :mi, :string
|
|
12
|
+
attribute :mtext, :string
|
|
13
|
+
attribute :mspace, ::Sts::TbxIsoTml::Mspace, collection: true
|
|
14
|
+
attribute :msub, ::Sts::TbxIsoTml::Msub, collection: true
|
|
15
|
+
attribute :mstyle, ::Sts::TbxIsoTml::Mstyle, collection: true
|
|
16
|
+
attribute :mfrac, ::Sts::TbxIsoTml::Mfrac, collection: true
|
|
24
17
|
|
|
25
18
|
xml do
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
element "mfenced"
|
|
20
|
+
mixed_content
|
|
21
|
+
namespace ::Sts::Namespaces::MathmlNamespace
|
|
28
22
|
|
|
29
|
-
map_attribute "separators", to: :separators
|
|
23
|
+
map_attribute "separators", to: :separators,
|
|
24
|
+
value_map: { to: { empty: :empty } }
|
|
30
25
|
map_attribute "open", to: :open
|
|
31
26
|
map_attribute "close", to: :close
|
|
32
27
|
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
|
-
require_relative "mrow"
|
|
5
|
-
require_relative "mstyle"
|
|
6
4
|
|
|
7
5
|
module Sts
|
|
8
6
|
module TbxIsoTml
|
|
9
|
-
class Mrow < Lutaml::Model::Serializable; end
|
|
10
|
-
|
|
11
7
|
class Mfrac < Lutaml::Model::Serializable
|
|
12
|
-
attribute :mrow, Mrow, collection: true
|
|
13
|
-
attribute :mstyle, Mstyle, collection: true
|
|
14
|
-
attribute :bevelled,
|
|
15
|
-
attribute :linethickness,
|
|
16
|
-
attribute :mn,
|
|
17
|
-
attribute :mtext,
|
|
8
|
+
attribute :mrow, ::Sts::TbxIsoTml::Mrow, collection: true
|
|
9
|
+
attribute :mstyle, ::Sts::TbxIsoTml::Mstyle, collection: true
|
|
10
|
+
attribute :bevelled, :string
|
|
11
|
+
attribute :linethickness, :string
|
|
12
|
+
attribute :mn, :string, collection: true
|
|
13
|
+
attribute :mtext, :string, collection: true
|
|
18
14
|
|
|
19
15
|
xml do
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
element "mfrac"
|
|
17
|
+
mixed_content
|
|
18
|
+
namespace ::Sts::Namespaces::MathmlNamespace
|
|
22
19
|
|
|
23
20
|
map_attribute "bevelled", to: :bevelled
|
|
24
21
|
map_attribute "linethickness", to: :linethickness
|
data/lib/sts/tbx_iso_tml/mi.rb
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
|
-
require_relative "mstyle"
|
|
5
4
|
|
|
6
5
|
module Sts
|
|
7
6
|
module TbxIsoTml
|
|
8
7
|
class Mi < Lutaml::Model::Serializable
|
|
9
|
-
attribute :content,
|
|
8
|
+
attribute :content, :string
|
|
10
9
|
|
|
11
10
|
xml do
|
|
12
|
-
|
|
13
|
-
namespace
|
|
11
|
+
element "mi"
|
|
12
|
+
namespace ::Sts::Namespaces::MathmlNamespace
|
|
14
13
|
|
|
15
14
|
map_content to: :content
|
|
16
15
|
end
|
data/lib/sts/tbx_iso_tml/mrow.rb
CHANGED
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
|
-
require_relative "mfrac"
|
|
5
|
-
require_relative "mstyle"
|
|
6
|
-
require_relative "msub"
|
|
7
|
-
require_relative "msup"
|
|
8
|
-
require_relative "mspace"
|
|
9
|
-
require_relative "mfenced"
|
|
10
4
|
|
|
11
5
|
module Sts
|
|
12
6
|
module TbxIsoTml
|
|
13
7
|
class Mrow < Lutaml::Model::Serializable
|
|
14
|
-
attribute :content,
|
|
15
|
-
attribute :mo,
|
|
16
|
-
attribute :mi,
|
|
17
|
-
attribute :mn,
|
|
18
|
-
attribute :mtext,
|
|
19
|
-
attribute :mrow, Mrow
|
|
20
|
-
attribute :mfrac, Mfrac, collection: true
|
|
21
|
-
attribute :mstyle, Mstyle, collection: true
|
|
22
|
-
attribute :msub, Msub, collection: true
|
|
23
|
-
attribute :msup, Msup
|
|
24
|
-
attribute :mfenced, Mfenced, collection: true
|
|
25
|
-
attribute :mspace, Mspace, collection: true
|
|
8
|
+
attribute :content, :string
|
|
9
|
+
attribute :mo, :string, collection: true
|
|
10
|
+
attribute :mi, :string, collection: true
|
|
11
|
+
attribute :mn, :string, collection: true
|
|
12
|
+
attribute :mtext, :string, collection: true
|
|
13
|
+
attribute :mrow, ::Sts::TbxIsoTml::Mrow
|
|
14
|
+
attribute :mfrac, ::Sts::TbxIsoTml::Mfrac, collection: true
|
|
15
|
+
attribute :mstyle, ::Sts::TbxIsoTml::Mstyle, collection: true
|
|
16
|
+
attribute :msub, ::Sts::TbxIsoTml::Msub, collection: true
|
|
17
|
+
attribute :msup, ::Sts::TbxIsoTml::Msup
|
|
18
|
+
attribute :mfenced, ::Sts::TbxIsoTml::Mfenced, collection: true
|
|
19
|
+
attribute :mspace, ::Sts::TbxIsoTml::Mspace, collection: true
|
|
26
20
|
|
|
27
21
|
xml do
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
element "mrow"
|
|
23
|
+
mixed_content
|
|
24
|
+
namespace ::Sts::Namespaces::MathmlNamespace
|
|
30
25
|
|
|
31
26
|
map_element "mo", to: :mo
|
|
32
27
|
map_element "mi", to: :mi
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
3
|
module Sts
|
|
6
4
|
module TbxIsoTml
|
|
7
5
|
class Mspace < Lutaml::Model::Serializable
|
|
8
|
-
attribute :width,
|
|
6
|
+
attribute :width, :string
|
|
9
7
|
|
|
10
8
|
xml do
|
|
11
|
-
|
|
12
|
-
namespace
|
|
9
|
+
element "mspace"
|
|
10
|
+
namespace ::Sts::Namespaces::MathmlNamespace
|
|
13
11
|
|
|
14
12
|
map_attribute "width", to: :width
|
|
15
13
|
end
|