metanorma-iso 1.5.1 → 1.5.6
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/.github/workflows/ubuntu.yml +1 -1
- data/lib/asciidoctor/iso/base.rb +1 -1
- data/lib/asciidoctor/iso/basicdoc.rng +31 -1
- data/lib/asciidoctor/iso/front.rb +6 -6
- data/lib/asciidoctor/iso/front_id.rb +5 -5
- data/lib/asciidoctor/iso/isodoc.rng +112 -9
- data/lib/asciidoctor/iso/section.rb +0 -7
- data/lib/asciidoctor/iso/validate_section.rb +10 -0
- data/lib/isodoc/iso/html/isodoc.css +16 -4
- data/lib/isodoc/iso/html/isodoc.scss +18 -4
- data/lib/isodoc/iso/html/wordstyle.css +10 -9
- data/lib/isodoc/iso/html/wordstyle.scss +15 -9
- data/lib/isodoc/iso/i18n-en.yaml +0 -1
- data/lib/isodoc/iso/iso.amendment.xsl +761 -259
- data/lib/isodoc/iso/iso.international-standard.xsl +761 -259
- data/lib/isodoc/iso/word_convert.rb +17 -13
- data/lib/isodoc/iso/xref.rb +7 -11
- data/lib/metanorma/iso/processor.rb +4 -1
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +1 -1
- data/spec/asciidoctor-iso/amd_spec.rb +0 -32
- data/spec/asciidoctor-iso/base_spec.rb +3 -11
- data/spec/asciidoctor-iso/cleanup_spec.rb +57 -33
- data/spec/asciidoctor-iso/inline_spec.rb +7 -1
- data/spec/asciidoctor-iso/table_spec.rb +118 -112
- data/spec/asciidoctor-iso/validate_spec.rb +87 -0
- data/spec/isodoc/amd_spec.rb +13 -13
- data/spec/isodoc/iso_spec.rb +3 -3
- data/spec/isodoc/postproc_spec.rb +76 -1
- data/spec/isodoc/ref_spec.rb +1 -1
- data/spec/metanorma/processor_spec.rb +1 -1
- metadata +4 -4
@@ -263,7 +263,6 @@ h1.Annex {
|
|
263
263
|
line-height: 12.5pt;
|
264
264
|
mso-pagination: widow-orphan;
|
265
265
|
page-break-after: avoid;
|
266
|
-
mso-outline-level: 2;
|
267
266
|
mso-hyphenate: none;
|
268
267
|
tab-stops: 27.0pt 35.0pt;
|
269
268
|
{% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
|
@@ -282,7 +281,8 @@ h1.Annex {
|
|
282
281
|
mso-bidi-font-weight: normal; }
|
283
282
|
|
284
283
|
h2 {
|
285
|
-
mso-list: l1 level2 lfo6;
|
284
|
+
mso-list: l1 level2 lfo6;
|
285
|
+
mso-outline-level: 2; }
|
286
286
|
|
287
287
|
.h3Annex, h3 {
|
288
288
|
mso-style-priority: 3;
|
@@ -317,7 +317,8 @@ h2 {
|
|
317
317
|
mso-bidi-font-weight: normal; }
|
318
318
|
|
319
319
|
h3 {
|
320
|
-
mso-list: l1 level3 lfo6;
|
320
|
+
mso-list: l1 level3 lfo6;
|
321
|
+
mso-outline-level: 3; }
|
321
322
|
|
322
323
|
.h4Annex, h4 {
|
323
324
|
mso-style-priority: 4;
|
@@ -334,7 +335,6 @@ h3 {
|
|
334
335
|
line-height: 12.0pt;
|
335
336
|
mso-pagination: widow-orphan;
|
336
337
|
page-break-after: avoid;
|
337
|
-
mso-outline-level: 4;
|
338
338
|
mso-hyphenate: none;
|
339
339
|
tab-stops: 51.05pt 57.0pt 68.0pt;
|
340
340
|
font-size: 11.0pt;
|
@@ -351,7 +351,8 @@ h3 {
|
|
351
351
|
mso-bidi-font-weight: normal; }
|
352
352
|
|
353
353
|
h4 {
|
354
|
-
mso-list: l1 level4 lfo6;
|
354
|
+
mso-list: l1 level4 lfo6;
|
355
|
+
mso-outline-level: 4; }
|
355
356
|
|
356
357
|
.h5Annex, h5 {
|
357
358
|
mso-style-priority: 5;
|
@@ -368,7 +369,6 @@ h4 {
|
|
368
369
|
line-height: 12.0pt;
|
369
370
|
mso-pagination: widow-orphan;
|
370
371
|
page-break-after: avoid;
|
371
|
-
mso-outline-level: 5;
|
372
372
|
mso-hyphenate: none;
|
373
373
|
tab-stops: 51.05pt list 54.0pt;
|
374
374
|
font-size: 11.0pt;
|
@@ -385,7 +385,8 @@ h4 {
|
|
385
385
|
mso-bidi-font-weight: normal; }
|
386
386
|
|
387
387
|
h5 {
|
388
|
-
mso-list: l1 level5 lfo6;
|
388
|
+
mso-list: l1 level5 lfo6;
|
389
|
+
mso-outline-level: 5; }
|
389
390
|
|
390
391
|
h6 {
|
391
392
|
mso-style-priority: 6;
|
@@ -402,7 +403,6 @@ h6 {
|
|
402
403
|
line-height: 12.0pt;
|
403
404
|
mso-pagination: widow-orphan;
|
404
405
|
page-break-after: avoid;
|
405
|
-
mso-outline-level: 6;
|
406
406
|
mso-hyphenate: none;
|
407
407
|
tab-stops: 51.05pt list 72.0pt;
|
408
408
|
font-size: 11.0pt;
|
@@ -419,7 +419,8 @@ h6 {
|
|
419
419
|
mso-bidi-font-weight: normal; }
|
420
420
|
|
421
421
|
h6 {
|
422
|
-
mso-list: l1 level6 lfo6;
|
422
|
+
mso-list: l1 level6 lfo6;
|
423
|
+
mso-outline-level: 6; }
|
423
424
|
|
424
425
|
p.MsoToc1, li.MsoToc1, div.MsoToc1 {
|
425
426
|
mso-style-priority: 39;
|
@@ -246,7 +246,6 @@ h1.Annex
|
|
246
246
|
line-height:12.5pt;
|
247
247
|
mso-pagination:widow-orphan;
|
248
248
|
page-break-after:avoid;
|
249
|
-
mso-outline-level:2;
|
250
249
|
mso-hyphenate:none;
|
251
250
|
tab-stops:27.0pt 35.0pt;
|
252
251
|
{% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
|
@@ -264,7 +263,9 @@ h1.Annex
|
|
264
263
|
mso-fareast-language:JA;
|
265
264
|
mso-bidi-font-weight:normal;}
|
266
265
|
h2
|
267
|
-
{ mso-list:l1 level2 lfo6;
|
266
|
+
{ mso-list:l1 level2 lfo6;
|
267
|
+
mso-outline-level:2;
|
268
|
+
}
|
268
269
|
.h3Annex, h3
|
269
270
|
{mso-style-priority:3;
|
270
271
|
mso-style-unhide:no;
|
@@ -296,7 +297,9 @@ h2
|
|
296
297
|
mso-ansi-language:EN-GB;
|
297
298
|
mso-fareast-language:JA;
|
298
299
|
mso-bidi-font-weight:normal;}
|
299
|
-
h3 {mso-list:l1 level3 lfo6;
|
300
|
+
h3 {mso-list:l1 level3 lfo6;
|
301
|
+
mso-outline-level:3;
|
302
|
+
}
|
300
303
|
.h4Annex, h4
|
301
304
|
{mso-style-priority:4;
|
302
305
|
mso-style-unhide:no;
|
@@ -312,7 +315,6 @@ h3 {mso-list:l1 level3 lfo6;}
|
|
312
315
|
line-height:12.0pt;
|
313
316
|
mso-pagination:widow-orphan;
|
314
317
|
page-break-after:avoid;
|
315
|
-
mso-outline-level:4;
|
316
318
|
mso-hyphenate:none;
|
317
319
|
tab-stops:51.05pt 57.0pt 68.0pt;
|
318
320
|
font-size:11.0pt;
|
@@ -327,7 +329,9 @@ h3 {mso-list:l1 level3 lfo6;}
|
|
327
329
|
mso-ansi-language:EN-GB;
|
328
330
|
mso-fareast-language:JA;
|
329
331
|
mso-bidi-font-weight:normal;}
|
330
|
-
h4 {mso-list:l1 level4 lfo6;
|
332
|
+
h4 {mso-list:l1 level4 lfo6;
|
333
|
+
mso-outline-level:4;
|
334
|
+
}
|
331
335
|
.h5Annex, h5
|
332
336
|
{mso-style-priority:5;
|
333
337
|
mso-style-unhide:no;
|
@@ -343,7 +347,6 @@ h4 {mso-list:l1 level4 lfo6;}
|
|
343
347
|
line-height:12.0pt;
|
344
348
|
mso-pagination:widow-orphan;
|
345
349
|
page-break-after:avoid;
|
346
|
-
mso-outline-level:5;
|
347
350
|
mso-hyphenate:none;
|
348
351
|
tab-stops:51.05pt list 54.0pt;
|
349
352
|
font-size:11.0pt;
|
@@ -358,7 +361,9 @@ h4 {mso-list:l1 level4 lfo6;}
|
|
358
361
|
mso-ansi-language:EN-GB;
|
359
362
|
mso-fareast-language:JA;
|
360
363
|
mso-bidi-font-weight:normal;}
|
361
|
-
h5 {mso-list:l1 level5 lfo6;
|
364
|
+
h5 {mso-list:l1 level5 lfo6;
|
365
|
+
mso-outline-level:5;
|
366
|
+
}
|
362
367
|
h6
|
363
368
|
{mso-style-priority:6;
|
364
369
|
mso-style-unhide:no;
|
@@ -374,7 +379,6 @@ h6
|
|
374
379
|
line-height:12.0pt;
|
375
380
|
mso-pagination:widow-orphan;
|
376
381
|
page-break-after:avoid;
|
377
|
-
mso-outline-level:6;
|
378
382
|
mso-hyphenate:none;
|
379
383
|
tab-stops:51.05pt list 72.0pt;
|
380
384
|
font-size:11.0pt;
|
@@ -389,7 +393,9 @@ h6
|
|
389
393
|
mso-ansi-language:EN-GB;
|
390
394
|
mso-fareast-language:JA;
|
391
395
|
mso-bidi-font-weight:normal;}
|
392
|
-
h6 {mso-list:l1 level6 lfo6;
|
396
|
+
h6 {mso-list:l1 level6 lfo6;
|
397
|
+
mso-outline-level:6;
|
398
|
+
}
|
393
399
|
p.MsoToc1, li.MsoToc1, div.MsoToc1
|
394
400
|
{mso-style-priority:39;
|
395
401
|
mso-style-unhide:no;
|
data/lib/isodoc/iso/i18n-en.yaml
CHANGED
@@ -15,6 +15,8 @@
|
|
15
15
|
<xsl:variable name="pageWidth" select="'210mm'"/>
|
16
16
|
<xsl:variable name="pageHeight" select="'297mm'"/>
|
17
17
|
|
18
|
+
<xsl:variable name="docidentifierISO" select="/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso'] | /iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'ISO']"/>
|
19
|
+
|
18
20
|
<xsl:variable name="copyrightText" select="concat('© ISO ', iso:iso-standard/iso:bibdata/iso:copyright/iso:from ,' – All rights reserved')"/>
|
19
21
|
|
20
22
|
<xsl:variable name="lang-1st-letter_tmp" select="substring-before(substring-after(/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-with-lang'], '('), ')')"/>
|
@@ -148,21 +150,8 @@
|
|
148
150
|
-->
|
149
151
|
<xsl:variable name="contents">
|
150
152
|
<contents>
|
151
|
-
<xsl:
|
152
|
-
|
153
|
-
<xsl:apply-templates select="/iso:iso-standard/iso:sections/iso:clause[1]" mode="contents"/> <!-- [@id = '_scope'] -->
|
154
|
-
|
155
|
-
<!-- Normative references -->
|
156
|
-
<xsl:apply-templates select="/iso:iso-standard/iso:bibliography/iso:references[1]" mode="contents"/> <!-- [@id = '_normative_references'] -->
|
157
|
-
|
158
|
-
<xsl:apply-templates select="/iso:iso-standard/iso:sections/*[position() > 1]" mode="contents"/> <!-- @id != '_scope' -->
|
159
|
-
|
160
|
-
<xsl:apply-templates select="/iso:iso-standard/iso:annex" mode="contents"/>
|
161
|
-
|
162
|
-
<!-- Bibliography -->
|
163
|
-
<xsl:apply-templates select="/iso:iso-standard/iso:bibliography/iso:references[position() > 1]" mode="contents"/> <!-- @id = '_bibliography' -->
|
164
|
-
|
165
|
-
|
153
|
+
<xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
|
154
|
+
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
166
155
|
</contents>
|
167
156
|
</xsl:variable>
|
168
157
|
|
@@ -412,7 +401,7 @@
|
|
412
401
|
<xsl:value-of select="$stage-fullname-uppercased"/>
|
413
402
|
</fo:block>
|
414
403
|
<fo:block font-size="20pt" font-weight="bold" text-align="right">
|
415
|
-
<xsl:value-of select="
|
404
|
+
<xsl:value-of select="$docidentifierISO"/>
|
416
405
|
</fo:block>
|
417
406
|
|
418
407
|
|
@@ -557,7 +546,7 @@
|
|
557
546
|
</fo:table-cell>
|
558
547
|
<fo:table-cell>
|
559
548
|
<fo:block text-align="right" font-weight="bold" margin-bottom="13mm">
|
560
|
-
<xsl:value-of select="
|
549
|
+
<xsl:value-of select="$docidentifierISO"/>
|
561
550
|
</fo:block>
|
562
551
|
</fo:table-cell>
|
563
552
|
</fo:table-row>
|
@@ -568,11 +557,11 @@
|
|
568
557
|
<xsl:call-template name="printEdition"/>
|
569
558
|
</xsl:if>
|
570
559
|
<xsl:choose>
|
571
|
-
<xsl:when test="$stage-abbreviation = 'IS'">
|
560
|
+
<xsl:when test="$stage-abbreviation = 'IS' and /iso:iso-standard/iso:bibdata/iso:date[@type = 'published']">
|
572
561
|
<xsl:value-of select="$linebreak"/>
|
573
562
|
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'published']"/>
|
574
|
-
</xsl:when>
|
575
|
-
<xsl:when test="$stage-abbreviation = 'published'">
|
563
|
+
</xsl:when>
|
564
|
+
<xsl:when test="$stage-abbreviation = 'IS' or $stage-abbreviation = 'published'">
|
576
565
|
<xsl:value-of select="$linebreak"/>
|
577
566
|
<xsl:value-of select="substring(/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date,1, 7)"/>
|
578
567
|
</xsl:when>
|
@@ -727,7 +716,7 @@
|
|
727
716
|
</fo:table-cell>
|
728
717
|
<fo:table-cell>
|
729
718
|
<fo:block text-align="right" font-weight="bold" margin-bottom="13mm">
|
730
|
-
<xsl:value-of select="
|
719
|
+
<xsl:value-of select="$docidentifierISO"/>
|
731
720
|
</fo:block>
|
732
721
|
</fo:table-cell>
|
733
722
|
</fo:table-row>
|
@@ -904,7 +893,7 @@
|
|
904
893
|
</fo:block-container>
|
905
894
|
<fo:block font-size="11pt" margin-bottom="8pt"><xsl:value-of select="$linebreak"/></fo:block>
|
906
895
|
<fo:block-container font-size="40pt" text-align="center" margin-bottom="12pt" border="0.5pt solid black">
|
907
|
-
<xsl:variable name="stage-title" select="substring-after(substring-before(
|
896
|
+
<xsl:variable name="stage-title" select="substring-after(substring-before($docidentifierISO, ' '), '/')"/>
|
908
897
|
<fo:block padding-top="2mm"><xsl:value-of select="$stage-title"/><xsl:text> stage</xsl:text></fo:block>
|
909
898
|
</fo:block-container>
|
910
899
|
<fo:block><xsl:value-of select="$linebreak"/></fo:block>
|
@@ -1027,8 +1016,8 @@
|
|
1027
1016
|
</xsl:otherwise>
|
1028
1017
|
</xsl:choose>
|
1029
1018
|
|
1030
|
-
<!-- Foreword, Introduction -->
|
1031
|
-
<xsl:
|
1019
|
+
<!-- Foreword, Introduction -->
|
1020
|
+
<xsl:call-template name="processPrefaceSectionsDefault"/>
|
1032
1021
|
|
1033
1022
|
</fo:flow>
|
1034
1023
|
</fo:page-sequence>
|
@@ -1100,19 +1089,14 @@
|
|
1100
1089
|
<!-- Clause(s) -->
|
1101
1090
|
<fo:block>
|
1102
1091
|
|
1103
|
-
<xsl:
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
<!-- Annex(s) -->
|
1112
|
-
<xsl:apply-templates select="/iso:iso-standard/iso:annex"/>
|
1113
|
-
|
1114
|
-
<!-- Bibliography -->
|
1115
|
-
<xsl:apply-templates select="/iso:iso-standard/iso:bibliography/iso:references[position() > 1]"/>
|
1092
|
+
<xsl:choose>
|
1093
|
+
<xsl:when test="$doctype = 'amendment'">
|
1094
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:sections/*"/>
|
1095
|
+
</xsl:when>
|
1096
|
+
<xsl:otherwise>
|
1097
|
+
<xsl:call-template name="processMainSectionsDefault"/>
|
1098
|
+
</xsl:otherwise>
|
1099
|
+
</xsl:choose>
|
1116
1100
|
|
1117
1101
|
<fo:block id="lastBlock" font-size="1pt"> </fo:block>
|
1118
1102
|
</fo:block>
|
@@ -1336,7 +1320,7 @@
|
|
1336
1320
|
</xsl:template>
|
1337
1321
|
|
1338
1322
|
<!-- Bibliography -->
|
1339
|
-
<xsl:template match="iso:references[
|
1323
|
+
<xsl:template match="iso:references[not(@normative='true')]/iso:title">
|
1340
1324
|
<xsl:choose>
|
1341
1325
|
<xsl:when test="$doctype = 'amendment'">
|
1342
1326
|
<xsl:call-template name="titleAmendment"/>
|
@@ -1374,7 +1358,7 @@
|
|
1374
1358
|
</xsl:variable>
|
1375
1359
|
|
1376
1360
|
<xsl:choose>
|
1377
|
-
<xsl:when test="$doctype = 'amendment'">
|
1361
|
+
<xsl:when test="$doctype = 'amendment' and not(ancestor::iso:preface)">
|
1378
1362
|
<fo:block font-size="11pt" font-style="italic" margin-bottom="12pt" keep-with-next="always">
|
1379
1363
|
<xsl:apply-templates/>
|
1380
1364
|
</fo:block>
|
@@ -1464,7 +1448,7 @@
|
|
1464
1448
|
</xsl:element>
|
1465
1449
|
<xsl:if test="$element-name = 'fo:inline' and not($inline = 'true') and not(local-name(..) = 'admonition')">
|
1466
1450
|
<fo:block margin-bottom="12pt">
|
1467
|
-
<xsl:if test="ancestor::iso:annex">
|
1451
|
+
<xsl:if test="ancestor::iso:annex or following-sibling::iso:table">
|
1468
1452
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
1469
1453
|
</xsl:if>
|
1470
1454
|
<xsl:value-of select="$linebreak"/>
|
@@ -1516,13 +1500,13 @@
|
|
1516
1500
|
<fo:inline font-size="80%" keep-with-previous.within-line="always" vertical-align="super">
|
1517
1501
|
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
1518
1502
|
<!-- <xsl:value-of select="@reference"/> -->
|
1519
|
-
<xsl:value-of select="$number + count(//iso:bibitem[ancestor::iso:references[@
|
1503
|
+
<xsl:value-of select="$number + count(//iso:bibitem[ancestor::iso:references[@normative='true']]/iso:note)"/><xsl:text>)</xsl:text>
|
1520
1504
|
</fo:basic-link>
|
1521
1505
|
</fo:inline>
|
1522
1506
|
<fo:footnote-body>
|
1523
1507
|
<fo:block font-size="10pt" margin-bottom="12pt">
|
1524
1508
|
<fo:inline id="footnote_{@reference}_{$number}" keep-with-next.within-line="always" padding-right="3mm"> <!-- font-size="60%" alignment-baseline="hanging" -->
|
1525
|
-
<xsl:value-of select="$number + count(//iso:bibitem[ancestor::iso:references[@
|
1509
|
+
<xsl:value-of select="$number + count(//iso:bibitem[ancestor::iso:references[@normative='true']]/iso:note)"/><xsl:text>)</xsl:text>
|
1526
1510
|
</fo:inline>
|
1527
1511
|
<xsl:for-each select="iso:p">
|
1528
1512
|
<xsl:apply-templates/>
|
@@ -1597,7 +1581,7 @@
|
|
1597
1581
|
|
1598
1582
|
|
1599
1583
|
|
1600
|
-
<xsl:template match="iso:ul | iso:ol">
|
1584
|
+
<xsl:template match="iso:ul | iso:ol" mode="ul_ol">
|
1601
1585
|
<fo:list-block provisional-distance-between-starts="7mm" margin-top="8pt"> <!-- margin-bottom="8pt" -->
|
1602
1586
|
<xsl:apply-templates/>
|
1603
1587
|
</fo:list-block>
|
@@ -1624,7 +1608,9 @@
|
|
1624
1608
|
</fo:list-item>
|
1625
1609
|
</xsl:template>
|
1626
1610
|
|
1627
|
-
|
1611
|
+
<xsl:template match="iso:note" mode="process">
|
1612
|
+
<xsl:call-template name="note"/>
|
1613
|
+
</xsl:template>
|
1628
1614
|
|
1629
1615
|
<xsl:template match="iso:preferred">
|
1630
1616
|
<fo:block line-height="1.1">
|
@@ -1638,9 +1624,14 @@
|
|
1638
1624
|
</xsl:template>
|
1639
1625
|
|
1640
1626
|
|
1627
|
+
<xsl:template match="iso:references[@normative='true']">
|
1628
|
+
<fo:block id="{@id}">
|
1629
|
+
<xsl:apply-templates/>
|
1630
|
+
</fo:block>
|
1631
|
+
</xsl:template>
|
1641
1632
|
|
1642
1633
|
<!-- <xsl:template match="iso:references[@id = '_bibliography']"> -->
|
1643
|
-
<xsl:template match="iso:references[
|
1634
|
+
<xsl:template match="iso:references[not(@normative='true')]">
|
1644
1635
|
<fo:block break-after="page"/>
|
1645
1636
|
<fo:block id="{@id}">
|
1646
1637
|
<xsl:apply-templates/>
|
@@ -1650,7 +1641,7 @@
|
|
1650
1641
|
|
1651
1642
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
1652
1643
|
<!-- <xsl:template match="iso:references[@id = '_bibliography']/iso:bibitem"> -->
|
1653
|
-
<xsl:template match="iso:references[
|
1644
|
+
<xsl:template match="iso:references[not(@normative='true')]/iso:bibitem">
|
1654
1645
|
<fo:list-block margin-bottom="6pt" provisional-distance-between-starts="12mm">
|
1655
1646
|
<fo:list-item>
|
1656
1647
|
<fo:list-item-label end-indent="label-end()">
|
@@ -1689,10 +1680,10 @@
|
|
1689
1680
|
</xsl:template>
|
1690
1681
|
|
1691
1682
|
<!-- <xsl:template match="iso:references[@id = '_bibliography']/iso:bibitem" mode="contents"/> -->
|
1692
|
-
<xsl:template match="iso:references[
|
1683
|
+
<xsl:template match="iso:references[not(@normative='true')]/iso:bibitem" mode="contents"/>
|
1693
1684
|
|
1694
1685
|
<!-- <xsl:template match="iso:references[@id = '_bibliography']/iso:bibitem/iso:title"> -->
|
1695
|
-
<xsl:template match="iso:references[
|
1686
|
+
<xsl:template match="iso:references[not(@normative='true')]/iso:bibitem/iso:title">
|
1696
1687
|
<fo:inline font-style="italic">
|
1697
1688
|
<xsl:apply-templates/>
|
1698
1689
|
</fo:inline>
|
@@ -1701,8 +1692,12 @@
|
|
1701
1692
|
|
1702
1693
|
<xsl:template match="mathml:math" priority="2">
|
1703
1694
|
<fo:inline font-family="Cambria Math">
|
1695
|
+
<xsl:variable name="mathml">
|
1696
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
1697
|
+
</xsl:variable>
|
1704
1698
|
<fo:instream-foreign-object fox:alt-text="Math">
|
1705
|
-
<xsl:copy-of select="."/>
|
1699
|
+
<!-- <xsl:copy-of select="."/> -->
|
1700
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
1706
1701
|
</fo:instream-foreign-object>
|
1707
1702
|
</fo:inline>
|
1708
1703
|
</xsl:template>
|
@@ -2038,7 +2033,12 @@
|
|
2038
2033
|
|
2039
2034
|
|
2040
2035
|
|
2041
|
-
<title-source lang="en">
|
2036
|
+
<title-source lang="en">
|
2037
|
+
|
2038
|
+
<xsl:text>SOURCE</xsl:text>
|
2039
|
+
|
2040
|
+
|
2041
|
+
</title-source>
|
2042
2042
|
|
2043
2043
|
<title-keywords lang="en">Keywords</title-keywords>
|
2044
2044
|
|
@@ -2081,6 +2081,10 @@
|
|
2081
2081
|
<title-warning lang="zh">警告</title-warning>
|
2082
2082
|
|
2083
2083
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
2084
|
+
|
2085
|
+
<title-continued lang="en">(continued)</title-continued>
|
2086
|
+
<title-continued lang="fr">(continué)</title-continued>
|
2087
|
+
|
2084
2088
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
2085
2089
|
<xsl:param name="name"/>
|
2086
2090
|
<xsl:variable name="lang">
|
@@ -2101,12 +2105,12 @@
|
|
2101
2105
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2102
2106
|
|
2103
2107
|
|
2108
|
+
|
2104
2109
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
2105
2110
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2106
2111
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
2107
2112
|
|
2108
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2109
|
-
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
2113
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2110
2114
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2111
2115
|
|
2112
2116
|
|
@@ -2116,6 +2120,7 @@
|
|
2116
2120
|
|
2117
2121
|
|
2118
2122
|
|
2123
|
+
|
2119
2124
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
2120
2125
|
|
2121
2126
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -2166,9 +2171,11 @@
|
|
2166
2171
|
|
2167
2172
|
|
2168
2173
|
|
2174
|
+
|
2169
2175
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
2170
2176
|
|
2171
2177
|
|
2178
|
+
|
2172
2179
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
2173
2180
|
|
2174
2181
|
|
@@ -2186,6 +2193,9 @@
|
|
2186
2193
|
|
2187
2194
|
|
2188
2195
|
|
2196
|
+
|
2197
|
+
|
2198
|
+
|
2189
2199
|
|
2190
2200
|
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
2191
2201
|
|
@@ -2203,6 +2213,8 @@
|
|
2203
2213
|
|
2204
2214
|
|
2205
2215
|
|
2216
|
+
|
2217
|
+
|
2206
2218
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
2207
2219
|
|
2208
2220
|
|
@@ -2217,9 +2229,10 @@
|
|
2217
2229
|
|
2218
2230
|
|
2219
2231
|
|
2232
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
2220
2233
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2221
2234
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2222
|
-
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2235
|
+
<!-- <xsl:attribute name="margin-top">12pt</xsl:attribute> -->
|
2223
2236
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2224
2237
|
|
2225
2238
|
|
@@ -2227,6 +2240,7 @@
|
|
2227
2240
|
|
2228
2241
|
|
2229
2242
|
|
2243
|
+
|
2230
2244
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
2231
2245
|
|
2232
2246
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -2249,11 +2263,13 @@
|
|
2249
2263
|
|
2250
2264
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2251
2265
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2252
|
-
|
2266
|
+
|
2267
|
+
|
2253
2268
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
2254
2269
|
|
2255
2270
|
|
2256
2271
|
|
2272
|
+
|
2257
2273
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
2258
2274
|
|
2259
2275
|
|
@@ -2273,20 +2289,20 @@
|
|
2273
2289
|
|
2274
2290
|
|
2275
2291
|
|
2292
|
+
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
2276
2293
|
|
2277
2294
|
|
2278
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
2279
2295
|
|
2280
2296
|
|
2281
2297
|
|
2282
2298
|
|
2299
|
+
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
2300
|
+
|
2283
2301
|
|
2284
2302
|
|
2285
|
-
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
2286
2303
|
|
2287
2304
|
|
2288
2305
|
|
2289
|
-
|
2290
2306
|
|
2291
2307
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
2292
2308
|
|
@@ -2316,6 +2332,8 @@
|
|
2316
2332
|
|
2317
2333
|
|
2318
2334
|
|
2335
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2336
|
+
|
2319
2337
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2320
2338
|
|
2321
2339
|
|
@@ -2344,6 +2362,7 @@
|
|
2344
2362
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
2345
2363
|
|
2346
2364
|
|
2365
|
+
|
2347
2366
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
2348
2367
|
|
2349
2368
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
@@ -2352,6 +2371,7 @@
|
|
2352
2371
|
|
2353
2372
|
|
2354
2373
|
|
2374
|
+
|
2355
2375
|
|
2356
2376
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2357
2377
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -2370,7 +2390,7 @@
|
|
2370
2390
|
|
2371
2391
|
|
2372
2392
|
|
2373
|
-
|
2393
|
+
|
2374
2394
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
2375
2395
|
|
2376
2396
|
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
@@ -2395,14 +2415,16 @@
|
|
2395
2415
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
2396
2416
|
|
2397
2417
|
|
2398
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2399
|
-
|
2418
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2419
|
+
|
2400
2420
|
|
2401
2421
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
2402
2422
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
2403
2423
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2404
2424
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2405
2425
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2426
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2427
|
+
|
2406
2428
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
2407
2429
|
|
2408
2430
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -2415,7 +2437,43 @@
|
|
2415
2437
|
|
2416
2438
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2417
2439
|
|
2418
|
-
</xsl:attribute-set><xsl:template
|
2440
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
2441
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2442
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
2443
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
2444
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
2445
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
2446
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
2447
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
2448
|
+
|
2449
|
+
<!-- Normative references -->
|
2450
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
2451
|
+
<!-- Terms and definitions -->
|
2452
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
2453
|
+
<!-- Another main sections -->
|
2454
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
2455
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
2456
|
+
<!-- Bibliography -->
|
2457
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
2458
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
2459
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
2460
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
2461
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
2462
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
2463
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
2464
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
2465
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
2466
|
+
|
2467
|
+
<!-- Normative references -->
|
2468
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
2469
|
+
<!-- Terms and definitions -->
|
2470
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
|
2471
|
+
<!-- Another main sections -->
|
2472
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
|
2473
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
2474
|
+
<!-- Bibliography -->
|
2475
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
2476
|
+
</xsl:template><xsl:template match="text()">
|
2419
2477
|
<xsl:value-of select="."/>
|
2420
2478
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
2421
2479
|
<xsl:value-of select="$linebreak"/>
|
@@ -2432,12 +2490,10 @@
|
|
2432
2490
|
|
2433
2491
|
|
2434
2492
|
|
2435
|
-
|
2493
|
+
<!-- $namespace = 'iso' or -->
|
2436
2494
|
|
2437
2495
|
|
2438
2496
|
|
2439
|
-
<xsl:call-template name="fn_name_display"/>
|
2440
|
-
|
2441
2497
|
|
2442
2498
|
|
2443
2499
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
@@ -2491,13 +2547,15 @@
|
|
2491
2547
|
|
2492
2548
|
|
2493
2549
|
|
2550
|
+
|
2494
2551
|
|
2495
|
-
|
2552
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2496
2553
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2497
2554
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2498
2555
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
2499
2556
|
|
2500
2557
|
|
2558
|
+
|
2501
2559
|
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
2502
2560
|
|
2503
2561
|
<xsl:attribute name="border">1.5pt solid black</xsl:attribute>
|
@@ -2520,6 +2578,9 @@
|
|
2520
2578
|
|
2521
2579
|
|
2522
2580
|
|
2581
|
+
|
2582
|
+
|
2583
|
+
|
2523
2584
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2524
2585
|
<xsl:choose>
|
2525
2586
|
<xsl:when test=". = 1 or . = 0">
|
@@ -2550,8 +2611,11 @@
|
|
2550
2611
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
2551
2612
|
<xsl:if test="normalize-space() != ''">
|
2552
2613
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2553
|
-
|
2554
|
-
|
2614
|
+
|
2615
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2616
|
+
|
2617
|
+
<xsl:apply-templates/>
|
2618
|
+
</fo:block>
|
2555
2619
|
</xsl:if>
|
2556
2620
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
2557
2621
|
<xsl:param name="table-row"/>
|
@@ -2667,28 +2731,29 @@
|
|
2667
2731
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
2668
2732
|
<xsl:param name="cols-count"/>
|
2669
2733
|
<!-- font-weight="bold" -->
|
2670
|
-
<fo:table-header>
|
2671
|
-
|
2672
|
-
<fo:table-row>
|
2673
|
-
<fo:table-cell number-columns-spanned="{$cols-count}"> <!-- border-left="1pt solid white" border-right="1pt solid white" border-top="1pt solid white" -->
|
2674
|
-
<fo:block text-align="center" font-size="11pt" font-weight="bold">
|
2675
|
-
<!-- (continued) -->
|
2676
|
-
<fo:block-container position="absolute" top="-7mm">
|
2677
|
-
<fo:block>
|
2678
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued" retrieve-position-within-table="first-starting" retrieve-boundary-within-table="table-fragment"/>
|
2679
|
-
</fo:block>
|
2680
|
-
</fo:block-container>
|
2734
|
+
<fo:table-header>
|
2681
2735
|
|
2682
|
-
|
2683
|
-
|
2684
|
-
|
2685
|
-
</fo:block> -->
|
2736
|
+
<xsl:call-template name="table-header-title">
|
2737
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2738
|
+
</xsl:call-template>
|
2686
2739
|
|
2687
|
-
</fo:table-cell>
|
2688
|
-
</fo:table-row>
|
2689
|
-
|
2690
2740
|
<xsl:apply-templates/>
|
2691
2741
|
</fo:table-header>
|
2742
|
+
</xsl:template><xsl:template name="table-header-title">
|
2743
|
+
<xsl:param name="cols-count"/>
|
2744
|
+
<!-- row for title -->
|
2745
|
+
<fo:table-row>
|
2746
|
+
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
2747
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
2748
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
2749
|
+
<xsl:call-template name="fn_name_display"/>
|
2750
|
+
</xsl:for-each>
|
2751
|
+
<fo:block text-align="right" font-style="italic">
|
2752
|
+
<xsl:text> </xsl:text>
|
2753
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
2754
|
+
</fo:block>
|
2755
|
+
</fo:table-cell>
|
2756
|
+
</fo:table-row>
|
2692
2757
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
2693
2758
|
<fo:table-body>
|
2694
2759
|
<xsl:apply-templates/>
|
@@ -2754,6 +2819,17 @@
|
|
2754
2819
|
</xsl:choose>
|
2755
2820
|
</xsl:variable>
|
2756
2821
|
|
2822
|
+
|
2823
|
+
<!-- if there isn't 'thead' and there is a table's title -->
|
2824
|
+
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='thead']) and ancestor::*[local-name()='table']/*[local-name()='name']">
|
2825
|
+
<fo:table-header>
|
2826
|
+
<xsl:call-template name="table-header-title">
|
2827
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2828
|
+
</xsl:call-template>
|
2829
|
+
</fo:table-header>
|
2830
|
+
</xsl:if>
|
2831
|
+
|
2832
|
+
|
2757
2833
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
2758
2834
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2759
2835
|
</xsl:apply-templates>
|
@@ -2763,6 +2839,30 @@
|
|
2763
2839
|
</xsl:call-template>
|
2764
2840
|
|
2765
2841
|
<fo:table-body>
|
2842
|
+
|
2843
|
+
<xsl:variable name="title_continued">
|
2844
|
+
<xsl:call-template name="getTitle">
|
2845
|
+
<xsl:with-param name="name" select="'title-continued'"/>
|
2846
|
+
</xsl:call-template>
|
2847
|
+
</xsl:variable>
|
2848
|
+
<fo:table-row height="0" keep-with-next.within-page="always">
|
2849
|
+
<fo:table-cell>
|
2850
|
+
<fo:marker marker-class-name="table_continued"/>
|
2851
|
+
<fo:block/>
|
2852
|
+
</fo:table-cell>
|
2853
|
+
</fo:table-row>
|
2854
|
+
<fo:table-row height="0" keep-with-next.within-page="always">
|
2855
|
+
<fo:table-cell>
|
2856
|
+
<fo:marker marker-class-name="table_continued">
|
2857
|
+
<!-- <fo:inline font-style="italic" font-weight="normal"> -->
|
2858
|
+
<xsl:value-of select="$title_continued"/>
|
2859
|
+
<!-- </fo:inline> -->
|
2860
|
+
</fo:marker>
|
2861
|
+
<fo:block/>
|
2862
|
+
</fo:table-cell>
|
2863
|
+
</fo:table-row>
|
2864
|
+
|
2865
|
+
|
2766
2866
|
<xsl:apply-templates/>
|
2767
2867
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
2768
2868
|
|
@@ -2804,11 +2904,21 @@
|
|
2804
2904
|
|
2805
2905
|
</xsl:if>
|
2806
2906
|
|
2907
|
+
|
2908
|
+
|
2807
2909
|
|
2808
2910
|
<xsl:apply-templates/>
|
2809
2911
|
</fo:table-row>
|
2810
2912
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
2811
2913
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
2914
|
+
<xsl:attribute name="text-align">
|
2915
|
+
<xsl:choose>
|
2916
|
+
<xsl:when test="@align">
|
2917
|
+
<xsl:value-of select="@align"/>
|
2918
|
+
</xsl:when>
|
2919
|
+
<xsl:otherwise>center</xsl:otherwise>
|
2920
|
+
</xsl:choose>
|
2921
|
+
</xsl:attribute>
|
2812
2922
|
|
2813
2923
|
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
2814
2924
|
|
@@ -2819,6 +2929,8 @@
|
|
2819
2929
|
|
2820
2930
|
|
2821
2931
|
|
2932
|
+
|
2933
|
+
|
2822
2934
|
<xsl:if test="@colspan">
|
2823
2935
|
<xsl:attribute name="number-columns-spanned">
|
2824
2936
|
<xsl:value-of select="@colspan"/>
|
@@ -2829,12 +2941,32 @@
|
|
2829
2941
|
<xsl:value-of select="@rowspan"/>
|
2830
2942
|
</xsl:attribute>
|
2831
2943
|
</xsl:if>
|
2944
|
+
<xsl:call-template name="display-align"/>
|
2832
2945
|
<fo:block>
|
2833
2946
|
<xsl:apply-templates/>
|
2834
2947
|
</fo:block>
|
2835
2948
|
</fo:table-cell>
|
2949
|
+
</xsl:template><xsl:template name="display-align">
|
2950
|
+
<xsl:if test="@valign">
|
2951
|
+
<xsl:attribute name="display-align">
|
2952
|
+
<xsl:choose>
|
2953
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2954
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2955
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2956
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2957
|
+
</xsl:choose>
|
2958
|
+
</xsl:attribute>
|
2959
|
+
</xsl:if>
|
2836
2960
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2837
2961
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2962
|
+
<xsl:attribute name="text-align">
|
2963
|
+
<xsl:choose>
|
2964
|
+
<xsl:when test="@align">
|
2965
|
+
<xsl:value-of select="@align"/>
|
2966
|
+
</xsl:when>
|
2967
|
+
<xsl:otherwise>left</xsl:otherwise>
|
2968
|
+
</xsl:choose>
|
2969
|
+
</xsl:attribute>
|
2838
2970
|
<!-- and ancestor::*[local-name() = 'thead'] -->
|
2839
2971
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2840
2972
|
|
@@ -2850,6 +2982,7 @@
|
|
2850
2982
|
|
2851
2983
|
|
2852
2984
|
|
2985
|
+
|
2853
2986
|
<xsl:if test="@colspan">
|
2854
2987
|
<xsl:attribute name="number-columns-spanned">
|
2855
2988
|
<xsl:value-of select="@colspan"/>
|
@@ -2860,20 +2993,8 @@
|
|
2860
2993
|
<xsl:value-of select="@rowspan"/>
|
2861
2994
|
</xsl:attribute>
|
2862
2995
|
</xsl:if>
|
2863
|
-
<
|
2864
|
-
|
2865
|
-
<xsl:variable name="row_number">
|
2866
|
-
<xsl:number format="1" count="*[local-name() = 'tr'] | *[local-name() = 'th']"/>
|
2867
|
-
</xsl:variable>
|
2868
|
-
<fo:marker marker-class-name="table_continued">
|
2869
|
-
<xsl:if test="$row_number > 1">
|
2870
|
-
<fo:inline>
|
2871
|
-
<xsl:apply-templates select="ancestor::*[local-name() = 'table']/*[local-name() = 'name']" mode="contents"/>
|
2872
|
-
<fo:inline font-style="italic" font-weight="normal">(continued)</fo:inline>
|
2873
|
-
</fo:inline>
|
2874
|
-
</xsl:if>
|
2875
|
-
</fo:marker>
|
2876
|
-
|
2996
|
+
<xsl:call-template name="display-align"/>
|
2997
|
+
<fo:block>
|
2877
2998
|
<xsl:apply-templates/>
|
2878
2999
|
</fo:block>
|
2879
3000
|
</fo:table-cell>
|
@@ -3062,6 +3183,7 @@
|
|
3062
3183
|
|
3063
3184
|
|
3064
3185
|
|
3186
|
+
|
3065
3187
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
3066
3188
|
|
3067
3189
|
<xsl:value-of select="@reference"/>
|
@@ -3072,129 +3194,143 @@
|
|
3072
3194
|
<xsl:apply-templates/>
|
3073
3195
|
</fo:inline>
|
3074
3196
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
3075
|
-
<
|
3076
|
-
|
3077
|
-
|
3078
|
-
|
3079
|
-
|
3080
|
-
|
3081
|
-
|
3082
|
-
|
3083
|
-
<xsl:choose>
|
3084
|
-
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
3085
|
-
|
3197
|
+
<fo:block-container margin-left="0mm">
|
3198
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3199
|
+
<xsl:attribute name="margin-left">
|
3200
|
+
<xsl:choose>
|
3201
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3202
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3203
|
+
</xsl:choose>
|
3204
|
+
</xsl:attribute>
|
3086
3205
|
|
3087
|
-
|
3088
|
-
|
3089
|
-
|
3090
|
-
|
3091
|
-
<xsl:variable name="title-where">
|
3092
|
-
<xsl:call-template name="getTitle">
|
3093
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3094
|
-
</xsl:call-template>
|
3095
|
-
</xsl:variable>
|
3096
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3097
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3098
|
-
<xsl:text/>
|
3099
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
3100
|
-
</fo:block>
|
3206
|
+
</xsl:if>
|
3207
|
+
<fo:block-container margin-left="0mm">
|
3208
|
+
|
3209
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
3101
3210
|
|
3102
|
-
|
3103
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
3104
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
3105
|
-
|
3106
|
-
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3107
|
-
|
3211
|
+
<xsl:variable name="key_iso">
|
3108
3212
|
|
3109
|
-
|
3110
|
-
|
3111
|
-
|
3112
|
-
<xsl:call-template name="getTitle">
|
3113
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3114
|
-
</xsl:call-template>
|
3115
|
-
</xsl:variable>
|
3116
|
-
<xsl:value-of select="$title-where"/>
|
3117
|
-
</fo:block>
|
3118
|
-
</xsl:when>
|
3119
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
3120
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
3121
|
-
|
3122
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3123
|
-
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3124
|
-
|
3125
|
-
|
3126
|
-
|
3127
|
-
<xsl:variable name="title-key">
|
3128
|
-
<xsl:call-template name="getTitle">
|
3129
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
3130
|
-
</xsl:call-template>
|
3131
|
-
</xsl:variable>
|
3132
|
-
<xsl:value-of select="$title-key"/>
|
3133
|
-
</fo:block>
|
3134
|
-
</xsl:when>
|
3135
|
-
</xsl:choose>
|
3136
|
-
|
3137
|
-
<!-- a few components -->
|
3138
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
3139
|
-
<fo:block>
|
3140
|
-
|
3141
|
-
<xsl:if test="$parent = 'formula'">
|
3142
|
-
<xsl:attribute name="margin-left">4mm</xsl:attribute>
|
3143
|
-
</xsl:if>
|
3144
|
-
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
3145
|
-
|
3146
|
-
|
3147
|
-
|
3213
|
+
<xsl:if test="$parent = 'figure' or $parent = 'formula'">true</xsl:if>
|
3214
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
3215
|
+
</xsl:variable>
|
3148
3216
|
|
3149
|
-
<
|
3150
|
-
|
3151
|
-
|
3152
|
-
|
3153
|
-
|
3154
|
-
<fo:table width="95%" table-layout="fixed">
|
3217
|
+
<xsl:choose>
|
3218
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
3155
3219
|
|
3156
|
-
|
3157
|
-
<
|
3158
|
-
|
3159
|
-
|
3160
|
-
|
3220
|
+
|
3221
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
3222
|
+
|
3223
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3224
|
+
|
3225
|
+
<xsl:variable name="title-where">
|
3226
|
+
<xsl:call-template name="getTitle">
|
3227
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3228
|
+
</xsl:call-template>
|
3229
|
+
</xsl:variable>
|
3230
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3231
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3232
|
+
<xsl:text/>
|
3233
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
3234
|
+
</fo:block>
|
3235
|
+
|
3236
|
+
</xsl:when>
|
3237
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
3238
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
3239
|
+
|
3240
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3241
|
+
|
3242
|
+
|
3243
|
+
|
3244
|
+
|
3245
|
+
<xsl:variable name="title-where">
|
3246
|
+
<xsl:call-template name="getTitle">
|
3247
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3248
|
+
</xsl:call-template>
|
3249
|
+
</xsl:variable>
|
3250
|
+
<xsl:value-of select="$title-where"/>
|
3251
|
+
</fo:block>
|
3252
|
+
</xsl:when>
|
3253
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
3254
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
3255
|
+
|
3161
3256
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3257
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3258
|
+
|
3259
|
+
|
3260
|
+
|
3261
|
+
<xsl:variable name="title-key">
|
3262
|
+
<xsl:call-template name="getTitle">
|
3263
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
3264
|
+
</xsl:call-template>
|
3265
|
+
</xsl:variable>
|
3266
|
+
<xsl:value-of select="$title-key"/>
|
3267
|
+
</fo:block>
|
3268
|
+
</xsl:when>
|
3269
|
+
</xsl:choose>
|
3270
|
+
|
3271
|
+
<!-- a few components -->
|
3272
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
3273
|
+
<fo:block>
|
3274
|
+
|
3275
|
+
<xsl:if test="$parent = 'formula'">
|
3276
|
+
<xsl:attribute name="margin-left">4mm</xsl:attribute>
|
3277
|
+
</xsl:if>
|
3278
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
3279
|
+
|
3280
|
+
|
3281
|
+
|
3282
|
+
|
3283
|
+
<fo:block>
|
3284
|
+
|
3285
|
+
|
3286
|
+
|
3287
|
+
|
3288
|
+
<fo:table width="95%" table-layout="fixed">
|
3162
3289
|
|
3163
|
-
|
3164
|
-
|
3165
|
-
|
3166
|
-
|
3167
|
-
|
3168
|
-
|
3169
|
-
|
3170
|
-
|
3171
|
-
</
|
3172
|
-
|
3173
|
-
|
3174
|
-
|
3175
|
-
|
3176
|
-
|
3177
|
-
|
3178
|
-
|
3179
|
-
|
3180
|
-
|
3181
|
-
|
3182
|
-
|
3183
|
-
|
3184
|
-
|
3185
|
-
|
3186
|
-
|
3187
|
-
|
3188
|
-
|
3189
|
-
|
3190
|
-
|
3191
|
-
|
3192
|
-
|
3193
|
-
|
3194
|
-
|
3195
|
-
|
3196
|
-
|
3197
|
-
|
3290
|
+
<xsl:choose>
|
3291
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
3292
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
3293
|
+
</xsl:when>
|
3294
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
3295
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3296
|
+
|
3297
|
+
</xsl:when>
|
3298
|
+
</xsl:choose>
|
3299
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
3300
|
+
<xsl:variable name="html-table">
|
3301
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
3302
|
+
<xsl:element name="{$ns}:table">
|
3303
|
+
<tbody>
|
3304
|
+
<xsl:apply-templates mode="dl"/>
|
3305
|
+
</tbody>
|
3306
|
+
</xsl:element>
|
3307
|
+
</xsl:variable>
|
3308
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
3309
|
+
<xsl:variable name="colwidths">
|
3310
|
+
<xsl:call-template name="calculate-column-widths">
|
3311
|
+
<xsl:with-param name="cols-count" select="2"/>
|
3312
|
+
<xsl:with-param name="table" select="$html-table"/>
|
3313
|
+
</xsl:call-template>
|
3314
|
+
</xsl:variable>
|
3315
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
3316
|
+
<xsl:variable name="maxlength_dt">
|
3317
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
3318
|
+
</xsl:variable>
|
3319
|
+
<xsl:call-template name="setColumnWidth_dl">
|
3320
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
3321
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
3322
|
+
</xsl:call-template>
|
3323
|
+
<fo:table-body>
|
3324
|
+
<xsl:apply-templates>
|
3325
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
3326
|
+
</xsl:apply-templates>
|
3327
|
+
</fo:table-body>
|
3328
|
+
</fo:table>
|
3329
|
+
</fo:block>
|
3330
|
+
</fo:block>
|
3331
|
+
</xsl:if>
|
3332
|
+
</fo:block-container>
|
3333
|
+
</fo:block-container>
|
3198
3334
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
3199
3335
|
<xsl:param name="colwidths"/>
|
3200
3336
|
<xsl:param name="maxlength_dt"/>
|
@@ -3291,6 +3427,7 @@
|
|
3291
3427
|
<xsl:param name="key_iso"/>
|
3292
3428
|
|
3293
3429
|
<fo:table-row>
|
3430
|
+
|
3294
3431
|
<fo:table-cell>
|
3295
3432
|
|
3296
3433
|
<fo:block margin-top="6pt">
|
@@ -3318,14 +3455,36 @@
|
|
3318
3455
|
<fo:table-cell>
|
3319
3456
|
<fo:block>
|
3320
3457
|
|
3321
|
-
|
3458
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
3459
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
3460
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
3461
|
+
</xsl:if>
|
3462
|
+
</xsl:if> -->
|
3322
3463
|
|
3323
3464
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
3324
3465
|
|
3325
3466
|
</fo:block>
|
3326
3467
|
</fo:table-cell>
|
3327
3468
|
</fo:table-row>
|
3328
|
-
|
3469
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
3470
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
3471
|
+
<fo:table-row>
|
3472
|
+
<fo:table-cell>
|
3473
|
+
<fo:block margin-top="6pt">
|
3474
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
3475
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
3476
|
+
</xsl:if>
|
3477
|
+
<xsl:text> </xsl:text>
|
3478
|
+
</fo:block>
|
3479
|
+
</fo:table-cell>
|
3480
|
+
<fo:table-cell>
|
3481
|
+
<fo:block>
|
3482
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
3483
|
+
</fo:block>
|
3484
|
+
</fo:table-cell>
|
3485
|
+
</fo:table-row>
|
3486
|
+
</xsl:if>
|
3487
|
+
</xsl:if> -->
|
3329
3488
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
3330
3489
|
<xsl:apply-templates/>
|
3331
3490
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -3350,6 +3509,31 @@
|
|
3350
3509
|
</fo:inline>
|
3351
3510
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
3352
3511
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
3512
|
+
<xsl:variable name="_font-size">
|
3513
|
+
|
3514
|
+
|
3515
|
+
|
3516
|
+
|
3517
|
+
|
3518
|
+
10
|
3519
|
+
|
3520
|
+
|
3521
|
+
|
3522
|
+
|
3523
|
+
|
3524
|
+
|
3525
|
+
|
3526
|
+
|
3527
|
+
</xsl:variable>
|
3528
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3529
|
+
<xsl:if test="$font-size != ''">
|
3530
|
+
<xsl:attribute name="font-size">
|
3531
|
+
<xsl:choose>
|
3532
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3533
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3534
|
+
</xsl:choose>
|
3535
|
+
</xsl:attribute>
|
3536
|
+
</xsl:if>
|
3353
3537
|
<xsl:apply-templates/>
|
3354
3538
|
</fo:inline>
|
3355
3539
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -3676,10 +3860,23 @@
|
|
3676
3860
|
<xsl:value-of select="substring($str, 2)"/>
|
3677
3861
|
</xsl:template><xsl:template match="mathml:math">
|
3678
3862
|
<fo:inline font-family="STIX2Math">
|
3679
|
-
<
|
3680
|
-
<xsl:
|
3681
|
-
</
|
3863
|
+
<xsl:variable name="mathml">
|
3864
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
3865
|
+
</xsl:variable>
|
3866
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
3867
|
+
<!-- <xsl:copy-of select="."/> -->
|
3868
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3869
|
+
</fo:instream-foreign-object>
|
3682
3870
|
</fo:inline>
|
3871
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3872
|
+
<xsl:copy>
|
3873
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3874
|
+
</xsl:copy>
|
3875
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
3876
|
+
<xsl:copy>
|
3877
|
+
<!-- replace start and end spaces to non-break space -->
|
3878
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3879
|
+
</xsl:copy>
|
3683
3880
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3684
3881
|
<xsl:variable name="target">
|
3685
3882
|
<xsl:choose>
|
@@ -3760,9 +3957,22 @@
|
|
3760
3957
|
<xsl:apply-templates/>
|
3761
3958
|
</fo:basic-link>
|
3762
3959
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
3763
|
-
<fo:block
|
3764
|
-
<xsl:
|
3765
|
-
|
3960
|
+
<fo:block-container margin-left="0mm">
|
3961
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3962
|
+
<xsl:attribute name="margin-left">
|
3963
|
+
<xsl:choose>
|
3964
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3965
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3966
|
+
</xsl:choose>
|
3967
|
+
</xsl:attribute>
|
3968
|
+
|
3969
|
+
</xsl:if>
|
3970
|
+
<fo:block-container margin-left="0mm">
|
3971
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3972
|
+
<xsl:apply-templates/>
|
3973
|
+
</fo:block>
|
3974
|
+
</fo:block-container>
|
3975
|
+
</fo:block-container>
|
3766
3976
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
3767
3977
|
<fo:inline>
|
3768
3978
|
<xsl:apply-templates/>
|
@@ -3822,7 +4032,9 @@
|
|
3822
4032
|
</xsl:choose>
|
3823
4033
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3824
4034
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3825
|
-
<xsl:
|
4035
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
4036
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4037
|
+
</fo:inline>
|
3826
4038
|
<xsl:apply-templates/>
|
3827
4039
|
</fo:block>
|
3828
4040
|
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
|
@@ -3991,21 +4203,61 @@
|
|
3991
4203
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3992
4204
|
<xsl:text> </xsl:text>
|
3993
4205
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3994
|
-
|
3995
|
-
|
3996
|
-
|
3997
|
-
|
3998
|
-
|
4206
|
+
|
4207
|
+
<fo:block-container margin-left="0mm">
|
4208
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4209
|
+
<xsl:attribute name="margin-left">
|
4210
|
+
<xsl:choose>
|
4211
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4212
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4213
|
+
</xsl:choose>
|
4214
|
+
</xsl:attribute>
|
4215
|
+
|
4216
|
+
</xsl:if>
|
4217
|
+
<fo:block-container margin-left="0mm">
|
4218
|
+
|
4219
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
4220
|
+
<xsl:variable name="_font-size">
|
4221
|
+
|
4222
|
+
|
4223
|
+
|
4224
|
+
|
4225
|
+
|
4226
|
+
9
|
4227
|
+
|
4228
|
+
|
4229
|
+
|
4230
|
+
|
4231
|
+
|
4232
|
+
|
4233
|
+
|
4234
|
+
|
4235
|
+
</xsl:variable>
|
4236
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
4237
|
+
<xsl:if test="$font-size != ''">
|
4238
|
+
<xsl:attribute name="font-size">
|
4239
|
+
<xsl:choose>
|
4240
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4241
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4242
|
+
</xsl:choose>
|
4243
|
+
</xsl:attribute>
|
4244
|
+
</xsl:if>
|
4245
|
+
<xsl:apply-templates/>
|
4246
|
+
</fo:block>
|
4247
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4248
|
+
|
4249
|
+
</fo:block-container>
|
4250
|
+
</fo:block-container>
|
4251
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
3999
4252
|
<xsl:variable name="text">
|
4000
4253
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
4001
4254
|
</xsl:variable>
|
4002
|
-
<xsl:call-template name="add-zero-spaces">
|
4255
|
+
<xsl:call-template name="add-zero-spaces-java">
|
4003
4256
|
<xsl:with-param name="text" select="$text"/>
|
4004
4257
|
</xsl:call-template>
|
4005
4258
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
4006
4259
|
<xsl:if test="normalize-space() != ''">
|
4007
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4008
|
-
|
4260
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4009
4261
|
<xsl:apply-templates/>
|
4010
4262
|
</fo:block>
|
4011
4263
|
</xsl:if>
|
@@ -4073,6 +4325,145 @@
|
|
4073
4325
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
4074
4326
|
<xsl:apply-templates/>
|
4075
4327
|
</fo:block>
|
4328
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4329
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
4330
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4331
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
4332
|
+
</xsl:if>
|
4333
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
4334
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
4335
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4336
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
4337
|
+
</xsl:if>
|
4338
|
+
<xsl:variable name="simple-table">
|
4339
|
+
<xsl:call-template name="getSimpleTable"/>
|
4340
|
+
</xsl:variable>
|
4341
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
4342
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
4343
|
+
<!-- <fo:table-column column-width="35mm"/>
|
4344
|
+
<fo:table-column column-width="115mm"/> -->
|
4345
|
+
<fo:table-column column-width="30%"/>
|
4346
|
+
<fo:table-column column-width="70%"/>
|
4347
|
+
</xsl:if>
|
4348
|
+
<xsl:apply-templates mode="requirement"/>
|
4349
|
+
</fo:table>
|
4350
|
+
<!-- fn processing -->
|
4351
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
4352
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
4353
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
4354
|
+
<xsl:call-template name="fn_display"/>
|
4355
|
+
</fo:block>
|
4356
|
+
</xsl:for-each>
|
4357
|
+
</xsl:if>
|
4358
|
+
</fo:block-container>
|
4359
|
+
</fo:block-container>
|
4360
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
4361
|
+
<fo:table-header>
|
4362
|
+
<xsl:apply-templates mode="requirement"/>
|
4363
|
+
</fo:table-header>
|
4364
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
4365
|
+
<fo:table-body>
|
4366
|
+
<xsl:apply-templates mode="requirement"/>
|
4367
|
+
</fo:table-body>
|
4368
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
4369
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
4370
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
4371
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
4372
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
4373
|
+
</xsl:if>
|
4374
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
4375
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
4376
|
+
</xsl:if>
|
4377
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
4378
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
4379
|
+
</xsl:if>
|
4380
|
+
<xsl:apply-templates mode="requirement"/>
|
4381
|
+
</fo:table-row>
|
4382
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
4383
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
4384
|
+
<xsl:attribute name="text-align">
|
4385
|
+
<xsl:choose>
|
4386
|
+
<xsl:when test="@align">
|
4387
|
+
<xsl:value-of select="@align"/>
|
4388
|
+
</xsl:when>
|
4389
|
+
<xsl:otherwise>left</xsl:otherwise>
|
4390
|
+
</xsl:choose>
|
4391
|
+
</xsl:attribute>
|
4392
|
+
<xsl:if test="@colspan">
|
4393
|
+
<xsl:attribute name="number-columns-spanned">
|
4394
|
+
<xsl:value-of select="@colspan"/>
|
4395
|
+
</xsl:attribute>
|
4396
|
+
</xsl:if>
|
4397
|
+
<xsl:if test="@rowspan">
|
4398
|
+
<xsl:attribute name="number-rows-spanned">
|
4399
|
+
<xsl:value-of select="@rowspan"/>
|
4400
|
+
</xsl:attribute>
|
4401
|
+
</xsl:if>
|
4402
|
+
<xsl:call-template name="display-align"/>
|
4403
|
+
|
4404
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4405
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4406
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
4407
|
+
</xsl:if>
|
4408
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
4409
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4410
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
4411
|
+
</xsl:if> -->
|
4412
|
+
|
4413
|
+
<fo:block>
|
4414
|
+
<xsl:apply-templates/>
|
4415
|
+
</fo:block>
|
4416
|
+
</fo:table-cell>
|
4417
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
4418
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
4419
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4420
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
4421
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
4422
|
+
</xsl:if>
|
4423
|
+
<xsl:attribute name="text-align">
|
4424
|
+
<xsl:choose>
|
4425
|
+
<xsl:when test="@align">
|
4426
|
+
<xsl:value-of select="@align"/>
|
4427
|
+
</xsl:when>
|
4428
|
+
<xsl:otherwise>left</xsl:otherwise>
|
4429
|
+
</xsl:choose>
|
4430
|
+
</xsl:attribute>
|
4431
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
4432
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4433
|
+
</xsl:if>
|
4434
|
+
<xsl:if test="@colspan">
|
4435
|
+
<xsl:attribute name="number-columns-spanned">
|
4436
|
+
<xsl:value-of select="@colspan"/>
|
4437
|
+
</xsl:attribute>
|
4438
|
+
</xsl:if>
|
4439
|
+
<xsl:if test="@rowspan">
|
4440
|
+
<xsl:attribute name="number-rows-spanned">
|
4441
|
+
<xsl:value-of select="@rowspan"/>
|
4442
|
+
</xsl:attribute>
|
4443
|
+
</xsl:if>
|
4444
|
+
<xsl:call-template name="display-align"/>
|
4445
|
+
|
4446
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4447
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
4448
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4449
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
4450
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
4451
|
+
</xsl:if>
|
4452
|
+
</xsl:if> -->
|
4453
|
+
<!-- 2nd line and below -->
|
4454
|
+
|
4455
|
+
<fo:block>
|
4456
|
+
<xsl:apply-templates/>
|
4457
|
+
</fo:block>
|
4458
|
+
</fo:table-cell>
|
4459
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
4460
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
4461
|
+
<xsl:apply-templates/>
|
4462
|
+
</fo:block>
|
4463
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
4464
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
4465
|
+
<xsl:apply-templates/>
|
4466
|
+
</fo:block>
|
4076
4467
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
4077
4468
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
4078
4469
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -4092,12 +4483,13 @@
|
|
4092
4483
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4093
4484
|
|
4094
4485
|
<xsl:variable name="element">
|
4095
|
-
block
|
4486
|
+
block
|
4096
4487
|
|
4488
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
4097
4489
|
</xsl:variable>
|
4098
4490
|
|
4099
4491
|
<xsl:choose>
|
4100
|
-
<xsl:when test="normalize-space($element)
|
4492
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
4101
4493
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
4102
4494
|
<xsl:apply-templates/>
|
4103
4495
|
</fo:block>
|
@@ -4134,25 +4526,44 @@
|
|
4134
4526
|
</xsl:otherwise>
|
4135
4527
|
</xsl:choose>
|
4136
4528
|
|
4137
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
4138
|
-
|
4529
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
4530
|
+
|
4531
|
+
<xsl:variable name="element">
|
4532
|
+
block
|
4139
4533
|
|
4140
|
-
|
4141
|
-
|
4534
|
+
</xsl:variable>
|
4535
|
+
<xsl:choose>
|
4536
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
4537
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
4538
|
+
|
4539
|
+
<xsl:apply-templates/>
|
4540
|
+
</fo:block>
|
4541
|
+
</xsl:when>
|
4542
|
+
<xsl:otherwise>
|
4543
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
4544
|
+
<xsl:apply-templates/>
|
4545
|
+
</fo:inline>
|
4546
|
+
</xsl:otherwise>
|
4547
|
+
</xsl:choose>
|
4142
4548
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4143
4549
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4144
4550
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4145
4551
|
<xsl:variable name="termsource_text">
|
4146
4552
|
<xsl:apply-templates/>
|
4147
4553
|
</xsl:variable>
|
4554
|
+
|
4148
4555
|
<xsl:choose>
|
4149
4556
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4150
4557
|
<xsl:apply-templates/>
|
4151
4558
|
</xsl:when>
|
4152
|
-
<xsl:otherwise>
|
4153
|
-
|
4154
|
-
|
4155
|
-
|
4559
|
+
<xsl:otherwise>
|
4560
|
+
|
4561
|
+
<xsl:text>[</xsl:text>
|
4562
|
+
|
4563
|
+
<xsl:apply-templates/>
|
4564
|
+
|
4565
|
+
<xsl:text>]</xsl:text>
|
4566
|
+
|
4156
4567
|
</xsl:otherwise>
|
4157
4568
|
</xsl:choose>
|
4158
4569
|
</fo:block>
|
@@ -4163,10 +4574,13 @@
|
|
4163
4574
|
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
4164
4575
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4165
4576
|
|
4166
|
-
<
|
4167
|
-
|
4168
|
-
|
4169
|
-
|
4577
|
+
<fo:inline>
|
4578
|
+
|
4579
|
+
<xsl:call-template name="getTitle">
|
4580
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
4581
|
+
</xsl:call-template>
|
4582
|
+
<xsl:text>: </xsl:text>
|
4583
|
+
</fo:inline>
|
4170
4584
|
|
4171
4585
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4172
4586
|
<xsl:apply-templates/>
|
@@ -4178,18 +4592,29 @@
|
|
4178
4592
|
<xsl:if test="normalize-space() != ''">
|
4179
4593
|
<xsl:value-of select="."/>
|
4180
4594
|
</xsl:if>
|
4181
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
4595
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
4596
|
+
<fo:block-container margin-left="0mm">
|
4597
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4598
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
4599
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
4600
|
+
</xsl:if>
|
4601
|
+
</xsl:if>
|
4602
|
+
|
4603
|
+
<fo:block-container margin-left="0mm">
|
4182
4604
|
|
4183
|
-
|
4184
|
-
|
4185
|
-
|
4186
|
-
|
4187
|
-
|
4188
|
-
|
4189
|
-
|
4190
|
-
|
4191
|
-
|
4192
|
-
|
4605
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
4606
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
4607
|
+
</fo:block>
|
4608
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4609
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
4610
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
4611
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
4612
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
4613
|
+
</fo:block>
|
4614
|
+
</xsl:if>
|
4615
|
+
|
4616
|
+
</fo:block-container>
|
4617
|
+
</fo:block-container>
|
4193
4618
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
4194
4619
|
<xsl:if test="../*[local-name() = 'author']">
|
4195
4620
|
<xsl:text>, </xsl:text>
|
@@ -4217,6 +4642,7 @@
|
|
4217
4642
|
<xsl:if test="@type = 'inline'">
|
4218
4643
|
|
4219
4644
|
|
4645
|
+
|
4220
4646
|
</xsl:if>
|
4221
4647
|
|
4222
4648
|
|
@@ -4254,6 +4680,7 @@
|
|
4254
4680
|
|
4255
4681
|
|
4256
4682
|
|
4683
|
+
|
4257
4684
|
</xsl:variable>
|
4258
4685
|
|
4259
4686
|
<xsl:variable name="padding-right">
|
@@ -4355,7 +4782,7 @@
|
|
4355
4782
|
<fo:block id="{@id}">
|
4356
4783
|
<xsl:apply-templates/>
|
4357
4784
|
</fo:block>
|
4358
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@
|
4785
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
4359
4786
|
|
4360
4787
|
<fo:block id="{@id}">
|
4361
4788
|
<xsl:apply-templates/>
|
@@ -4373,6 +4800,21 @@
|
|
4373
4800
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
4374
4801
|
<!-- 0xA0 to space replacement -->
|
4375
4802
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4803
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4804
|
+
<fo:block-container margin-left="0mm">
|
4805
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4806
|
+
<xsl:attribute name="margin-left">
|
4807
|
+
<xsl:choose>
|
4808
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4809
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4810
|
+
</xsl:choose>
|
4811
|
+
</xsl:attribute>
|
4812
|
+
|
4813
|
+
</xsl:if>
|
4814
|
+
<fo:block-container margin-left="0mm">
|
4815
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4816
|
+
</fo:block-container>
|
4817
|
+
</fo:block-container>
|
4376
4818
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4377
4819
|
<!-- <row>
|
4378
4820
|
<date>05-07-2013</date>
|
@@ -4404,6 +4846,65 @@
|
|
4404
4846
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
4405
4847
|
<fo:block><xsl:apply-templates/></fo:block>
|
4406
4848
|
</fo:table-cell>
|
4849
|
+
</xsl:template><xsl:template name="processBibitem">
|
4850
|
+
|
4851
|
+
|
4852
|
+
|
4853
|
+
|
4854
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4855
|
+
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
4856
|
+
<xsl:choose>
|
4857
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4858
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
4859
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4860
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4861
|
+
</xsl:if>
|
4862
|
+
<xsl:value-of select="$_doc_ident"/>
|
4863
|
+
</xsl:when>
|
4864
|
+
<xsl:otherwise>
|
4865
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4866
|
+
<xsl:if test="$type != ''">
|
4867
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4868
|
+
</xsl:if>
|
4869
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4870
|
+
</xsl:otherwise>
|
4871
|
+
</xsl:choose>
|
4872
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
4873
|
+
<xsl:choose>
|
4874
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
4875
|
+
<author>
|
4876
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4877
|
+
</author>
|
4878
|
+
</xsl:when>
|
4879
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
4880
|
+
<author>
|
4881
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4882
|
+
<xsl:text> </xsl:text>
|
4883
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
4884
|
+
</author>
|
4885
|
+
</xsl:when>
|
4886
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
4887
|
+
<author>
|
4888
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4889
|
+
<xsl:text> </xsl:text>
|
4890
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
4891
|
+
</author>
|
4892
|
+
</xsl:when>
|
4893
|
+
<xsl:otherwise>
|
4894
|
+
<xsl:apply-templates/>
|
4895
|
+
</xsl:otherwise>
|
4896
|
+
</xsl:choose>
|
4897
|
+
</xsl:template><xsl:template name="renderDate">
|
4898
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
4899
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
4900
|
+
</xsl:if>
|
4901
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
4902
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
4903
|
+
</xsl:if>
|
4904
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
4905
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
4906
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4907
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
4407
4908
|
</xsl:template><xsl:template name="convertDate">
|
4408
4909
|
<xsl:param name="date"/>
|
4409
4910
|
<xsl:param name="format" select="'short'"/>
|
@@ -4609,7 +5110,8 @@
|
|
4609
5110
|
|
4610
5111
|
|
4611
5112
|
|
4612
|
-
|
5113
|
+
|
5114
|
+
|
4613
5115
|
</xsl:variable>
|
4614
5116
|
<xsl:if test="$documentNS != $XSLNS">
|
4615
5117
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|