sts 0.2.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/lib/sts/niso_sts/adoption.rb +30 -0
- data/lib/sts/niso_sts/adoption_front.rb +16 -0
- data/lib/sts/niso_sts/custom_meta_group.rb +2 -1
- data/lib/sts/niso_sts/ext_link.rb +4 -0
- data/lib/sts/niso_sts/fn.rb +2 -1
- data/lib/sts/niso_sts/front.rb +1 -2
- data/lib/sts/niso_sts/label.rb +21 -0
- data/lib/sts/niso_sts/list_item.rb +5 -2
- data/lib/sts/niso_sts/meta_date.rb +20 -0
- data/lib/sts/niso_sts/metadata_iso.rb +28 -12
- data/lib/sts/niso_sts/metadata_std.rb +2 -0
- data/lib/sts/niso_sts/mixed_citation.rb +5 -0
- data/lib/sts/niso_sts/non_normative_example.rb +3 -0
- data/lib/sts/niso_sts/non_normative_note.rb +4 -0
- data/lib/sts/niso_sts/paragraph.rb +11 -0
- data/lib/sts/niso_sts/reference_standard.rb +4 -0
- data/lib/sts/niso_sts/section.rb +5 -8
- data/lib/sts/niso_sts/section_array.rb +21 -0
- data/lib/sts/niso_sts/std_cross_reference.rb +2 -1
- data/lib/sts/niso_sts/title_wrap.rb +22 -2
- data/lib/sts/niso_sts.rb +2 -0
- data/lib/sts/tbx_iso_tml/table.rb +2 -0
- data/lib/sts/tbx_iso_tml/table_wrap.rb +7 -3
- data/lib/sts/tbx_iso_tml/td.rb +8 -1
- data/lib/sts/tbx_iso_tml/th.rb +4 -0
- data/lib/sts/version.rb +1 -1
- metadata +12 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3878043fa422f182a16489bf53b740967591ad3effa6191be2ffbbbfa285b715
|
4
|
+
data.tar.gz: 4e38a43e0368b58e456dbd2a5a96c6874ada800da08d5af4721ec08d41bfd001
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: badf2e28603cd492996e3ad9872fad39a2dc75034e5b14fd5ad240b6043c0e9421606f0a5655ea25e4e5d79306a3bf42af15b7aec0d3e5a24c93054cadec61d4
|
7
|
+
data.tar.gz: d6e027a704baa902bb0dc1f8982a06d45b232fb7c63bf6cfa4bea036007007147fcc34f0d3887a2c9ea96cf54bc87f0142b69346d3afcc0cbdd6ed00d7fbca23
|
data/Gemfile
CHANGED
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "standard"
|
4
|
+
require_relative "adoption_front"
|
5
|
+
|
6
|
+
module Sts
|
7
|
+
module NisoSts
|
8
|
+
class Adoption < Sts::Mapper
|
9
|
+
attribute :front, AdoptionFront
|
10
|
+
attribute :back, Back
|
11
|
+
attribute :id, Shale::Type::String
|
12
|
+
attribute :lang, Shale::Type::String
|
13
|
+
attribute :adoptions, Adoption, collection: true
|
14
|
+
attribute :standard, Standard
|
15
|
+
|
16
|
+
xml do
|
17
|
+
root "adoption"
|
18
|
+
|
19
|
+
map_attribute "id", to: :id
|
20
|
+
map_attribute "lang", to: :lang,
|
21
|
+
namespace: "http://www.w3.org/XML/1998/namespace",
|
22
|
+
prefix: "xml"
|
23
|
+
map_element "adoption-front", to: :front
|
24
|
+
map_element "back", to: :back
|
25
|
+
map_element "adoption", to: :adoptions
|
26
|
+
map_element "standard", to: :standard
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "front"
|
4
|
+
|
5
|
+
module Sts
|
6
|
+
module NisoSts
|
7
|
+
class AdoptionFront < Front
|
8
|
+
xml do
|
9
|
+
root "adoption-front"
|
10
|
+
map_element "iso-meta", to: :iso_meta
|
11
|
+
map_element "std-meta", to: :std_meta
|
12
|
+
map_element "sec", to: :sec
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -6,6 +6,7 @@ module Sts
|
|
6
6
|
module NisoSts
|
7
7
|
class ExtLink < Sts::Mapper
|
8
8
|
attribute :ext_link_type, Shale::Type::String
|
9
|
+
attribute :href, Shale::Type::String
|
9
10
|
attribute :content, Shale::Type::String
|
10
11
|
|
11
12
|
xml do
|
@@ -14,6 +15,9 @@ module Sts
|
|
14
15
|
map_content to: :content
|
15
16
|
|
16
17
|
map_attribute "ext-link-type", to: :ext_link_type
|
18
|
+
map_attribute "href", to: :href,
|
19
|
+
namespace: "http://www.w3.org/1999/xlink",
|
20
|
+
prefix: "xlink"
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
data/lib/sts/niso_sts/fn.rb
CHANGED
@@ -2,13 +2,14 @@
|
|
2
2
|
|
3
3
|
require_relative "../mapper"
|
4
4
|
|
5
|
+
require_relative "label"
|
5
6
|
require_relative "paragraph"
|
6
7
|
|
7
8
|
module Sts
|
8
9
|
module NisoSts
|
9
10
|
class Fn < Sts::Mapper
|
10
11
|
attribute :id, Shale::Type::String
|
11
|
-
attribute :label,
|
12
|
+
attribute :label, Label
|
12
13
|
attribute :paragraph, Paragraph
|
13
14
|
|
14
15
|
xml do
|
data/lib/sts/niso_sts/front.rb
CHANGED
@@ -4,11 +4,10 @@ require_relative "../mapper"
|
|
4
4
|
|
5
5
|
require_relative "metadata_iso"
|
6
6
|
require_relative "metadata_std"
|
7
|
+
require_relative "section"
|
7
8
|
|
8
9
|
module Sts
|
9
10
|
module NisoSts
|
10
|
-
class Section < Sts::Mapper; end
|
11
|
-
|
12
11
|
class Front < Sts::Mapper
|
13
12
|
attribute :iso_meta, MetadataIso
|
14
13
|
attribute :std_meta, MetadataStd
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../mapper"
|
4
|
+
|
5
|
+
require_relative "../tbx_iso_tml/sup"
|
6
|
+
|
7
|
+
module Sts
|
8
|
+
module NisoSts
|
9
|
+
class Label < Sts::Mapper
|
10
|
+
attribute :content, Shale::Type::String
|
11
|
+
attribute :sup, Sts::TbxIsoTml::Sup
|
12
|
+
|
13
|
+
xml do
|
14
|
+
root "label"
|
15
|
+
|
16
|
+
map_content to: :content
|
17
|
+
map_element "sup", to: :sup
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative "../mapper"
|
4
4
|
require_relative "list"
|
5
|
+
require_relative "non_normative_example"
|
5
6
|
|
6
7
|
module Sts
|
7
8
|
module NisoSts
|
@@ -10,15 +11,17 @@ module Sts
|
|
10
11
|
|
11
12
|
class ListItem < Sts::Mapper
|
12
13
|
attribute :label, Shale::Type::String
|
13
|
-
attribute :p, Sts::NisoSts::Paragraph
|
14
14
|
attribute :list, List
|
15
|
+
attribute :non_normative_example, NonNormativeExample
|
16
|
+
attribute :p, Sts::NisoSts::Paragraph
|
15
17
|
|
16
18
|
xml do
|
17
19
|
root "list-item"
|
18
20
|
|
19
21
|
map_element :label, to: :label
|
20
|
-
map_element :p, to: :p
|
21
22
|
map_element :list, to: :list
|
23
|
+
map_element "non-normative-example", to: :non_normative_example
|
24
|
+
map_element :p, to: :p
|
22
25
|
end
|
23
26
|
end
|
24
27
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../mapper"
|
4
|
+
|
5
|
+
module Sts
|
6
|
+
module NisoSts
|
7
|
+
class MetaDate < Sts::Mapper
|
8
|
+
attribute :content, Shale::Type::String
|
9
|
+
attribute :type, Shale::Type::String
|
10
|
+
|
11
|
+
xml do
|
12
|
+
root "meta-date"
|
13
|
+
|
14
|
+
map_content to: :content
|
15
|
+
|
16
|
+
map_attribute :type, to: :type
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,40 +1,56 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "../mapper"
|
4
|
-
|
4
|
+
|
5
|
+
require_relative "custom_meta_group"
|
5
6
|
require_relative "document_identification"
|
7
|
+
require_relative "meta_date"
|
8
|
+
require_relative "page_count"
|
9
|
+
require_relative "permissions"
|
6
10
|
require_relative "standard_identification"
|
7
11
|
require_relative "standard_ref"
|
8
|
-
require_relative "
|
12
|
+
require_relative "std_cross_reference"
|
13
|
+
require_relative "title_wrap"
|
9
14
|
|
10
15
|
module Sts
|
11
16
|
module NisoSts
|
12
17
|
class MetadataIso < Sts::Mapper
|
13
|
-
attribute :
|
18
|
+
attribute :comm_ref, Shale::Type::String
|
14
19
|
attribute :content_language, Shale::Type::String
|
15
|
-
attribute :
|
20
|
+
attribute :custom_meta_group, CustomMetaGroup
|
16
21
|
attribute :doc_ident, DocumentIdentification
|
17
|
-
attribute :std_ref, StandardRef
|
18
22
|
attribute :doc_ref, Shale::Type::String
|
23
|
+
attribute :ics, Shale::Type::String
|
24
|
+
attribute :meta_date, MetaDate
|
25
|
+
attribute :page_count, PageCount
|
26
|
+
attribute :permissions, Permissions
|
19
27
|
attribute :pub_date, Shale::Type::String
|
20
28
|
attribute :release_date, Shale::Type::String
|
21
|
-
attribute :comm_ref, Shale::Type::String
|
22
29
|
attribute :secretariat, Shale::Type::String
|
23
|
-
attribute :
|
30
|
+
attribute :std_ident, StandardIdentification
|
31
|
+
attribute :std_ref, StandardRef
|
32
|
+
attribute :std_xref, StdCrossReference
|
33
|
+
attribute :title_wrap, TitleWrap
|
24
34
|
|
25
35
|
xml do
|
26
36
|
root "iso-meta"
|
27
|
-
|
37
|
+
|
38
|
+
map_element "comm-ref", to: :comm_ref
|
28
39
|
map_element "content-language", to: :content_language
|
29
|
-
map_element "
|
40
|
+
map_element "custom-meta-group", to: :custom_meta_group
|
30
41
|
map_element "doc-ident", to: :doc_ident
|
31
|
-
map_element "std-ref", to: :std_ref
|
32
42
|
map_element "doc-ref", to: :doc_ref
|
43
|
+
map_element "ics", to: :ics
|
44
|
+
map_element "meta-date", to: :meta_date
|
45
|
+
map_element "page-count", to: :page_count
|
46
|
+
map_element "permissions", to: :permissions
|
33
47
|
map_element "pub-date", to: :pub_date
|
34
48
|
map_element "release-date", to: :release_date
|
35
|
-
map_element "comm-ref", to: :comm_ref
|
36
49
|
map_element "secretariat", to: :secretariat
|
37
|
-
map_element "
|
50
|
+
map_element "std-ident", to: :std_ident
|
51
|
+
map_element "std-ref", to: :std_ref
|
52
|
+
map_element "std-xref", to: :std_xref
|
53
|
+
map_element "title-wrap", to: :title_wrap
|
38
54
|
end
|
39
55
|
end
|
40
56
|
end
|
@@ -10,6 +10,8 @@ module Sts
|
|
10
10
|
class MixedCitation < Sts::Mapper
|
11
11
|
attribute :content, Shale::Type::String
|
12
12
|
attribute :bold, Shale::Type::String
|
13
|
+
attribute :italic, Shale::Type::String
|
14
|
+
attribute :publication_type, Shale::Type::String
|
13
15
|
attribute :std, ReferenceStandard
|
14
16
|
attribute :ext_link, ExtLink
|
15
17
|
|
@@ -18,7 +20,10 @@ module Sts
|
|
18
20
|
|
19
21
|
map_content to: :content
|
20
22
|
|
23
|
+
map_attribute "publication-type", to: :publication_type
|
24
|
+
|
21
25
|
map_element "bold", to: :bold
|
26
|
+
map_element "italic", to: :italic
|
22
27
|
map_element "std", to: :std
|
23
28
|
map_element "ext-link", to: :ext_link
|
24
29
|
end
|
@@ -6,6 +6,8 @@ require_relative "paragraph"
|
|
6
6
|
|
7
7
|
module Sts
|
8
8
|
module NisoSts
|
9
|
+
class Paragraph < Sts::Mapper; end
|
10
|
+
|
9
11
|
class NonNormativeExample < Sts::Mapper
|
10
12
|
attribute :id, Shale::Type::String
|
11
13
|
attribute :p, Paragraph
|
@@ -13,6 +15,7 @@ module Sts
|
|
13
15
|
|
14
16
|
xml do
|
15
17
|
root "non-normative-example"
|
18
|
+
|
16
19
|
map_attribute "id", to: :id
|
17
20
|
map_element "p", to: :p
|
18
21
|
map_element "label", to: :label
|
@@ -8,12 +8,16 @@ module Sts
|
|
8
8
|
module NisoSts
|
9
9
|
class NonNormativeNote < Sts::Mapper
|
10
10
|
attribute :id, Shale::Type::String
|
11
|
+
attribute :content_type, Shale::Type::String
|
11
12
|
attribute :p, Paragraph
|
12
13
|
attribute :label, Shale::Type::String
|
13
14
|
|
14
15
|
xml do
|
15
16
|
root "non-normative-note"
|
17
|
+
|
18
|
+
map_attribute "content-type", to: :content_type
|
16
19
|
map_attribute "id", to: :id
|
20
|
+
|
17
21
|
map_element "p", to: :p
|
18
22
|
map_element "label", to: :label
|
19
23
|
end
|
@@ -9,17 +9,21 @@ require_relative "def_list"
|
|
9
9
|
require_relative "non_normative_note"
|
10
10
|
require_relative "non_normative_example"
|
11
11
|
require_relative "reference_standard"
|
12
|
+
require_relative "ext_link"
|
13
|
+
require_relative "../tbx_iso_tml/entailed_term"
|
12
14
|
require_relative "../tbx_iso_tml/xref"
|
13
15
|
|
14
16
|
module Sts
|
15
17
|
module NisoSts
|
16
18
|
class NonNormativeNote < Sts::Mapper; end
|
19
|
+
class ReferenceStandard < Sts::Mapper; end
|
17
20
|
|
18
21
|
class Paragraph < Sts::Mapper
|
19
22
|
attribute :id, Shale::Type::String
|
20
23
|
attribute :text, Shale::Type::String
|
21
24
|
attribute :italic, Shale::Type::String
|
22
25
|
attribute :bold, Shale::Type::String
|
26
|
+
attribute :uri, Shale::Type::String
|
23
27
|
attribute :list, Sts::NisoSts::List
|
24
28
|
attribute :def_list, DefList
|
25
29
|
attribute :non_normative_note, NonNormativeNote
|
@@ -28,6 +32,8 @@ module Sts
|
|
28
32
|
attribute :disp_formula, Sts::NisoSts::DisplayFormula, collection: true
|
29
33
|
attribute :xref, TbxIsoTml::Xref
|
30
34
|
attribute :std, ReferenceStandard
|
35
|
+
attribute :ext_link, ExtLink
|
36
|
+
attribute :entailed_term, Sts::TbxIsoTml::EntailedTerm
|
31
37
|
|
32
38
|
xml do
|
33
39
|
root "p"
|
@@ -42,6 +48,11 @@ module Sts
|
|
42
48
|
map_element "non-normative-example", to: :non_normative_example
|
43
49
|
map_element "inline-formula", to: :inline_formula
|
44
50
|
map_element "disp-formula", to: :disp_formula
|
51
|
+
map_element "ext-link", to: :ext_link
|
52
|
+
map_element "entailedTerm", to: :entailed_term,
|
53
|
+
namespace: "urn:iso:std:iso:30042:ed-1",
|
54
|
+
prefix: "tbx"
|
55
|
+
map_element "uri", to: :uri
|
45
56
|
map_element "std", to: :std, namespace: nil, prefix: nil
|
46
57
|
map_element "xref", to: :xref, namespace: nil, prefix: nil
|
47
58
|
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require_relative "../mapper"
|
4
4
|
require_relative "standard_ref"
|
5
5
|
require_relative "std_id_group"
|
6
|
+
require_relative "fn"
|
6
7
|
require_relative "../tbx_iso_tml/xref"
|
7
8
|
|
8
9
|
module Sts
|
@@ -13,6 +14,7 @@ module Sts
|
|
13
14
|
attribute :content, Shale::Type::String
|
14
15
|
attribute :std_ref, StandardRef
|
15
16
|
attribute :title, Shale::Type::String
|
17
|
+
attribute :fn, Fn, collection: true
|
16
18
|
attribute :std_id_group, StdIdGroup, collection: true
|
17
19
|
attribute :xref, Sts::TbxIsoTml::Xref, collection: true
|
18
20
|
|
@@ -21,7 +23,9 @@ module Sts
|
|
21
23
|
|
22
24
|
map_attribute "type", to: :type
|
23
25
|
map_attribute "std-id", to: :std_id
|
26
|
+
|
24
27
|
map_element "std-ref", to: :std_ref, namespace: nil, prefix: nil
|
28
|
+
map_element "fn", to: :fn, namespace: nil, prefix: nil
|
25
29
|
map_element "title", to: :title, namespace: nil, prefix: nil
|
26
30
|
map_element "std-id-group", to: :std_id_group,
|
27
31
|
namespace: nil,
|
data/lib/sts/niso_sts/section.rb
CHANGED
@@ -10,15 +10,10 @@ require_relative "non_normative_note"
|
|
10
10
|
require_relative "non_normative_example"
|
11
11
|
require_relative "figure"
|
12
12
|
require_relative "title"
|
13
|
+
require_relative "section_array"
|
13
14
|
|
14
15
|
require_relative "../tbx_iso_tml/table_wrap"
|
15
16
|
|
16
|
-
module Sts
|
17
|
-
module TbxIsoTml
|
18
|
-
class TableWrap < Sts::Mapper; end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
17
|
module Sts
|
23
18
|
module NisoSts
|
24
19
|
class Title < Sts::Mapper; end
|
@@ -29,6 +24,7 @@ module Sts
|
|
29
24
|
attribute :label, Shale::Type::String
|
30
25
|
attribute :title, Title
|
31
26
|
attribute :type, Shale::Type::String
|
27
|
+
attribute :array, SectionArray
|
32
28
|
attribute :paragraphs, Paragraph, collection: true
|
33
29
|
attribute :list, List, collection: true
|
34
30
|
attribute :term_sec, TermSection, collection: true
|
@@ -39,7 +35,7 @@ module Sts
|
|
39
35
|
attribute :figures, Figure, collection: true
|
40
36
|
attribute :fig, Figure, collection: true
|
41
37
|
|
42
|
-
attribute :table_wrap, Sts::TbxIsoTml::TableWrap, collection: true
|
38
|
+
attribute :table_wrap, ::Sts::TbxIsoTml::TableWrap, collection: true
|
43
39
|
|
44
40
|
xml do
|
45
41
|
root "sec"
|
@@ -48,7 +44,7 @@ module Sts
|
|
48
44
|
map_attribute "sec-type", to: :type
|
49
45
|
map_attribute "specific-use", to: :specific_use
|
50
46
|
|
51
|
-
map_element "label", to: :label
|
47
|
+
map_element "label", to: :label, render_nil: true
|
52
48
|
map_element "title", to: :title
|
53
49
|
map_element "p", to: :paragraphs
|
54
50
|
map_element "sec", to: :sec
|
@@ -57,6 +53,7 @@ module Sts
|
|
57
53
|
map_element "figure", to: :figures
|
58
54
|
map_element "fig", to: :fig
|
59
55
|
map_element "ref-list", to: :ref_list
|
56
|
+
map_element "array", to: :array
|
60
57
|
map_element "table-wrap", to: :table_wrap
|
61
58
|
map_element "non-normative-note", to: :non_normative_note
|
62
59
|
map_element "non-normative-example", to: :non_normative_example
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../mapper"
|
4
|
+
|
5
|
+
require_relative "../tbx_iso_tml/table"
|
6
|
+
|
7
|
+
module Sts
|
8
|
+
module NisoSts
|
9
|
+
class SectionArray < Sts::Mapper
|
10
|
+
attribute :id, Shale::Type::String
|
11
|
+
attribute :table, Sts::TbxIsoTml::Table
|
12
|
+
|
13
|
+
xml do
|
14
|
+
root "array"
|
15
|
+
|
16
|
+
map_attribute "id", to: :id
|
17
|
+
map_element "table", to: :table
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -3,14 +3,34 @@
|
|
3
3
|
require_relative "../mapper"
|
4
4
|
|
5
5
|
require_relative "reference_list"
|
6
|
+
require_relative "reference_standard"
|
6
7
|
|
7
8
|
module Sts
|
8
9
|
module NisoSts
|
10
|
+
class TitleFull < Sts::Mapper
|
11
|
+
attribute :content, Shale::Type::String
|
12
|
+
attribute :std, ReferenceStandard
|
13
|
+
|
14
|
+
xml do
|
15
|
+
root "full"
|
16
|
+
map_content to: :content
|
17
|
+
map_element "std", to: :std, namespace: nil, prefix: nil
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
class TitleCompl < TitleFull
|
22
|
+
xml do
|
23
|
+
root "compl"
|
24
|
+
map_content to: :content
|
25
|
+
map_element "std", to: :std, namespace: nil, prefix: nil
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
9
29
|
class TitleWrap < Sts::Mapper
|
10
30
|
attribute :intro, Shale::Type::String
|
11
31
|
attribute :main, Shale::Type::String
|
12
|
-
attribute :full,
|
13
|
-
attribute :compl,
|
32
|
+
attribute :full, TitleFull
|
33
|
+
attribute :compl, TitleCompl
|
14
34
|
attribute :lang, Shale::Type::String
|
15
35
|
|
16
36
|
xml do
|
data/lib/sts/niso_sts.rb
CHANGED
@@ -18,5 +18,7 @@ require_relative "niso_sts/reference_list"
|
|
18
18
|
require_relative "niso_sts/reference_standard"
|
19
19
|
require_relative "niso_sts/section"
|
20
20
|
require_relative "niso_sts/standard"
|
21
|
+
require_relative "niso_sts/adoption"
|
22
|
+
require_relative "niso_sts/adoption_front"
|
21
23
|
require_relative "niso_sts/term_display"
|
22
24
|
require_relative "niso_sts/term_section"
|
@@ -15,6 +15,7 @@ module Sts
|
|
15
15
|
attribute :border, Shale::Type::String
|
16
16
|
attribute :rules, Shale::Type::String
|
17
17
|
attribute :frame, Shale::Type::String
|
18
|
+
attribute :width, Shale::Type::String
|
18
19
|
|
19
20
|
xml do
|
20
21
|
root "table"
|
@@ -22,6 +23,7 @@ module Sts
|
|
22
23
|
map_attribute "border", to: :border
|
23
24
|
map_attribute "rules", to: :rules
|
24
25
|
map_attribute "frame", to: :frame
|
26
|
+
map_attribute "width", to: :width
|
25
27
|
|
26
28
|
map_element "col", to: :col
|
27
29
|
map_element "thead", to: :thead
|
@@ -5,23 +5,27 @@ require_relative "../mapper"
|
|
5
5
|
require_relative "table"
|
6
6
|
require_relative "table_wrap_foot"
|
7
7
|
|
8
|
-
require_relative "../niso_sts/caption"
|
9
|
-
|
10
8
|
module Sts
|
11
9
|
module TbxIsoTml
|
12
10
|
class TableWrap < Sts::Mapper
|
13
11
|
attribute :id, Shale::Type::String
|
14
12
|
attribute :orientation, Shale::Type::String
|
13
|
+
attribute :position, Shale::Type::String
|
15
14
|
attribute :label, Shale::Type::String
|
16
|
-
attribute :caption, Sts::NisoSts::Caption
|
17
15
|
attribute :table, Sts::TbxIsoTml::Table, collection: true
|
18
16
|
attribute :table_wrap_foot, Sts::TbxIsoTml::TableWrapFoot
|
19
17
|
|
18
|
+
# TODO: This require will cause a loop when defined in header
|
19
|
+
require_relative "../niso_sts/caption"
|
20
|
+
attribute :caption, Sts::NisoSts::Caption
|
21
|
+
|
20
22
|
xml do
|
21
23
|
root "table-wrap"
|
22
24
|
|
23
25
|
map_attribute "id", to: :id
|
24
26
|
map_attribute "orientation", to: :orientation
|
27
|
+
map_attribute "position", to: :position
|
28
|
+
|
25
29
|
map_element "label", to: :label
|
26
30
|
map_element "caption", to: :caption
|
27
31
|
map_element "table", to: :table
|
data/lib/sts/tbx_iso_tml/td.rb
CHANGED
@@ -10,12 +10,15 @@ require_relative "../niso_sts/inline_formula"
|
|
10
10
|
require_relative "../niso_sts/non_normative_note"
|
11
11
|
require_relative "../niso_sts/graphic"
|
12
12
|
require_relative "../niso_sts/def_list"
|
13
|
+
require_relative "../niso_sts/paragraph"
|
13
14
|
|
14
15
|
module Sts
|
15
16
|
module TbxIsoTml
|
16
17
|
class Td < Sts::Mapper
|
17
18
|
attribute :content, Shale::Type::String
|
18
19
|
attribute :align, Shale::Type::String
|
20
|
+
attribute :scope, Shale::Type::String
|
21
|
+
attribute :style, Shale::Type::String
|
19
22
|
attribute :bold, Bold
|
20
23
|
attribute :italic, Italic
|
21
24
|
attribute :content_type, Shale::Type::String
|
@@ -24,13 +27,14 @@ module Sts
|
|
24
27
|
attribute :colspan, Shale::Type::String
|
25
28
|
attribute :rowspan, Shale::Type::String
|
26
29
|
attribute :valign, Shale::Type::String
|
27
|
-
attribute :inline_formula, Sts::NisoSts::InlineFormula
|
30
|
+
attribute :inline_formula, Sts::NisoSts::InlineFormula, collection: true
|
28
31
|
attribute :non_normative_note, Sts::NisoSts::NonNormativeNote
|
29
32
|
attribute :list, Sts::NisoSts::List
|
30
33
|
attribute :xref, Xref
|
31
34
|
attribute :std, Sts::NisoSts::ReferenceStandard
|
32
35
|
attribute :graphic, Sts::NisoSts::Graphic
|
33
36
|
attribute :def_list, Sts::NisoSts::DefList
|
37
|
+
attribute :paragraph, Sts::NisoSts::Paragraph
|
34
38
|
|
35
39
|
xml do
|
36
40
|
root "tr"
|
@@ -38,6 +42,8 @@ module Sts
|
|
38
42
|
map_content to: :content
|
39
43
|
|
40
44
|
map_attribute "align", to: :align
|
45
|
+
map_attribute "scope", to: :scope
|
46
|
+
map_attribute "style", to: :style
|
41
47
|
map_attribute "content-type", to: :content_type
|
42
48
|
map_attribute "char", to: :char
|
43
49
|
map_attribute "charoff", to: :charoff
|
@@ -54,6 +60,7 @@ module Sts
|
|
54
60
|
map_element "non-normative-note", to: :non_normative_note
|
55
61
|
map_element "graphic", to: :graphic
|
56
62
|
map_element "def-list", to: :def_list
|
63
|
+
map_element "p", to: :paragraph
|
57
64
|
end
|
58
65
|
end
|
59
66
|
end
|
data/lib/sts/tbx_iso_tml/th.rb
CHANGED
@@ -14,6 +14,8 @@ module Sts
|
|
14
14
|
attribute :content, Shale::Type::String
|
15
15
|
attribute :colspan, Shale::Type::String
|
16
16
|
attribute :align, Shale::Type::String
|
17
|
+
attribute :scope, Shale::Type::String
|
18
|
+
attribute :style, Shale::Type::String
|
17
19
|
attribute :rowspan, Shale::Type::String
|
18
20
|
attribute :break, Shale::Type::String
|
19
21
|
attribute :content_type, Shale::Type::String
|
@@ -32,6 +34,8 @@ module Sts
|
|
32
34
|
map_content to: :content
|
33
35
|
map_attribute "colspan", to: :colspan
|
34
36
|
map_attribute "align", to: :align
|
37
|
+
map_attribute "scope", to: :scope
|
38
|
+
map_attribute "style", to: :style
|
35
39
|
map_attribute "rowspan", to: :rowspan
|
36
40
|
map_attribute "content-type", to: :content_type
|
37
41
|
map_attribute "char", to: :char
|
data/lib/sts/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description:
|
41
|
+
description:
|
42
42
|
email:
|
43
43
|
- open.source@ribose.com
|
44
44
|
executables: []
|
@@ -57,6 +57,8 @@ files:
|
|
57
57
|
- lib/sts.rb
|
58
58
|
- lib/sts/mapper.rb
|
59
59
|
- lib/sts/niso_sts.rb
|
60
|
+
- lib/sts/niso_sts/adoption.rb
|
61
|
+
- lib/sts/niso_sts/adoption_front.rb
|
60
62
|
- lib/sts/niso_sts/app.rb
|
61
63
|
- lib/sts/niso_sts/app_group.rb
|
62
64
|
- lib/sts/niso_sts/back.rb
|
@@ -76,8 +78,10 @@ files:
|
|
76
78
|
- lib/sts/niso_sts/front.rb
|
77
79
|
- lib/sts/niso_sts/graphic.rb
|
78
80
|
- lib/sts/niso_sts/inline_formula.rb
|
81
|
+
- lib/sts/niso_sts/label.rb
|
79
82
|
- lib/sts/niso_sts/list.rb
|
80
83
|
- lib/sts/niso_sts/list_item.rb
|
84
|
+
- lib/sts/niso_sts/meta_date.rb
|
81
85
|
- lib/sts/niso_sts/meta_note.rb
|
82
86
|
- lib/sts/niso_sts/metadata_iso.rb
|
83
87
|
- lib/sts/niso_sts/metadata_std.rb
|
@@ -92,6 +96,7 @@ files:
|
|
92
96
|
- lib/sts/niso_sts/reference_list.rb
|
93
97
|
- lib/sts/niso_sts/reference_standard.rb
|
94
98
|
- lib/sts/niso_sts/section.rb
|
99
|
+
- lib/sts/niso_sts/section_array.rb
|
95
100
|
- lib/sts/niso_sts/standard.rb
|
96
101
|
- lib/sts/niso_sts/standard_identification.rb
|
97
102
|
- lib/sts/niso_sts/standard_ref.rb
|
@@ -160,7 +165,7 @@ metadata:
|
|
160
165
|
homepage_uri: https://github.com/metanorma/sts-ruby
|
161
166
|
source_code_uri: https://github.com/metanorma/sts-ruby
|
162
167
|
bug_tracker_uri: https://github.com/metanorma/sts-ruby/issues
|
163
|
-
post_install_message:
|
168
|
+
post_install_message:
|
164
169
|
rdoc_options: []
|
165
170
|
require_paths:
|
166
171
|
- lib
|
@@ -175,8 +180,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
180
|
- !ruby/object:Gem::Version
|
176
181
|
version: '0'
|
177
182
|
requirements: []
|
178
|
-
rubygems_version: 3.
|
179
|
-
signing_key:
|
183
|
+
rubygems_version: 3.3.27
|
184
|
+
signing_key:
|
180
185
|
specification_version: 4
|
181
186
|
summary: Library to work with NISO STS and ISOSTS.
|
182
187
|
test_files: []
|