isodoc 1.0.25 → 1.0.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0256be2230e0c8757987eb82dee6f8ced68e1cc8794964fabbc446e78d53195
4
- data.tar.gz: a8bc10c2952aacf1542b3a4a1edae6c363bee78604dea3c541f9fd769031ea13
3
+ metadata.gz: c880a51deba0cb3638cae9563b05e1216c34b631225bd1fecb28c8b070a2affb
4
+ data.tar.gz: f64deeac458969b8f9c396b3f72bea106fb50da295132092ea13dcc2daf38d4e
5
5
  SHA512:
6
- metadata.gz: b54f7daa32cc4e7e80a560dfd660f76bf4acae581cda2c3b7f89012ab368da2d0951dec308982bea80e07b1e9d59eed1d170aecae686f42b82f31843a9fff4e9
7
- data.tar.gz: 75bceea7c655e1bf34de59ed6eb185596966c70b09f4da3c786c80fb57394a8e28c7f87cd47b1a795bee0b5e72d08f372981c587f27e3fb31240a96668cebeaf
6
+ metadata.gz: 184392c1f9e0b216a32f80309e031f5ee9cf85679af2975dfa24ca58807094da25445f8a2068da7032f16484ccf91e83eae9dbb1f9d26b08856b2893f117ea58
7
+ data.tar.gz: b8cfd29ad7920acb05e192197d6332189cfcec4412980665a3251bae5c32a235fff257fffc0726195826b79a3405135409259aff3020eabf8949f8aa0cc85c55
@@ -222,5 +222,10 @@ module IsoDoc::Function
222
222
  quote_attribution(node, out)
223
223
  end
224
224
  end
225
+
226
+ def passthrough_parse(node, out)
227
+ return if node["format"] and !(node["format"].split(/,/).include? @format.to_s)
228
+ out << HTMLEntities.new.decode(node.content)
229
+ end
225
230
  end
226
231
  end
@@ -146,8 +146,7 @@ module IsoDoc::Function
146
146
  end
147
147
 
148
148
  def norm_ref(isoxml, out, num)
149
- q = "//bibliography/references[title = 'Normative References' or "\
150
- "title = 'Normative references']"
149
+ q = "//bibliography/references[@normative = 'true']"
151
150
  f = isoxml.at(ns(q)) or return num
152
151
  out.div do |div|
153
152
  num = num + 1
@@ -157,8 +156,8 @@ module IsoDoc::Function
157
156
  num
158
157
  end
159
158
 
160
- BIBLIOGRAPHY_XPATH = "//bibliography/clause[title = 'Bibliography'] | "\
161
- "//bibliography/references[title = 'Bibliography']".freeze
159
+ BIBLIOGRAPHY_XPATH = "//bibliography/clause[.//references[@normative = 'false']] | "\
160
+ "//bibliography/references[@normative = 'false']".freeze
162
161
 
163
162
  def bibliography(isoxml, out)
164
163
  f = isoxml.at(ns(BIBLIOGRAPHY_XPATH)) || return
@@ -207,7 +207,8 @@ module IsoDoc::Function
207
207
 
208
208
  def preface(isoxml, out)
209
209
  title_attr = { class: "IntroTitle" }
210
- isoxml.xpath(ns("//preface/clause")).each do |f|
210
+ isoxml.xpath(ns("//preface/clause | //preface/terms | //preface/definitions | "\
211
+ "//preface/references")).each do |f|
211
212
  page_break(out)
212
213
  out.div **{ class: "Section3", id: f["id"] } do |div|
213
214
  clause_name(nil, f&.at(ns("./title")), div, title_attr)
@@ -21,7 +21,7 @@ module IsoDoc::Function
21
21
  filename = filepath.sub_ext('').to_s
22
22
  dir = "#{filename}_files"
23
23
  unless debug
24
- Dir.mkdir(dir) unless File.exists?(dir)
24
+ Dir.mkdir(dir, 0777) unless File.exists?(dir)
25
25
  FileUtils.rm_rf "#{dir}/*"
26
26
  end
27
27
  @filename = filename
@@ -210,6 +210,7 @@ module IsoDoc::Function
210
210
  when "license-statement" then license_parse(node, out)
211
211
  when "legal-statement" then legal_parse(node, out)
212
212
  when "feedback-statement" then feedback_parse(node, out)
213
+ when "passthrough" then passthrough_parse(node, out)
213
214
  else
214
215
  error_parse(node, out)
215
216
  end
@@ -40,6 +40,7 @@ module IsoDoc::Function
40
40
 
41
41
  SECTIONS_XPATH =
42
42
  "//foreword | //introduction | //acknowledgements | //preface/clause | "\
43
+ "//preface/terms | preface/definitions | preface/references | "\
43
44
  "//sections/terms | //annex | "\
44
45
  "//sections/clause | //sections/definitions | "\
45
46
  "//bibliography/references | //bibliography/clause".freeze
@@ -68,7 +69,7 @@ module IsoDoc::Function
68
69
  "not(self::xmlns:terms) and not(self::xmlns:definitions)]//"\
69
70
  "xmlns:example | ./xmlns:example".freeze
70
71
 
71
- CHILD_SECTIONS = "./clause | ./appendix | ./terms | ./definitions"
72
+ CHILD_SECTIONS = "./clause | ./appendix | ./terms | ./definitions | ./references"
72
73
 
73
74
  def example_anchor_names(sections)
74
75
  sections.each do |s|
@@ -5,10 +5,9 @@ module IsoDoc::Function
5
5
  annex_names(c, (65 + i).chr.to_s)
6
6
  end
7
7
  docxml.xpath(
8
- ns("//bibliography/clause[not(xmlns:title = 'Normative References' or "\
9
- "xmlns:title = 'Normative references')] |"\
10
- "//bibliography/references[not(xmlns:title = 'Normative References'"\
11
- " or xmlns:title = 'Normative references')]")).each do |b|
8
+ ns("//bibliography/clause[.//references[@normative = 'false']] | "\
9
+ "//bibliography/references[@normative = 'false']"
10
+ )).each do |b|
12
11
  preface_names(b)
13
12
  end
14
13
  docxml.xpath(ns("//bibitem[not(ancestor::bibitem)]")).each do |ref|
@@ -17,23 +16,13 @@ module IsoDoc::Function
17
16
  end
18
17
 
19
18
  def initial_anchor_names(d)
20
- preface_names(d.at(ns("//preface/abstract")))
21
- preface_names(d.at(ns("//foreword")))
22
- preface_names(d.at(ns("//introduction")))
23
- d.xpath(ns("//preface/clause")).each do |c|
24
- preface_names(c)
25
- end
26
- preface_names(d.at(ns("//acknowledgements")))
19
+ d.xpath(ns("//preface/*")).each { |c| c.element? and preface_names(c) }
27
20
  # potentially overridden in middle_section_asset_names()
28
- sequential_asset_names(
29
- d.xpath(ns("//preface/abstract | //foreword | //introduction | "\
30
- "//preface/clause | //acknowledgements")))
21
+ sequential_asset_names(d.xpath(ns("//preface/*")))
31
22
  n = section_names(d.at(ns("//clause[title = 'Scope']")), 0, 1)
32
23
  n = section_names(d.at(ns(
33
- "//bibliography/clause[title = 'Normative References' or "\
34
- "title = 'Normative references'] |"\
35
- "//bibliography/references[title = 'Normative References' or "\
36
- "title = 'Normative references']")), n, 1)
24
+ "//bibliography/clause[.//references[@normative = 'true']] | "\
25
+ "//bibliography/references[@normative = 'true']")), n, 1)
37
26
  n = section_names(d.at(ns("//sections/terms | "\
38
27
  "//sections/clause[descendant::terms]")), n, 1)
39
28
  n = section_names(d.at(ns("//sections/definitions")), n, 1)
@@ -76,10 +65,8 @@ module IsoDoc::Function
76
65
 
77
66
  def middle_section_asset_names(d)
78
67
  middle_sections = "//clause[title = 'Scope'] | "\
79
- "//references[title = 'Normative References' or title = "\
80
- "'Normative references'] | "\
81
- "//sections/terms | //preface/abstract | //foreword | "\
82
- "//introduction | //preface/clause | //acknowledgements | "\
68
+ "//references[@normative = 'true'] | "\
69
+ "//sections/terms | //preface/* | "\
83
70
  "//sections/definitions | //clause[parent::sections]"
84
71
  sequential_asset_names(d.xpath(ns(middle_sections)))
85
72
  end
@@ -120,12 +107,25 @@ module IsoDoc::Function
120
107
  l10n("<b>#{@annex_lbl} #{num}</b><br/>#{obl}")
121
108
  end
122
109
 
110
+ def single_annex_special_section(clause)
111
+ a = clause.xpath(ns("./references | ./terms | ./definitions"))
112
+ a.size == 1 or return nil
113
+ clause.xpath(ns("./clause | ./p | ./table | ./ol | ./ul | ./dl | "\
114
+ "./note | ./admonition | ./figure")).size == 0 or
115
+ return nil
116
+ a[0]
117
+ end
118
+
123
119
  def annex_names(clause, num)
124
120
  @anchors[clause["id"]] = { label: annex_name_lbl(clause, num),
125
121
  type: "clause",
126
122
  xref: "#{@annex_lbl} #{num}", level: 1 }
127
- clause.xpath(ns(SUBCLAUSES)).each_with_index do |c, i|
128
- annex_names1(c, "#{num}.#{i + 1}", 2)
123
+ if a = single_annex_special_section(clause)
124
+ annex_names1(a, "#{num}", 1)
125
+ else
126
+ clause.xpath(ns(SUBCLAUSES)).each_with_index do |c, i|
127
+ annex_names1(c, "#{num}.#{i + 1}", 2)
128
+ end
129
129
  end
130
130
  hierarchical_asset_names(clause, num)
131
131
  end
@@ -14,6 +14,11 @@ module IsoDoc
14
14
  "_headlessimages"
15
15
  end
16
16
 
17
+ def initialize(options)
18
+ @format = :html
19
+ super
20
+ end
21
+
17
22
  def convert(filename, file = nil, debug = false)
18
23
  file = File.read(filename, encoding: "utf-8") if file.nil?
19
24
  @openmathdelim, @closemathdelim = extract_delims(file)
@@ -14,6 +14,11 @@ module IsoDoc
14
14
  "_htmlimages"
15
15
  end
16
16
 
17
+ def initialize(options)
18
+ @format = :html
19
+ super
20
+ end
21
+
17
22
  def convert(filename, file = nil, debug = false)
18
23
  ret = super
19
24
  Dir.exists?(tmpimagedir) and Dir["#{tmpimagedir}/*"].empty? and
@@ -14,14 +14,26 @@ module IsoDoc
14
14
  "10": @labels["month_october"],
15
15
  "11": @labels["month_november"],
16
16
  "12": @labels["month_december"],
17
- }
17
+ }
18
18
  end
19
19
 
20
- def monthyr(isodate)
21
- m = /(?<yr>\d\d\d\d)-(?<mo>\d\d)/.match isodate
22
- return isodate unless m && m[:yr] && m[:mo]
23
- IsoDoc::Function::I18n::l10n("#{months[m[:mo].to_sym]} #{m[:yr]}",
24
- @lang, @script)
25
- end
20
+ def monthyr(isodate)
21
+ m = /(?<yr>\d\d\d\d)-(?<mo>\d\d)/.match isodate
22
+ return isodate unless m && m[:yr] && m[:mo]
23
+ IsoDoc::Function::I18n::l10n("#{months[m[:mo].to_sym]} #{m[:yr]}",
24
+ @lang, @script)
25
+ end
26
+
27
+ def MMMddyyyy(isodate)
28
+ return nil if isodate.nil?
29
+ arr = isodate.split("-")
30
+ date = if arr.size == 1 and (/^\d+$/.match isodate)
31
+ Date.new(*arr.map(&:to_i)).strftime("%Y")
32
+ elsif arr.size == 2
33
+ Date.new(*arr.map(&:to_i)).strftime("%B %Y")
34
+ else
35
+ Date.parse(isodate).strftime("%B %d, %Y")
36
+ end
37
+ end
26
38
  end
27
39
  end
@@ -22,6 +22,11 @@ module IsoDoc
22
22
  "_pdfimages"
23
23
  end
24
24
 
25
+ def initialize(options)
26
+ @format = :pdf
27
+ super
28
+ end
29
+
25
30
  def convert(filename, file = nil, debug = false)
26
31
  file = File.read(filename, encoding: "utf-8") if file.nil?
27
32
  @openmathdelim, @closemathdelim = extract_delims(file)
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "1.0.25".freeze
2
+ VERSION = "1.0.26".freeze
3
3
  end
@@ -30,6 +30,11 @@ module IsoDoc
30
30
  include WordFunction::Body
31
31
  include WordFunction::Postprocess
32
32
 
33
+ def initialize(options)
34
+ @format = :doc
35
+ super
36
+ end
37
+
33
38
  def convert(filename, file = nil, debug = false)
34
39
  ret = super
35
40
  FileUtils.rm_rf tmpimagedir
@@ -13,6 +13,11 @@ module IsoDoc
13
13
  "_pdfimages"
14
14
  end
15
15
 
16
+ def initialize(options)
17
+ @format = :pdf
18
+ super
19
+ end
20
+
16
21
  def convert(filename, file = nil, debug = false)
17
22
  file = File.read(filename, encoding: "utf-8") if file.nil?
18
23
  docxml, outname_html, dir = convert_init(file, filename, debug)
@@ -1030,7 +1030,7 @@ World</p>
1030
1030
  </import>
1031
1031
  </permission>
1032
1032
  </foreword></preface>
1033
- <bibliography><references id="_bibliography" obligation="informative">
1033
+ <bibliography><references id="_bibliography" obligation="informative" normative="false">
1034
1034
  <title>Bibliography</title>
1035
1035
  <bibitem id="rfc2616" type="standard"> <fetched>2020-03-27</fetched> <title format="text/plain" language="en" script="Latn">Hypertext Transfer Protocol — HTTP/1.1</title> <uri type="xml">https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2616.xml</uri> <uri type="src">https://www.rfc-editor.org/info/rfc2616</uri> <docidentifier type="IETF">RFC 2616</docidentifier> <docidentifier type="rfc-anchor">RFC2616</docidentifier> <docidentifier type="DOI">10.17487/RFC2616</docidentifier> <date type="published"> <on>1999-06</on> </date> <contributor> <role type="author"/> <person> <name> <completename language="en">R. Fielding</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">J. Gettys</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">J. Mogul</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">H. Frystyk</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">L. Masinter</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">P. Leach</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">T. Berners-Lee</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <language>en</language> <script>Latn</script> <abstract format="text/plain" language="en" script="Latn">HTTP has been in use by the World-Wide Web global information initiative since 1990. This specification defines the protocol referred to as “HTTP/1.1”, and is an update to RFC 2068. [STANDARDS-TRACK]</abstract> <series type="main"> <title format="text/plain" language="en" script="Latn">RFC</title> <number>2616</number> </series> <place>Fremont, CA</place></bibitem>
1036
1036
 
@@ -1462,5 +1462,47 @@ INPUT
1462
1462
  OUTPUT
1463
1463
  end
1464
1464
 
1465
+ it "processes passthrough with compatible format" do
1466
+ expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
1467
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
1468
+ <preface><foreword>
1469
+ <passthrough format="html,rfc">&lt;A&gt;</passthrough>
1470
+ </foreword></preface>
1471
+ </iso-standard>
1472
+ INPUT
1473
+ #{HTML_HDR}
1474
+ <br/>
1475
+ <div>
1476
+ <h1 class='ForewordTitle'>Foreword</h1>
1477
+ <a/>
1478
+ </div>
1479
+ <p class='zzSTDTitle1'/>
1480
+ </div>
1481
+ </body>
1482
+ </html>
1483
+ OUTPUT
1484
+ end
1485
+
1486
+ it "ignore passthrough with incompatible format" do
1487
+ expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
1488
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
1489
+ <preface><foreword>
1490
+ <passthrough format="doc,rfc">&lt;A&gt;</passthrough>
1491
+ </foreword></preface>
1492
+ </iso-standard>
1493
+ INPUT
1494
+ #{HTML_HDR}
1495
+ <br/>
1496
+ <div>
1497
+ <h1 class='ForewordTitle'>Foreword</h1>
1498
+ </div>
1499
+ <p class='zzSTDTitle1'/>
1500
+ </div>
1501
+ </body>
1502
+ </html>
1503
+ OUTPUT
1504
+ end
1505
+
1506
+
1465
1507
 
1466
1508
  end
@@ -55,11 +55,11 @@ RSpec.describe IsoDoc do
55
55
  <title>Annex A.1a</title>
56
56
  </clause>
57
57
  </clause>
58
- </annex><bibliography><references id="R" obligation="informative">
58
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
59
59
  <title>Normative References</title>
60
60
  </references><clause id="S" obligation="informative">
61
61
  <title>Bibliography</title>
62
- <references id="T" obligation="informative">
62
+ <references id="T" obligation="informative" normative="false">
63
63
  <title>Bibliography Subsection</title>
64
64
  </references>
65
65
  </clause>
@@ -191,11 +191,11 @@ RSpec.describe IsoDoc do
191
191
  <title>Annex A.1a</title>
192
192
  </clause>
193
193
  </clause>
194
- </annex><bibliography><references id="R" obligation="informative">
194
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
195
195
  <title>Normative References</title>
196
196
  </references><clause id="S" obligation="informative">
197
197
  <title>Bibliography</title>
198
- <references id="T" obligation="informative">
198
+ <references id="T" obligation="informative" normative="false">
199
199
  <title>Bibliography Subsection</title>
200
200
  </references>
201
201
  </clause>
@@ -327,11 +327,11 @@ RSpec.describe IsoDoc do
327
327
  <title>Annex A.1a</title>
328
328
  </clause>
329
329
  </clause>
330
- </annex><bibliography><references id="R" obligation="informative">
330
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
331
331
  <title>Normative References</title>
332
332
  </references><clause id="S" obligation="informative">
333
333
  <title>Bibliography</title>
334
- <references id="T" obligation="informative">
334
+ <references id="T" obligation="informative" normative="false">
335
335
  <title>Bibliography Subsection</title>
336
336
  </references>
337
337
  </clause>
@@ -464,7 +464,7 @@ RSpec.describe IsoDoc do
464
464
  <title>Annex A.1a</title>
465
465
  </clause>
466
466
  </clause>
467
- </annex><bibliography><references id="R" obligation="informative">
467
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
468
468
  <title>Normative References</title>
469
469
  <bibitem id="ISO712" type="standard">
470
470
  <title format="text/plain">Cereals and cereal products</title>
@@ -478,7 +478,7 @@ RSpec.describe IsoDoc do
478
478
  </bibitem>
479
479
  </references><clause id="S" obligation="informative">
480
480
  <title>Bibliography</title>
481
- <references id="T" obligation="informative">
481
+ <references id="T" obligation="informative" normative="false">
482
482
  <title>Bibliography Subsection</title>
483
483
  </references>
484
484
  </clause>
@@ -165,7 +165,7 @@ RSpec.describe IsoDoc do
165
165
  <sections>
166
166
  <clause id="clause1"><title>Clause 1</title></clause>
167
167
  </sections>
168
- <bibliography><references id="_normative_references" obligation="informative"><title>Normative References</title>
168
+ <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
169
169
  <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
170
170
  <bibitem id="ISO712" type="standard">
171
171
  <title format="text/plain">Cereals or cereal products</title>
@@ -414,7 +414,7 @@ OUTPUT
414
414
  <eref type="inline" bibitemid="ISO712" citeas="ISO 712">A</stem>
415
415
  </p>
416
416
  </foreword></preface>
417
- <bibliography><references id="_normative_references" obligation="informative"><title>Normative References</title>
417
+ <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
418
418
  <bibitem id="ISO712" type="standard">
419
419
  <title format="text/plain">Cereals and cereal products</title>
420
420
  <docidentifier>ISO 712</docidentifier>
@@ -469,7 +469,7 @@ OUTPUT
469
469
  <eref type="inline" bibitemid="ISO712" citeas="ISO 712">A</eref>
470
470
  </p>
471
471
  </foreword></preface>
472
- <bibliography><references id="_normative_references" obligation="informative"><title>Normative References</title>
472
+ <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
473
473
  <bibitem id="ISO712" type="standard">
474
474
  <title format="text/plain">Cereals and cereal products</title>
475
475
  <docidentifier>ISO 712</docidentifier>
@@ -19,7 +19,7 @@ RSpec.describe IsoDoc do
19
19
  <eref bibitemid="zip_ffs"/>
20
20
  </p>
21
21
  </foreword></preface>
22
- <bibliography><references id="_normative_references" obligation="informative"><title>Normative References</title>
22
+ <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
23
23
  <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
24
24
  <bibitem id="ISO712" type="standard">
25
25
  <title format="text/plain">Cereals or cereal products</title>
@@ -69,7 +69,7 @@ RSpec.describe IsoDoc do
69
69
  <bibitem id="zip_ffs"><formattedref format="application/x-isodoc+xml">Title 5</formattedref><docidentifier type="metanorma">[5]</docidentifier></bibitem>
70
70
 
71
71
 
72
- </references><references id="_bibliography" obligation="informative">
72
+ </references><references id="_bibliography" obligation="informative" normative="false">
73
73
  <title>Bibliography</title>
74
74
  <bibitem id="ISBN" type="ISBN">
75
75
  <title format="text/plain">Chemicals for analytical laboratory use</title>
@@ -112,16 +112,16 @@ RSpec.describe IsoDoc do
112
112
  <clause id="Q1" inline-header="false" obligation="normative">
113
113
  <title>Annex A.1a</title>
114
114
  </clause>
115
- <references id="Q2"><title>Annex Bibliography</title></references>
115
+ <references id="Q2" normative="false"><title>Annex Bibliography</title></references>
116
116
  </clause>
117
117
  </annex>
118
118
  <annex id="P1" inline-header="false" obligation="normative">
119
119
  </annex>
120
- <bibliography><references id="R" obligation="informative">
120
+ <bibliography><references id="R" obligation="informative" normative="true">
121
121
  <title>Normative References</title>
122
122
  </references><clause id="S" obligation="informative">
123
123
  <title>Bibliography</title>
124
- <references id="T" obligation="informative">
124
+ <references id="T" obligation="informative" normative="false">
125
125
  <title>Bibliography Subsection</title>
126
126
  </references>
127
127
  </clause>
@@ -342,11 +342,11 @@ OUTPUT
342
342
  </annex>
343
343
  <annex id="P1" inline-header="false" obligation="normative">
344
344
  </annex>
345
- <bibliography><references id="R" obligation="informative">
345
+ <bibliography><references id="R" obligation="informative" normative="true">
346
346
  <title>Normative References</title>
347
347
  </references><clause id="S" obligation="informative">
348
348
  <title>Bibliography</title>
349
- <references id="T" obligation="informative">
349
+ <references id="T" obligation="informative" normative="false">
350
350
  <title>Bibliography Subsection</title>
351
351
  </references>
352
352
  </clause>
@@ -579,215 +579,225 @@ OUTPUT
579
579
  <clause id="Q1" inline-header="false" obligation="normative">
580
580
  <title>Annex A.1a<fn reference="17"><p>A</p></fn></title>
581
581
  </clause>
582
- <references id="Q2"><title>Annex Bibliography<fn reference="18"><p>A</p></fn></title></references>
582
+ <references id="Q2" normative="false"><title>Annex Bibliography<fn reference="18"><p>A</p></fn></title></references>
583
583
  </clause>
584
- </annex><bibliography><references id="R" obligation="informative">
584
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
585
585
  <title>Normative References<fn reference="19"><p>A</p></fn></title>
586
586
  </references><clause id="S" obligation="informative">
587
587
  <title>Bibliography<fn reference="20"><p>A</p></fn></title>
588
- <references id="T" obligation="informative">
588
+ <references id="T" obligation="informative" normative="false">
589
589
  <title>Bibliography Subsection<fn reference="21"><p>A</p></fn></title>
590
590
  </references>
591
591
  </clause>
592
592
  </bibliography>
593
593
  </iso-standard>
594
594
  INPUT
595
- <html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
596
- <head/>
597
- <body lang='en'>
598
- <div class='title-section'>
599
- <p>&#160;</p>
600
- </div>
601
- <br/>
602
- <div class='prefatory-section'>
603
- <p>&#160;</p>
604
- </div>
605
- <br/>
606
- <div class='main-section'>
607
- <div class='authority'>
608
- <div class='boilerplate-copyright'>
609
- <div>
610
- <h1>
611
- Copyright
612
- <a rel='footnote' href='#fn:1' epub:type='footnote'>
613
- <sup>1</sup>
614
- </a>
615
- </h1>
616
- </div>
617
- </div>
618
- <div class='boilerplate-license'>
619
- <div>
620
- <h1>
621
- License
622
- <a rel='footnote' href='#fn:2' epub:type='footnote'>
623
- <sup>2</sup>
624
- </a>
625
- </h1>
626
- </div>
627
- </div>
628
- <div class='boilerplate-legal'>
629
- <div>
630
- <h1>
631
- Legal
632
- <a rel='footnote' href='#fn:3' epub:type='footnote'>
633
- <sup>3</sup>
634
- </a>
635
- </h1>
636
- </div>
637
- </div>
638
- <div class='boilerplate-feedback'>
639
- <div>
640
- <h1>
641
- Feedback
642
- <a rel='footnote' href='#fn:4' epub:type='footnote'>
643
- <sup>4</sup>
644
- </a>
645
- </h1>
646
- </div>
647
- </div>
648
- </div>
649
- <br/>
650
- <div>
651
- <h1 class='AbstractTitle'>Abstract</h1>
652
- </div>
653
- <br/>
654
- <div>
655
- <h1 class='ForewordTitle'>Foreword</h1>
656
- <p id='A'>This is a preamble</p>
657
- </div>
658
- <br/>
659
- <div class='Section3' id='B'>
660
- <h1 class='IntroTitle'>Introduction</h1>
661
- <div id='C'>
662
- <h2>
663
- Introduction Subsection
664
- <a rel='footnote' href='#fn:8' epub:type='footnote'>
665
- <sup>8</sup>
666
- </a>
667
- </h2>
668
- </div>
669
- </div>
670
- <p class='zzSTDTitle1'/>
671
- <div id='H'>
672
- <h1>
673
- 1.&#160; Terms, Definitions, Symbols and Abbreviated Terms
674
- <a rel='footnote' href='#fn:10' epub:type='footnote'>
675
- <sup>10</sup>
676
- </a>
677
- </h1>
678
- <div id='I'>
679
- <h2>
680
- 1.1.&#160; Normal Terms
681
- <a rel='footnote' href='#fn:11' epub:type='footnote'>
682
- <sup>11</sup>
683
- </a>
684
- </h2>
685
- <p class='TermNum' id='J'>1.1.1.</p>
686
- <p class='Terms' style='text-align:left;'>Term2</p>
687
- </div>
688
- <div id='K'>
689
- <h2>
690
- 1.2.&#160; Definitions
691
- <a rel='footnote' href='#fn:12' epub:type='footnote'>
692
- <sup>12</sup>
693
- </a>
694
- </h2>
695
- <dl>
696
- <dt>
697
- <p>Symbol</p>
698
- </dt>
699
- <dd>Definition</dd>
700
- </dl>
701
- </div>
702
- </div>
703
- <div id='L' class='Symbols'>
704
- <h1>2.&#160; Symbols and abbreviated terms</h1>
705
- <dl>
706
- <dt>
707
- <p>Symbol</p>
708
- </dt>
709
- <dd>Definition</dd>
710
- </dl>
711
- </div>
712
- <div id='D'>
713
- <h1>
714
- 3.&#160; Scope
715
- <a rel='footnote' href='#fn:9' epub:type='footnote'>
716
- <sup>9</sup>
717
- </a>
718
- </h1>
719
- <p id='E'>Text</p>
720
- </div>
721
- <div id='M'>
722
- <h1>
723
- 4.&#160; Clause 4
724
- <a rel='footnote' href='#fn:13' epub:type='footnote'>
725
- <sup>13</sup>
726
- </a>
727
- </h1>
728
- <div id='N'>
729
- <h2>
730
- 4.1.&#160; Introduction
731
- <a rel='footnote' href='#fn:1' epub:type='footnote'>
732
- <sup>1</sup>
733
- </a>
734
- </h2>
735
- </div>
736
- <div id='O'>
737
- <h2>
738
- 4.2.&#160; Clause 4.2
739
- <a rel='footnote' href='#fn:14' epub:type='footnote'>
740
- <sup>14</sup>
741
- </a>
742
- </h2>
743
- </div>
744
- <div id='O1'>
745
- <h2>4.3.&#160; </h2>
746
- </div>
747
- </div>
748
- <br/>
749
- <div id='P' class='Section3'>
750
- <h1 class='Annex'>
751
- <b>Annex A</b>
752
- <br/>
753
- (normative)
754
- <br/>
755
- <br/>
756
- <b>
757
- Annex
758
- <a rel='footnote' href='#fn:15' epub:type='footnote'>
759
- <sup>15</sup>
760
- </a>
761
- </b>
762
- </h1>
763
- <div id='Q'>
764
- <h2>
765
- A.1.&#160; Annex A.1
766
- <a rel='footnote' href='#fn:16' epub:type='footnote'>
767
- <sup>16</sup>
768
- </a>
769
- </h2>
770
- <div id='Q1'>
771
- <h3>
772
- A.1.1.&#160; Annex A.1a
773
- <a rel='footnote' href='#fn:17' epub:type='footnote'>
774
- <sup>17</sup>
775
- </a>
776
- </h3>
777
- </div>
778
- <div>
779
- <h3>
780
- A.1.2.&#160; Annex Bibliography
781
- <a rel='footnote' href='#fn:18' epub:type='footnote'>
782
- <sup>18</sup>
783
- </a>
784
- </h3>
785
- </div>
786
- </div>
787
- </div>
788
- </div>
789
- </body>
790
- </html>
595
+ <html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
596
+ <head/>
597
+ <body lang='en'>
598
+ <div class='title-section'>
599
+ <p>&#160;</p>
600
+ </div>
601
+ <br/>
602
+ <div class='prefatory-section'>
603
+ <p>&#160;</p>
604
+ </div>
605
+ <br/>
606
+ <div class='main-section'>
607
+ <div class='authority'>
608
+ <div class='boilerplate-copyright'>
609
+ <div>
610
+ <h1>
611
+ Copyright
612
+ <a rel='footnote' href='#fn:1' epub:type='footnote'>
613
+ <sup>1</sup>
614
+ </a>
615
+ </h1>
616
+ </div>
617
+ </div>
618
+ <div class='boilerplate-license'>
619
+ <div>
620
+ <h1>
621
+ License
622
+ <a rel='footnote' href='#fn:2' epub:type='footnote'>
623
+ <sup>2</sup>
624
+ </a>
625
+ </h1>
626
+ </div>
627
+ </div>
628
+ <div class='boilerplate-legal'>
629
+ <div>
630
+ <h1>
631
+ Legal
632
+ <a rel='footnote' href='#fn:3' epub:type='footnote'>
633
+ <sup>3</sup>
634
+ </a>
635
+ </h1>
636
+ </div>
637
+ </div>
638
+ <div class='boilerplate-feedback'>
639
+ <div>
640
+ <h1>
641
+ Feedback
642
+ <a rel='footnote' href='#fn:4' epub:type='footnote'>
643
+ <sup>4</sup>
644
+ </a>
645
+ </h1>
646
+ </div>
647
+ </div>
648
+ </div>
649
+ <br/>
650
+ <div>
651
+ <h1 class='AbstractTitle'>Abstract</h1>
652
+ </div>
653
+ <br/>
654
+ <div>
655
+ <h1 class='ForewordTitle'>Foreword</h1>
656
+ <p id='A'>This is a preamble</p>
657
+ </div>
658
+ <br/>
659
+ <div class='Section3' id='B'>
660
+ <h1 class='IntroTitle'>Introduction</h1>
661
+ <div id='C'>
662
+ <h2>
663
+ Introduction Subsection
664
+ <a rel='footnote' href='#fn:8' epub:type='footnote'>
665
+ <sup>8</sup>
666
+ </a>
667
+ </h2>
668
+ </div>
669
+ </div>
670
+ <p class='zzSTDTitle1'/>
671
+ <div>
672
+ <h1>1.&#160; Normative references</h1>
673
+ </div>
674
+ <div id='H'>
675
+ <h1>
676
+ 2.&#160; Terms, Definitions, Symbols and Abbreviated Terms
677
+ <a rel='footnote' href='#fn:10' epub:type='footnote'>
678
+ <sup>10</sup>
679
+ </a>
680
+ </h1>
681
+ <div id='I'>
682
+ <h2>
683
+ 2.1.&#160; Normal Terms
684
+ <a rel='footnote' href='#fn:11' epub:type='footnote'>
685
+ <sup>11</sup>
686
+ </a>
687
+ </h2>
688
+ <p class='TermNum' id='J'>2.1.1.</p>
689
+ <p class='Terms' style='text-align:left;'>Term2</p>
690
+ </div>
691
+ <div id='K'>
692
+ <h2>
693
+ 2.2.&#160; Definitions
694
+ <a rel='footnote' href='#fn:12' epub:type='footnote'>
695
+ <sup>12</sup>
696
+ </a>
697
+ </h2>
698
+ <dl>
699
+ <dt>
700
+ <p>Symbol</p>
701
+ </dt>
702
+ <dd>Definition</dd>
703
+ </dl>
704
+ </div>
705
+ </div>
706
+ <div id='L' class='Symbols'>
707
+ <h1>3.&#160; Symbols and abbreviated terms</h1>
708
+ <dl>
709
+ <dt>
710
+ <p>Symbol</p>
711
+ </dt>
712
+ <dd>Definition</dd>
713
+ </dl>
714
+ </div>
715
+ <div id='D'>
716
+ <h1>
717
+ 4.&#160; Scope
718
+ <a rel='footnote' href='#fn:9' epub:type='footnote'>
719
+ <sup>9</sup>
720
+ </a>
721
+ </h1>
722
+ <p id='E'>Text</p>
723
+ </div>
724
+ <div id='M'>
725
+ <h1>
726
+ 5.&#160; Clause 4
727
+ <a rel='footnote' href='#fn:13' epub:type='footnote'>
728
+ <sup>13</sup>
729
+ </a>
730
+ </h1>
731
+ <div id='N'>
732
+ <h2>
733
+ 5.1.&#160; Introduction
734
+ <a rel='footnote' href='#fn:1' epub:type='footnote'>
735
+ <sup>1</sup>
736
+ </a>
737
+ </h2>
738
+ </div>
739
+ <div id='O'>
740
+ <h2>
741
+ 5.2.&#160; Clause 4.2
742
+ <a rel='footnote' href='#fn:14' epub:type='footnote'>
743
+ <sup>14</sup>
744
+ </a>
745
+ </h2>
746
+ </div>
747
+ <div id='O1'>
748
+ <h2>5.3.&#160; </h2>
749
+ </div>
750
+ </div>
751
+ <br/>
752
+ <div id='P' class='Section3'>
753
+ <h1 class='Annex'>
754
+ <b>Annex A</b>
755
+ <br/>
756
+ (normative)
757
+ <br/>
758
+ <br/>
759
+ <b>
760
+ Annex
761
+ <a rel='footnote' href='#fn:15' epub:type='footnote'>
762
+ <sup>15</sup>
763
+ </a>
764
+ </b>
765
+ </h1>
766
+ <div id='Q'>
767
+ <h2>
768
+ A.1.&#160; Annex A.1
769
+ <a rel='footnote' href='#fn:16' epub:type='footnote'>
770
+ <sup>16</sup>
771
+ </a>
772
+ </h2>
773
+ <div id='Q1'>
774
+ <h3>
775
+ A.1.1.&#160; Annex A.1a
776
+ <a rel='footnote' href='#fn:17' epub:type='footnote'>
777
+ <sup>17</sup>
778
+ </a>
779
+ </h3>
780
+ </div>
781
+ <div>
782
+ <h3>
783
+ A.1.2.&#160; Annex Bibliography
784
+ <a rel='footnote' href='#fn:18' epub:type='footnote'>
785
+ <sup>18</sup>
786
+ </a>
787
+ </h3>
788
+ </div>
789
+ </div>
790
+ </div>
791
+ <br/>
792
+ <div>
793
+ <h1 class='Section3'>Bibliography</h1>
794
+ <div>
795
+ <h2 class='Section3'>Bibliography SubsectionA</h2>
796
+ </div>
797
+ </div>
798
+ </div>
799
+ </body>
800
+ </html>
791
801
  OUTPUT
792
802
  end
793
803
 
@@ -845,11 +855,11 @@ OUTPUT
845
855
  <title>Annex A.1a</title>
846
856
  </clause>
847
857
  </clause>
848
- </annex><bibliography><references id="R" obligation="informative">
858
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
849
859
  <title>Normative References</title>
850
860
  </references><clause id="S" obligation="informative">
851
861
  <title>Bibliography</title>
852
- <references id="T" obligation="informative">
862
+ <references id="T" obligation="informative" normative="false">
853
863
  <title>Bibliography Subsection</title>
854
864
  </references>
855
865
  </clause>
@@ -1631,6 +1631,9 @@ OUTPUT
1631
1631
  <xref target="P"/>
1632
1632
  <xref target="Q"/>
1633
1633
  <xref target="Q1"/>
1634
+ <xref target="QQ"/>
1635
+ <xref target="QQ1"/>
1636
+ <xref target="QQ2"/>
1634
1637
  <xref target="R"/>
1635
1638
  <xref target="S"/>
1636
1639
  </p>
@@ -1679,11 +1682,17 @@ OUTPUT
1679
1682
  <title>Annex A.1a</title>
1680
1683
  </clause>
1681
1684
  </clause>
1682
- </annex><bibliography><references id="R" obligation="informative">
1685
+ </annex>
1686
+ <annex id="QQ">
1687
+ <terms id="QQ1">
1688
+ <term id="QQ2"/>
1689
+ </terms>
1690
+ </annex>
1691
+ <bibliography><references id="R" obligation="informative" normative="true">
1683
1692
  <title>Normative References</title>
1684
1693
  </references><clause id="S" obligation="informative">
1685
1694
  <title>Bibliography</title>
1686
- <references id="T" obligation="informative">
1695
+ <references id="T" obligation="informative" normative="false">
1687
1696
  <title>Bibliography Subsection</title>
1688
1697
  </references>
1689
1698
  </clause>
@@ -1709,6 +1718,9 @@ OUTPUT
1709
1718
  <a href="#P">Annex A</a>
1710
1719
  <a href="#Q">Annex A.1</a>
1711
1720
  <a href="#Q1">Annex A.1.1</a>
1721
+ <a href='#QQ'>Annex B</a>
1722
+ <a href='#QQ1'>Annex B</a>
1723
+ <a href='#QQ2'>Annex B.1</a>
1712
1724
  <a href="#R">Clause 2</a>
1713
1725
  <a href="#S">Bibliography</a>
1714
1726
  </p>
@@ -1764,6 +1776,21 @@ OUTPUT
1764
1776
  <div id="Q1">
1765
1777
  <h3>A.1.1.&#160; Annex A.1a</h3>
1766
1778
  </div>
1779
+ </div>
1780
+ </div>
1781
+ <br/>
1782
+ <div id='QQ' class='Section3'>
1783
+ <h1 class='Annex'>
1784
+ <b>Annex B</b>
1785
+ <br/>
1786
+ (informative)
1787
+ <br/>
1788
+ <br/>
1789
+ <b/>
1790
+ </h1>
1791
+ <div id='QQ1'>
1792
+ <h1>B.&#160; </h1>
1793
+ <p class='TermNum' id='QQ2'>B.1.</p>
1767
1794
  </div>
1768
1795
  </div>
1769
1796
  <br/>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.25
4
+ version: 1.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-01 00:00:00.000000000 Z
11
+ date: 2020-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath