metanorma-bsi 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of metanorma-bsi might be problematic. Click here for more details.

Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +43 -0
  3. data/.github/workflows/release_github_packages.yml +49 -0
  4. data/.hound.yml +3 -1
  5. data/.rubocop.yml +4 -8
  6. data/README.adoc +95 -11
  7. data/lib/asciidoctor/bsi/biblio.rng +1 -0
  8. data/lib/asciidoctor/bsi/bsi.rng +32 -4
  9. data/lib/asciidoctor/bsi/bsi_intro_en.xml +87 -61
  10. data/lib/asciidoctor/bsi/cleanup.rb +15 -8
  11. data/lib/asciidoctor/bsi/cleanup_ref.rb +10 -21
  12. data/lib/asciidoctor/bsi/converter.rb +7 -5
  13. data/lib/asciidoctor/bsi/front.rb +26 -5
  14. data/lib/asciidoctor/bsi/isodoc.rng +191 -3
  15. data/lib/asciidoctor/bsi/isostandard.rng +12 -0
  16. data/lib/asciidoctor/bsi/validate.rb +5 -6
  17. data/lib/asciidoctor/bsi/validate_list.rb +2 -2
  18. data/lib/isodoc/bsi/base_convert.rb +2 -1
  19. data/lib/isodoc/bsi/bsi.international-standard.xsl +3380 -2349
  20. data/lib/isodoc/bsi/html/htmlstyle.css +43 -22
  21. data/lib/isodoc/bsi/html/htmlstyle.scss +46 -22
  22. data/lib/isodoc/bsi/html_convert.rb +2 -2
  23. data/lib/isodoc/bsi/i18n-en.yaml +4 -4
  24. data/lib/isodoc/bsi/metadata.rb +2 -2
  25. data/lib/isodoc/bsi/presentation_xml_convert.rb +26 -5
  26. data/lib/isodoc/bsi/xref.rb +11 -4
  27. data/lib/metanorma/bsi/version.rb +1 -1
  28. data/metanorma-bsi.gemspec +2 -2
  29. data/spec/asciidoctor/base_spec.rb +564 -494
  30. data/spec/asciidoctor/blocks_spec.rb +192 -195
  31. data/spec/asciidoctor/cleanup_spec.rb +361 -361
  32. data/spec/asciidoctor/refs_spec.rb +8 -78
  33. data/spec/asciidoctor/section_spec.rb +227 -227
  34. data/spec/asciidoctor/validate_spec.rb +26 -1
  35. data/spec/isodoc/blocks_spec.rb +56 -21
  36. data/spec/isodoc/i18n_spec.rb +156 -234
  37. data/spec/isodoc/inline_spec.rb +7 -7
  38. data/spec/isodoc/iso_spec.rb +4 -4
  39. data/spec/isodoc/metadata_spec.rb +0 -1
  40. data/spec/isodoc/ref_spec.rb +7 -7
  41. data/spec/isodoc/section_spec.rb +400 -343
  42. data/spec/isodoc/terms_spec.rb +224 -225
  43. data/spec/isodoc/xref_spec.rb +1347 -1360
  44. data/spec/metanorma/processor_spec.rb +37 -40
  45. data/spec/spec_helper.rb +6 -4
  46. data/spec/vcr_cassettes/iso-639.yml +19 -19
  47. data/spec/vcr_cassettes/isobib_get_639_1967.yml +17 -17
  48. data/spec/vcr_cassettes/multistandard.yml +15 -193
  49. metadata +7 -5
@@ -75,63 +75,62 @@ RSpec.describe IsoDoc do
75
75
  </clause>
76
76
  </bibliography>
77
77
  </iso-standard>
78
- INPUT
78
+ INPUT
79
79
 
80
- presxml = <<~OUTPUT
81
- <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
80
+ presxml = <<~OUTPUT
81
+ <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
82
82
  <bibdata>
83
83
  <docnumber>1</docnumber>
84
84
  <language current="true">en</language>
85
85
  <ext>
86
- <doctype language=''>international-standard</doctype>
87
- <doctype language='en'>International Standard</doctype>
88
- <horizontal>true</horizontal>
89
- <function>emc</function>
90
- </ext>
86
+ <doctype language="">international-standard</doctype><doctype language="en">International Standard</doctype>
87
+ <horizontal>true</horizontal>
88
+ <function>emc</function>
89
+ </ext>
91
90
  </bibdata>
92
91
  <preface>
93
- <foreword obligation="informative">
92
+ <foreword obligation="informative" displayorder="1">
94
93
  <title>Foreword</title>
95
94
  <p id="A">This is a preamble</p>
96
95
  </foreword>
97
- <introduction id="B" obligation="informative"><title depth="1">0<tab/>Introduction</title><clause id="C" inline-header="false" obligation="informative">
96
+ <introduction id="B" obligation="informative" displayorder="2"><title depth="1">0<tab/>Introduction</title><clause id="C" inline-header="false" obligation="informative">
98
97
  <title depth="2">0.1<tab/>Introduction Subsection</title>
99
98
  </clause>
100
99
  <p>This is patent boilerplate</p>
101
100
  </introduction></preface><sections>
102
- <clause id="D" obligation="normative" type="scope">
101
+ <clause id="D" obligation="normative" type="scope" displayorder="3">
103
102
  <title depth="1">1<tab/>Scope</title>
104
103
  <p id="E">Text</p>
105
104
  </clause>
106
-
107
- <clause id="H" obligation="normative"><title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
105
+
106
+ <clause id="H" obligation="normative" displayorder="5"><title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
108
107
  <title depth="2">3.1<tab/>Normal Terms</title>
109
108
  <term id="J"><name>3.1.1</name>
110
109
  <preferred>Term2</preferred>
111
110
  </term>
112
111
  </terms>
113
- <definitions id="K" inline-header='true'><title>3.2</title>
112
+ <definitions id="K" inline-header="true"><title>3.2</title>
114
113
  <dl>
115
114
  <dt>Symbol</dt>
116
115
  <dd>Definition</dd>
117
116
  </dl>
118
117
  </definitions>
119
118
  </clause>
120
- <definitions id="L"><title>4</title>
119
+ <definitions id="L" displayorder="6"><title>4</title>
121
120
  <dl>
122
121
  <dt>Symbol</dt>
123
122
  <dd>Definition</dd>
124
123
  </dl>
125
124
  </definitions>
126
- <clause id="M" inline-header="false" obligation="normative"><title depth="1">5<tab/>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
125
+ <clause id="M" inline-header="false" obligation="normative" displayorder="7"><title depth="1">5<tab/>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
127
126
  <title depth="2">5.1<tab/>Introduction</title>
128
127
  </clause>
129
128
  <clause id="O" inline-header="false" obligation="normative">
130
129
  <title depth="2">5.2<tab/>Clause 4.2</title>
131
130
  </clause></clause>
132
-
133
- </sections><annex id="P" inline-header="false" obligation="normative">
134
- <title><strong>Annex A</strong><br/>(normative)<br/><br/><strong>Annex</strong></title>
131
+
132
+ </sections><annex id="P" inline-header="false" obligation="normative" displayorder="8">
133
+ <title><strong>Annex A</strong><tab/>(normative)<br/><strong>Annex</strong></title>
135
134
  <clause id="Q" inline-header="false" obligation="normative">
136
135
  <title depth="2">A.1<tab/>Annex A.1</title>
137
136
  <clause id="Q1" inline-header="false" obligation="normative">
@@ -141,9 +140,9 @@ RSpec.describe IsoDoc do
141
140
  <appendix id="Q2" inline-header="false" obligation="normative">
142
141
  <title depth="2">Appendix 1<tab/>An Appendix</title>
143
142
  </appendix>
144
- </annex><bibliography><references id="R" obligation="informative" normative="true">
143
+ </annex><bibliography><references id="R" obligation="informative" normative="true" displayorder="4">
145
144
  <title depth="1">2<tab/>Normative References</title>
146
- </references><clause id="S" obligation="informative">
145
+ </references><clause id="S" obligation="informative" displayorder="9">
147
146
  <title depth="1">Bibliography</title>
148
147
  <references id="T" obligation="informative" normative="false">
149
148
  <title depth="2">Bibliography Subsection</title>
@@ -151,85 +150,77 @@ RSpec.describe IsoDoc do
151
150
  </clause>
152
151
  </bibliography>
153
152
  </iso-standard>
154
- OUTPUT
155
-
156
- html = <<~OUTPUT
157
- #{HTML_HDR}
158
- <div>
159
- <h1 class="ForewordTitle">FOREWORD</h1>
160
- <div class="boilerplate_legal"/>
161
- <p id="A">This is a preamble</p>
162
- </div>
163
- <br/>
164
- <div class="Section3" id="B">
165
- <h1 class="IntroTitle">0&#8195;Introduction</h1>
166
- <div id="C"><h2>0.1&#8195;Introduction Subsection</h2>
167
-
168
- </div>
169
- <p>This is patent boilerplate</p>
170
- </div>
171
- #{IEC_TITLE1}
172
- <div id="D">
173
- <h1>1&#8195;Scope</h1>
174
- <p id="E">Text</p>
175
- </div>
176
- <div>
177
- <h1>2&#8195;Normative References</h1>
178
- </div>
179
- <div id="H"><h1>3&#8195;Terms, definitions, symbols and abbreviated terms</h1>
180
- <div id="I"><h2>3.1&#8195;Normal Terms</h2>
181
-
182
- <p class="TermNum" id="J">3.1.1</p>
183
- <p class="Terms" style="text-align:left;">Term2</p>
184
-
185
- </div><div id="K"><span class='zzMoveToFollowing'>
186
- <b>3.2&#8195;</b>
187
- </span>
188
- <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
189
- </div></div>
190
- <div id="L" class="Symbols">
191
- <h1>4</h1>
192
- <dl>
193
- <dt>
194
- <p>Symbol</p>
195
- </dt>
196
- <dd>Definition</dd>
197
- </dl>
198
- </div>
199
- <div id="M">
200
- <h1>5&#8195;Clause 4</h1>
201
- <div id="N"><h2>5.1&#8195;Introduction</h2>
202
-
203
- </div>
204
- <div id="O"><h2>5.2&#8195;Clause 4.2</h2>
205
-
206
- </div>
207
- </div>
208
- <br/>
209
- <div id="P" class="Section3">
210
- <h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
211
- <div id="Q"><h2>A.1&#8195;Annex A.1</h2>
212
-
213
- <div id="Q1"><h3>A.1.1&#8195;Annex A.1a</h3>
214
-
215
- </div>
216
- </div>
217
- <div id="Q2"><h2>Appendix 1&#8195;An Appendix</h2>
153
+ OUTPUT
218
154
 
219
- </div>
220
- </div>
221
- <br/>
222
- <div>
223
- <h1 class="Section3">Bibliography</h1>
224
- <div>
225
- <h2 class="Section3">Bibliography Subsection</h2>
226
- </div>
227
- </div>
228
- </div>
229
- </body>
230
- </html>
155
+ html = <<~OUTPUT
156
+ #{HTML_HDR}
157
+ <div>
158
+ <h1 class="ForewordTitle">Foreword</h1>
159
+ <div class="boilerplate_legal"/>
160
+ <p id="A">This is a preamble</p>
161
+ </div>
162
+ <br/>
163
+ <div class="Section3" id="B">
164
+ <h1 class="IntroTitle">0&#8195;Introduction</h1>
165
+ <div id="C"><h2>0.1&#8195;Introduction Subsection</h2>
166
+ </div>
167
+ <p>This is patent boilerplate</p>
168
+ </div>
169
+ #{IEC_TITLE1}
170
+ <div id="D">
171
+ <h1>1&#8195;Scope</h1>
172
+ <p id="E">Text</p>
173
+ </div>
174
+ <div>
175
+ <h1>2&#8195;Normative References</h1>
176
+ </div>
177
+ <div id="H"><h1>3&#8195;Terms, definitions, symbols and abbreviated terms</h1>
178
+ <div id="I"><h2>3.1&#8195;Normal Terms</h2>
179
+ <p class="TermNum" id="J">3.1.1</p>
180
+ <p class="Terms" style="text-align:left;">Term2</p>
181
+ </div><div id="K"><span class='zzMoveToFollowing'>
182
+ <b>3.2&#8195;</b>
183
+ </span>
184
+ <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
185
+ </div></div>
186
+ <div id="L" class="Symbols">
187
+ <h1>4</h1>
188
+ <dl>
189
+ <dt>
190
+ <p>Symbol</p>
191
+ </dt>
192
+ <dd>Definition</dd>
193
+ </dl>
194
+ </div>
195
+ <div id="M">
196
+ <h1>5&#8195;Clause 4</h1>
197
+ <div id="N"><h2>5.1&#8195;Introduction</h2>
198
+ </div>
199
+ <div id="O"><h2>5.2&#8195;Clause 4.2</h2>
200
+ </div>
201
+ </div>
202
+ <br/>
203
+ <div id="P" class="Section3">
204
+ <h1 class="Annex"><b>Annex A</b>&#8195;(normative)<br/><b>Annex</b></h1>
205
+ <div id="Q"><h2>A.1&#8195;Annex A.1</h2>
206
+ <div id="Q1"><h3>A.1.1&#8195;Annex A.1a</h3>
207
+ </div>
208
+ </div>
209
+ <div id="Q2"><h2>Appendix 1&#8195;An Appendix</h2>
210
+ </div>
211
+ </div>
212
+ <br/>
213
+ <div>
214
+ <h1 class="Section3">Bibliography</h1>
215
+ <div>
216
+ <h2 class="Section3">Bibliography Subsection</h2>
217
+ </div>
218
+ </div>
219
+ </div>
220
+ </body>
221
+ </html>
231
222
  OUTPUT
232
- expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
223
+ expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
233
224
  expect(xmlpp(IsoDoc::BSI::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
234
225
  end
235
226
 
@@ -301,142 +292,73 @@ RSpec.describe IsoDoc do
301
292
  </clause>
302
293
  </bibliography>
303
294
  </iso-standard>
304
- INPUT
305
- <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
306
- <bibdata>
307
- <language current="true">tlh</language>
308
- </bibdata>
309
- <preface>
310
- <foreword obligation='informative'>
311
- <title>Foreword</title>
312
- <p id='A'>This is a preamble</p>
313
- </foreword>
314
- <introduction id='B' obligation='informative'>
315
- <title depth='1'>
316
- 0
317
- <tab/>
318
- Introduction
319
- </title>
320
- <clause id='C' inline-header='false' obligation='informative'>
321
- <title depth='2'>
322
- 0.1
323
- <tab/>
324
- Introduction Subsection
325
- </title>
326
- </clause>
327
- <p>This is patent boilerplate</p>
328
- </introduction>
329
- </preface>
330
- <sections>
331
- <clause id='D' obligation='normative' type="scope">
332
- <title depth='1'>
333
- 1
334
- <tab/>
335
- Scope
336
- </title>
337
- <p id='E'>Text</p>
338
- </clause>
339
- <clause id='H' obligation='normative'>
340
- <title depth='1'>
341
- 3
342
- <tab/>
343
- Terms, definitions, symbols and abbreviated terms
344
- </title>
345
- <terms id='I' obligation='normative'>
346
- <title depth='2'>
347
- 3.1
348
- <tab/>
349
- Normal Terms
350
- </title>
351
- <term id='J'>
352
- <name>3.1.1</name>
353
- <preferred>Term2</preferred>
354
- </term>
355
- </terms>
356
- <definitions id='K' inline-header='true'>
357
- <title>3.2</title>
358
- <dl>
359
- <dt>Symbol</dt>
360
- <dd>Definition</dd>
361
- </dl>
362
- </definitions>
363
- </clause>
364
- <definitions id='L'>
365
- <title>4</title>
366
- <dl>
367
- <dt>Symbol</dt>
368
- <dd>Definition</dd>
369
- </dl>
370
- </definitions>
371
- <clause id='M' inline-header='false' obligation='normative'>
372
- <title depth='1'>
373
- 5
374
- <tab/>
375
- Clause 4
376
- </title>
377
- <clause id='N' inline-header='false' obligation='normative'>
378
- <title depth='2'>
379
- 5.1
380
- <tab/>
381
- Introduction
382
- </title>
383
- </clause>
384
- <clause id='O' inline-header='false' obligation='normative'>
385
- <title depth='2'>
386
- 5.2
387
- <tab/>
388
- Clause 4.2
389
- </title>
390
- </clause>
391
- </clause>
392
- </sections>
393
- <annex id='P' inline-header='false' obligation='normative'>
394
- <title>
395
- <strong>Annex A</strong>
396
- <br/>
397
- (normative)
398
- <br/>
399
- <br/>
400
- <strong>Annex</strong>
401
- </title>
402
- <clause id='Q' inline-header='false' obligation='normative'>
403
- <title depth='2'>
404
- A.1
405
- <tab/>
406
- Annex A.1
407
- </title>
408
- <clause id='Q1' inline-header='false' obligation='normative'>
409
- <title depth='3'>
410
- A.1.1
411
- <tab/>
412
- Annex A.1a
413
- </title>
414
- </clause>
415
- </clause>
416
- <appendix id='Q2' inline-header='false' obligation='normative'>
417
- <title depth='2'>
418
- Appendix 1
419
- <tab/>
420
- An Appendix
421
- </title>
422
- </appendix>
423
- </annex>
424
- <bibliography>
425
- <references id='R' obligation='informative' normative='true'>
426
- <title depth='1'>
427
- 2
428
- <tab/>
429
- Normative References
430
- </title>
431
- </references>
432
- <clause id='S' obligation='informative'>
433
- <title depth='1'>Bibliography</title>
434
- <references id='T' obligation='informative' normative='false'>
435
- <title depth='2'>Bibliography Subsection</title>
436
- </references>
437
- </clause>
438
- </bibliography>
439
- </iso-standard>
295
+ INPUT
296
+ <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
297
+ <bibdata>
298
+ <language current="true">tlh</language>
299
+ </bibdata>
300
+ <preface>
301
+ <foreword obligation="informative" displayorder="1">
302
+ <title>Foreword</title>
303
+ <p id="A">This is a preamble</p>
304
+ </foreword>
305
+ <introduction id="B" obligation="informative" displayorder="2"><title depth="1">0<tab/>Introduction</title><clause id="C" inline-header="false" obligation="informative">
306
+ <title depth="2">0.1<tab/>Introduction Subsection</title>
307
+ </clause>
308
+ <p>This is patent boilerplate</p>
309
+ </introduction></preface><sections>
310
+ <clause id="D" obligation="normative" type="scope" displayorder="3">
311
+ <title depth="1">1<tab/>Scope</title>
312
+ <p id="E">Text</p>
313
+ </clause>
314
+
315
+ <clause id="H" obligation="normative" displayorder="5"><title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
316
+ <title depth="2">3.1<tab/>Normal Terms</title>
317
+ <term id="J"><name>3.1.1</name>
318
+ <preferred>Term2</preferred>
319
+ </term>
320
+ </terms>
321
+ <definitions id="K" inline-header="true"><title>3.2</title>
322
+ <dl>
323
+ <dt>Symbol</dt>
324
+ <dd>Definition</dd>
325
+ </dl>
326
+ </definitions>
327
+ </clause>
328
+ <definitions id="L" displayorder="6"><title>4</title>
329
+ <dl>
330
+ <dt>Symbol</dt>
331
+ <dd>Definition</dd>
332
+ </dl>
333
+ </definitions>
334
+ <clause id="M" inline-header="false" obligation="normative" displayorder="7"><title depth="1">5<tab/>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
335
+ <title depth="2">5.1<tab/>Introduction</title>
336
+ </clause>
337
+ <clause id="O" inline-header="false" obligation="normative">
338
+ <title depth="2">5.2<tab/>Clause 4.2</title>
339
+ </clause></clause>
340
+
341
+ </sections><annex id="P" inline-header="false" obligation="normative" displayorder="8">
342
+ <title><strong>Annex A</strong><tab/>(normative)<br/><strong>Annex</strong></title>
343
+ <clause id="Q" inline-header="false" obligation="normative">
344
+ <title depth="2">A.1<tab/>Annex A.1</title>
345
+ <clause id="Q1" inline-header="false" obligation="normative">
346
+ <title depth="3">A.1.1<tab/>Annex A.1a</title>
347
+ </clause>
348
+ </clause>
349
+ <appendix id="Q2" inline-header="false" obligation="normative">
350
+ <title depth="2">Appendix 1<tab/>An Appendix</title>
351
+ </appendix>
352
+ </annex><bibliography><references id="R" obligation="informative" normative="true" displayorder="4">
353
+ <title depth="1">2<tab/>Normative References</title>
354
+ </references><clause id="S" obligation="informative" displayorder="9">
355
+ <title depth="1">Bibliography</title>
356
+ <references id="T" obligation="informative" normative="false">
357
+ <title depth="2">Bibliography Subsection</title>
358
+ </references>
359
+ </clause>
360
+ </bibliography>
361
+ </iso-standard>
440
362
  OUTPUT
441
363
  end
442
364
  end
@@ -16,7 +16,7 @@ RSpec.describe IsoDoc do
16
16
  INPUT
17
17
  #{HTML_HDR}
18
18
  <div>
19
- <h1 class="ForewordTitle">FOREWORD</h1>
19
+ <h1 class="ForewordTitle">Foreword</h1>
20
20
  <div class="boilerplate_legal"/>
21
21
  <p>
22
22
  <i>A</i> <b>B</b> <sup>C</sup> <sub>D</sub> <tt>E</tt>
@@ -47,7 +47,7 @@ RSpec.describe IsoDoc do
47
47
  INPUT
48
48
  #{HTML_HDR}
49
49
  <div>
50
- <h1 class="ForewordTitle">FOREWORD</h1>
50
+ <h1 class="ForewordTitle">Foreword</h1>
51
51
  <div class="boilerplate_legal"/>
52
52
  <p>
53
53
  <a href="http://example.com">http://example.com</a>
@@ -76,7 +76,7 @@ RSpec.describe IsoDoc do
76
76
  INPUT
77
77
  #{HTML_HDR}
78
78
  <div>
79
- <h1 class="ForewordTitle">FOREWORD</h1>
79
+ <h1 class="ForewordTitle">Foreword</h1>
80
80
  <div class="boilerplate_legal"/>
81
81
  <p>
82
82
  <para><b role="strong">&lt;barry fred="http://example.com"&gt;example&lt;/barry&gt;</b></para>
@@ -104,7 +104,7 @@ RSpec.describe IsoDoc do
104
104
  INPUT
105
105
  #{HTML_HDR.sub(/<html/, "<html xmlns:m='m'")}
106
106
  <div>
107
- <h1 class="ForewordTitle">FOREWORD</h1>
107
+ <h1 class="ForewordTitle">Foreword</h1>
108
108
  <div class="boilerplate_legal"/>
109
109
  <p>
110
110
  <span class="stem">(#(A)#)</span>
@@ -135,7 +135,7 @@ RSpec.describe IsoDoc do
135
135
  INPUT
136
136
  #{HTML_HDR}
137
137
  <div>
138
- <h1 class="ForewordTitle">FOREWORD</h1>
138
+ <h1 class="ForewordTitle">Foreword</h1>
139
139
  <div class="boilerplate_legal"/>
140
140
  <p>
141
141
  <span class="stem">(#(((A)#)))</span>
@@ -187,7 +187,7 @@ expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({}).convert("test", <<~"INP
187
187
  <?xml version='1.0'?>
188
188
  <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
189
189
  <preface>
190
- <foreword>
190
+ <foreword displayorder="1">
191
191
  <p>
192
192
  <eref type='inline' bibitemid='IEV' citeas='IEV'>
193
193
  <locality type='clause'>
@@ -261,7 +261,7 @@ expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({}).convert("test", <<~"INP
261
261
  </foreword>
262
262
  </preface>
263
263
  <bibliography>
264
- <references id='_normative_references' obligation='informative' normative='true'>
264
+ <references id='_normative_references' obligation='informative' normative='true' displayorder="2">
265
265
  <title depth='1'>
266
266
  1
267
267
  <tab/>
@@ -15,8 +15,8 @@ RSpec.describe IsoDoc::BSI do
15
15
  INPUT
16
16
  html = File.read("test.html", encoding: "utf-8")
17
17
  expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
18
- expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: "Tahoma", sans-serif;]m)
19
- expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Tahoma", sans-serif;]m)
18
+ expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: "Gesta", "Tahoma", sans-serif;]m)
19
+ expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Gesta", "Tahoma", sans-serif;]m)
20
20
  end
21
21
 
22
22
  it "processes isodoc as ISO: Chinese HTML output" do
@@ -66,7 +66,7 @@ RSpec.describe IsoDoc::BSI do
66
66
  INPUT
67
67
  #{HTML_HDR}
68
68
  <div>
69
- <h1 class="ForewordTitle">FOREWORD</h1>
69
+ <h1 class="ForewordTitle">Foreword</h1>
70
70
  <div class="boilerplate_legal"/>
71
71
  <div id="samplecode" class="example">
72
72
  <p><span class="example_label">EXAMPLE</span>&#8195;Hello</p>
@@ -97,7 +97,7 @@ RSpec.describe IsoDoc::BSI do
97
97
  INPUT
98
98
  #{HTML_HDR}
99
99
  <div>
100
- <h1 class="ForewordTitle">FOREWORD</h1>
100
+ <h1 class="ForewordTitle">Foreword</h1>
101
101
  <div class="boilerplate_legal"/>
102
102
  <div id="samplecode" class="example">
103
103
  <p><span class="example_label">EXAMPLE 1</span>&#8195;Hello</p>
@@ -258,5 +258,4 @@ INPUT
258
258
  :wg=>"GHI 3"}
259
259
  OUTPUT
260
260
  end
261
-
262
261
  end
@@ -130,7 +130,7 @@ RSpec.describe IsoDoc::BSI do
130
130
  <bibdata>
131
131
  <language current="true">en</language>
132
132
  </bibdata>
133
- <preface><foreword>
133
+ <preface><foreword displayorder='1'>
134
134
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
135
135
  <eref bibitemid="ISO712">[110]</eref>
136
136
  <eref bibitemid="ISBN">[1]</eref>
@@ -142,7 +142,7 @@ RSpec.describe IsoDoc::BSI do
142
142
  <eref bibitemid="zip_ffs">[5]</eref>
143
143
  </p>
144
144
  </foreword></preface>
145
- <bibliography><references id="_normative_references" obligation="informative" normative="true"><title depth="1">1<tab/>Normative References</title>
145
+ <bibliography><references id="_normative_references" obligation="informative" normative="true" displayorder='2'><title depth="1">1<tab/>Normative References</title>
146
146
  <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>
147
147
  <bibitem id="ISO712" type="standard">
148
148
  <title format="text/plain">Cereals or cereal products</title>
@@ -186,13 +186,13 @@ RSpec.describe IsoDoc::BSI do
186
186
  </bibitem>
187
187
  <bibitem id="ref1">
188
188
  <formattedref format="application/x-isodoc+xml"><smallcap>Standard No I.C.C 167</smallcap>. <em>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</em> (see <link target="http://www.icc.or.at"/>)</formattedref>
189
- <docidentifier type="ICC">167</docidentifier>
189
+ <docidentifier type="ICC">ICC 167</docidentifier>
190
190
  </bibitem>
191
191
  <note><name>NOTE</name><p>This is an annotation of ISO 20483:2013-2014</p></note>
192
192
  <bibitem id="zip_ffs"><formattedref format="application/x-isodoc+xml">Title 5</formattedref><docidentifier type="metanorma">[5]</docidentifier></bibitem>
193
193
 
194
194
 
195
- </references><references id="_bibliography" obligation="informative" normative="false">
195
+ </references><references id="_bibliography" obligation="informative" normative="false" displayorder='3'>
196
196
  <title depth="1">Bibliography</title>
197
197
  <bibitem id="ISBN" type="ISBN">
198
198
  <title format="text/plain">Chemicals for analytical laboratory use</title>
@@ -234,12 +234,12 @@ RSpec.describe IsoDoc::BSI do
234
234
  </bibitem>
235
235
  <bibitem id="ref11">
236
236
  <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
237
- <docidentifier type="IETF">RFC 10</docidentifier>
237
+ <docidentifier type="IETF">IETF RFC 10</docidentifier>
238
238
  </bibitem>
239
239
  <bibitem id="ref12">
240
240
  <formattedref format="application/x-isodoc+xml">CitationWorks. 2019. <em>How to cite a reference</em>.</formattedref>
241
241
  <docidentifier type="metanorma">[Citn]</docidentifier>
242
- <docidentifier type="IETF">RFC 20</docidentifier>
242
+ <docidentifier type="IETF">IETF RFC 20</docidentifier>
243
243
  </bibitem>
244
244
 
245
245
 
@@ -251,7 +251,7 @@ RSpec.describe IsoDoc::BSI do
251
251
  html = <<~OUTPUT
252
252
  #{HTML_HDR}
253
253
  <div>
254
- <h1 class='ForewordTitle'>FOREWORD</h1>
254
+ <h1 class='ForewordTitle'>Foreword</h1>
255
255
  <div class='boilerplate_legal'/>
256
256
  <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
257
257
  <a href='#ISO712'>[110]</a>