metanorma-plateau 1.0.7 → 1.0.9
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/lib/isodoc/plateau/plateau.international-standard.xsl +10082 -11023
- data/lib/isodoc/plateau/presentation_xml_convert.rb +30 -24
- data/lib/metanorma/plateau/isodoc.rng +19 -2
- data/lib/metanorma/plateau/version.rb +1 -1
- data/metanorma-plateau.gemspec +0 -1
- metadata +2 -16
@@ -36,14 +36,14 @@ module IsoDoc
|
|
36
36
|
source1(elem, :para)
|
37
37
|
# if we haven't already removed it...
|
38
38
|
elem.parent or return
|
39
|
-
#elem.parent.next = "<p>#{to_xml(elem.remove)}</p>"
|
39
|
+
# elem.parent.next = "<p>#{to_xml(elem.remove)}</p>"
|
40
40
|
elem.parent.next = elem.remove
|
41
41
|
end
|
42
42
|
|
43
43
|
def listsource(elem, ancestor)
|
44
44
|
source1(elem, ancestor)
|
45
45
|
elem.parent or return
|
46
|
-
#elem.parent.next = "<p>#{to_xml(elem.remove)}</p>"
|
46
|
+
# elem.parent.next = "<p>#{to_xml(elem.remove)}</p>"
|
47
47
|
elem.parent.next = elem.remove
|
48
48
|
end
|
49
49
|
|
@@ -88,33 +88,35 @@ module IsoDoc
|
|
88
88
|
cols
|
89
89
|
end
|
90
90
|
|
91
|
-
# if there is already a full-row cell at the start of tfoot,
|
91
|
+
# if there is already a full-row cell at the start of tfoot,
|
92
|
+
# use that to move content into
|
92
93
|
# else create a full-row cell at the start of tfoot
|
93
94
|
def initial_tfoot_cell(node)
|
94
95
|
colspan = table_col_count(node)
|
95
96
|
tfoot_start = node.at(ns("./tfoot/tr/td"))
|
96
97
|
if !tfoot_start
|
97
|
-
node.at(ns("./tbody")).after("<tfoot><tr><td colspan='#{colspan}'> </td></tr></tfoot>").first
|
98
|
+
node.at(ns("./tbody")).after("<tfoot><tr #{add_id_text}><td #{add_id_text} colspan='#{colspan}'> </td></tr></tfoot>").first
|
98
99
|
tfoot_start = node.at(ns("./tfoot/tr/td"))
|
99
100
|
end
|
100
101
|
if tfoot_start["colspan"] != colspan.to_s
|
101
|
-
tfoot_start.parent.previous = "<tr><td colspan='#{colspan}'> </td></tr>"
|
102
|
+
tfoot_start.parent.previous = "<tr #{add_id_text}><td #{add_id_text} colspan='#{colspan}'> </td></tr>"
|
102
103
|
tfoot_start = node.at(ns("./tfoot/tr/td"))
|
103
104
|
end
|
104
105
|
tfoot_start
|
105
106
|
end
|
106
107
|
|
107
|
-
# if there is already a full-row cell at the end of tfoot,
|
108
|
+
# if there is already a full-row cell at the end of tfoot,
|
109
|
+
# use that to move content into
|
108
110
|
# else create a full-row cell at the end of tfoot
|
109
111
|
def final_tfoot_cell(node)
|
110
112
|
colspan = table_col_count(node)
|
111
113
|
tfoot_start = node.at(ns("./tfoot/tr[last()]/td"))
|
112
114
|
if !tfoot_start
|
113
|
-
node.at(ns("./tbody")).after("<tfoot><tr><td colspan='#{colspan}'> </td></tr></tfoot>").first
|
115
|
+
node.at(ns("./tbody")).after("<tfoot><tr #{add_id_text}><td #{add_id_text} colspan='#{colspan}'> </td></tr></tfoot>").first
|
114
116
|
tfoot_start = node.at(ns("./tfoot/tr[last()]/td"))
|
115
117
|
end
|
116
118
|
if tfoot_start["colspan"] != colspan.to_s
|
117
|
-
tfoot_start.parent.next = "<tr><td colspan='#{colspan}'> </td></tr>"
|
119
|
+
tfoot_start.parent.next = "<tr #{add_id_text}><td #{add_id_text} colspan='#{colspan}'> </td></tr>"
|
118
120
|
tfoot_start = node.at(ns("./tfoot/tr[last()]/td"))
|
119
121
|
end
|
120
122
|
tfoot_start
|
@@ -122,23 +124,27 @@ module IsoDoc
|
|
122
124
|
|
123
125
|
def table1(node)
|
124
126
|
super
|
125
|
-
# move dl, notes, footnotes, fmt-source,
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
127
|
+
# move dl, notes, footnotes, fmt-source,
|
128
|
+
# fmt-footnote-container inside tfoot
|
129
|
+
table_dl_to_tfoot(node)
|
130
|
+
table_content_to_tfoot(node)
|
131
|
+
end
|
132
|
+
|
133
|
+
def table_dl_to_tfoot(node)
|
134
|
+
node.at(ns("./dl")) or return
|
135
|
+
tf = initial_tfoot_cell(node)
|
136
|
+
node.xpath(ns("./dl")).reverse_each do |x|
|
137
|
+
tf.children.first.previous = x.remove
|
131
138
|
end
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
node.xpath(ns("./fmt-source")).each do |x|
|
139
|
+
end
|
140
|
+
|
141
|
+
def table_content_to_tfoot(node)
|
142
|
+
node.at(ns("./note | ./fmt-source | ./example | " \
|
143
|
+
"./fmt-footnote-container")) or return
|
144
|
+
tf = final_tfoot_cell(node)
|
145
|
+
%w(example note fmt-footnote-container
|
146
|
+
fmt-source).each do |n|
|
147
|
+
node.xpath(ns("./#{n}")).each do |x|
|
142
148
|
tf.children.last.next = x.remove
|
143
149
|
end
|
144
150
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
|
-
<!-- VERSION v2.0.
|
3
|
+
<!-- VERSION v2.0.7 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -76,6 +76,7 @@ but to `@anchor`, the user-supplied cross-reference</a:documentation>
|
|
76
76
|
<a:documentation>Title(s) of a clause</a:documentation>
|
77
77
|
<element name="title">
|
78
78
|
<a:documentation>Title proper for a clause</a:documentation>
|
79
|
+
<ref name="RequiredId"/>
|
79
80
|
<zeroOrMore>
|
80
81
|
<ref name="TextElement"/>
|
81
82
|
</zeroOrMore>
|
@@ -83,10 +84,19 @@ but to `@anchor`, the user-supplied cross-reference</a:documentation>
|
|
83
84
|
<zeroOrMore>
|
84
85
|
<element name="variant-title">
|
85
86
|
<a:documentation>Alternate title for a clause</a:documentation>
|
87
|
+
<ref name="RequiredId"/>
|
86
88
|
<ref name="TypedTitleString"/>
|
87
89
|
</element>
|
88
90
|
</zeroOrMore>
|
89
91
|
</define>
|
92
|
+
<define name="tname">
|
93
|
+
<element name="name">
|
94
|
+
<ref name="RequiredId"/>
|
95
|
+
<oneOrMore>
|
96
|
+
<ref name="NestedTextElement"/>
|
97
|
+
</oneOrMore>
|
98
|
+
</element>
|
99
|
+
</define>
|
90
100
|
<define name="UlBody">
|
91
101
|
<optional>
|
92
102
|
<ref name="tname">
|
@@ -475,6 +485,7 @@ normative or informative references, some split references into sections organiz
|
|
475
485
|
<!-- exclude figures? -->
|
476
486
|
<define name="dd">
|
477
487
|
<element name="dd">
|
488
|
+
<ref name="OptionalId"/>
|
478
489
|
<zeroOrMore>
|
479
490
|
<!-- exclude figures? -->
|
480
491
|
<ref name="BasicBlock"/>
|
@@ -526,6 +537,7 @@ normative or informative references, some split references into sections organiz
|
|
526
537
|
</choice>
|
527
538
|
</define>
|
528
539
|
<define name="TrAttributes">
|
540
|
+
<ref name="OptionalId"/>
|
529
541
|
<optional>
|
530
542
|
<attribute name="style">
|
531
543
|
<a:documentation>CSS style: only background-color supported</a:documentation>
|
@@ -595,6 +607,7 @@ gives an explicit page orientation</a:documentation>
|
|
595
607
|
</include>
|
596
608
|
<!-- end overrides -->
|
597
609
|
<define name="FnAttributes" combine="interleave">
|
610
|
+
<ref name="RequiredId"/>
|
598
611
|
<optional>
|
599
612
|
<attribute name="hiddenref">
|
600
613
|
<a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
|
@@ -604,6 +617,7 @@ This is done if the footnote reference is already presented in some other form,
|
|
604
617
|
</optional>
|
605
618
|
</define>
|
606
619
|
<define name="TdAttributes" combine="interleave">
|
620
|
+
<ref name="RequiredId"/>
|
607
621
|
<optional>
|
608
622
|
<attribute name="style">
|
609
623
|
<a:documentation>CSS style: only background-color supported</a:documentation>
|
@@ -1821,7 +1835,7 @@ used in document amendments</a:documentation>
|
|
1821
1835
|
</element>
|
1822
1836
|
</define>
|
1823
1837
|
<define name="TermAttributes">
|
1824
|
-
<ref name="
|
1838
|
+
<ref name="RequiredId"/>
|
1825
1839
|
<ref name="LocalizedStringAttributes"/>
|
1826
1840
|
<ref name="BlockAttributes"/>
|
1827
1841
|
</define>
|
@@ -2164,6 +2178,7 @@ used in document amendments</a:documentation>
|
|
2164
2178
|
<define name="termdefinition">
|
2165
2179
|
<a:documentation>The definition of a term applied in the current document</a:documentation>
|
2166
2180
|
<element name="definition">
|
2181
|
+
<ref name="RequiredId"/>
|
2167
2182
|
<optional>
|
2168
2183
|
<attribute name="type">
|
2169
2184
|
<a:documentation>Type of definition, used to differentiate it from other definitions of the same term if present</a:documentation>
|
@@ -2185,6 +2200,7 @@ used in document amendments</a:documentation>
|
|
2185
2200
|
</define>
|
2186
2201
|
<define name="verbaldefinition">
|
2187
2202
|
<element name="verbal-definition">
|
2203
|
+
<ref name="RequiredId"/>
|
2188
2204
|
<oneOrMore>
|
2189
2205
|
<choice>
|
2190
2206
|
<a:documentation>Content of the verbal representation of the term</a:documentation>
|
@@ -2205,6 +2221,7 @@ used in document amendments</a:documentation>
|
|
2205
2221
|
<define name="nonverbalrep">
|
2206
2222
|
<a:documentation>Non-verbal representation of the term</a:documentation>
|
2207
2223
|
<element name="non-verbal-representation">
|
2224
|
+
<ref name="RequiredId"/>
|
2208
2225
|
<oneOrMore>
|
2209
2226
|
<choice>
|
2210
2227
|
<a:documentation>Content of the non-verbal representation of the term</a:documentation>
|
data/metanorma-plateau.gemspec
CHANGED
@@ -44,7 +44,6 @@ spec.add_development_dependency "rubocop-performance"
|
|
44
44
|
spec.add_development_dependency "sassc-embedded", "~> 1"
|
45
45
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
46
46
|
spec.add_development_dependency "timecop", "~> 0.9"
|
47
|
-
spec.add_development_dependency "vcr", "~> 6.1.0"
|
48
47
|
spec.add_development_dependency "webmock"
|
49
48
|
spec.add_development_dependency "xml-c14n"
|
50
49
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-plateau
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-jis
|
@@ -206,20 +206,6 @@ dependencies:
|
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0.9'
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: vcr
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - "~>"
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: 6.1.0
|
216
|
-
type: :development
|
217
|
-
prerelease: false
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
219
|
-
requirements:
|
220
|
-
- - "~>"
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: 6.1.0
|
223
209
|
- !ruby/object:Gem::Dependency
|
224
210
|
name: webmock
|
225
211
|
requirement: !ruby/object:Gem::Requirement
|