metanorma-iso 1.8.4 → 1.8.5
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/.rubocop.yml +1 -1
- data/lib/isodoc/iso/base_convert.rb +13 -13
- data/lib/isodoc/iso/html/isodoc.css +475 -20
- data/lib/isodoc/iso/html/isodoc.scss +456 -23
- data/lib/isodoc/iso/html/wordstyle.css +202 -31
- data/lib/isodoc/iso/html/wordstyle.scss +194 -32
- data/lib/isodoc/iso/iso.amendment.xsl +69 -13
- data/lib/isodoc/iso/iso.international-standard.xsl +69 -13
- data/lib/isodoc/iso/metadata.rb +2 -2
- data/lib/isodoc/iso/word_convert.rb +153 -39
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +1 -1
- data/spec/isodoc/amd_spec.rb +193 -201
- data/spec/isodoc/blocks_spec.rb +100 -88
- data/spec/isodoc/i18n_spec.rb +36 -36
- data/spec/isodoc/inline_spec.rb +2 -2
- data/spec/isodoc/iso_spec.rb +86 -138
- data/spec/isodoc/postproc_spec.rb +19 -10
- data/spec/isodoc/ref_spec.rb +6 -6
- data/spec/isodoc/section_spec.rb +301 -306
- data/spec/isodoc/table_spec.rb +166 -231
- data/spec/isodoc/terms_spec.rb +11 -8
- data/spec/isodoc/xref_spec.rb +147 -118
- metadata +3 -3
data/lib/isodoc/iso/metadata.rb
CHANGED
@@ -38,12 +38,12 @@ module IsoDoc
|
|
38
38
|
set(:statusabbr, status_abbrev(docstatus["abbreviation"] || "??",
|
39
39
|
isoxml&.at(ns("//bibdata/status/substage"))&.text,
|
40
40
|
isoxml&.at(ns("//bibdata/status/iteration"))&.text,
|
41
|
-
isoxml&.at(ns("//version/draft"))&.text,
|
41
|
+
isoxml&.at(ns("//bibdata/version/draft"))&.text,
|
42
42
|
isoxml&.at(ns("//bibdata/ext/doctype"))&.text))
|
43
43
|
unpublished(docstatus.text) and
|
44
44
|
set(:stageabbr, docstatus["abbreviation"])
|
45
45
|
end
|
46
|
-
revdate = isoxml.at(ns("//version/revision-date"))
|
46
|
+
revdate = isoxml.at(ns("//bibdata/version/revision-date"))
|
47
47
|
set(:revdate, revdate&.text)
|
48
48
|
end
|
49
49
|
|
@@ -14,34 +14,34 @@ module IsoDoc
|
|
14
14
|
@htmlToClevels = 3 if @htmlToClevels.zero?
|
15
15
|
end
|
16
16
|
|
17
|
+
def font_choice(options)
|
18
|
+
if options[:script] == "Hans" then '"Source Han Sans",serif'
|
19
|
+
else '"Cambria",serif'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
17
23
|
def default_fonts(options)
|
18
|
-
{
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
monospacefontsize: "9.0pt",
|
26
|
-
smallerfontsize: "10.0pt",
|
27
|
-
footnotefontsize: "10.0pt",
|
28
|
-
}
|
24
|
+
{ bodyfont: font_choice(options),
|
25
|
+
headerfont: font_choice(options),
|
26
|
+
monospacefont: '"Courier New",monospace',
|
27
|
+
normalfontsize: "11.0pt",
|
28
|
+
monospacefontsize: "9.0pt",
|
29
|
+
smallerfontsize: "10.0pt",
|
30
|
+
footnotefontsize: "10.0pt" }
|
29
31
|
end
|
30
32
|
|
31
33
|
def default_file_locations(options)
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
olstyle: "l2",
|
44
|
-
}
|
34
|
+
a = options[:alt] ? "style-human.scss" : "style-iso.scss"
|
35
|
+
{ htmlstylesheet: html_doc_path(a),
|
36
|
+
htmlcoverpage: html_doc_path("html_iso_titlepage.html"),
|
37
|
+
htmlintropage: html_doc_path("html_iso_intro.html"),
|
38
|
+
wordstylesheet: html_doc_path("wordstyle.scss"),
|
39
|
+
standardstylesheet: html_doc_path("isodoc.scss"),
|
40
|
+
header: html_doc_path("header.html"),
|
41
|
+
wordcoverpage: html_doc_path("word_iso_titlepage.html"),
|
42
|
+
wordintropage: html_doc_path("word_iso_intro.html"),
|
43
|
+
ulstyle: "l3",
|
44
|
+
olstyle: "l2" }
|
45
45
|
end
|
46
46
|
|
47
47
|
def make_body(xml, docxml)
|
@@ -54,9 +54,10 @@ module IsoDoc
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
-
def colophon(body,
|
58
|
-
stage =
|
57
|
+
def colophon(body, _docxml)
|
58
|
+
stage = @meta.get[:stage_int]
|
59
59
|
return if !stage.nil? && stage < 60
|
60
|
+
|
60
61
|
body.br **{ clear: "all", style: "page-break-before:left;"\
|
61
62
|
"mso-break-type:section-break" }
|
62
63
|
body.div **{ class: "colophon" } do |div|
|
@@ -67,35 +68,55 @@ module IsoDoc
|
|
67
68
|
super
|
68
69
|
xml.xpath("//div[@class = 'figure']//table[@class = 'dl']").each do |t|
|
69
70
|
t["class"] = "figdl"
|
70
|
-
d = t.add_previous_sibling("<div class='figdl'
|
71
|
+
d = t.add_previous_sibling("<div class='figdl' "\
|
72
|
+
"style='page-break-after:avoid;'/>")
|
71
73
|
t.parent = d.first
|
72
74
|
end
|
73
75
|
end
|
74
76
|
|
75
77
|
# force Annex h2 down to be p.h2Annex, so it is not picked up by ToC
|
76
|
-
def word_annex_cleanup1(docxml,
|
77
|
-
docxml.xpath("//h#{
|
78
|
+
def word_annex_cleanup1(docxml, lvl)
|
79
|
+
docxml.xpath("//h#{lvl}[ancestor::*[@class = 'Section3']]").each do |h2|
|
78
80
|
h2.name = "p"
|
79
|
-
h2["class"] = "h#{
|
81
|
+
h2["class"] = "h#{lvl}Annex"
|
80
82
|
end
|
81
83
|
end
|
82
84
|
|
83
85
|
def word_annex_cleanup(docxml)
|
84
|
-
word_annex_cleanup1(docxml,
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
86
|
+
(2..6).each { |i| word_annex_cleanup1(docxml, i) }
|
87
|
+
end
|
88
|
+
|
89
|
+
def word_annex_cleanup_h1(docxml)
|
90
|
+
docxml.xpath("//h1[@class = 'Annex']").each do |h|
|
91
|
+
h.name = "p"
|
92
|
+
h["class"] = "ANNEX"
|
93
|
+
end
|
94
|
+
%w(BiblioTitle ForewordTitle IntroTitle).each do |s|
|
95
|
+
docxml.xpath("//*[@class = '#{s}']").each do |h|
|
96
|
+
h.name = "p"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
def style_cleanup(docxml)
|
102
|
+
word_annex_cleanup_h1(docxml)
|
103
|
+
style_cleanup1(docxml)
|
104
|
+
end
|
105
|
+
|
106
|
+
def style_cleanup1(docxml)
|
107
|
+
docxml.xpath("//*[@class = 'example']").each do |p|
|
108
|
+
p["class"] = "Example"
|
109
|
+
end
|
89
110
|
end
|
90
111
|
|
91
112
|
def authority_hdr_cleanup(docxml)
|
92
|
-
docxml&.xpath("//div[@class = 'boilerplate-license']")
|
113
|
+
docxml&.xpath("//div[@class = 'boilerplate-license']")&.each do |d|
|
93
114
|
d.xpath(".//h1").each do |p|
|
94
115
|
p.name = "p"
|
95
116
|
p["class"] = "zzWarningHdr"
|
96
117
|
end
|
97
118
|
end
|
98
|
-
docxml&.xpath("//div[@class = 'boilerplate-copyright']")
|
119
|
+
docxml&.xpath("//div[@class = 'boilerplate-copyright']")&.each do |d|
|
99
120
|
d.xpath(".//h1").each do |p|
|
100
121
|
p.name = "p"
|
101
122
|
p["class"] = "zzCopyrightHdr"
|
@@ -120,11 +141,104 @@ module IsoDoc
|
|
120
141
|
def word_cleanup(docxml)
|
121
142
|
authority_hdr_cleanup(docxml)
|
122
143
|
super
|
144
|
+
style_cleanup(docxml)
|
123
145
|
docxml
|
124
146
|
end
|
125
147
|
|
126
|
-
def
|
127
|
-
|
148
|
+
def word_toc_preface(level)
|
149
|
+
<<~TOC.freeze
|
150
|
+
<span lang="EN-GB"><span
|
151
|
+
style='mso-element:field-begin'></span><span
|
152
|
+
style='mso-spacerun:yes'> </span>TOC
|
153
|
+
\\o "1-#{level}" \\h \\z \\t "Heading
|
154
|
+
1;1;ANNEX;1;Biblio Title;1;Foreword Title;1;Intro Title;1" <span
|
155
|
+
style='mso-element:field-separator'></span></span>
|
156
|
+
TOC
|
157
|
+
end
|
158
|
+
|
159
|
+
def footnote_reference_format(link)
|
160
|
+
link.children =
|
161
|
+
"<span class='MsoFootnoteReference'>#{link.children.to_xml}</span>)"
|
162
|
+
end
|
163
|
+
|
164
|
+
def bibliography_attrs
|
165
|
+
{ class: "BiblioTitle" }
|
166
|
+
end
|
167
|
+
|
168
|
+
def bibliography(xml, out)
|
169
|
+
f = xml.at(ns(bibliography_xpath)) and f["hidden"] != "true" or return
|
170
|
+
page_break(out)
|
171
|
+
out.div do |div|
|
172
|
+
div.h1 **bibliography_attrs do |h1|
|
173
|
+
f&.at(ns("./title"))&.children&.each { |c2| parse(c2, h1) }
|
174
|
+
end
|
175
|
+
biblio_list(f, div, true)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
def bibliography_parse(node, out)
|
180
|
+
node["hidden"] != true or return
|
181
|
+
out.div do |div|
|
182
|
+
clause_parse_title(node, div, node.at(ns("./title")), out,
|
183
|
+
bibliography_attrs)
|
184
|
+
biblio_list(node, div, true)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
def para_class(node)
|
189
|
+
if !node.ancestors("definition").empty? && !@in_footnote
|
190
|
+
"Definition"
|
191
|
+
elsif !node.ancestors("foreword").empty? && !@in_footnote
|
192
|
+
"ForewordText"
|
193
|
+
else
|
194
|
+
super
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
def termref_attrs
|
199
|
+
{ class: "Source" }
|
200
|
+
end
|
201
|
+
|
202
|
+
def termref_parse(node, out)
|
203
|
+
out.p **termref_attrs do |p|
|
204
|
+
p << "[TERMREF]"
|
205
|
+
node.children.each { |n| parse(n, p) }
|
206
|
+
p << "[/TERMREF]"
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
def figure_name_attrs(node)
|
211
|
+
s = node.ancestors("annex").empty? ? "FigureTitle" : "AnnexFigureTitle"
|
212
|
+
{ class: s, style: "text-align:center;" }
|
213
|
+
end
|
214
|
+
|
215
|
+
def figure_name_parse(node, div, name)
|
216
|
+
return if name.nil?
|
217
|
+
|
218
|
+
div.p **figure_name_attrs(node) do |p|
|
219
|
+
name.children.each { |n| parse(n, p) }
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
def table_title_attrs(node)
|
224
|
+
s = node.ancestors("annex").empty? ? "Tabletitle" : "AnnexTableTitle"
|
225
|
+
{ class: s, style: "text-align:center;" }
|
226
|
+
end
|
227
|
+
|
228
|
+
def table_title_parse(node, out)
|
229
|
+
name = node.at(ns("./name")) or return
|
230
|
+
out.p **table_title_attrs(node) do |p|
|
231
|
+
name&.children&.each { |n| parse(n, p) }
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
def annex_name(_annex, name, div)
|
236
|
+
return if name.nil?
|
237
|
+
|
238
|
+
name&.at(ns("./strong"))&.remove # supplied by CSS list numbering
|
239
|
+
div.h1 **{ class: "Annex" } do |t|
|
240
|
+
name.children.each { |c2| parse(c2, t) }
|
241
|
+
end
|
128
242
|
end
|
129
243
|
|
130
244
|
include BaseConvert
|
data/metanorma-iso.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
spec.files = `git ls-files`.split("\n")
|
29
29
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
30
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
30
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
31
31
|
|
32
32
|
spec.add_dependency "isodoc", "~> 1.6.2"
|
33
33
|
spec.add_dependency "metanorma-standoc", "~> 1.9.0"
|
data/spec/isodoc/amd_spec.rb
CHANGED
@@ -75,7 +75,7 @@ RSpec.describe IsoDoc do
|
|
75
75
|
</ext>
|
76
76
|
</bibdata>
|
77
77
|
<preface>
|
78
|
-
<foreword>
|
78
|
+
<foreword displayorder="1">
|
79
79
|
<p>
|
80
80
|
<xref target="N">Scope, Note</xref>
|
81
81
|
<xref target="note1">Widgets, 1, Note 1</xref>
|
@@ -87,7 +87,7 @@ RSpec.describe IsoDoc do
|
|
87
87
|
</foreword>
|
88
88
|
</preface>
|
89
89
|
<sections>
|
90
|
-
<clause id="scope">
|
90
|
+
<clause id="scope" displayorder="3">
|
91
91
|
<title depth="1">Scope</title>
|
92
92
|
<note id="N">
|
93
93
|
<name>NOTE</name>
|
@@ -99,8 +99,8 @@ RSpec.describe IsoDoc do
|
|
99
99
|
<xref target="N">Note</xref>
|
100
100
|
</p>
|
101
101
|
</clause>
|
102
|
-
<terms id="terms"/>
|
103
|
-
<clause id="widgets">
|
102
|
+
<terms id="terms" displayorder="2"/>
|
103
|
+
<clause id="widgets" displayorder="4">
|
104
104
|
<title depth="1">Widgets</title>
|
105
105
|
<clause id="widgets1" inline-header="true">
|
106
106
|
<note id="note1">
|
@@ -122,7 +122,7 @@ RSpec.describe IsoDoc do
|
|
122
122
|
</clause>
|
123
123
|
</clause>
|
124
124
|
</sections>
|
125
|
-
<annex id="annex1">
|
125
|
+
<annex id="annex1" displayorder="5">
|
126
126
|
<title>
|
127
127
|
<strong>Annex A</strong>
|
128
128
|
<br/>(informative)</title>
|
@@ -235,97 +235,102 @@ RSpec.describe IsoDoc do
|
|
235
235
|
INPUT
|
236
236
|
expect(xmlpp(output).sub(%r{<localized-strings>.*</localized-strings>}m, ""))
|
237
237
|
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
238
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
|
239
|
+
<bibdata>
|
240
|
+
<ext>
|
241
|
+
<doctype language=''>amendment</doctype>
|
242
|
+
</ext>
|
243
|
+
</bibdata>
|
244
|
+
|
245
|
+
<preface>
|
246
|
+
<foreword obligation='informative' displayorder='1'>
|
247
|
+
<title>Foreword</title>
|
248
|
+
<p id='A'>
|
249
|
+
This is a preamble
|
250
|
+
<xref target='C'>0.1</xref>
|
251
|
+
<xref target='C1'>0.2</xref>
|
252
|
+
<xref target='D'>Scope</xref>
|
253
|
+
<xref target='H'>[H]</xref>
|
254
|
+
<xref target='I'>[I]</xref>
|
255
|
+
<xref target='J'>[J]</xref>
|
256
|
+
<xref target='K'>[K]</xref>
|
257
|
+
<xref target='L'>[L]</xref>
|
258
|
+
<xref target='M'>Clause 4</xref>
|
259
|
+
<xref target='N'>Introduction</xref>
|
260
|
+
<xref target='O'>Clause 4.2</xref>
|
261
|
+
<xref target='P'>Annex A</xref>
|
262
|
+
<xref target='Q'>A.1</xref>
|
263
|
+
<xref target='Q1'>A.1.1</xref>
|
264
|
+
<xref target='Q2'>Annex A, Appendix 1</xref>
|
265
|
+
<xref target='R'>[R]</xref>
|
266
|
+
</p>
|
267
|
+
</foreword>
|
268
|
+
<introduction id='B' obligation='informative' displayorder='2'>
|
269
|
+
<title depth='1'>Introduction</title>
|
270
|
+
<clause id='C' inline-header='false' obligation='informative'>
|
271
|
+
<title depth='2'>Introduction Subsection</title>
|
272
|
+
</clause>
|
273
|
+
<clause id='C1' inline-header='true' obligation='informative'>Text</clause>
|
274
|
+
</introduction>
|
275
|
+
</preface>
|
276
|
+
<sections>
|
277
|
+
<clause id='D' obligation='normative' type='scope' displayorder='3'>
|
278
|
+
<title depth='1'>Scope</title>
|
279
|
+
<p id='E'>Text</p>
|
280
|
+
</clause>
|
281
|
+
<clause id='M' inline-header='false' obligation='normative' displayorder='5'>
|
282
|
+
<title depth='1'>Clause 4</title>
|
283
|
+
<clause id='N' inline-header='false' obligation='normative'>
|
284
|
+
<title depth='2'>Introduction</title>
|
285
|
+
</clause>
|
286
|
+
<clause id='O' inline-header='false' obligation='normative'>
|
287
|
+
<title depth='2'>Clause 4.2</title>
|
288
|
+
</clause>
|
289
|
+
</clause>
|
290
|
+
</sections>
|
291
|
+
<annex id='P' inline-header='false' obligation='normative' displayorder='6'>
|
292
|
+
<title>
|
293
|
+
<strong>Annex A</strong>
|
294
|
+
<br/>
|
295
|
+
(normative)
|
296
|
+
<br/>
|
297
|
+
<br/>
|
298
|
+
<strong>Annex</strong>
|
299
|
+
</title>
|
300
|
+
<clause id='Q' inline-header='false' obligation='normative'>
|
301
|
+
<title depth='2'>
|
302
|
+
A.1
|
303
|
+
<tab/>
|
304
|
+
Annex A.1
|
305
|
+
</title>
|
306
|
+
<clause id='Q1' inline-header='false' obligation='normative'>
|
307
|
+
<title depth='3'>
|
308
|
+
A.1.1
|
309
|
+
<tab/>
|
310
|
+
Annex A.1a
|
311
|
+
</title>
|
312
|
+
</clause>
|
313
|
+
</clause>
|
314
|
+
<appendix id='Q2' inline-header='false' obligation='normative'>
|
315
|
+
<title depth='2'>
|
316
|
+
Appendix 1
|
317
|
+
<tab/>
|
318
|
+
An Appendix
|
319
|
+
</title>
|
320
|
+
</appendix>
|
321
|
+
</annex>
|
322
|
+
<bibliography>
|
323
|
+
<references id='R' normative='true' obligation='informative' displayorder='4'>
|
324
|
+
<title depth='1'>Normative References</title>
|
325
|
+
</references>
|
326
|
+
<clause id='S' obligation='informative' displayorder='7'>
|
327
|
+
<title depth='1'>Bibliography</title>
|
328
|
+
<references id='T' normative='false' obligation='informative'>
|
329
|
+
<title depth='2'>Bibliography Subsection</title>
|
330
|
+
</references>
|
331
|
+
</clause>
|
332
|
+
</bibliography>
|
333
|
+
</iso-standard>
|
329
334
|
OUTPUT
|
330
335
|
end
|
331
336
|
|
@@ -423,109 +428,96 @@ RSpec.describe IsoDoc do
|
|
423
428
|
</iso-standard>
|
424
429
|
INPUT
|
425
430
|
presxml = <<~OUTPUT
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
</annex>
|
517
|
-
<bibliography>
|
518
|
-
<references id="R" normative="true" obligation="informative">
|
519
|
-
<title depth="1">Normative References</title>
|
520
|
-
</references>
|
521
|
-
<clause id="S" obligation="informative">
|
522
|
-
<title depth="1">Bibliography</title>
|
523
|
-
<references id="T" normative="false" obligation="informative">
|
524
|
-
<title depth="2">Bibliography Subsection</title>
|
525
|
-
</references>
|
526
|
-
</clause>
|
527
|
-
</bibliography>
|
528
|
-
</iso-standard>
|
431
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
|
432
|
+
<bibdata>
|
433
|
+
<ext>
|
434
|
+
<doctype language="">amendment</doctype>
|
435
|
+
</ext>
|
436
|
+
</bibdata>
|
437
|
+
<boilerplate>
|
438
|
+
<copyright-statement>
|
439
|
+
<clause>
|
440
|
+
<title depth="1">Copyright</title>
|
441
|
+
</clause>
|
442
|
+
</copyright-statement>
|
443
|
+
<license-statement>
|
444
|
+
<clause>
|
445
|
+
<title depth="1">License</title>
|
446
|
+
</clause>
|
447
|
+
</license-statement>
|
448
|
+
<legal-statement>
|
449
|
+
<clause>
|
450
|
+
<title depth="1">Legal</title>
|
451
|
+
</clause>
|
452
|
+
</legal-statement>
|
453
|
+
<feedback-statement>
|
454
|
+
<clause>
|
455
|
+
<title depth="1">Feedback</title>
|
456
|
+
</clause>
|
457
|
+
</feedback-statement>
|
458
|
+
</boilerplate>
|
459
|
+
<preface>
|
460
|
+
<abstract obligation="informative" displayorder="1">
|
461
|
+
<title>Abstract</title>
|
462
|
+
</abstract>
|
463
|
+
<foreword obligation="informative" displayorder="2">
|
464
|
+
<title>Foreword</title>
|
465
|
+
<p id="A">This is a preamble</p>
|
466
|
+
</foreword>
|
467
|
+
<introduction id="B" obligation="informative" displayorder="3">
|
468
|
+
<title depth="1">Introduction</title>
|
469
|
+
<clause id="C" inline-header="false" obligation="informative">
|
470
|
+
<title depth="2">Introduction Subsection</title>
|
471
|
+
</clause>
|
472
|
+
</introduction>
|
473
|
+
<clause id="B1" displayorder="4">
|
474
|
+
<title depth="1">Dedication</title>
|
475
|
+
</clause>
|
476
|
+
<clause id="B2" displayorder="5">
|
477
|
+
<title depth="1">Note to reader</title>
|
478
|
+
</clause>
|
479
|
+
<acknowledgements obligation="informative" displayorder="6">
|
480
|
+
<title>Acknowledgements</title>
|
481
|
+
</acknowledgements>
|
482
|
+
</preface>
|
483
|
+
<sections>
|
484
|
+
<clause id="M" inline-header="false" obligation="normative" displayorder="8">
|
485
|
+
<title depth="1">Clause 4</title>
|
486
|
+
<clause id="N" inline-header="false" obligation="normative">
|
487
|
+
<title depth="2">Introduction</title>
|
488
|
+
</clause>
|
489
|
+
<clause id="O" inline-header="false" obligation="normative">
|
490
|
+
<title depth="2">Clause 4.2</title>
|
491
|
+
</clause>
|
492
|
+
<clause id="O1" inline-header="true" obligation="normative"/>
|
493
|
+
</clause>
|
494
|
+
<clause id="D" obligation="normative" displayorder="9">
|
495
|
+
<title depth="1">Scope</title>
|
496
|
+
<p id="E">Text</p>
|
497
|
+
</clause>
|
498
|
+
</sections>
|
499
|
+
<annex id="P" inline-header="false" obligation="normative" displayorder="10">
|
500
|
+
<title><strong>Annex A</strong><br/>(normative)<br/><br/><strong>Annex</strong></title>
|
501
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
502
|
+
<title depth="2">A.1<tab/>Annex A.1</title>
|
503
|
+
<clause id="Q1" inline-header="false" obligation="normative">
|
504
|
+
<title depth="3">A.1.1<tab/>Annex A.1a</title>
|
505
|
+
</clause>
|
506
|
+
</clause>
|
507
|
+
</annex>
|
508
|
+
<annex id="P1" inline-header="false" obligation="normative" displayorder="11"><title><strong>Annex B</strong><br/>(normative)</title></annex>
|
509
|
+
<bibliography>
|
510
|
+
<references id="R" normative="true" obligation="informative" displayorder="7">
|
511
|
+
<title depth="1">Normative References</title>
|
512
|
+
</references>
|
513
|
+
<clause id="S" obligation="informative" displayorder="12">
|
514
|
+
<title depth="1">Bibliography</title>
|
515
|
+
<references id="T" normative="false" obligation="informative">
|
516
|
+
<title depth="2">Bibliography Subsection</title>
|
517
|
+
</references>
|
518
|
+
</clause>
|
519
|
+
</bibliography>
|
520
|
+
</iso-standard>
|
529
521
|
OUTPUT
|
530
522
|
html = <<~OUTPUT
|
531
523
|
<html lang="en" xmlns:epub="http://www.idpf.org/2007/ops">
|
@@ -617,9 +609,9 @@ RSpec.describe IsoDoc do
|
|
617
609
|
<br/>
|
618
610
|
<b>Annex</b></h1>
|
619
611
|
<div id="Q">
|
620
|
-
<h2>A.1
|
612
|
+
<h2>A.1  Annex A.1</h2>
|
621
613
|
<div id="Q1">
|
622
|
-
<h3>A.1.1
|
614
|
+
<h3>A.1.1  Annex A.1a</h3>
|
623
615
|
</div>
|
624
616
|
</div>
|
625
617
|
</div>
|