metanorma-iso 2.0.7 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iso/base.rb +0 -1
- data/lib/asciidoctor/iso/cleanup.rb +0 -1
- data/lib/asciidoctor/iso/converter.rb +0 -1
- data/lib/asciidoctor/iso/deprecated.rb +4 -2
- data/lib/asciidoctor/iso/front.rb +0 -1
- data/lib/asciidoctor/iso/front_id.rb +0 -1
- data/lib/asciidoctor/iso/section.rb +0 -1
- data/lib/asciidoctor/iso/validate.rb +0 -1
- data/lib/asciidoctor/iso/validate_image.rb +0 -1
- data/lib/asciidoctor/iso/validate_requirements.rb +0 -1
- data/lib/asciidoctor/iso/validate_section.rb +0 -1
- data/lib/asciidoctor/iso/validate_style.rb +0 -1
- data/lib/asciidoctor/iso/validate_title.rb +0 -1
- data/lib/html2doc/lists.rb +37 -0
- data/lib/isodoc/iso/html/html_iso_titlepage.html +7 -2
- data/lib/isodoc/iso/html/isodoc-dis.css +196 -156
- data/lib/isodoc/iso/html/isodoc-dis.scss +193 -156
- data/lib/isodoc/iso/html/word_iso_intro-dis.html +7 -0
- data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +3 -2
- data/lib/isodoc/iso/html/word_iso_titlepage.html +8 -2
- data/lib/isodoc/iso/html/wordstyle-dis.css +204 -34
- data/lib/isodoc/iso/html/wordstyle-dis.scss +198 -34
- data/lib/isodoc/iso/i18n-en.yaml +2 -1
- data/lib/isodoc/iso/i18n-fr.yaml +1 -0
- data/lib/isodoc/iso/i18n-ru.yaml +1 -0
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -0
- data/lib/isodoc/iso/index.rb +1 -1
- data/lib/isodoc/iso/init.rb +17 -1
- data/lib/isodoc/iso/iso.amendment.xsl +726 -299
- data/lib/isodoc/iso/iso.international-standard.xsl +726 -299
- data/lib/isodoc/iso/metadata.rb +75 -63
- data/lib/isodoc/iso/presentation_inline.rb +90 -0
- data/lib/isodoc/iso/presentation_xml_convert.rb +39 -100
- data/lib/isodoc/iso/presentation_xref.rb +126 -0
- data/lib/isodoc/iso/word_cleanup.rb +16 -2
- data/lib/isodoc/iso/word_convert.rb +27 -10
- data/lib/isodoc/iso/word_dis_convert.rb +174 -0
- data/lib/isodoc/iso/xref.rb +50 -30
- data/lib/metanorma/iso/biblio.rng +62 -10
- data/lib/metanorma/iso/boilerplate-fr.xml +1 -1
- data/lib/metanorma/iso/boilerplate-ru.xml +1 -3
- data/lib/metanorma/iso/boilerplate.xml +1 -3
- data/lib/metanorma/iso/cleanup.rb +7 -6
- data/lib/metanorma/iso/front_id.rb +28 -11
- data/lib/metanorma/iso/isodoc.rng +56 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/metanorma-iso.rb +1 -0
- data/lib/relaton/render/config.yml +4 -0
- data/lib/relaton/render/general.rb +13 -0
- data/metanorma-iso.gemspec +1 -1
- data/spec/isodoc/amd_spec.rb +15 -14
- data/spec/isodoc/blocks_spec.rb +286 -179
- data/spec/isodoc/i18n_spec.rb +296 -133
- data/spec/isodoc/inline_spec.rb +35 -42
- data/spec/isodoc/iso_spec.rb +43 -27
- data/spec/isodoc/postproc_spec.rb +25 -0
- data/spec/isodoc/ref_spec.rb +66 -69
- data/spec/isodoc/section_spec.rb +78 -76
- data/spec/isodoc/table_spec.rb +2 -2
- data/spec/isodoc/terms_spec.rb +2 -2
- data/spec/isodoc/word_dis_spec.rb +760 -0
- data/spec/isodoc/xref_spec.rb +51 -51
- data/spec/metanorma/amd_spec.rb +39 -16
- data/spec/metanorma/base_spec.rb +17 -9
- data/spec/metanorma/blocks_spec.rb +4 -4
- data/spec/metanorma/cleanup_spec.rb +11 -11
- data/spec/metanorma/section_spec.rb +3 -3
- data/spec/spec_helper.rb +5 -2
- data/spec/vcr_cassettes/withdrawn_iso.yml +26 -26
- metadata +11 -5
- data/spec/vcr_cassettes/docrels.yml +0 -385
data/spec/isodoc/i18n_spec.rb
CHANGED
@@ -156,7 +156,7 @@ RSpec.describe IsoDoc do
|
|
156
156
|
<annex id="P" inline-header="false" obligation="normative" displayorder='8'>
|
157
157
|
<title>
|
158
158
|
<strong>Annex A</strong>
|
159
|
-
<br
|
159
|
+
<br/><span class='obligation'>(normative)</span>
|
160
160
|
<br/>
|
161
161
|
<br/>
|
162
162
|
<strong>Annex</strong></title>
|
@@ -263,6 +263,181 @@ RSpec.describe IsoDoc do
|
|
263
263
|
</body>
|
264
264
|
</html>
|
265
265
|
OUTPUT
|
266
|
+
word = <<~WORD
|
267
|
+
<html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
|
268
|
+
<head>
|
269
|
+
<style></style>
|
270
|
+
<style></style>
|
271
|
+
</head>
|
272
|
+
<body lang='EN-US' link='blue' vlink='#954F72'>
|
273
|
+
<div class='WordSection1'>
|
274
|
+
<p> </p>
|
275
|
+
</div>
|
276
|
+
<p>
|
277
|
+
<br clear='all' class='section'/>
|
278
|
+
</p>
|
279
|
+
<div class='WordSection2'>
|
280
|
+
<p>
|
281
|
+
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
282
|
+
</p>
|
283
|
+
<div>
|
284
|
+
<h1 class='ForewordTitle'>Foreword</h1>
|
285
|
+
<p class='ForewordText' id='A'>This is a preamble</p>
|
286
|
+
</div>
|
287
|
+
<p>
|
288
|
+
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
289
|
+
</p>
|
290
|
+
<div class='Section3' id='B'>
|
291
|
+
<h1 class='IntroTitle'>
|
292
|
+
0
|
293
|
+
<span style='mso-tab-count:1'> </span>
|
294
|
+
Introduction
|
295
|
+
</h1>
|
296
|
+
<div id='C'>
|
297
|
+
<h2>
|
298
|
+
0.1
|
299
|
+
<span style='mso-tab-count:1'> </span>
|
300
|
+
Introduction Subsection
|
301
|
+
</h2>
|
302
|
+
</div>
|
303
|
+
<p>This is patent boilerplate</p>
|
304
|
+
</div>
|
305
|
+
<p> </p>
|
306
|
+
</div>
|
307
|
+
<p>
|
308
|
+
<br clear='all' class='section'/>
|
309
|
+
</p>
|
310
|
+
<div class='WordSection3'>
|
311
|
+
<p class='zzSTDTitle1'/>
|
312
|
+
<div id='D'>
|
313
|
+
<h1>
|
314
|
+
1
|
315
|
+
<span style='mso-tab-count:1'> </span>
|
316
|
+
Scope
|
317
|
+
</h1>
|
318
|
+
<p id='E'>Text</p>
|
319
|
+
</div>
|
320
|
+
<div>
|
321
|
+
<h1>
|
322
|
+
2
|
323
|
+
<span style='mso-tab-count:1'> </span>
|
324
|
+
Normative References
|
325
|
+
</h1>
|
326
|
+
</div>
|
327
|
+
<div id='H'>
|
328
|
+
<h1>
|
329
|
+
3
|
330
|
+
<span style='mso-tab-count:1'> </span>
|
331
|
+
Terms, definitions, symbols and abbreviated terms
|
332
|
+
</h1>
|
333
|
+
<div id='I'>
|
334
|
+
<h2>
|
335
|
+
3.1
|
336
|
+
<span style='mso-tab-count:1'> </span>
|
337
|
+
Normal Terms
|
338
|
+
</h2>
|
339
|
+
<p class='TermNum' id='J'>3.1.1</p>
|
340
|
+
<p class='Terms' style='text-align:left;'>
|
341
|
+
<b>Term2</b>
|
342
|
+
</p>
|
343
|
+
</div>
|
344
|
+
<div id='K'>
|
345
|
+
<span class='zzMoveToFollowing'>
|
346
|
+
<b>
|
347
|
+
3.2
|
348
|
+
<span style='mso-tab-count:1'> </span>
|
349
|
+
</b>
|
350
|
+
</span>
|
351
|
+
<table class='dl'>
|
352
|
+
<tr>
|
353
|
+
<td valign='top' align='left'>
|
354
|
+
<p align='left' style='margin-left:0pt;text-align:left;'>Symbol</p>
|
355
|
+
</td>
|
356
|
+
<td valign='top'>Definition</td>
|
357
|
+
</tr>
|
358
|
+
</table>
|
359
|
+
</div>
|
360
|
+
</div>
|
361
|
+
<div id='L' class='Symbols'>
|
362
|
+
<h1>4</h1>
|
363
|
+
<table class='dl'>
|
364
|
+
<tr>
|
365
|
+
<td valign='top' align='left'>
|
366
|
+
<p align='left' style='margin-left:0pt;text-align:left;'>Symbol</p>
|
367
|
+
</td>
|
368
|
+
<td valign='top'>Definition</td>
|
369
|
+
</tr>
|
370
|
+
</table>
|
371
|
+
</div>
|
372
|
+
<div id='M'>
|
373
|
+
<h1>
|
374
|
+
5
|
375
|
+
<span style='mso-tab-count:1'> </span>
|
376
|
+
Clause 4
|
377
|
+
</h1>
|
378
|
+
<div id='N'>
|
379
|
+
<h2>
|
380
|
+
5.1
|
381
|
+
<span style='mso-tab-count:1'> </span>
|
382
|
+
Introduction
|
383
|
+
</h2>
|
384
|
+
</div>
|
385
|
+
<div id='O'>
|
386
|
+
<h2>
|
387
|
+
5.2
|
388
|
+
<span style='mso-tab-count:1'> </span>
|
389
|
+
Clause 4.2
|
390
|
+
</h2>
|
391
|
+
</div>
|
392
|
+
</div>
|
393
|
+
<p>
|
394
|
+
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
395
|
+
</p>
|
396
|
+
<div id='P' class='Section3'>
|
397
|
+
<h1 class='Annex'>
|
398
|
+
<br/>
|
399
|
+
<span style='font-weight:normal;'>(normative)</span>
|
400
|
+
<br/>
|
401
|
+
<br/>
|
402
|
+
<b>Annex</b>
|
403
|
+
</h1>
|
404
|
+
<div id='Q'>
|
405
|
+
<h2>
|
406
|
+
A.1
|
407
|
+
<span style='mso-tab-count:1'> </span>
|
408
|
+
Annex A.1
|
409
|
+
</h2>
|
410
|
+
<div id='Q1'>
|
411
|
+
<h3>
|
412
|
+
A.1.1
|
413
|
+
<span style='mso-tab-count:1'> </span>
|
414
|
+
Annex A.1a
|
415
|
+
</h3>
|
416
|
+
</div>
|
417
|
+
</div>
|
418
|
+
<div id='Q2'>
|
419
|
+
<h2>
|
420
|
+
Appendix 1
|
421
|
+
<span style='mso-tab-count:1'> </span>
|
422
|
+
An Appendix
|
423
|
+
</h2>
|
424
|
+
</div>
|
425
|
+
</div>
|
426
|
+
<p>
|
427
|
+
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
428
|
+
</p>
|
429
|
+
<div>
|
430
|
+
<h1 class='BiblioTitle'>Bibliography</h1>
|
431
|
+
<div>
|
432
|
+
<h2 class='BiblioTitle'>Bibliography Subsection</h2>
|
433
|
+
</div>
|
434
|
+
</div>
|
435
|
+
</div>
|
436
|
+
<br clear='all' style='page-break-before:left;mso-break-type:section-break'/>
|
437
|
+
<div class='colophon'/>
|
438
|
+
</body>
|
439
|
+
</html>
|
440
|
+
WORD
|
266
441
|
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
267
442
|
.convert("test", input, true))
|
268
443
|
.sub(%r{<localized-strings>.*</localized-strings>}m, ""))
|
@@ -270,6 +445,9 @@ RSpec.describe IsoDoc do
|
|
270
445
|
expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
|
271
446
|
.convert("test", presxml, true)))
|
272
447
|
.to be_equivalent_to xmlpp(html)
|
448
|
+
expect(xmlpp(IsoDoc::Iso::WordConvert.new({})
|
449
|
+
.convert("test", presxml, true)))
|
450
|
+
.to be_equivalent_to xmlpp(word)
|
273
451
|
end
|
274
452
|
|
275
453
|
it "defaults to English" do
|
@@ -380,11 +558,7 @@ RSpec.describe IsoDoc do
|
|
380
558
|
<p id="A">This is a preamble</p>
|
381
559
|
</foreword>
|
382
560
|
<introduction id="B" obligation="informative" displayorder='2'>
|
383
|
-
<title depth="1">
|
384
|
-
0
|
385
|
-
<tab/>
|
386
|
-
Introduction
|
387
|
-
</title>
|
561
|
+
<title depth="1">0<tab/>Introduction</title>
|
388
562
|
<clause id="C" inline-header="false" obligation="informative">
|
389
563
|
<title depth="2">0.1<tab/>Introduction Subsection</title>
|
390
564
|
</clause>
|
@@ -433,7 +607,7 @@ RSpec.describe IsoDoc do
|
|
433
607
|
<annex id="P" inline-header="false" obligation="normative" displayorder='8'>
|
434
608
|
<title>
|
435
609
|
<strong>Annex A</strong>
|
436
|
-
<br
|
610
|
+
<br/><span class='obligation'>(normative)</span>
|
437
611
|
<br/>
|
438
612
|
<br/>
|
439
613
|
<strong>Annex</strong></title>
|
@@ -617,7 +791,7 @@ RSpec.describe IsoDoc do
|
|
617
791
|
<annex id="P" inline-header="false" obligation="normative" displayorder='8'>
|
618
792
|
<title>
|
619
793
|
<strong>Annexe A</strong>
|
620
|
-
<br
|
794
|
+
<br/><span class='obligation'>(normative)</span>
|
621
795
|
<br/>
|
622
796
|
<br/>
|
623
797
|
<strong>Annex</strong></title>
|
@@ -902,7 +1076,7 @@ RSpec.describe IsoDoc do
|
|
902
1076
|
<annex id="P" inline-header="false" obligation="normative" displayorder='8'>
|
903
1077
|
<title>
|
904
1078
|
<strong>Дополнение A</strong>
|
905
|
-
<br
|
1079
|
+
<br/><span class='obligation'>(нормативное)</span>
|
906
1080
|
<br/>
|
907
1081
|
<br/>
|
908
1082
|
<strong>Annex</strong></title>
|
@@ -1113,14 +1287,8 @@ RSpec.describe IsoDoc do
|
|
1113
1287
|
<references id="R" normative="true" obligation="informative">
|
1114
1288
|
<title>Normative References</title>
|
1115
1289
|
<bibitem id="ISO712" type="standard">
|
1116
|
-
<
|
1290
|
+
<formattedref><em>Cereals and cereal products</em>.</formattedref>
|
1117
1291
|
<docidentifier>ISO 712</docidentifier>
|
1118
|
-
<contributor>
|
1119
|
-
<role type="publisher"/>
|
1120
|
-
<organization>
|
1121
|
-
<abbreviation>ISO</abbreviation>
|
1122
|
-
</organization>
|
1123
|
-
</contributor>
|
1124
1292
|
</bibitem>
|
1125
1293
|
</references>
|
1126
1294
|
<clause id="S" obligation="informative">
|
@@ -1146,40 +1314,31 @@ RSpec.describe IsoDoc do
|
|
1146
1314
|
<doctype language='zh'>国际标准</doctype>
|
1147
1315
|
</ext>
|
1148
1316
|
</bibdata>
|
1317
|
+
|
1149
1318
|
<preface>
|
1150
1319
|
<foreword obligation="informative" displayorder='1'>
|
1151
1320
|
<title>Foreword</title>
|
1152
1321
|
<p id="A">This is a preamble</p>
|
1153
1322
|
</foreword>
|
1154
1323
|
<introduction id="B" obligation="informative" displayorder='2'>
|
1155
|
-
<title depth="1">0
|
1156
|
-
<tab/>
|
1157
|
-
Introduction</title>
|
1324
|
+
<title depth="1">0<tab/>Introduction</title>
|
1158
1325
|
<clause id="C" inline-header="false" obligation="informative">
|
1159
|
-
<title depth="2">0.1
|
1160
|
-
<tab/>
|
1161
|
-
Introduction Subsection</title>
|
1326
|
+
<title depth="2">0.1<tab/>Introduction Subsection</title>
|
1162
1327
|
</clause>
|
1163
1328
|
<p>This is patent boilerplate</p>
|
1164
1329
|
</introduction>
|
1165
1330
|
</preface>
|
1166
1331
|
<sections>
|
1167
1332
|
<clause id="D" obligation="normative" type="scope" displayorder='3'>
|
1168
|
-
<title depth="1">1
|
1169
|
-
<tab/>
|
1170
|
-
Scope</title>
|
1333
|
+
<title depth="1">1<tab/>Scope</title>
|
1171
1334
|
<p id="E">
|
1172
|
-
<eref bibitemid="ISO712" type="inline"><locality type="table"><referenceFrom>1</referenceFrom><referenceTo>1</referenceTo></locality>ISO 712
|
1335
|
+
<eref bibitemid="ISO712" type="inline"><locality type="table"><referenceFrom>1</referenceFrom><referenceTo>1</referenceTo></locality>ISO 712, <span class='citetbl'>第1–1表</span></eref>
|
1173
1336
|
</p>
|
1174
1337
|
</clause>
|
1175
1338
|
<clause id="H" obligation="normative" displayorder='5'>
|
1176
|
-
<title depth="1">3
|
1177
|
-
<tab/>
|
1178
|
-
Terms, definitions, symbols and abbreviated terms</title>
|
1339
|
+
<title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title>
|
1179
1340
|
<terms id="I" obligation="normative">
|
1180
|
-
<title depth="2">3.1
|
1181
|
-
<tab/>
|
1182
|
-
Normal Terms</title>
|
1341
|
+
<title depth="2">3.1<tab/>Normal Terms</title>
|
1183
1342
|
<term id="J">
|
1184
1343
|
<name>3.1.1</name>
|
1185
1344
|
<preferred><strong>Term2</strong></preferred>
|
@@ -1201,58 +1360,38 @@ RSpec.describe IsoDoc do
|
|
1201
1360
|
</dl>
|
1202
1361
|
</definitions>
|
1203
1362
|
<clause id="M" inline-header="false" obligation="normative" displayorder='7'>
|
1204
|
-
<title depth="1">5
|
1205
|
-
<tab/>
|
1206
|
-
Clause 4</title>
|
1363
|
+
<title depth="1">5<tab/>Clause 4</title>
|
1207
1364
|
<clause id="N" inline-header="false" obligation="normative">
|
1208
|
-
<title depth="2">5.1
|
1209
|
-
<tab/>
|
1210
|
-
Introduction</title>
|
1365
|
+
<title depth="2">5.1<tab/>Introduction</title>
|
1211
1366
|
</clause>
|
1212
1367
|
<clause id="O" inline-header="false" obligation="normative">
|
1213
|
-
<title depth="2">5.2
|
1214
|
-
<tab/>
|
1215
|
-
Clause 4.2</title>
|
1368
|
+
<title depth="2">5.2<tab/>Clause 4.2</title>
|
1216
1369
|
</clause>
|
1217
1370
|
</clause>
|
1218
1371
|
</sections>
|
1219
1372
|
<annex id="P" inline-header="false" obligation="normative" displayorder='8'>
|
1220
1373
|
<title>
|
1221
1374
|
<strong>附件A</strong>
|
1222
|
-
<br
|
1375
|
+
<br/><span class='obligation'>(规范性附录)</span>
|
1223
1376
|
<br/>
|
1224
1377
|
<br/>
|
1225
1378
|
<strong>Annex</strong></title>
|
1226
1379
|
<clause id="Q" inline-header="false" obligation="normative">
|
1227
|
-
<title depth="2">A.1
|
1228
|
-
<tab/>
|
1229
|
-
Annex A.1</title>
|
1380
|
+
<title depth="2">A.1<tab/>Annex A.1</title>
|
1230
1381
|
<clause id="Q1" inline-header="false" obligation="normative">
|
1231
|
-
<title depth="3">A.1.1
|
1232
|
-
<tab/>
|
1233
|
-
Annex A.1a</title>
|
1382
|
+
<title depth="3">A.1.1<tab/>Annex A.1a</title>
|
1234
1383
|
</clause>
|
1235
1384
|
</clause>
|
1236
1385
|
<appendix id="Q2" inline-header="false" obligation="normative">
|
1237
|
-
<title depth="2">附录1
|
1238
|
-
<tab/>
|
1239
|
-
An Appendix</title>
|
1386
|
+
<title depth="2">附录1<tab/>An Appendix</title>
|
1240
1387
|
</appendix>
|
1241
1388
|
</annex>
|
1242
1389
|
<bibliography>
|
1243
1390
|
<references id="R" normative="true" obligation="informative" displayorder='4'>
|
1244
|
-
<title depth="1">2
|
1245
|
-
<tab/>
|
1246
|
-
Normative References</title>
|
1391
|
+
<title depth="1">2<tab/>Normative References</title>
|
1247
1392
|
<bibitem id="ISO712" type="standard">
|
1248
|
-
<
|
1393
|
+
<formattedref><em>Cereals and cereal products</em>.</formattedref>
|
1249
1394
|
<docidentifier>ISO 712</docidentifier>
|
1250
|
-
<contributor>
|
1251
|
-
<role type="publisher"/>
|
1252
|
-
<organization>
|
1253
|
-
<abbreviation>ISO</abbreviation>
|
1254
|
-
</organization>
|
1255
|
-
</contributor>
|
1256
1395
|
</bibitem>
|
1257
1396
|
</references>
|
1258
1397
|
<clause id="S" obligation="informative" displayorder='9'>
|
@@ -1267,78 +1406,102 @@ RSpec.describe IsoDoc do
|
|
1267
1406
|
|
1268
1407
|
html = <<~OUTPUT
|
1269
1408
|
#{HTML_HDR.gsub(/"en"/, '"zh"')}
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1409
|
+
<br/>
|
1410
|
+
<div>
|
1411
|
+
<h1 class='ForewordTitle'>Foreword</h1>
|
1412
|
+
<p id='A'>This is a preamble</p>
|
1413
|
+
</div>
|
1414
|
+
<br/>
|
1415
|
+
<div class='Section3' id='B'>
|
1416
|
+
<h1 class='IntroTitle'>0 Introduction</h1>
|
1417
|
+
<div id='C'>
|
1418
|
+
<h2>0.1 Introduction Subsection</h2>
|
1419
|
+
</div>
|
1420
|
+
<p>This is patent boilerplate</p>
|
1421
|
+
</div>
|
1422
|
+
<p class='zzSTDTitle1'/>
|
1423
|
+
<div id='D'>
|
1424
|
+
<h1>1 Scope</h1>
|
1425
|
+
<p id='E'>
|
1426
|
+
<a href='#ISO712'>ISO 712, 第1–1表</a>
|
1427
|
+
</p>
|
1428
|
+
</div>
|
1429
|
+
<div>
|
1430
|
+
<h1>2 Normative References</h1>
|
1431
|
+
<p id='ISO712' class='NormRef'>
|
1432
|
+
ISO 712,
|
1433
|
+
<i>Cereals and cereal products</i>.
|
1434
|
+
</p>
|
1435
|
+
</div>
|
1436
|
+
<div id='H'>
|
1437
|
+
<h1>3 Terms, definitions, symbols and abbreviated terms</h1>
|
1438
|
+
<div id='I'>
|
1439
|
+
<h2>3.1 Normal Terms</h2>
|
1440
|
+
<p class='TermNum' id='J'>3.1.1</p>
|
1441
|
+
<p class='Terms' style='text-align:left;'>
|
1442
|
+
<b>Term2</b>
|
1443
|
+
</p>
|
1444
|
+
</div>
|
1445
|
+
<div id='K'>
|
1446
|
+
<span class='zzMoveToFollowing'>
|
1447
|
+
<b>3.2 </b>
|
1448
|
+
</span>
|
1449
|
+
<dl>
|
1450
|
+
<dt>
|
1451
|
+
<p>Symbol</p>
|
1452
|
+
</dt>
|
1453
|
+
<dd>Definition</dd>
|
1454
|
+
</dl>
|
1455
|
+
</div>
|
1456
|
+
</div>
|
1457
|
+
<div id='L' class='Symbols'>
|
1458
|
+
<h1>4</h1>
|
1459
|
+
<dl>
|
1460
|
+
<dt>
|
1461
|
+
<p>Symbol</p>
|
1462
|
+
</dt>
|
1463
|
+
<dd>Definition</dd>
|
1464
|
+
</dl>
|
1465
|
+
</div>
|
1466
|
+
<div id='M'>
|
1467
|
+
<h1>5 Clause 4</h1>
|
1468
|
+
<div id='N'>
|
1469
|
+
<h2>5.1 Introduction</h2>
|
1470
|
+
</div>
|
1471
|
+
<div id='O'>
|
1472
|
+
<h2>5.2 Clause 4.2</h2>
|
1473
|
+
</div>
|
1474
|
+
</div>
|
1475
|
+
<br/>
|
1476
|
+
<div id='P' class='Section3'>
|
1477
|
+
<h1 class='Annex'>
|
1478
|
+
<b>附件A</b>
|
1479
|
+
<br/>
|
1480
|
+
(规范性附录)
|
1481
|
+
<br/>
|
1482
|
+
<br/>
|
1483
|
+
<b>Annex</b>
|
1484
|
+
</h1>
|
1485
|
+
<div id='Q'>
|
1486
|
+
<h2>A.1 Annex A.1</h2>
|
1487
|
+
<div id='Q1'>
|
1488
|
+
<h3>A.1.1 Annex A.1a</h3>
|
1489
|
+
</div>
|
1490
|
+
</div>
|
1491
|
+
<div id='Q2'>
|
1492
|
+
<h2>附录1 An Appendix</h2>
|
1493
|
+
</div>
|
1494
|
+
</div>
|
1495
|
+
<br/>
|
1496
|
+
<div>
|
1497
|
+
<h1 class='Section3'>Bibliography</h1>
|
1498
|
+
<div>
|
1499
|
+
<h2 class='Section3'>Bibliography Subsection</h2>
|
1500
|
+
</div>
|
1501
|
+
</div>
|
1502
|
+
</div>
|
1503
|
+
</body>
|
1504
|
+
</html>
|
1342
1505
|
OUTPUT
|
1343
1506
|
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1344
1507
|
.convert("test", input, true))
|