metanorma-iso 1.5.5 → 1.5.10
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/lib/asciidoctor/iso/basicdoc.rng +23 -0
- data/lib/asciidoctor/iso/front.rb +9 -15
- data/lib/asciidoctor/iso/isodoc.rng +121 -15
- data/lib/asciidoctor/iso/isostandard.rng +8 -1
- data/lib/asciidoctor/iso/section.rb +0 -7
- data/lib/isodoc/iso/html/isodoc.css +16 -4
- data/lib/isodoc/iso/html/isodoc.scss +18 -4
- data/lib/isodoc/iso/html/style-human.css +1 -1
- data/lib/isodoc/iso/html/style-iso.css +1 -1
- data/lib/isodoc/iso/iso.amendment.xsl +982 -291
- data/lib/isodoc/iso/iso.international-standard.xsl +982 -291
- data/lib/isodoc/iso/isosts_convert.rb +31 -0
- data/lib/isodoc/iso/xref.rb +7 -11
- data/lib/metanorma-iso.rb +1 -0
- data/lib/metanorma/iso/processor.rb +4 -1
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +2 -2
- data/spec/asciidoctor-iso/amd_spec.rb +7 -39
- data/spec/asciidoctor-iso/base_spec.rb +122 -6
- data/spec/asciidoctor-iso/cleanup_spec.rb +30 -30
- data/spec/asciidoctor-iso/table_spec.rb +111 -111
- data/spec/asciidoctor-iso/validate_spec.rb +35 -15
- data/spec/assets/xref_error.adoc +7 -0
- data/spec/isodoc/amd_spec.rb +32 -23
- data/spec/isodoc/blocks_spec.rb +1 -1
- data/spec/isodoc/i18n_spec.rb +17 -4
- data/spec/isodoc/inline_spec.rb +1 -1
- data/spec/isodoc/iso_spec.rb +5 -5
- data/spec/isodoc/metadata_spec.rb +2 -16
- data/spec/isodoc/postproc_spec.rb +4 -1
- data/spec/isodoc/ref_spec.rb +5 -2
- data/spec/isodoc/section_spec.rb +2 -2
- data/spec/isodoc/table_spec.rb +1 -1
- data/spec/isodoc/terms_spec.rb +1 -1
- data/spec/isodoc/xref_spec.rb +11 -11
- data/spec/metanorma/processor_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -1
- metadata +8 -6
@@ -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'], '('), ')')"/>
|
@@ -293,6 +295,10 @@
|
|
293
295
|
|
294
296
|
<xsl:call-template name="addPDFUAmeta"/>
|
295
297
|
|
298
|
+
<xsl:call-template name="addBookmarks">
|
299
|
+
<xsl:with-param name="contents" select="$contents"/>
|
300
|
+
</xsl:call-template>
|
301
|
+
|
296
302
|
<!-- cover page -->
|
297
303
|
<xsl:choose>
|
298
304
|
<xsl:when test="$stage-abbreviation != ''">
|
@@ -396,10 +402,18 @@
|
|
396
402
|
<fo:flow flow-name="xsl-region-body">
|
397
403
|
<fo:block-container>
|
398
404
|
<fo:block margin-top="-1mm" font-size="20pt" text-align="right">
|
399
|
-
<xsl:value-of select="$stage-fullname-uppercased"/>
|
405
|
+
<xsl:value-of select="$stage-fullname-uppercased"/>
|
406
|
+
<!-- <xsl:if test="$doctype = 'amendment'">
|
407
|
+
<xsl:variable name="title-amendment">
|
408
|
+
<xsl:call-template name="getTitle">
|
409
|
+
<xsl:with-param name="name" select="'title-amendment'"/>
|
410
|
+
</xsl:call-template>
|
411
|
+
</xsl:variable>
|
412
|
+
<xsl:text> </xsl:text><xsl:value-of select="$title-amendment"/>
|
413
|
+
</xsl:if> -->
|
400
414
|
</fo:block>
|
401
415
|
<fo:block font-size="20pt" font-weight="bold" text-align="right">
|
402
|
-
<xsl:value-of select="
|
416
|
+
<xsl:value-of select="$docidentifierISO"/>
|
403
417
|
</fo:block>
|
404
418
|
|
405
419
|
|
@@ -471,16 +485,13 @@
|
|
471
485
|
|
472
486
|
<xsl:call-template name="printTitlePartEn"/>
|
473
487
|
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
<
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
</xsl:if>
|
482
|
-
<xsl:value-of select="$title-part"/>
|
483
|
-
</xsl:if> -->
|
488
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
|
489
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
490
|
+
<fo:block margin-top="12pt">
|
491
|
+
<xsl:call-template name="printAmendmentTitle"/>
|
492
|
+
</fo:block>
|
493
|
+
</xsl:if>
|
494
|
+
|
484
495
|
</fo:block>
|
485
496
|
|
486
497
|
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
@@ -495,6 +506,15 @@
|
|
495
506
|
|
496
507
|
<xsl:call-template name="printTitlePartFr"/>
|
497
508
|
|
509
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-amd']"/>
|
510
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
511
|
+
<fo:block margin-top="6pt">
|
512
|
+
<xsl:call-template name="printAmendmentTitle">
|
513
|
+
<xsl:with-param name="lang" select="'fr'"/>
|
514
|
+
</xsl:call-template>
|
515
|
+
</fo:block>
|
516
|
+
</xsl:if>
|
517
|
+
|
498
518
|
</fo:block>
|
499
519
|
</fo:block>
|
500
520
|
<fo:block margin-top="10mm">
|
@@ -539,36 +559,69 @@
|
|
539
559
|
</fo:table-cell>
|
540
560
|
<fo:table-cell>
|
541
561
|
<fo:block text-align="left">
|
542
|
-
<xsl:
|
562
|
+
<xsl:choose>
|
563
|
+
<xsl:when test="$doctype = 'amendment'">
|
564
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(translate(/iso:iso-standard/iso:bibdata/iso:ext/iso:updates-document-type,'-',' ')))"/>
|
565
|
+
</xsl:when>
|
566
|
+
<xsl:otherwise>
|
567
|
+
<xsl:value-of select="$doctype_uppercased"/>
|
568
|
+
</xsl:otherwise>
|
569
|
+
</xsl:choose>
|
543
570
|
</fo:block>
|
544
571
|
</fo:table-cell>
|
545
572
|
<fo:table-cell>
|
546
573
|
<fo:block text-align="right" font-weight="bold" margin-bottom="13mm">
|
547
|
-
<xsl:value-of select="
|
574
|
+
<xsl:value-of select="$docidentifierISO"/>
|
548
575
|
</fo:block>
|
549
576
|
</fo:table-cell>
|
550
577
|
</fo:table-row>
|
551
578
|
<fo:table-row height="42mm">
|
552
579
|
<fo:table-cell number-columns-spanned="3" font-size="10pt" line-height="1.2">
|
553
580
|
<fo:block text-align="right">
|
554
|
-
<xsl:if test="$stage-abbreviation = 'PRF' or $stage-abbreviation = 'IS' or $stage-abbreviation = 'published'">
|
581
|
+
<xsl:if test="$stage-abbreviation = 'PRF' or $stage-abbreviation = 'IS' or $stage-abbreviation = 'D' or $stage-abbreviation = 'published'">
|
555
582
|
<xsl:call-template name="printEdition"/>
|
556
583
|
</xsl:if>
|
557
584
|
<xsl:choose>
|
558
|
-
<xsl:when test="$stage-abbreviation = 'IS'">
|
585
|
+
<xsl:when test="$stage-abbreviation = 'IS' and /iso:iso-standard/iso:bibdata/iso:date[@type = 'published']">
|
559
586
|
<xsl:value-of select="$linebreak"/>
|
560
587
|
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'published']"/>
|
561
588
|
</xsl:when>
|
562
|
-
<xsl:when test="$stage-abbreviation = '
|
589
|
+
<xsl:when test="($stage-abbreviation = 'IS' or $stage-abbreviation = 'D') and /iso:iso-standard/iso:bibdata/iso:date[@type = 'created']">
|
590
|
+
<xsl:value-of select="$linebreak"/>
|
591
|
+
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'created']"/>
|
592
|
+
</xsl:when>
|
593
|
+
<xsl:when test="$stage-abbreviation = 'IS' or $stage-abbreviation = 'published'">
|
563
594
|
<xsl:value-of select="$linebreak"/>
|
564
595
|
<xsl:value-of select="substring(/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date,1, 7)"/>
|
565
596
|
</xsl:when>
|
566
597
|
</xsl:choose>
|
567
|
-
|
568
|
-
|
598
|
+
</fo:block>
|
599
|
+
<!-- <xsl:value-of select="$linebreak"/>
|
600
|
+
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date"/> -->
|
601
|
+
<xsl:if test="$doctype = 'amendment'">
|
602
|
+
<fo:block text-align="right" margin-right="0.5mm">
|
603
|
+
<fo:block font-weight="bold" margin-top="4pt">
|
604
|
+
<xsl:variable name="title-amendment">
|
605
|
+
<xsl:call-template name="getTitle">
|
606
|
+
<xsl:with-param name="name" select="'title-amendment'"/>
|
607
|
+
</xsl:call-template>
|
608
|
+
</xsl:variable>
|
609
|
+
<xsl:value-of select="$title-amendment"/><xsl:text> </xsl:text>
|
610
|
+
<xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
|
611
|
+
<xsl:if test="normalize-space($amendment-number) != ''">
|
612
|
+
<xsl:value-of select="$amendment-number"/><xsl:text> </xsl:text>
|
613
|
+
</xsl:if>
|
614
|
+
</fo:block>
|
615
|
+
<fo:block>
|
616
|
+
<xsl:if test="/iso:iso-standard/iso:bibdata/iso:date[@type = 'updated']">
|
617
|
+
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'updated']"/>
|
618
|
+
</xsl:if>
|
619
|
+
</fo:block>
|
569
620
|
</fo:block>
|
621
|
+
</xsl:if>
|
570
622
|
</fo:table-cell>
|
571
623
|
</fo:table-row>
|
624
|
+
|
572
625
|
</fo:table-body>
|
573
626
|
</fo:table>
|
574
627
|
|
@@ -637,6 +690,12 @@
|
|
637
690
|
</xsl:if>
|
638
691
|
<xsl:value-of select="$title-part"/>
|
639
692
|
</xsl:if> -->
|
693
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
|
694
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
695
|
+
<fo:block margin-right="-5mm" margin-top="12pt">
|
696
|
+
<xsl:call-template name="printAmendmentTitle"/>
|
697
|
+
</fo:block>
|
698
|
+
</xsl:if>
|
640
699
|
</fo:block>
|
641
700
|
|
642
701
|
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
@@ -651,6 +710,15 @@
|
|
651
710
|
|
652
711
|
<xsl:call-template name="printTitlePartFr"/>
|
653
712
|
|
713
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-amd']"/>
|
714
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
715
|
+
<fo:block margin-right="-5mm" margin-top="6pt">
|
716
|
+
<xsl:call-template name="printAmendmentTitle">
|
717
|
+
<xsl:with-param name="lang" select="'fr'"/>
|
718
|
+
</xsl:call-template>
|
719
|
+
</fo:block>
|
720
|
+
</xsl:if>
|
721
|
+
|
654
722
|
</fo:block>
|
655
723
|
</fo:block>
|
656
724
|
</fo:block-container>
|
@@ -714,7 +782,7 @@
|
|
714
782
|
</fo:table-cell>
|
715
783
|
<fo:table-cell>
|
716
784
|
<fo:block text-align="right" font-weight="bold" margin-bottom="13mm">
|
717
|
-
<xsl:value-of select="
|
785
|
+
<xsl:value-of select="$docidentifierISO"/>
|
718
786
|
</fo:block>
|
719
787
|
</fo:table-cell>
|
720
788
|
</fo:table-row>
|
@@ -891,7 +959,7 @@
|
|
891
959
|
</fo:block-container>
|
892
960
|
<fo:block font-size="11pt" margin-bottom="8pt"><xsl:value-of select="$linebreak"/></fo:block>
|
893
961
|
<fo:block-container font-size="40pt" text-align="center" margin-bottom="12pt" border="0.5pt solid black">
|
894
|
-
<xsl:variable name="stage-title" select="substring-after(substring-before(
|
962
|
+
<xsl:variable name="stage-title" select="substring-after(substring-before($docidentifierISO, ' '), '/')"/>
|
895
963
|
<fo:block padding-top="2mm"><xsl:value-of select="$stage-title"/><xsl:text> stage</xsl:text></fo:block>
|
896
964
|
</fo:block-container>
|
897
965
|
<fo:block><xsl:value-of select="$linebreak"/></fo:block>
|
@@ -964,7 +1032,7 @@
|
|
964
1032
|
</xsl:if>
|
965
1033
|
|
966
1034
|
<xsl:variable name="margin-left">12</xsl:variable>
|
967
|
-
<xsl:for-each select="xalan:nodeset($contents)//item
|
1035
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
968
1036
|
|
969
1037
|
<fo:block>
|
970
1038
|
<xsl:if test="@level = 1">
|
@@ -994,9 +1062,9 @@
|
|
994
1062
|
</fo:list-item-label>
|
995
1063
|
<fo:list-item-body start-indent="body-start()">
|
996
1064
|
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
997
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
1065
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
998
1066
|
|
999
|
-
<xsl:apply-templates/>
|
1067
|
+
<xsl:apply-templates select="title"/>
|
1000
1068
|
|
1001
1069
|
<fo:inline keep-together.within-line="always">
|
1002
1070
|
<fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
|
@@ -1065,19 +1133,8 @@
|
|
1065
1133
|
|
1066
1134
|
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
|
1067
1135
|
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
1068
|
-
<fo:block
|
1069
|
-
<xsl:
|
1070
|
-
<xsl:call-template name="getTitle">
|
1071
|
-
<xsl:with-param name="name" select="'title-amendment'"/>
|
1072
|
-
</xsl:call-template>
|
1073
|
-
</xsl:variable>
|
1074
|
-
<xsl:value-of select="$title-amendment"/>
|
1075
|
-
<xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
|
1076
|
-
<xsl:if test="normalize-space($amendment-number) != ''">
|
1077
|
-
<xsl:text> </xsl:text><xsl:value-of select="$amendment-number"/>
|
1078
|
-
</xsl:if>
|
1079
|
-
<xsl:text>: </xsl:text>
|
1080
|
-
<xsl:value-of select="$title-amd"/>
|
1136
|
+
<fo:block margin-top="12pt">
|
1137
|
+
<xsl:call-template name="printAmendmentTitle"/>
|
1081
1138
|
</fo:block>
|
1082
1139
|
</xsl:if>
|
1083
1140
|
|
@@ -1172,6 +1229,27 @@
|
|
1172
1229
|
<xsl:apply-templates/>
|
1173
1230
|
</xsl:template>
|
1174
1231
|
|
1232
|
+
<xsl:template name="printAmendmentTitle">
|
1233
|
+
<xsl:param name="lang" select="'en'"/>
|
1234
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']"/>
|
1235
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
1236
|
+
<fo:block font-weight="normal" line-height="1.1">
|
1237
|
+
<xsl:variable name="title-amendment">
|
1238
|
+
<xsl:call-template name="getTitle">
|
1239
|
+
<xsl:with-param name="name" select="'title-amendment'"/>
|
1240
|
+
</xsl:call-template>
|
1241
|
+
</xsl:variable>
|
1242
|
+
<xsl:value-of select="$title-amendment"/>
|
1243
|
+
<xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
|
1244
|
+
<xsl:if test="normalize-space($amendment-number) != ''">
|
1245
|
+
<xsl:text> </xsl:text><xsl:value-of select="$amendment-number"/>
|
1246
|
+
</xsl:if>
|
1247
|
+
<xsl:text>: </xsl:text>
|
1248
|
+
<xsl:value-of select="$title-amd"/>
|
1249
|
+
</fo:block>
|
1250
|
+
</xsl:if>
|
1251
|
+
</xsl:template>
|
1252
|
+
|
1175
1253
|
<!-- ============================= -->
|
1176
1254
|
<!-- CONTENTS -->
|
1177
1255
|
<!-- ============================= -->
|
@@ -1196,9 +1274,7 @@
|
|
1196
1274
|
</xsl:variable>
|
1197
1275
|
|
1198
1276
|
<xsl:variable name="display">
|
1199
|
-
<xsl:choose>
|
1200
|
-
<xsl:when test="ancestor-or-self::iso:bibitem">false</xsl:when>
|
1201
|
-
<xsl:when test="ancestor-or-self::iso:term">false</xsl:when>
|
1277
|
+
<xsl:choose>
|
1202
1278
|
<xsl:when test="ancestor-or-self::iso:annex and $level >= 2">false</xsl:when>
|
1203
1279
|
<xsl:when test="$section = '' and $type = 'clause'">false</xsl:when>
|
1204
1280
|
<xsl:when test="$level <= 3">true</xsl:when>
|
@@ -1206,8 +1282,16 @@
|
|
1206
1282
|
</xsl:choose>
|
1207
1283
|
</xsl:variable>
|
1208
1284
|
|
1285
|
+
<xsl:variable name="skip">
|
1286
|
+
<xsl:choose>
|
1287
|
+
<xsl:when test="ancestor-or-self::iso:bibitem">true</xsl:when>
|
1288
|
+
<xsl:when test="ancestor-or-self::iso:term">true</xsl:when>
|
1289
|
+
<xsl:otherwise>false</xsl:otherwise>
|
1290
|
+
</xsl:choose>
|
1291
|
+
</xsl:variable>
|
1292
|
+
|
1209
1293
|
|
1210
|
-
<xsl:if test="$
|
1294
|
+
<xsl:if test="$skip = 'false'">
|
1211
1295
|
|
1212
1296
|
<xsl:variable name="title">
|
1213
1297
|
<xsl:call-template name="getName"/>
|
@@ -1218,12 +1302,13 @@
|
|
1218
1302
|
<xsl:if test="ancestor-or-self::iso:annex">annex</xsl:if>
|
1219
1303
|
</xsl:variable>
|
1220
1304
|
|
1221
|
-
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}">
|
1222
|
-
<
|
1305
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
|
1306
|
+
<title>
|
1307
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
1308
|
+
</title>
|
1309
|
+
<xsl:apply-templates mode="contents"/>
|
1223
1310
|
</item>
|
1224
|
-
|
1225
|
-
</xsl:if>
|
1226
|
-
|
1311
|
+
</xsl:if>
|
1227
1312
|
</xsl:template>
|
1228
1313
|
|
1229
1314
|
|
@@ -1446,7 +1531,7 @@
|
|
1446
1531
|
</xsl:element>
|
1447
1532
|
<xsl:if test="$element-name = 'fo:inline' and not($inline = 'true') and not(local-name(..) = 'admonition')">
|
1448
1533
|
<fo:block margin-bottom="12pt">
|
1449
|
-
<xsl:if test="ancestor::iso:annex">
|
1534
|
+
<xsl:if test="ancestor::iso:annex or following-sibling::iso:table">
|
1450
1535
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
1451
1536
|
</xsl:if>
|
1452
1537
|
<xsl:value-of select="$linebreak"/>
|
@@ -1579,7 +1664,7 @@
|
|
1579
1664
|
|
1580
1665
|
|
1581
1666
|
|
1582
|
-
<xsl:template match="iso:ul | iso:ol">
|
1667
|
+
<xsl:template match="iso:ul | iso:ol" mode="ul_ol">
|
1583
1668
|
<fo:list-block provisional-distance-between-starts="7mm" margin-top="8pt"> <!-- margin-bottom="8pt" -->
|
1584
1669
|
<xsl:apply-templates/>
|
1585
1670
|
</fo:list-block>
|
@@ -1606,7 +1691,9 @@
|
|
1606
1691
|
</fo:list-item>
|
1607
1692
|
</xsl:template>
|
1608
1693
|
|
1609
|
-
|
1694
|
+
<xsl:template match="iso:note" mode="process">
|
1695
|
+
<xsl:call-template name="note"/>
|
1696
|
+
</xsl:template>
|
1610
1697
|
|
1611
1698
|
<xsl:template match="iso:preferred">
|
1612
1699
|
<fo:block line-height="1.1">
|
@@ -1688,8 +1775,12 @@
|
|
1688
1775
|
|
1689
1776
|
<xsl:template match="mathml:math" priority="2">
|
1690
1777
|
<fo:inline font-family="Cambria Math">
|
1778
|
+
<xsl:variable name="mathml">
|
1779
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
1780
|
+
</xsl:variable>
|
1691
1781
|
<fo:instream-foreign-object fox:alt-text="Math">
|
1692
|
-
<xsl:copy-of select="."/>
|
1782
|
+
<!-- <xsl:copy-of select="."/> -->
|
1783
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
1693
1784
|
</fo:instream-foreign-object>
|
1694
1785
|
</fo:inline>
|
1695
1786
|
</xsl:template>
|
@@ -1979,6 +2070,12 @@
|
|
1979
2070
|
|
1980
2071
|
</title-edition>
|
1981
2072
|
|
2073
|
+
<title-edition lang="fr">
|
2074
|
+
|
2075
|
+
<xsl:text>Édition </xsl:text>
|
2076
|
+
|
2077
|
+
</title-edition>
|
2078
|
+
|
1982
2079
|
|
1983
2080
|
<title-toc lang="en">
|
1984
2081
|
|
@@ -1987,7 +2084,12 @@
|
|
1987
2084
|
|
1988
2085
|
|
1989
2086
|
</title-toc>
|
1990
|
-
<title-toc lang="fr">
|
2087
|
+
<title-toc lang="fr">
|
2088
|
+
|
2089
|
+
<xsl:text>Sommaire</xsl:text>
|
2090
|
+
|
2091
|
+
|
2092
|
+
</title-toc>
|
1991
2093
|
|
1992
2094
|
<title-toc lang="zh">Contents</title-toc>
|
1993
2095
|
|
@@ -2025,7 +2127,12 @@
|
|
2025
2127
|
|
2026
2128
|
|
2027
2129
|
|
2028
|
-
<title-source lang="en">
|
2130
|
+
<title-source lang="en">
|
2131
|
+
|
2132
|
+
<xsl:text>SOURCE</xsl:text>
|
2133
|
+
|
2134
|
+
|
2135
|
+
</title-source>
|
2029
2136
|
|
2030
2137
|
<title-keywords lang="en">Keywords</title-keywords>
|
2031
2138
|
|
@@ -2068,12 +2175,25 @@
|
|
2068
2175
|
<title-warning lang="zh">警告</title-warning>
|
2069
2176
|
|
2070
2177
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
2178
|
+
|
2179
|
+
<title-continued lang="en">(continued)</title-continued>
|
2180
|
+
<title-continued lang="fr">(continué)</title-continued>
|
2181
|
+
|
2071
2182
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
2072
2183
|
<xsl:param name="name"/>
|
2073
|
-
<xsl:
|
2074
|
-
|
2184
|
+
<xsl:param name="lang"/>
|
2185
|
+
<xsl:variable name="lang_">
|
2186
|
+
<xsl:choose>
|
2187
|
+
<xsl:when test="$lang != ''">
|
2188
|
+
<xsl:value-of select="$lang"/>
|
2189
|
+
</xsl:when>
|
2190
|
+
<xsl:otherwise>
|
2191
|
+
<xsl:call-template name="getLang"/>
|
2192
|
+
</xsl:otherwise>
|
2193
|
+
</xsl:choose>
|
2075
2194
|
</xsl:variable>
|
2076
|
-
<xsl:variable name="
|
2195
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
2196
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
2077
2197
|
<xsl:choose>
|
2078
2198
|
<xsl:when test="normalize-space($title_) != ''">
|
2079
2199
|
<xsl:value-of select="$title_"/>
|
@@ -2082,18 +2202,20 @@
|
|
2082
2202
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
2083
2203
|
</xsl:otherwise>
|
2084
2204
|
</xsl:choose>
|
2085
|
-
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="
|
2205
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
2206
|
+
|
2207
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
2086
2208
|
|
2087
2209
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2088
2210
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2089
2211
|
|
2090
2212
|
|
2213
|
+
|
2091
2214
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
2092
2215
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2093
2216
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
2094
2217
|
|
2095
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2096
|
-
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
2218
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2097
2219
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2098
2220
|
|
2099
2221
|
|
@@ -2103,6 +2225,7 @@
|
|
2103
2225
|
|
2104
2226
|
|
2105
2227
|
|
2228
|
+
|
2106
2229
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
2107
2230
|
|
2108
2231
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -2153,6 +2276,7 @@
|
|
2153
2276
|
|
2154
2277
|
|
2155
2278
|
|
2279
|
+
|
2156
2280
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
2157
2281
|
|
2158
2282
|
|
@@ -2173,6 +2297,7 @@
|
|
2173
2297
|
|
2174
2298
|
|
2175
2299
|
|
2300
|
+
|
2176
2301
|
|
2177
2302
|
|
2178
2303
|
|
@@ -2209,9 +2334,10 @@
|
|
2209
2334
|
|
2210
2335
|
|
2211
2336
|
|
2337
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
2212
2338
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2213
2339
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2214
|
-
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2340
|
+
<!-- <xsl:attribute name="margin-top">12pt</xsl:attribute> -->
|
2215
2341
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2216
2342
|
|
2217
2343
|
|
@@ -2220,6 +2346,7 @@
|
|
2220
2346
|
|
2221
2347
|
|
2222
2348
|
|
2349
|
+
|
2223
2350
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
2224
2351
|
|
2225
2352
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -2242,11 +2369,13 @@
|
|
2242
2369
|
|
2243
2370
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2244
2371
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2245
|
-
|
2372
|
+
|
2373
|
+
|
2246
2374
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
2247
2375
|
|
2248
2376
|
|
2249
2377
|
|
2378
|
+
|
2250
2379
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
2251
2380
|
|
2252
2381
|
|
@@ -2266,20 +2395,20 @@
|
|
2266
2395
|
|
2267
2396
|
|
2268
2397
|
|
2398
|
+
</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">
|
2269
2399
|
|
2270
2400
|
|
2271
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
2272
2401
|
|
2273
2402
|
|
2274
2403
|
|
2275
2404
|
|
2405
|
+
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
2406
|
+
|
2276
2407
|
|
2277
2408
|
|
2278
|
-
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
2279
2409
|
|
2280
2410
|
|
2281
2411
|
|
2282
|
-
|
2283
2412
|
|
2284
2413
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
2285
2414
|
|
@@ -2309,6 +2438,8 @@
|
|
2309
2438
|
|
2310
2439
|
|
2311
2440
|
|
2441
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2442
|
+
|
2312
2443
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2313
2444
|
|
2314
2445
|
|
@@ -2337,6 +2468,7 @@
|
|
2337
2468
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
2338
2469
|
|
2339
2470
|
|
2471
|
+
|
2340
2472
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
2341
2473
|
|
2342
2474
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
@@ -2345,6 +2477,7 @@
|
|
2345
2477
|
|
2346
2478
|
|
2347
2479
|
|
2480
|
+
|
2348
2481
|
|
2349
2482
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2350
2483
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -2388,14 +2521,16 @@
|
|
2388
2521
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
2389
2522
|
|
2390
2523
|
|
2391
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2392
|
-
|
2524
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2525
|
+
|
2393
2526
|
|
2394
2527
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
2395
2528
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
2396
2529
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2397
2530
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2398
2531
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2532
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2533
|
+
|
2399
2534
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
2400
2535
|
|
2401
2536
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -2461,11 +2596,11 @@
|
|
2461
2596
|
|
2462
2597
|
|
2463
2598
|
|
2464
|
-
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2465
2599
|
|
2466
|
-
|
2467
2600
|
|
2468
|
-
|
2601
|
+
<!-- $namespace = 'iso' or -->
|
2602
|
+
|
2603
|
+
|
2469
2604
|
|
2470
2605
|
|
2471
2606
|
|
@@ -2496,6 +2631,7 @@
|
|
2496
2631
|
<xsl:with-param name="table" select="$simple-table"/>
|
2497
2632
|
</xsl:call-template>
|
2498
2633
|
</xsl:variable>
|
2634
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2499
2635
|
|
2500
2636
|
<!-- <xsl:variable name="colwidths2">
|
2501
2637
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2516,40 +2652,65 @@
|
|
2516
2652
|
|
2517
2653
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2518
2654
|
|
2655
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2519
2656
|
|
2520
2657
|
|
2658
|
+
|
2659
|
+
|
2660
|
+
|
2521
2661
|
|
2522
2662
|
|
2663
|
+
|
2523
2664
|
|
2524
2665
|
|
2666
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2525
2667
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2526
2668
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2527
2669
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
2528
2670
|
|
2529
2671
|
|
2530
2672
|
|
2531
|
-
|
2673
|
+
|
2674
|
+
|
2675
|
+
|
2676
|
+
<xsl:variable name="table_attributes">
|
2677
|
+
<attribute name="table-layout">fixed</attribute>
|
2678
|
+
<attribute name="width">100%</attribute>
|
2679
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2680
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2532
2681
|
|
2533
|
-
<
|
2682
|
+
<attribute name="border">1.5pt solid black</attribute>
|
2534
2683
|
<xsl:if test="*[local-name()='thead']">
|
2535
|
-
<
|
2684
|
+
<attribute name="border-top">1pt solid black</attribute>
|
2536
2685
|
</xsl:if>
|
2537
2686
|
|
2538
2687
|
|
2539
2688
|
|
2540
2689
|
|
2541
|
-
<
|
2542
|
-
<
|
2543
|
-
|
2544
|
-
|
2545
|
-
|
2546
|
-
|
2690
|
+
<attribute name="margin-left">0mm</attribute>
|
2691
|
+
<attribute name="margin-right">0mm</attribute>
|
2547
2692
|
|
2693
|
+
|
2694
|
+
|
2695
|
+
|
2548
2696
|
|
2549
|
-
|
2697
|
+
|
2550
2698
|
|
2699
|
+
</xsl:variable>
|
2700
|
+
|
2701
|
+
|
2702
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2551
2703
|
|
2704
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2705
|
+
<xsl:attribute name="{@name}">
|
2706
|
+
<xsl:value-of select="."/>
|
2707
|
+
</xsl:attribute>
|
2708
|
+
</xsl:for-each>
|
2552
2709
|
|
2710
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2711
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2712
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2713
|
+
</xsl:if>
|
2553
2714
|
|
2554
2715
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2555
2716
|
<xsl:choose>
|
@@ -2573,6 +2734,33 @@
|
|
2573
2734
|
|
2574
2735
|
</fo:table>
|
2575
2736
|
|
2737
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2738
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2739
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2740
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2741
|
+
</xsl:call-template>
|
2742
|
+
</xsl:for-each>
|
2743
|
+
|
2744
|
+
<!-- insert footer as table -->
|
2745
|
+
<!-- <fo:table>
|
2746
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
2747
|
+
<xsl:attribute name="{@name}">
|
2748
|
+
<xsl:value-of select="."/>
|
2749
|
+
</xsl:attribute>
|
2750
|
+
</xsl:for-each>
|
2751
|
+
|
2752
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2753
|
+
<xsl:choose>
|
2754
|
+
<xsl:when test=". = 1 or . = 0">
|
2755
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2756
|
+
</xsl:when>
|
2757
|
+
<xsl:otherwise>
|
2758
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2759
|
+
</xsl:otherwise>
|
2760
|
+
</xsl:choose>
|
2761
|
+
</xsl:for-each>
|
2762
|
+
</fo:table>-->
|
2763
|
+
|
2576
2764
|
|
2577
2765
|
|
2578
2766
|
|
@@ -2581,8 +2769,11 @@
|
|
2581
2769
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
2582
2770
|
<xsl:if test="normalize-space() != ''">
|
2583
2771
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2584
|
-
|
2585
|
-
|
2772
|
+
|
2773
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2774
|
+
|
2775
|
+
<xsl:apply-templates/>
|
2776
|
+
</fo:block>
|
2586
2777
|
</xsl:if>
|
2587
2778
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
2588
2779
|
<xsl:param name="table-row"/>
|
@@ -2636,6 +2827,13 @@
|
|
2636
2827
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
2637
2828
|
<xsl:variable name="td_text">
|
2638
2829
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2830
|
+
|
2831
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2832
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
2833
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
2834
|
+
</xsl:for-each>
|
2835
|
+
</xsl:if> -->
|
2836
|
+
|
2639
2837
|
</xsl:variable>
|
2640
2838
|
<xsl:variable name="words">
|
2641
2839
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -2695,31 +2893,35 @@
|
|
2695
2893
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
2696
2894
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
2697
2895
|
<xsl:value-of select="@target"/>
|
2896
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
2897
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
2898
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
2698
2899
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
2699
2900
|
<xsl:param name="cols-count"/>
|
2700
2901
|
<!-- font-weight="bold" -->
|
2701
|
-
<fo:table-header>
|
2702
|
-
|
2703
|
-
<fo:table-row>
|
2704
|
-
<fo:table-cell number-columns-spanned="{$cols-count}"> <!-- border-left="1pt solid white" border-right="1pt solid white" border-top="1pt solid white" -->
|
2705
|
-
<fo:block text-align="center" font-size="11pt" font-weight="bold">
|
2706
|
-
<!-- (continued) -->
|
2707
|
-
<fo:block-container position="absolute" top="-7mm">
|
2708
|
-
<fo:block>
|
2709
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued" retrieve-position-within-table="first-starting" retrieve-boundary-within-table="table-fragment"/>
|
2710
|
-
</fo:block>
|
2711
|
-
</fo:block-container>
|
2902
|
+
<fo:table-header>
|
2712
2903
|
|
2713
|
-
|
2714
|
-
|
2715
|
-
|
2716
|
-
</fo:block> -->
|
2717
|
-
|
2718
|
-
</fo:table-cell>
|
2719
|
-
</fo:table-row>
|
2904
|
+
<xsl:call-template name="table-header-title">
|
2905
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2906
|
+
</xsl:call-template>
|
2720
2907
|
|
2721
2908
|
<xsl:apply-templates/>
|
2722
2909
|
</fo:table-header>
|
2910
|
+
</xsl:template><xsl:template name="table-header-title">
|
2911
|
+
<xsl:param name="cols-count"/>
|
2912
|
+
<!-- row for title -->
|
2913
|
+
<fo:table-row>
|
2914
|
+
<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">
|
2915
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
2916
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
2917
|
+
<xsl:call-template name="fn_name_display"/>
|
2918
|
+
</xsl:for-each>
|
2919
|
+
<fo:block text-align="right" font-style="italic">
|
2920
|
+
<xsl:text> </xsl:text>
|
2921
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
2922
|
+
</fo:block>
|
2923
|
+
</fo:table-cell>
|
2924
|
+
</fo:table-row>
|
2723
2925
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
2724
2926
|
<fo:table-body>
|
2725
2927
|
<xsl:apply-templates/>
|
@@ -2727,6 +2929,13 @@
|
|
2727
2929
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
2728
2930
|
<xsl:apply-templates/>
|
2729
2931
|
</xsl:template><xsl:template name="insertTableFooter">
|
2932
|
+
<xsl:param name="cols-count"/>
|
2933
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
2934
|
+
<fo:table-footer>
|
2935
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
2936
|
+
</fo:table-footer>
|
2937
|
+
</xsl:if>
|
2938
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
2730
2939
|
<xsl:param name="cols-count"/>
|
2731
2940
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2732
2941
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -2750,11 +2959,15 @@
|
|
2750
2959
|
<!-- fn will be processed inside 'note' processing -->
|
2751
2960
|
|
2752
2961
|
|
2753
|
-
|
2962
|
+
|
2963
|
+
<!-- except gb and bipm -->
|
2754
2964
|
|
2755
2965
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2756
2966
|
|
2757
2967
|
|
2968
|
+
|
2969
|
+
|
2970
|
+
|
2758
2971
|
<!-- horizontal row separator -->
|
2759
2972
|
|
2760
2973
|
|
@@ -2768,6 +2981,86 @@
|
|
2768
2981
|
</fo:table-footer>
|
2769
2982
|
|
2770
2983
|
</xsl:if>
|
2984
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2985
|
+
<xsl:param name="table_attributes"/>
|
2986
|
+
<xsl:param name="colwidths"/>
|
2987
|
+
|
2988
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2989
|
+
|
2990
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2991
|
+
|
2992
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
2993
|
+
|
2994
|
+
<fo:table keep-with-previous="always">
|
2995
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2996
|
+
<xsl:choose>
|
2997
|
+
<xsl:when test="@name = 'border-top'">
|
2998
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
2999
|
+
</xsl:when>
|
3000
|
+
<xsl:when test="@name = 'border'">
|
3001
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
3002
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
3003
|
+
</xsl:when>
|
3004
|
+
<xsl:otherwise>
|
3005
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
3006
|
+
</xsl:otherwise>
|
3007
|
+
</xsl:choose>
|
3008
|
+
</xsl:for-each>
|
3009
|
+
|
3010
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
3011
|
+
<xsl:choose>
|
3012
|
+
<xsl:when test=". = 1 or . = 0">
|
3013
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
3014
|
+
</xsl:when>
|
3015
|
+
<xsl:otherwise>
|
3016
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
3017
|
+
</xsl:otherwise>
|
3018
|
+
</xsl:choose>
|
3019
|
+
</xsl:for-each>
|
3020
|
+
|
3021
|
+
<fo:table-body>
|
3022
|
+
<fo:table-row>
|
3023
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
3024
|
+
|
3025
|
+
<xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
|
3026
|
+
|
3027
|
+
|
3028
|
+
|
3029
|
+
<!-- fn will be processed inside 'note' processing -->
|
3030
|
+
|
3031
|
+
|
3032
|
+
|
3033
|
+
<!-- except gb and bipm -->
|
3034
|
+
|
3035
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3036
|
+
|
3037
|
+
|
3038
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3039
|
+
<xsl:choose>
|
3040
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
3041
|
+
show Note under table in preface (ex. abstract) sections
|
3042
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3043
|
+
</xsl:when>
|
3044
|
+
<xsl:otherwise>
|
3045
|
+
empty, because notes show at page side in main sections
|
3046
|
+
<fo:block/>
|
3047
|
+
</xsl:otherwise>
|
3048
|
+
</xsl:choose>
|
3049
|
+
</xsl:if> -->
|
3050
|
+
|
3051
|
+
|
3052
|
+
<!-- horizontal row separator -->
|
3053
|
+
|
3054
|
+
|
3055
|
+
<!-- fn processing -->
|
3056
|
+
<xsl:call-template name="fn_display"/>
|
3057
|
+
|
3058
|
+
</fo:table-cell>
|
3059
|
+
</fo:table-row>
|
3060
|
+
</fo:table-body>
|
3061
|
+
|
3062
|
+
</fo:table>
|
3063
|
+
</xsl:if>
|
2771
3064
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
2772
3065
|
|
2773
3066
|
<xsl:variable name="cols-count">
|
@@ -2785,6 +3078,17 @@
|
|
2785
3078
|
</xsl:choose>
|
2786
3079
|
</xsl:variable>
|
2787
3080
|
|
3081
|
+
|
3082
|
+
<!-- if there isn't 'thead' and there is a table's title -->
|
3083
|
+
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='thead']) and ancestor::*[local-name()='table']/*[local-name()='name']">
|
3084
|
+
<fo:table-header>
|
3085
|
+
<xsl:call-template name="table-header-title">
|
3086
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3087
|
+
</xsl:call-template>
|
3088
|
+
</fo:table-header>
|
3089
|
+
</xsl:if>
|
3090
|
+
|
3091
|
+
|
2788
3092
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
2789
3093
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2790
3094
|
</xsl:apply-templates>
|
@@ -2794,6 +3098,30 @@
|
|
2794
3098
|
</xsl:call-template>
|
2795
3099
|
|
2796
3100
|
<fo:table-body>
|
3101
|
+
|
3102
|
+
<xsl:variable name="title_continued">
|
3103
|
+
<xsl:call-template name="getTitle">
|
3104
|
+
<xsl:with-param name="name" select="'title-continued'"/>
|
3105
|
+
</xsl:call-template>
|
3106
|
+
</xsl:variable>
|
3107
|
+
<fo:table-row height="0" keep-with-next.within-page="always">
|
3108
|
+
<fo:table-cell>
|
3109
|
+
<fo:marker marker-class-name="table_continued"/>
|
3110
|
+
<fo:block/>
|
3111
|
+
</fo:table-cell>
|
3112
|
+
</fo:table-row>
|
3113
|
+
<fo:table-row height="0" keep-with-next.within-page="always">
|
3114
|
+
<fo:table-cell>
|
3115
|
+
<fo:marker marker-class-name="table_continued">
|
3116
|
+
<!-- <fo:inline font-style="italic" font-weight="normal"> -->
|
3117
|
+
<xsl:value-of select="$title_continued"/>
|
3118
|
+
<!-- </fo:inline> -->
|
3119
|
+
</fo:marker>
|
3120
|
+
<fo:block/>
|
3121
|
+
</fo:table-cell>
|
3122
|
+
</fo:table-row>
|
3123
|
+
|
3124
|
+
|
2797
3125
|
<xsl:apply-templates/>
|
2798
3126
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
2799
3127
|
|
@@ -2836,6 +3164,8 @@
|
|
2836
3164
|
</xsl:if>
|
2837
3165
|
|
2838
3166
|
|
3167
|
+
|
3168
|
+
|
2839
3169
|
<xsl:apply-templates/>
|
2840
3170
|
</fo:table-row>
|
2841
3171
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -2859,6 +3189,8 @@
|
|
2859
3189
|
|
2860
3190
|
|
2861
3191
|
|
3192
|
+
|
3193
|
+
|
2862
3194
|
<xsl:if test="@colspan">
|
2863
3195
|
<xsl:attribute name="number-columns-spanned">
|
2864
3196
|
<xsl:value-of select="@colspan"/>
|
@@ -2869,10 +3201,22 @@
|
|
2869
3201
|
<xsl:value-of select="@rowspan"/>
|
2870
3202
|
</xsl:attribute>
|
2871
3203
|
</xsl:if>
|
3204
|
+
<xsl:call-template name="display-align"/>
|
2872
3205
|
<fo:block>
|
2873
3206
|
<xsl:apply-templates/>
|
2874
3207
|
</fo:block>
|
2875
3208
|
</fo:table-cell>
|
3209
|
+
</xsl:template><xsl:template name="display-align">
|
3210
|
+
<xsl:if test="@valign">
|
3211
|
+
<xsl:attribute name="display-align">
|
3212
|
+
<xsl:choose>
|
3213
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
3214
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
3215
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
3216
|
+
<xsl:otherwise>before</xsl:otherwise>
|
3217
|
+
</xsl:choose>
|
3218
|
+
</xsl:attribute>
|
3219
|
+
</xsl:if>
|
2876
3220
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2877
3221
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2878
3222
|
<xsl:attribute name="text-align">
|
@@ -2892,7 +3236,9 @@
|
|
2892
3236
|
<xsl:attribute name="border">solid black 0</xsl:attribute>
|
2893
3237
|
</xsl:if>
|
2894
3238
|
|
2895
|
-
|
3239
|
+
|
3240
|
+
|
3241
|
+
|
2896
3242
|
|
2897
3243
|
|
2898
3244
|
|
@@ -2908,20 +3254,8 @@
|
|
2908
3254
|
<xsl:value-of select="@rowspan"/>
|
2909
3255
|
</xsl:attribute>
|
2910
3256
|
</xsl:if>
|
2911
|
-
<
|
2912
|
-
|
2913
|
-
<xsl:variable name="row_number">
|
2914
|
-
<xsl:number format="1" count="*[local-name() = 'tr'] | *[local-name() = 'th']"/>
|
2915
|
-
</xsl:variable>
|
2916
|
-
<fo:marker marker-class-name="table_continued">
|
2917
|
-
<xsl:if test="$row_number > 1">
|
2918
|
-
<fo:inline>
|
2919
|
-
<xsl:apply-templates select="ancestor::*[local-name() = 'table']/*[local-name() = 'name']" mode="contents"/>
|
2920
|
-
<fo:inline font-style="italic" font-weight="normal">(continued)</fo:inline>
|
2921
|
-
</fo:inline>
|
2922
|
-
</xsl:if>
|
2923
|
-
</fo:marker>
|
2924
|
-
|
3257
|
+
<xsl:call-template name="display-align"/>
|
3258
|
+
<fo:block>
|
2925
3259
|
<xsl:apply-templates/>
|
2926
3260
|
</fo:block>
|
2927
3261
|
</fo:table-cell>
|
@@ -2936,14 +3270,17 @@
|
|
2936
3270
|
|
2937
3271
|
|
2938
3272
|
|
3273
|
+
|
3274
|
+
|
2939
3275
|
<fo:inline padding-right="2mm">
|
2940
3276
|
|
2941
3277
|
|
2942
3278
|
|
2943
|
-
|
3279
|
+
|
2944
3280
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2945
3281
|
|
2946
3282
|
</fo:inline>
|
3283
|
+
|
2947
3284
|
<xsl:apply-templates mode="process"/>
|
2948
3285
|
</fo:block>
|
2949
3286
|
|
@@ -2970,6 +3307,7 @@
|
|
2970
3307
|
|
2971
3308
|
|
2972
3309
|
|
3310
|
+
|
2973
3311
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
2974
3312
|
|
2975
3313
|
|
@@ -2979,12 +3317,15 @@
|
|
2979
3317
|
|
2980
3318
|
|
2981
3319
|
|
3320
|
+
|
2982
3321
|
<xsl:value-of select="@reference"/>
|
2983
3322
|
|
3323
|
+
|
2984
3324
|
</fo:inline>
|
2985
3325
|
<fo:inline>
|
2986
3326
|
|
2987
|
-
<xsl:apply-templates/>
|
3327
|
+
<!-- <xsl:apply-templates /> -->
|
3328
|
+
<xsl:copy-of select="./node()"/>
|
2988
3329
|
</fo:inline>
|
2989
3330
|
</fo:block>
|
2990
3331
|
</xsl:if>
|
@@ -3021,7 +3362,20 @@
|
|
3021
3362
|
<xsl:variable name="following_dl_colwidths">
|
3022
3363
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
3023
3364
|
<xsl:variable name="html-table">
|
3024
|
-
<xsl:variable name="
|
3365
|
+
<xsl:variable name="doc_ns">
|
3366
|
+
|
3367
|
+
</xsl:variable>
|
3368
|
+
<xsl:variable name="ns">
|
3369
|
+
<xsl:choose>
|
3370
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3371
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3372
|
+
</xsl:when>
|
3373
|
+
<xsl:otherwise>
|
3374
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3375
|
+
</xsl:otherwise>
|
3376
|
+
</xsl:choose>
|
3377
|
+
</xsl:variable>
|
3378
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3025
3379
|
<xsl:element name="{$ns}:table">
|
3026
3380
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
3027
3381
|
<tbody>
|
@@ -3086,7 +3440,8 @@
|
|
3086
3440
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3087
3441
|
</xsl:if>
|
3088
3442
|
|
3089
|
-
<xsl:apply-templates/>
|
3443
|
+
<!-- <xsl:apply-templates /> -->
|
3444
|
+
<xsl:copy-of select="./node()"/>
|
3090
3445
|
</fo:block>
|
3091
3446
|
</fo:table-cell>
|
3092
3447
|
</fo:table-row>
|
@@ -3110,9 +3465,13 @@
|
|
3110
3465
|
|
3111
3466
|
|
3112
3467
|
|
3468
|
+
|
3469
|
+
|
3113
3470
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
3114
3471
|
|
3472
|
+
|
3115
3473
|
<xsl:value-of select="@reference"/>
|
3474
|
+
|
3116
3475
|
</fo:basic-link>
|
3117
3476
|
</fo:inline>
|
3118
3477
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -3120,129 +3479,156 @@
|
|
3120
3479
|
<xsl:apply-templates/>
|
3121
3480
|
</fo:inline>
|
3122
3481
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
3123
|
-
<
|
3124
|
-
|
3125
|
-
|
3126
|
-
|
3127
|
-
|
3128
|
-
|
3129
|
-
|
3130
|
-
|
3131
|
-
<xsl:choose>
|
3132
|
-
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
3133
|
-
|
3482
|
+
<fo:block-container margin-left="0mm">
|
3483
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3484
|
+
<xsl:attribute name="margin-left">
|
3485
|
+
<xsl:choose>
|
3486
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3487
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3488
|
+
</xsl:choose>
|
3489
|
+
</xsl:attribute>
|
3134
3490
|
|
3135
|
-
|
3136
|
-
|
3137
|
-
|
3138
|
-
|
3139
|
-
<xsl:variable name="title-where">
|
3140
|
-
<xsl:call-template name="getTitle">
|
3141
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3142
|
-
</xsl:call-template>
|
3143
|
-
</xsl:variable>
|
3144
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3145
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3146
|
-
<xsl:text/>
|
3147
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
3148
|
-
</fo:block>
|
3491
|
+
</xsl:if>
|
3492
|
+
<fo:block-container margin-left="0mm">
|
3493
|
+
|
3494
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
3149
3495
|
|
3150
|
-
|
3151
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
3152
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
3153
|
-
|
3154
|
-
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3155
|
-
|
3156
|
-
|
3496
|
+
<xsl:variable name="key_iso">
|
3157
3497
|
|
3158
|
-
|
3159
|
-
|
3160
|
-
|
3161
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3162
|
-
</xsl:call-template>
|
3163
|
-
</xsl:variable>
|
3164
|
-
<xsl:value-of select="$title-where"/>
|
3165
|
-
</fo:block>
|
3166
|
-
</xsl:when>
|
3167
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
3168
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
3169
|
-
|
3170
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3171
|
-
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3172
|
-
|
3173
|
-
|
3174
|
-
|
3175
|
-
<xsl:variable name="title-key">
|
3176
|
-
<xsl:call-template name="getTitle">
|
3177
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
3178
|
-
</xsl:call-template>
|
3179
|
-
</xsl:variable>
|
3180
|
-
<xsl:value-of select="$title-key"/>
|
3181
|
-
</fo:block>
|
3182
|
-
</xsl:when>
|
3183
|
-
</xsl:choose>
|
3184
|
-
|
3185
|
-
<!-- a few components -->
|
3186
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
3187
|
-
<fo:block>
|
3188
|
-
|
3189
|
-
<xsl:if test="$parent = 'formula'">
|
3190
|
-
<xsl:attribute name="margin-left">4mm</xsl:attribute>
|
3191
|
-
</xsl:if>
|
3192
|
-
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
3193
|
-
|
3194
|
-
|
3195
|
-
|
3498
|
+
<xsl:if test="$parent = 'figure' or $parent = 'formula'">true</xsl:if>
|
3499
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
3500
|
+
</xsl:variable>
|
3196
3501
|
|
3197
|
-
<
|
3198
|
-
|
3199
|
-
|
3200
|
-
|
3201
|
-
|
3202
|
-
<fo:table width="95%" table-layout="fixed">
|
3502
|
+
<xsl:choose>
|
3503
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
3203
3504
|
|
3204
|
-
|
3205
|
-
<
|
3206
|
-
|
3207
|
-
|
3208
|
-
|
3505
|
+
|
3506
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
3507
|
+
|
3508
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3509
|
+
|
3510
|
+
<xsl:variable name="title-where">
|
3511
|
+
<xsl:call-template name="getTitle">
|
3512
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3513
|
+
</xsl:call-template>
|
3514
|
+
</xsl:variable>
|
3515
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3516
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3517
|
+
<xsl:text/>
|
3518
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
3519
|
+
</fo:block>
|
3520
|
+
|
3521
|
+
</xsl:when>
|
3522
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
3523
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
3524
|
+
|
3525
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3526
|
+
|
3527
|
+
|
3528
|
+
|
3529
|
+
|
3530
|
+
<xsl:variable name="title-where">
|
3531
|
+
<xsl:call-template name="getTitle">
|
3532
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3533
|
+
</xsl:call-template>
|
3534
|
+
</xsl:variable>
|
3535
|
+
<xsl:value-of select="$title-where"/>
|
3536
|
+
</fo:block>
|
3537
|
+
</xsl:when>
|
3538
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
3539
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
3540
|
+
|
3209
3541
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3542
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3543
|
+
|
3544
|
+
|
3545
|
+
|
3546
|
+
<xsl:variable name="title-key">
|
3547
|
+
<xsl:call-template name="getTitle">
|
3548
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
3549
|
+
</xsl:call-template>
|
3550
|
+
</xsl:variable>
|
3551
|
+
<xsl:value-of select="$title-key"/>
|
3552
|
+
</fo:block>
|
3553
|
+
</xsl:when>
|
3554
|
+
</xsl:choose>
|
3555
|
+
|
3556
|
+
<!-- a few components -->
|
3557
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
3558
|
+
<fo:block>
|
3559
|
+
|
3560
|
+
<xsl:if test="$parent = 'formula'">
|
3561
|
+
<xsl:attribute name="margin-left">4mm</xsl:attribute>
|
3562
|
+
</xsl:if>
|
3563
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
3564
|
+
|
3565
|
+
|
3566
|
+
|
3567
|
+
|
3568
|
+
<fo:block>
|
3569
|
+
|
3570
|
+
|
3571
|
+
|
3572
|
+
|
3573
|
+
<fo:table width="95%" table-layout="fixed">
|
3210
3574
|
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3214
|
-
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
</
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
3223
|
-
|
3224
|
-
|
3225
|
-
|
3226
|
-
|
3227
|
-
|
3228
|
-
|
3229
|
-
|
3230
|
-
|
3231
|
-
|
3232
|
-
|
3233
|
-
|
3234
|
-
|
3235
|
-
|
3236
|
-
|
3237
|
-
|
3238
|
-
|
3239
|
-
|
3240
|
-
|
3241
|
-
|
3242
|
-
|
3243
|
-
|
3244
|
-
|
3245
|
-
|
3575
|
+
<xsl:choose>
|
3576
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
3577
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
3578
|
+
</xsl:when>
|
3579
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
3580
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3581
|
+
|
3582
|
+
</xsl:when>
|
3583
|
+
</xsl:choose>
|
3584
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
3585
|
+
<xsl:variable name="html-table">
|
3586
|
+
<xsl:variable name="doc_ns">
|
3587
|
+
|
3588
|
+
</xsl:variable>
|
3589
|
+
<xsl:variable name="ns">
|
3590
|
+
<xsl:choose>
|
3591
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3592
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3593
|
+
</xsl:when>
|
3594
|
+
<xsl:otherwise>
|
3595
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3596
|
+
</xsl:otherwise>
|
3597
|
+
</xsl:choose>
|
3598
|
+
</xsl:variable>
|
3599
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3600
|
+
<xsl:element name="{$ns}:table">
|
3601
|
+
<tbody>
|
3602
|
+
<xsl:apply-templates mode="dl"/>
|
3603
|
+
</tbody>
|
3604
|
+
</xsl:element>
|
3605
|
+
</xsl:variable>
|
3606
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
3607
|
+
<xsl:variable name="colwidths">
|
3608
|
+
<xsl:call-template name="calculate-column-widths">
|
3609
|
+
<xsl:with-param name="cols-count" select="2"/>
|
3610
|
+
<xsl:with-param name="table" select="$html-table"/>
|
3611
|
+
</xsl:call-template>
|
3612
|
+
</xsl:variable>
|
3613
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
3614
|
+
<xsl:variable name="maxlength_dt">
|
3615
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
3616
|
+
</xsl:variable>
|
3617
|
+
<xsl:call-template name="setColumnWidth_dl">
|
3618
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
3619
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
3620
|
+
</xsl:call-template>
|
3621
|
+
<fo:table-body>
|
3622
|
+
<xsl:apply-templates>
|
3623
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
3624
|
+
</xsl:apply-templates>
|
3625
|
+
</fo:table-body>
|
3626
|
+
</fo:table>
|
3627
|
+
</fo:block>
|
3628
|
+
</fo:block>
|
3629
|
+
</xsl:if>
|
3630
|
+
</fo:block-container>
|
3631
|
+
</fo:block-container>
|
3246
3632
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
3247
3633
|
<xsl:param name="colwidths"/>
|
3248
3634
|
<xsl:param name="maxlength_dt"/>
|
@@ -3339,6 +3725,7 @@
|
|
3339
3725
|
<xsl:param name="key_iso"/>
|
3340
3726
|
|
3341
3727
|
<fo:table-row>
|
3728
|
+
|
3342
3729
|
<fo:table-cell>
|
3343
3730
|
|
3344
3731
|
<fo:block margin-top="6pt">
|
@@ -3355,6 +3742,7 @@
|
|
3355
3742
|
|
3356
3743
|
|
3357
3744
|
|
3745
|
+
|
3358
3746
|
<xsl:apply-templates/>
|
3359
3747
|
<!-- <xsl:if test="$namespace = 'gb'">
|
3360
3748
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -3420,6 +3808,31 @@
|
|
3420
3808
|
</fo:inline>
|
3421
3809
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
3422
3810
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
3811
|
+
<xsl:variable name="_font-size">
|
3812
|
+
|
3813
|
+
|
3814
|
+
|
3815
|
+
|
3816
|
+
|
3817
|
+
10
|
3818
|
+
|
3819
|
+
|
3820
|
+
|
3821
|
+
|
3822
|
+
|
3823
|
+
|
3824
|
+
|
3825
|
+
|
3826
|
+
</xsl:variable>
|
3827
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3828
|
+
<xsl:if test="$font-size != ''">
|
3829
|
+
<xsl:attribute name="font-size">
|
3830
|
+
<xsl:choose>
|
3831
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3832
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3833
|
+
</xsl:choose>
|
3834
|
+
</xsl:attribute>
|
3835
|
+
</xsl:if>
|
3423
3836
|
<xsl:apply-templates/>
|
3424
3837
|
</fo:inline>
|
3425
3838
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -3745,11 +4158,24 @@
|
|
3745
4158
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3746
4159
|
<xsl:value-of select="substring($str, 2)"/>
|
3747
4160
|
</xsl:template><xsl:template match="mathml:math">
|
3748
|
-
<fo:inline font-family="
|
3749
|
-
<
|
3750
|
-
<xsl:
|
3751
|
-
</
|
4161
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
4162
|
+
<xsl:variable name="mathml">
|
4163
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
4164
|
+
</xsl:variable>
|
4165
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
4166
|
+
<!-- <xsl:copy-of select="."/> -->
|
4167
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
4168
|
+
</fo:instream-foreign-object>
|
3752
4169
|
</fo:inline>
|
4170
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
4171
|
+
<xsl:copy>
|
4172
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
4173
|
+
</xsl:copy>
|
4174
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
4175
|
+
<xsl:copy>
|
4176
|
+
<!-- replace start and end spaces to non-break space -->
|
4177
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
4178
|
+
</xsl:copy>
|
3753
4179
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3754
4180
|
<xsl:variable name="target">
|
3755
4181
|
<xsl:choose>
|
@@ -3826,13 +4252,26 @@
|
|
3826
4252
|
<xsl:apply-templates/>
|
3827
4253
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3828
4254
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3829
|
-
|
4255
|
+
|
3830
4256
|
<xsl:apply-templates/>
|
3831
4257
|
</fo:basic-link>
|
3832
4258
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
3833
|
-
<fo:block
|
3834
|
-
<xsl:
|
3835
|
-
|
4259
|
+
<fo:block-container margin-left="0mm">
|
4260
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4261
|
+
<xsl:attribute name="margin-left">
|
4262
|
+
<xsl:choose>
|
4263
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4264
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4265
|
+
</xsl:choose>
|
4266
|
+
</xsl:attribute>
|
4267
|
+
|
4268
|
+
</xsl:if>
|
4269
|
+
<fo:block-container margin-left="0mm">
|
4270
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
4271
|
+
<xsl:apply-templates/>
|
4272
|
+
</fo:block>
|
4273
|
+
</fo:block-container>
|
4274
|
+
</fo:block-container>
|
3836
4275
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
3837
4276
|
<fo:inline>
|
3838
4277
|
<xsl:apply-templates/>
|
@@ -3892,7 +4331,9 @@
|
|
3892
4331
|
</xsl:choose>
|
3893
4332
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3894
4333
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3895
|
-
<xsl:
|
4334
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
4335
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4336
|
+
</fo:inline>
|
3896
4337
|
<xsl:apply-templates/>
|
3897
4338
|
</fo:block>
|
3898
4339
|
</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">
|
@@ -3989,15 +4430,109 @@
|
|
3989
4430
|
|
3990
4431
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3991
4432
|
</fo:block>
|
3992
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
4433
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
3993
4434
|
<xsl:apply-templates mode="contents"/>
|
3994
4435
|
<xsl:text> </xsl:text>
|
3995
|
-
</xsl:template><xsl:template match="
|
4436
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
4437
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4438
|
+
<xsl:text> </xsl:text>
|
4439
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4440
|
+
<xsl:value-of select="."/>
|
4441
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3996
4442
|
<xsl:value-of select="."/>
|
3997
|
-
</xsl:template><xsl:template match="
|
4443
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
4444
|
+
<xsl:apply-templates mode="contents"/>
|
4445
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4446
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4447
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
4448
|
+
<xsl:apply-templates select="."/>
|
4449
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4450
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4451
|
+
</xsl:template><xsl:template name="addBookmarks">
|
4452
|
+
<xsl:param name="contents"/>
|
4453
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
4454
|
+
<fo:bookmark-tree>
|
4455
|
+
<xsl:choose>
|
4456
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
4457
|
+
<xsl:choose>
|
4458
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
4459
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4460
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
4461
|
+
<fo:bookmark-title>
|
4462
|
+
<xsl:variable name="bookmark-title_">
|
4463
|
+
<xsl:call-template name="getLangVersion">
|
4464
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4465
|
+
</xsl:call-template>
|
4466
|
+
</xsl:variable>
|
4467
|
+
<xsl:choose>
|
4468
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
4469
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
4470
|
+
</xsl:when>
|
4471
|
+
<xsl:otherwise>
|
4472
|
+
<xsl:choose>
|
4473
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
4474
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
4475
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
4476
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
4477
|
+
</xsl:choose>
|
4478
|
+
</xsl:otherwise>
|
4479
|
+
</xsl:choose>
|
4480
|
+
</fo:bookmark-title>
|
4481
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4482
|
+
</fo:bookmark>
|
4483
|
+
|
4484
|
+
</xsl:for-each>
|
4485
|
+
</xsl:when>
|
4486
|
+
<xsl:otherwise>
|
4487
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4488
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4489
|
+
</xsl:for-each>
|
4490
|
+
</xsl:otherwise>
|
4491
|
+
</xsl:choose>
|
4492
|
+
</xsl:when>
|
4493
|
+
<xsl:otherwise>
|
4494
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
4495
|
+
</xsl:otherwise>
|
4496
|
+
</xsl:choose>
|
4497
|
+
|
4498
|
+
|
4499
|
+
|
4500
|
+
|
4501
|
+
|
4502
|
+
|
4503
|
+
|
4504
|
+
|
4505
|
+
</fo:bookmark-tree>
|
4506
|
+
</xsl:if>
|
4507
|
+
</xsl:template><xsl:template name="getLangVersion">
|
4508
|
+
<xsl:param name="lang"/>
|
4509
|
+
<xsl:choose>
|
4510
|
+
<xsl:when test="$lang = 'en'">
|
4511
|
+
|
4512
|
+
|
4513
|
+
</xsl:when>
|
4514
|
+
<xsl:when test="$lang = 'fr'">
|
4515
|
+
|
4516
|
+
|
4517
|
+
</xsl:when>
|
4518
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
4519
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
4520
|
+
</xsl:choose>
|
4521
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
4522
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
4523
|
+
<fo:bookmark-title>
|
4524
|
+
<xsl:if test="@section != ''">
|
4525
|
+
<xsl:value-of select="@section"/>
|
4526
|
+
<xsl:text> </xsl:text>
|
4527
|
+
</xsl:if>
|
4528
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4529
|
+
</fo:bookmark-title>
|
4530
|
+
<xsl:apply-templates mode="bookmark"/>
|
4531
|
+
</fo:bookmark>
|
4532
|
+
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
3998
4533
|
<xsl:if test="normalize-space() != ''">
|
3999
4534
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
4000
|
-
|
4535
|
+
|
4001
4536
|
<xsl:apply-templates/>
|
4002
4537
|
</fo:block>
|
4003
4538
|
</xsl:if>
|
@@ -4052,7 +4587,7 @@
|
|
4052
4587
|
<xsl:apply-templates/>
|
4053
4588
|
</xsl:otherwise>
|
4054
4589
|
</xsl:choose>
|
4055
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
4590
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
4056
4591
|
<xsl:text> </xsl:text>
|
4057
4592
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
4058
4593
|
<xsl:copy>
|
@@ -4061,21 +4596,61 @@
|
|
4061
4596
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4062
4597
|
<xsl:text> </xsl:text>
|
4063
4598
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4064
|
-
|
4065
|
-
|
4066
|
-
|
4067
|
-
|
4068
|
-
|
4599
|
+
|
4600
|
+
<fo:block-container margin-left="0mm">
|
4601
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4602
|
+
<xsl:attribute name="margin-left">
|
4603
|
+
<xsl:choose>
|
4604
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4605
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4606
|
+
</xsl:choose>
|
4607
|
+
</xsl:attribute>
|
4608
|
+
|
4609
|
+
</xsl:if>
|
4610
|
+
<fo:block-container margin-left="0mm">
|
4611
|
+
|
4612
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
4613
|
+
<xsl:variable name="_font-size">
|
4614
|
+
|
4615
|
+
|
4616
|
+
|
4617
|
+
|
4618
|
+
|
4619
|
+
9
|
4620
|
+
|
4621
|
+
|
4622
|
+
|
4623
|
+
|
4624
|
+
|
4625
|
+
|
4626
|
+
|
4627
|
+
|
4628
|
+
</xsl:variable>
|
4629
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
4630
|
+
<xsl:if test="$font-size != ''">
|
4631
|
+
<xsl:attribute name="font-size">
|
4632
|
+
<xsl:choose>
|
4633
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4634
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4635
|
+
</xsl:choose>
|
4636
|
+
</xsl:attribute>
|
4637
|
+
</xsl:if>
|
4638
|
+
<xsl:apply-templates/>
|
4639
|
+
</fo:block>
|
4640
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4641
|
+
|
4642
|
+
</fo:block-container>
|
4643
|
+
</fo:block-container>
|
4644
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
4069
4645
|
<xsl:variable name="text">
|
4070
4646
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
4071
4647
|
</xsl:variable>
|
4072
|
-
<xsl:call-template name="add-zero-spaces">
|
4648
|
+
<xsl:call-template name="add-zero-spaces-java">
|
4073
4649
|
<xsl:with-param name="text" select="$text"/>
|
4074
4650
|
</xsl:call-template>
|
4075
4651
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
4076
4652
|
<xsl:if test="normalize-space() != ''">
|
4077
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4078
|
-
|
4653
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4079
4654
|
<xsl:apply-templates/>
|
4080
4655
|
</fo:block>
|
4081
4656
|
</xsl:if>
|
@@ -4149,9 +4724,9 @@
|
|
4149
4724
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
4150
4725
|
</xsl:if>
|
4151
4726
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
4152
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black"
|
4727
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
4153
4728
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4154
|
-
<xsl:attribute name="border">0.5pt solid black</xsl:attribute>
|
4729
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
4155
4730
|
</xsl:if>
|
4156
4731
|
<xsl:variable name="simple-table">
|
4157
4732
|
<xsl:call-template name="getSimpleTable"/>
|
@@ -4160,8 +4735,8 @@
|
|
4160
4735
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
4161
4736
|
<!-- <fo:table-column column-width="35mm"/>
|
4162
4737
|
<fo:table-column column-width="115mm"/> -->
|
4163
|
-
<fo:table-column column-width="
|
4164
|
-
<fo:table-column column-width="
|
4738
|
+
<fo:table-column column-width="30%"/>
|
4739
|
+
<fo:table-column column-width="70%"/>
|
4165
4740
|
</xsl:if>
|
4166
4741
|
<xsl:apply-templates mode="requirement"/>
|
4167
4742
|
</fo:table>
|
@@ -4184,14 +4759,21 @@
|
|
4184
4759
|
<xsl:apply-templates mode="requirement"/>
|
4185
4760
|
</fo:table-body>
|
4186
4761
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
4187
|
-
<fo:table-row height="7mm">
|
4188
|
-
<xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])
|
4189
|
-
<xsl:attribute name="border">1pt solid black</xsl:attribute>
|
4762
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
4763
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
4764
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
4765
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
4766
|
+
</xsl:if>
|
4767
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
4768
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
4769
|
+
</xsl:if>
|
4770
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
4771
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
4190
4772
|
</xsl:if>
|
4191
4773
|
<xsl:apply-templates mode="requirement"/>
|
4192
4774
|
</fo:table-row>
|
4193
4775
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
4194
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
4776
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
4195
4777
|
<xsl:attribute name="text-align">
|
4196
4778
|
<xsl:choose>
|
4197
4779
|
<xsl:when test="@align">
|
@@ -4210,6 +4792,7 @@
|
|
4210
4792
|
<xsl:value-of select="@rowspan"/>
|
4211
4793
|
</xsl:attribute>
|
4212
4794
|
</xsl:if>
|
4795
|
+
<xsl:call-template name="display-align"/>
|
4213
4796
|
|
4214
4797
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4215
4798
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
@@ -4225,7 +4808,7 @@
|
|
4225
4808
|
</fo:block>
|
4226
4809
|
</fo:table-cell>
|
4227
4810
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
4228
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
4811
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
4229
4812
|
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4230
4813
|
<xsl:attribute name="padding">0mm</xsl:attribute>
|
4231
4814
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -4238,6 +4821,9 @@
|
|
4238
4821
|
<xsl:otherwise>left</xsl:otherwise>
|
4239
4822
|
</xsl:choose>
|
4240
4823
|
</xsl:attribute>
|
4824
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
4825
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4826
|
+
</xsl:if>
|
4241
4827
|
<xsl:if test="@colspan">
|
4242
4828
|
<xsl:attribute name="number-columns-spanned">
|
4243
4829
|
<xsl:value-of select="@colspan"/>
|
@@ -4248,6 +4834,7 @@
|
|
4248
4834
|
<xsl:value-of select="@rowspan"/>
|
4249
4835
|
</xsl:attribute>
|
4250
4836
|
</xsl:if>
|
4837
|
+
<xsl:call-template name="display-align"/>
|
4251
4838
|
|
4252
4839
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4253
4840
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
@@ -4263,7 +4850,7 @@
|
|
4263
4850
|
</fo:block>
|
4264
4851
|
</fo:table-cell>
|
4265
4852
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
4266
|
-
<fo:block font-size="11pt" font-weight="bold"
|
4853
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
4267
4854
|
<xsl:apply-templates/>
|
4268
4855
|
</fo:block>
|
4269
4856
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
@@ -4289,12 +4876,13 @@
|
|
4289
4876
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4290
4877
|
|
4291
4878
|
<xsl:variable name="element">
|
4292
|
-
block
|
4879
|
+
block
|
4293
4880
|
|
4881
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
4294
4882
|
</xsl:variable>
|
4295
4883
|
|
4296
4884
|
<xsl:choose>
|
4297
|
-
<xsl:when test="normalize-space($element)
|
4885
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
4298
4886
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
4299
4887
|
<xsl:apply-templates/>
|
4300
4888
|
</fo:block>
|
@@ -4331,25 +4919,44 @@
|
|
4331
4919
|
</xsl:otherwise>
|
4332
4920
|
</xsl:choose>
|
4333
4921
|
|
4334
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
4335
|
-
|
4922
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
4923
|
+
|
4924
|
+
<xsl:variable name="element">
|
4925
|
+
block
|
4336
4926
|
|
4337
|
-
|
4338
|
-
|
4927
|
+
</xsl:variable>
|
4928
|
+
<xsl:choose>
|
4929
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
4930
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
4931
|
+
|
4932
|
+
<xsl:apply-templates/>
|
4933
|
+
</fo:block>
|
4934
|
+
</xsl:when>
|
4935
|
+
<xsl:otherwise>
|
4936
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
4937
|
+
<xsl:apply-templates/>
|
4938
|
+
</fo:inline>
|
4939
|
+
</xsl:otherwise>
|
4940
|
+
</xsl:choose>
|
4339
4941
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4340
4942
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4341
4943
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4342
4944
|
<xsl:variable name="termsource_text">
|
4343
4945
|
<xsl:apply-templates/>
|
4344
4946
|
</xsl:variable>
|
4947
|
+
|
4345
4948
|
<xsl:choose>
|
4346
4949
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4347
4950
|
<xsl:apply-templates/>
|
4348
4951
|
</xsl:when>
|
4349
|
-
<xsl:otherwise>
|
4350
|
-
|
4351
|
-
|
4352
|
-
|
4952
|
+
<xsl:otherwise>
|
4953
|
+
|
4954
|
+
<xsl:text>[</xsl:text>
|
4955
|
+
|
4956
|
+
<xsl:apply-templates/>
|
4957
|
+
|
4958
|
+
<xsl:text>]</xsl:text>
|
4959
|
+
|
4353
4960
|
</xsl:otherwise>
|
4354
4961
|
</xsl:choose>
|
4355
4962
|
</fo:block>
|
@@ -4360,10 +4967,13 @@
|
|
4360
4967
|
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
4361
4968
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4362
4969
|
|
4363
|
-
<
|
4364
|
-
|
4365
|
-
|
4366
|
-
|
4970
|
+
<fo:inline>
|
4971
|
+
|
4972
|
+
<xsl:call-template name="getTitle">
|
4973
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
4974
|
+
</xsl:call-template>
|
4975
|
+
<xsl:text>: </xsl:text>
|
4976
|
+
</fo:inline>
|
4367
4977
|
|
4368
4978
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4369
4979
|
<xsl:apply-templates/>
|
@@ -4375,18 +4985,29 @@
|
|
4375
4985
|
<xsl:if test="normalize-space() != ''">
|
4376
4986
|
<xsl:value-of select="."/>
|
4377
4987
|
</xsl:if>
|
4378
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
4988
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
4989
|
+
<fo:block-container margin-left="0mm">
|
4990
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4991
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
4992
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
4993
|
+
</xsl:if>
|
4994
|
+
</xsl:if>
|
4995
|
+
|
4996
|
+
<fo:block-container margin-left="0mm">
|
4379
4997
|
|
4380
|
-
|
4381
|
-
|
4382
|
-
|
4383
|
-
|
4384
|
-
|
4385
|
-
|
4386
|
-
|
4387
|
-
|
4388
|
-
|
4389
|
-
|
4998
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
4999
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
5000
|
+
</fo:block>
|
5001
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
5002
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
5003
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
5004
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
5005
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
5006
|
+
</fo:block>
|
5007
|
+
</xsl:if>
|
5008
|
+
|
5009
|
+
</fo:block-container>
|
5010
|
+
</fo:block-container>
|
4390
5011
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
4391
5012
|
<xsl:if test="../*[local-name() = 'author']">
|
4392
5013
|
<xsl:text>, </xsl:text>
|
@@ -4414,6 +5035,7 @@
|
|
4414
5035
|
<xsl:if test="@type = 'inline'">
|
4415
5036
|
|
4416
5037
|
|
5038
|
+
|
4417
5039
|
</xsl:if>
|
4418
5040
|
|
4419
5041
|
|
@@ -4451,6 +5073,7 @@
|
|
4451
5073
|
|
4452
5074
|
|
4453
5075
|
|
5076
|
+
|
4454
5077
|
</xsl:variable>
|
4455
5078
|
|
4456
5079
|
<xsl:variable name="padding-right">
|
@@ -4546,6 +5169,7 @@
|
|
4546
5169
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4547
5170
|
<fo:block>
|
4548
5171
|
<xsl:call-template name="setId"/>
|
5172
|
+
|
4549
5173
|
<xsl:apply-templates/>
|
4550
5174
|
</fo:block>
|
4551
5175
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -4570,6 +5194,31 @@
|
|
4570
5194
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
4571
5195
|
<!-- 0xA0 to space replacement -->
|
4572
5196
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
5197
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
5198
|
+
<xsl:choose>
|
5199
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
5200
|
+
<fo:block-container>
|
5201
|
+
<xsl:attribute name="margin-left">
|
5202
|
+
<xsl:choose>
|
5203
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
5204
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
5205
|
+
</xsl:choose>
|
5206
|
+
</xsl:attribute>
|
5207
|
+
|
5208
|
+
|
5209
|
+
<fo:block-container margin-left="0mm">
|
5210
|
+
<fo:block>
|
5211
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
5212
|
+
</fo:block>
|
5213
|
+
</fo:block-container>
|
5214
|
+
</fo:block-container>
|
5215
|
+
</xsl:when>
|
5216
|
+
<xsl:otherwise>
|
5217
|
+
<fo:block>
|
5218
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
5219
|
+
</fo:block>
|
5220
|
+
</xsl:otherwise>
|
5221
|
+
</xsl:choose>
|
4573
5222
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4574
5223
|
<!-- <row>
|
4575
5224
|
<date>05-07-2013</date>
|
@@ -4602,7 +5251,28 @@
|
|
4602
5251
|
<fo:block><xsl:apply-templates/></fo:block>
|
4603
5252
|
</fo:table-cell>
|
4604
5253
|
</xsl:template><xsl:template name="processBibitem">
|
5254
|
+
|
5255
|
+
|
4605
5256
|
|
5257
|
+
|
5258
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
5259
|
+
<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')]"/>
|
5260
|
+
<xsl:choose>
|
5261
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
5262
|
+
<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"/>
|
5263
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
5264
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
5265
|
+
</xsl:if>
|
5266
|
+
<xsl:value-of select="$_doc_ident"/>
|
5267
|
+
</xsl:when>
|
5268
|
+
<xsl:otherwise>
|
5269
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
5270
|
+
<xsl:if test="$type != ''">
|
5271
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
5272
|
+
</xsl:if>
|
5273
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
5274
|
+
</xsl:otherwise>
|
5275
|
+
</xsl:choose>
|
4606
5276
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
4607
5277
|
<xsl:choose>
|
4608
5278
|
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
@@ -4721,6 +5391,7 @@
|
|
4721
5391
|
|
4722
5392
|
|
4723
5393
|
|
5394
|
+
|
4724
5395
|
|
4725
5396
|
</xsl:variable>
|
4726
5397
|
<xsl:choose>
|
@@ -4737,6 +5408,7 @@
|
|
4737
5408
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
4738
5409
|
|
4739
5410
|
|
5411
|
+
|
4740
5412
|
</dc:creator>
|
4741
5413
|
<dc:description>
|
4742
5414
|
<xsl:variable name="abstract">
|
@@ -4746,6 +5418,7 @@
|
|
4746
5418
|
|
4747
5419
|
|
4748
5420
|
|
5421
|
+
|
4749
5422
|
</xsl:variable>
|
4750
5423
|
<xsl:value-of select="normalize-space($abstract)"/>
|
4751
5424
|
</dc:description>
|
@@ -4846,6 +5519,7 @@
|
|
4846
5519
|
|
4847
5520
|
|
4848
5521
|
|
5522
|
+
|
4849
5523
|
</xsl:variable>
|
4850
5524
|
<xsl:if test="$documentNS != $XSLNS">
|
4851
5525
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4871,4 +5545,21 @@
|
|
4871
5545
|
</xsl:otherwise>
|
4872
5546
|
</xsl:choose>
|
4873
5547
|
</xsl:attribute>
|
5548
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
5549
|
+
<xsl:param name="text"/>
|
5550
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
5551
|
+
<xsl:if test="string-length($text) > 0">
|
5552
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
5553
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
5554
|
+
<xsl:if test="$char = '®'">
|
5555
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
5556
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
5557
|
+
</xsl:if>
|
5558
|
+
<xsl:value-of select="$char"/>
|
5559
|
+
</fo:inline>
|
5560
|
+
<xsl:call-template name="add-letter-spacing">
|
5561
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
5562
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
5563
|
+
</xsl:call-template>
|
5564
|
+
</xsl:if>
|
4874
5565
|
</xsl:template></xsl:stylesheet>
|