metanorma-iho 0.4.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -31
- data/.gitignore +11 -0
- data/bin/console +1 -1
- data/lib/isodoc/iho/base_convert.rb +11 -9
- data/lib/isodoc/iho/html/htmlstyle.css +25 -12
- data/lib/isodoc/iho/html/htmlstyle.scss +16 -11
- data/lib/isodoc/iho/html/scripts.html +0 -1
- data/lib/isodoc/iho/html/wordstyle.css +30 -18
- data/lib/isodoc/iho/html/wordstyle.scss +30 -18
- data/lib/isodoc/iho/iho.specification.xsl +480 -247
- data/lib/isodoc/iho/iho.standard.xsl +480 -247
- data/lib/{asciidoctor → metanorma}/iho/basicdoc.rng +0 -0
- data/lib/{asciidoctor → metanorma}/iho/biblio.rng +0 -0
- data/lib/{asciidoctor → metanorma}/iho/boilerplate.xml +0 -0
- data/lib/{asciidoctor → metanorma}/iho/converter.rb +5 -5
- data/lib/{asciidoctor → metanorma}/iho/iho.rng +0 -0
- data/lib/{asciidoctor → metanorma}/iho/isodoc.rng +90 -18
- data/lib/{asciidoctor → metanorma}/iho/reqt.rng +0 -0
- data/lib/metanorma/iho/version.rb +1 -1
- data/lib/metanorma-iho.rb +1 -1
- data/metanorma-iho.gemspec +2 -2
- data/metanorma.yml +1 -1
- metadata +17 -18
- data/lib/asciidoctor/iho.rb +0 -4
@@ -9,8 +9,7 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
|
12
|
-
|
13
|
-
<xsl:key name="kfn" match="iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']]" use="@reference"/>
|
12
|
+
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
|
14
13
|
|
15
14
|
|
16
15
|
|
@@ -377,7 +376,7 @@
|
|
377
376
|
|
378
377
|
<xsl:variable name="display">
|
379
378
|
<xsl:choose>
|
380
|
-
<xsl:when test="$level <=
|
379
|
+
<xsl:when test="$level <= $toc_level">true</xsl:when>
|
381
380
|
<xsl:otherwise>false</xsl:otherwise>
|
382
381
|
</xsl:choose>
|
383
382
|
</xsl:variable>
|
@@ -420,8 +419,6 @@
|
|
420
419
|
|
421
420
|
</xsl:template>
|
422
421
|
|
423
|
-
|
424
|
-
<xsl:template match="iho:references/iho:bibitem" mode="contents"/>
|
425
422
|
<!-- ============================= -->
|
426
423
|
<!-- END CONTENTS -->
|
427
424
|
<!-- ============================= -->
|
@@ -467,7 +464,7 @@
|
|
467
464
|
</fo:block>
|
468
465
|
</xsl:template>
|
469
466
|
|
470
|
-
<xsl:template match="iho:title">
|
467
|
+
<xsl:template match="iho:title" name="title">
|
471
468
|
|
472
469
|
<xsl:variable name="level">
|
473
470
|
<xsl:call-template name="getLevel"/>
|
@@ -575,61 +572,6 @@
|
|
575
572
|
</xsl:if>
|
576
573
|
</xsl:template>
|
577
574
|
|
578
|
-
<!--
|
579
|
-
<fn reference="1">
|
580
|
-
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
581
|
-
</fn>
|
582
|
-
-->
|
583
|
-
|
584
|
-
<xsl:variable name="p_fn">
|
585
|
-
<!-- <xsl:for-each select="//iho:p/iho:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]"> -->
|
586
|
-
<xsl:for-each select="//iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
587
|
-
<!-- copy unique fn -->
|
588
|
-
<fn gen_id="{generate-id(.)}">
|
589
|
-
<xsl:copy-of select="@*"/>
|
590
|
-
<xsl:copy-of select="node()"/>
|
591
|
-
</fn>
|
592
|
-
</xsl:for-each>
|
593
|
-
</xsl:variable>
|
594
|
-
|
595
|
-
<!-- iho:p/iho:fn -->
|
596
|
-
<xsl:template match="iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']]" priority="2">
|
597
|
-
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
598
|
-
<xsl:variable name="reference" select="@reference"/>
|
599
|
-
<xsl:variable name="number">
|
600
|
-
<!-- <xsl:number level="any" count="iho:p/iho:fn"/> -->
|
601
|
-
<xsl:value-of select="count(xalan:nodeset($p_fn)//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
602
|
-
</xsl:variable>
|
603
|
-
<xsl:choose>
|
604
|
-
<xsl:when test="xalan:nodeset($p_fn)//fn[@gen_id = $gen_id]">
|
605
|
-
<fo:footnote>
|
606
|
-
<fo:inline font-size="70%" keep-with-previous.within-line="always" vertical-align="super"> <!-- -->
|
607
|
-
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
608
|
-
<!-- <xsl:value-of select="@reference"/> -->
|
609
|
-
<xsl:value-of select="$number + count(//iho:bibitem[ancestor::iho:references[@normative='true']]/iho:note)"/>
|
610
|
-
</fo:basic-link>
|
611
|
-
</fo:inline>
|
612
|
-
<fo:footnote-body>
|
613
|
-
<fo:block font-size="10pt" margin-bottom="12pt">
|
614
|
-
<fo:inline id="footnote_{@reference}_{$number}" font-size="60%" vertical-align="super" keep-with-next.within-line="always" padding-right="1mm"> <!-- font-size="60%" alignment-baseline="hanging" -->
|
615
|
-
<xsl:value-of select="$number + count(//iho:bibitem[ancestor::iho:references[@normative='true']]/iho:note)"/>
|
616
|
-
</fo:inline>
|
617
|
-
<xsl:for-each select="iho:p">
|
618
|
-
<xsl:apply-templates/>
|
619
|
-
</xsl:for-each>
|
620
|
-
</fo:block>
|
621
|
-
</fo:footnote-body>
|
622
|
-
</fo:footnote>
|
623
|
-
</xsl:when>
|
624
|
-
<xsl:otherwise>
|
625
|
-
<fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
|
626
|
-
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
627
|
-
<xsl:value-of select="$number + count(//iho:bibitem/iho:note)"/>
|
628
|
-
</fo:basic-link>
|
629
|
-
</fo:inline>
|
630
|
-
</xsl:otherwise>
|
631
|
-
</xsl:choose>
|
632
|
-
</xsl:template>
|
633
575
|
|
634
576
|
<xsl:template match="iho:p/iho:fn/iho:p">
|
635
577
|
<xsl:apply-templates/>
|
@@ -734,7 +676,10 @@
|
|
734
676
|
<fo:list-item-label end-indent="label-end()">
|
735
677
|
<fo:block>
|
736
678
|
<fo:inline id="{@id}">
|
737
|
-
<xsl:
|
679
|
+
<xsl:value-of select="iho:docidentifier[@type = 'metanorma-ordinal']"/>
|
680
|
+
<xsl:if test="not(iho:docidentifier[@type = 'metanorma-ordinal'])">
|
681
|
+
<xsl:number format="[1]"/>
|
682
|
+
</xsl:if>
|
738
683
|
</fo:inline>
|
739
684
|
</fo:block>
|
740
685
|
</fo:list-item-label>
|
@@ -820,6 +765,7 @@
|
|
820
765
|
<xsl:apply-templates select="ancestor::iho:term[1]/iho:name" mode="presentation"/>
|
821
766
|
</fo:block>
|
822
767
|
<fo:block font-weight="bold" keep-with-next="always">
|
768
|
+
<xsl:call-template name="setStyle_preferred"/>
|
823
769
|
<xsl:apply-templates/>
|
824
770
|
</fo:block>
|
825
771
|
</fo:block>
|
@@ -875,7 +821,9 @@
|
|
875
821
|
|
876
822
|
<xsl:template name="getListItemFormat">
|
877
823
|
<xsl:choose>
|
878
|
-
<xsl:when test="local-name(..) = 'ul'"
|
824
|
+
<xsl:when test="local-name(..) = 'ul'">
|
825
|
+
<xsl:call-template name="setULLabel"/>
|
826
|
+
</xsl:when>
|
879
827
|
<xsl:otherwise> <!-- for ordered lists -->
|
880
828
|
<xsl:choose>
|
881
829
|
<xsl:when test="../@type = 'arabic'">
|
@@ -970,13 +918,6 @@
|
|
970
918
|
|
971
919
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
|
972
920
|
|
973
|
-
<title-annex lang="en">Annex </title-annex>
|
974
|
-
<title-annex lang="fr">Annexe </title-annex>
|
975
|
-
|
976
|
-
<title-annex lang="zh">Annex </title-annex>
|
977
|
-
|
978
|
-
|
979
|
-
|
980
921
|
<title-edition lang="en">
|
981
922
|
|
982
923
|
<xsl:text>Edition </xsl:text>
|
@@ -990,7 +931,8 @@
|
|
990
931
|
|
991
932
|
</title-edition>
|
992
933
|
|
993
|
-
|
934
|
+
|
935
|
+
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
994
936
|
<title-toc lang="en">
|
995
937
|
|
996
938
|
<xsl:text>Contents</xsl:text>
|
@@ -1002,21 +944,11 @@
|
|
1002
944
|
|
1003
945
|
<xsl:text>Sommaire</xsl:text>
|
1004
946
|
|
1005
|
-
|
1006
|
-
</title-toc>
|
947
|
+
</title-toc>
|
1007
948
|
|
1008
949
|
<title-toc lang="zh">Contents</title-toc>
|
1009
950
|
|
1010
951
|
|
1011
|
-
|
1012
|
-
<title-page lang="en">Page</title-page>
|
1013
|
-
<title-page lang="fr">Page</title-page>
|
1014
|
-
|
1015
|
-
<title-key lang="en">Key</title-key>
|
1016
|
-
<title-key lang="fr">Légende</title-key>
|
1017
|
-
|
1018
|
-
<title-where lang="en">where</title-where>
|
1019
|
-
<title-where lang="fr">où</title-where>
|
1020
952
|
|
1021
953
|
<title-descriptors lang="en">Descriptors</title-descriptors>
|
1022
954
|
|
@@ -1039,25 +971,6 @@
|
|
1039
971
|
|
1040
972
|
</title-subpart>
|
1041
973
|
|
1042
|
-
<title-modified lang="en">modified</title-modified>
|
1043
|
-
<title-modified lang="fr">modifiée</title-modified>
|
1044
|
-
|
1045
|
-
<title-modified lang="zh">modified</title-modified>
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
<title-source lang="en">
|
1050
|
-
|
1051
|
-
<xsl:text>SOURCE</xsl:text>
|
1052
|
-
|
1053
|
-
|
1054
|
-
</title-source>
|
1055
|
-
|
1056
|
-
<title-keywords lang="en">Keywords</title-keywords>
|
1057
|
-
|
1058
|
-
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
1059
|
-
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
1060
|
-
|
1061
974
|
<title-list-tables lang="en">List of Tables</title-list-tables>
|
1062
975
|
|
1063
976
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
@@ -1066,37 +979,8 @@
|
|
1066
979
|
|
1067
980
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
1068
981
|
|
1069
|
-
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
1070
|
-
|
1071
|
-
<title-abstract lang="en">Abstract</title-abstract>
|
1072
|
-
|
1073
982
|
<title-summary lang="en">Summary</title-summary>
|
1074
983
|
|
1075
|
-
<title-in lang="en">in </title-in>
|
1076
|
-
|
1077
|
-
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
1078
|
-
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
1079
|
-
|
1080
|
-
<title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
|
1081
|
-
<title-completion-date lang="zh">本稿完成日期</title-completion-date>
|
1082
|
-
|
1083
|
-
<title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
|
1084
|
-
<title-issuance-date lang="zh"># 发布</title-issuance-date>
|
1085
|
-
|
1086
|
-
<title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
|
1087
|
-
<title-implementation-date lang="zh"># 实施</title-implementation-date>
|
1088
|
-
|
1089
|
-
<title-obligation-normative lang="en">normative</title-obligation-normative>
|
1090
|
-
<title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
|
1091
|
-
|
1092
|
-
<title-caution lang="en">CAUTION</title-caution>
|
1093
|
-
<title-caution lang="zh">注意</title-caution>
|
1094
|
-
|
1095
|
-
<title-warning lang="en">WARNING</title-warning>
|
1096
|
-
<title-warning lang="zh">警告</title-warning>
|
1097
|
-
|
1098
|
-
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1099
|
-
|
1100
984
|
<title-continued lang="en">(continued)</title-continued>
|
1101
985
|
<title-continued lang="fr">(continué)</title-continued>
|
1102
986
|
|
@@ -1201,6 +1085,7 @@
|
|
1201
1085
|
|
1202
1086
|
|
1203
1087
|
|
1088
|
+
|
1204
1089
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1205
1090
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1206
1091
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -1217,7 +1102,9 @@
|
|
1217
1102
|
|
1218
1103
|
|
1219
1104
|
|
1105
|
+
|
1220
1106
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1107
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1221
1108
|
|
1222
1109
|
|
1223
1110
|
|
@@ -1243,6 +1130,7 @@
|
|
1243
1130
|
|
1244
1131
|
|
1245
1132
|
|
1133
|
+
|
1246
1134
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1247
1135
|
<xsl:attribute name="margin-left">12.7mm</xsl:attribute>
|
1248
1136
|
|
@@ -1536,7 +1424,79 @@
|
|
1536
1424
|
|
1537
1425
|
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1538
1426
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1539
|
-
</xsl:attribute-set><xsl:
|
1427
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-style">
|
1428
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1429
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-num-style">
|
1430
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1431
|
+
|
1432
|
+
|
1433
|
+
|
1434
|
+
|
1435
|
+
|
1436
|
+
|
1437
|
+
|
1438
|
+
<xsl:attribute name="font-size">70%</xsl:attribute>
|
1439
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1440
|
+
|
1441
|
+
|
1442
|
+
|
1443
|
+
|
1444
|
+
|
1445
|
+
|
1446
|
+
|
1447
|
+
|
1448
|
+
|
1449
|
+
|
1450
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
1451
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1452
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
1453
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1454
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
1455
|
+
|
1456
|
+
|
1457
|
+
|
1458
|
+
|
1459
|
+
|
1460
|
+
|
1461
|
+
|
1462
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1463
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1464
|
+
|
1465
|
+
|
1466
|
+
|
1467
|
+
|
1468
|
+
|
1469
|
+
|
1470
|
+
|
1471
|
+
|
1472
|
+
|
1473
|
+
|
1474
|
+
|
1475
|
+
|
1476
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
1477
|
+
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
1478
|
+
|
1479
|
+
|
1480
|
+
|
1481
|
+
|
1482
|
+
|
1483
|
+
|
1484
|
+
|
1485
|
+
<xsl:attribute name="font-size">60%</xsl:attribute>
|
1486
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1487
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1488
|
+
|
1489
|
+
|
1490
|
+
|
1491
|
+
|
1492
|
+
|
1493
|
+
|
1494
|
+
|
1495
|
+
|
1496
|
+
|
1497
|
+
|
1498
|
+
|
1499
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
1540
1500
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1541
1501
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1542
1502
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -1561,7 +1521,8 @@
|
|
1561
1521
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
1562
1522
|
|
1563
1523
|
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1564
|
-
|
1524
|
+
|
1525
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
|
1565
1526
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1566
1527
|
<xsl:apply-templates select="." mode="contents"/>
|
1567
1528
|
</xsl:for-each>
|
@@ -1571,7 +1532,7 @@
|
|
1571
1532
|
<xsl:apply-templates select="." mode="contents"/>
|
1572
1533
|
</xsl:for-each>
|
1573
1534
|
|
1574
|
-
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1535
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1575
1536
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1576
1537
|
<xsl:apply-templates select="." mode="contents"/>
|
1577
1538
|
</xsl:for-each>
|
@@ -2476,6 +2437,102 @@
|
|
2476
2437
|
|
2477
2438
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
2478
2439
|
<xsl:apply-templates/>
|
2440
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
|
2441
|
+
|
2442
|
+
<!-- list of footnotes to calculate actual footnotes number -->
|
2443
|
+
<xsl:variable name="p_fn_">
|
2444
|
+
<xsl:choose>
|
2445
|
+
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
2446
|
+
<fn gen_id="{generate-id(.)}">
|
2447
|
+
<xsl:copy-of select="@*"/>
|
2448
|
+
<xsl:copy-of select="node()"/>
|
2449
|
+
</fn>
|
2450
|
+
</xsl:when>
|
2451
|
+
<xsl:otherwise>
|
2452
|
+
<!-- itetation for:
|
2453
|
+
footnotes in bibdata/title
|
2454
|
+
footnotes in bibliography
|
2455
|
+
footnotes in document's body (except table's head/body/foot and figure text)
|
2456
|
+
-->
|
2457
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
2458
|
+
<fn gen_id="{generate-id(.)}">
|
2459
|
+
<xsl:copy-of select="@*"/>
|
2460
|
+
<xsl:copy-of select="node()"/>
|
2461
|
+
</fn>
|
2462
|
+
</xsl:for-each>
|
2463
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
2464
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2465
|
+
<xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
2466
|
+
<!-- copy unique fn -->
|
2467
|
+
<fn gen_id="{generate-id(.)}">
|
2468
|
+
<xsl:copy-of select="@*"/>
|
2469
|
+
<xsl:copy-of select="node()"/>
|
2470
|
+
</fn>
|
2471
|
+
</xsl:for-each>
|
2472
|
+
</xsl:for-each>
|
2473
|
+
</xsl:otherwise>
|
2474
|
+
</xsl:choose>
|
2475
|
+
</xsl:variable>
|
2476
|
+
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
2477
|
+
|
2478
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
2479
|
+
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
2480
|
+
<xsl:variable name="reference" select="@reference"/>
|
2481
|
+
<!-- fn sequence number in document -->
|
2482
|
+
<xsl:variable name="current_fn_number">
|
2483
|
+
<xsl:choose>
|
2484
|
+
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
2485
|
+
<xsl:otherwise>
|
2486
|
+
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
2487
|
+
</xsl:otherwise>
|
2488
|
+
</xsl:choose>
|
2489
|
+
</xsl:variable>
|
2490
|
+
<xsl:variable name="current_fn_number_text">
|
2491
|
+
<xsl:value-of select="$current_fn_number"/>
|
2492
|
+
|
2493
|
+
|
2494
|
+
</xsl:variable>
|
2495
|
+
|
2496
|
+
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
2497
|
+
<xsl:variable name="footnote_inline">
|
2498
|
+
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
2499
|
+
|
2500
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
2501
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
2502
|
+
</fo:basic-link>
|
2503
|
+
</fo:inline>
|
2504
|
+
</xsl:variable>
|
2505
|
+
<!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
|
2506
|
+
gen_id=<xsl:value-of select="$gen_id"/> -->
|
2507
|
+
<xsl:choose>
|
2508
|
+
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
2509
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2510
|
+
</xsl:when>
|
2511
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
2512
|
+
<fo:footnote xsl:use-attribute-sets="fn-style">
|
2513
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2514
|
+
<fo:footnote-body>
|
2515
|
+
|
2516
|
+
<fo:block-container text-indent="0" start-indent="0">
|
2517
|
+
|
2518
|
+
|
2519
|
+
<fo:block xsl:use-attribute-sets="fn-body-style">
|
2520
|
+
|
2521
|
+
|
2522
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
2523
|
+
|
2524
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
2525
|
+
</fo:inline>
|
2526
|
+
<xsl:apply-templates/>
|
2527
|
+
</fo:block>
|
2528
|
+
</fo:block-container>
|
2529
|
+
</fo:footnote-body>
|
2530
|
+
</fo:footnote>
|
2531
|
+
</xsl:when>
|
2532
|
+
<xsl:otherwise>
|
2533
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2534
|
+
</xsl:otherwise>
|
2535
|
+
</xsl:choose>
|
2479
2536
|
</xsl:template><xsl:template name="fn_display">
|
2480
2537
|
<xsl:variable name="references">
|
2481
2538
|
|
@@ -2668,6 +2725,8 @@
|
|
2668
2725
|
|
2669
2726
|
</fo:basic-link>
|
2670
2727
|
</fo:inline>
|
2728
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
2729
|
+
<fo:inline><xsl:value-of select="."/></fo:inline>
|
2671
2730
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
2672
2731
|
<fo:inline>
|
2673
2732
|
<xsl:apply-templates/>
|
@@ -2716,12 +2775,9 @@
|
|
2716
2775
|
<fo:block margin-bottom="12pt" text-align="left">
|
2717
2776
|
|
2718
2777
|
<xsl:variable name="title-where">
|
2719
|
-
|
2720
|
-
|
2721
|
-
|
2722
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2723
|
-
</xsl:call-template>
|
2724
|
-
|
2778
|
+
<xsl:call-template name="getLocalizedString">
|
2779
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
2780
|
+
</xsl:call-template>
|
2725
2781
|
</xsl:variable>
|
2726
2782
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2727
2783
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -2737,12 +2793,9 @@
|
|
2737
2793
|
|
2738
2794
|
|
2739
2795
|
<xsl:variable name="title-where">
|
2740
|
-
|
2741
|
-
|
2742
|
-
|
2743
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2744
|
-
</xsl:call-template>
|
2745
|
-
|
2796
|
+
<xsl:call-template name="getLocalizedString">
|
2797
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
2798
|
+
</xsl:call-template>
|
2746
2799
|
</xsl:variable>
|
2747
2800
|
<xsl:value-of select="$title-where"/>
|
2748
2801
|
</fo:block>
|
@@ -2754,12 +2807,9 @@
|
|
2754
2807
|
|
2755
2808
|
|
2756
2809
|
<xsl:variable name="title-key">
|
2757
|
-
|
2758
|
-
|
2759
|
-
|
2760
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
2761
|
-
</xsl:call-template>
|
2762
|
-
|
2810
|
+
<xsl:call-template name="getLocalizedString">
|
2811
|
+
<xsl:with-param name="key">key</xsl:with-param>
|
2812
|
+
</xsl:call-template>
|
2763
2813
|
</xsl:variable>
|
2764
2814
|
<xsl:value-of select="$title-key"/>
|
2765
2815
|
</fo:block>
|
@@ -3032,6 +3082,7 @@
|
|
3032
3082
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
3033
3083
|
<xsl:apply-templates/>
|
3034
3084
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
3085
|
+
<xsl:apply-templates select="@language"/>
|
3035
3086
|
<xsl:apply-templates/>
|
3036
3087
|
</xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
3037
3088
|
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
@@ -3093,6 +3144,15 @@
|
|
3093
3144
|
</fo:inline>
|
3094
3145
|
</xsl:template><xsl:template match="*[local-name()='add']">
|
3095
3146
|
<xsl:choose>
|
3147
|
+
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
|
3148
|
+
<fo:inline>
|
3149
|
+
<xsl:call-template name="insertTag">
|
3150
|
+
<xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
|
3151
|
+
<xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
3152
|
+
<xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
3153
|
+
</xsl:call-template>
|
3154
|
+
</fo:inline>
|
3155
|
+
</xsl:when>
|
3096
3156
|
<xsl:when test="@amendment">
|
3097
3157
|
<fo:inline>
|
3098
3158
|
<xsl:call-template name="insertTag">
|
@@ -3127,7 +3187,6 @@
|
|
3127
3187
|
</fo:inline>
|
3128
3188
|
</xsl:otherwise>
|
3129
3189
|
</xsl:choose>
|
3130
|
-
|
3131
3190
|
</xsl:template><xsl:template name="insertTag">
|
3132
3191
|
<xsl:param name="type"/>
|
3133
3192
|
<xsl:param name="kind"/>
|
@@ -3143,14 +3202,14 @@
|
|
3143
3202
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3144
3203
|
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
3145
3204
|
<g>
|
3146
|
-
<xsl:if test="$type = 'closing'">
|
3205
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
3147
3206
|
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
3148
3207
|
</xsl:if>
|
3149
3208
|
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
3150
3209
|
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
3151
3210
|
</g>
|
3152
3211
|
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
3153
|
-
<xsl:if test="$type = 'closing'">
|
3212
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
3154
3213
|
<xsl:attribute name="x">25</xsl:attribute>
|
3155
3214
|
</xsl:if>
|
3156
3215
|
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
@@ -3643,9 +3702,9 @@
|
|
3643
3702
|
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
3644
3703
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
3645
3704
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
3646
|
-
<xsl:apply-templates select="*[local-name()='name']"
|
3705
|
+
<xsl:apply-templates select="*[local-name()='name']"/>
|
3647
3706
|
</fo:block>
|
3648
|
-
<xsl:apply-templates/>
|
3707
|
+
<xsl:apply-templates select="node()[not(local-name()='name')]"/>
|
3649
3708
|
</xsl:template><xsl:template match="*[local-name() = 'callout']">
|
3650
3709
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
3651
3710
|
</xsl:template><xsl:template match="*[local-name() = 'annotation']">
|
@@ -3665,22 +3724,6 @@
|
|
3665
3724
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
3666
3725
|
<xsl:apply-templates/>
|
3667
3726
|
</fo:inline>
|
3668
|
-
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
3669
|
-
<xsl:variable name="title-modified">
|
3670
|
-
|
3671
|
-
|
3672
|
-
<xsl:call-template name="getTitle">
|
3673
|
-
<xsl:with-param name="name" select="'title-modified'"/>
|
3674
|
-
</xsl:call-template>
|
3675
|
-
|
3676
|
-
</xsl:variable>
|
3677
|
-
|
3678
|
-
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
3679
|
-
<xsl:choose>
|
3680
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
3681
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
3682
|
-
</xsl:choose>
|
3683
|
-
<xsl:apply-templates/>
|
3684
3727
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3685
3728
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3686
3729
|
|
@@ -4249,20 +4292,67 @@
|
|
4249
4292
|
</xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
|
4250
4293
|
<xsl:apply-templates mode="contents"/>
|
4251
4294
|
<xsl:text> </xsl:text>
|
4252
|
-
</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">
|
4295
|
+
</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'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
|
4253
4296
|
<xsl:apply-templates mode="bookmarks"/>
|
4254
4297
|
<xsl:text> </xsl:text>
|
4255
4298
|
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4256
4299
|
<xsl:value-of select="."/>
|
4257
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
4300
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
4258
4301
|
<xsl:value-of select="."/>
|
4259
4302
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4260
4303
|
<xsl:apply-templates mode="contents"/>
|
4304
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
|
4305
|
+
<xsl:variable name="level">
|
4306
|
+
<xsl:call-template name="getLevel">
|
4307
|
+
<xsl:with-param name="depth" select="@depth"/>
|
4308
|
+
</xsl:call-template>
|
4309
|
+
</xsl:variable>
|
4310
|
+
|
4311
|
+
<xsl:variable name="section">
|
4312
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
4313
|
+
</xsl:variable>
|
4314
|
+
|
4315
|
+
<xsl:variable name="type">floating-title</xsl:variable>
|
4316
|
+
|
4317
|
+
<xsl:variable name="display">
|
4318
|
+
<xsl:choose>
|
4319
|
+
<xsl:when test="normalize-space(@id) = ''">false</xsl:when>
|
4320
|
+
<xsl:when test="$level <= $toc_level">true</xsl:when>
|
4321
|
+
<xsl:otherwise>false</xsl:otherwise>
|
4322
|
+
</xsl:choose>
|
4323
|
+
</xsl:variable>
|
4324
|
+
|
4325
|
+
<xsl:variable name="skip">false</xsl:variable>
|
4326
|
+
|
4327
|
+
<xsl:if test="$skip = 'false'">
|
4328
|
+
|
4329
|
+
<xsl:variable name="title">
|
4330
|
+
<xsl:choose>
|
4331
|
+
<xsl:when test="*[local-name() = 'tab']">
|
4332
|
+
<xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
4333
|
+
</xsl:when>
|
4334
|
+
<xsl:otherwise>
|
4335
|
+
<xsl:copy-of select="node()"/>
|
4336
|
+
</xsl:otherwise>
|
4337
|
+
</xsl:choose>
|
4338
|
+
</xsl:variable>
|
4339
|
+
|
4340
|
+
<xsl:variable name="root">
|
4341
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
|
4342
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
|
4343
|
+
</xsl:variable>
|
4344
|
+
|
4345
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
|
4346
|
+
<title>
|
4347
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
4348
|
+
</title>
|
4349
|
+
</item>
|
4350
|
+
</xsl:if>
|
4261
4351
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4262
4352
|
<xsl:apply-templates mode="bookmarks"/>
|
4263
4353
|
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
4264
4354
|
<xsl:apply-templates select="."/>
|
4265
|
-
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4355
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4266
4356
|
<xsl:apply-templates mode="bookmarks"/>
|
4267
4357
|
</xsl:template><xsl:template name="addBookmarks">
|
4268
4358
|
<xsl:param name="contents"/>
|
@@ -4433,7 +4523,10 @@
|
|
4433
4523
|
</fo:block>
|
4434
4524
|
</xsl:if>
|
4435
4525
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
|
4436
|
-
<xsl:
|
4526
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
4527
|
+
<xsl:apply-templates mode="contents_item">
|
4528
|
+
<xsl:with-param name="mode" select="$mode"/>
|
4529
|
+
</xsl:apply-templates>
|
4437
4530
|
<!-- <xsl:text> </xsl:text> -->
|
4438
4531
|
</xsl:template><xsl:template name="getSection">
|
4439
4532
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
@@ -4506,6 +4599,18 @@
|
|
4506
4599
|
<xsl:copy-of select="."/>
|
4507
4600
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4508
4601
|
<xsl:text> </xsl:text>
|
4602
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
|
4603
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
4604
|
+
<xsl:apply-templates mode="contents_item">
|
4605
|
+
<xsl:with-param name="mode" select="$mode"/>
|
4606
|
+
</xsl:apply-templates>
|
4607
|
+
</xsl:template><xsl:template match="*[local-name() = 'add'][starts-with(text(), $ace_tag)]" mode="contents_item">
|
4608
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
4609
|
+
<xsl:if test="$mode = 'contents'">
|
4610
|
+
<xsl:copy>
|
4611
|
+
<xsl:apply-templates mode="contents_item"/>
|
4612
|
+
</xsl:copy>
|
4613
|
+
</xsl:if>
|
4509
4614
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4510
4615
|
|
4511
4616
|
<fo:block-container margin-left="0mm">
|
@@ -4524,6 +4629,8 @@
|
|
4524
4629
|
|
4525
4630
|
|
4526
4631
|
|
4632
|
+
|
4633
|
+
|
4527
4634
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
4528
4635
|
<xsl:variable name="_font-size">
|
4529
4636
|
|
@@ -4557,13 +4664,17 @@
|
|
4557
4664
|
|
4558
4665
|
|
4559
4666
|
|
4667
|
+
|
4668
|
+
|
4560
4669
|
<xsl:apply-templates/>
|
4561
4670
|
</fo:block>
|
4562
|
-
|
4671
|
+
|
4563
4672
|
|
4564
4673
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4565
4674
|
|
4566
4675
|
|
4676
|
+
|
4677
|
+
|
4567
4678
|
</fo:block-container>
|
4568
4679
|
</fo:block-container>
|
4569
4680
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -4836,42 +4947,48 @@
|
|
4836
4947
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4837
4948
|
|
4838
4949
|
|
4839
|
-
<xsl:
|
4840
|
-
|
4841
|
-
<xsl:variable name="element">
|
4950
|
+
<xsl:variable name="fo_element">
|
4951
|
+
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
|
4842
4952
|
block
|
4843
4953
|
|
4844
|
-
|
4954
|
+
|
4845
4955
|
</xsl:variable>
|
4846
4956
|
|
4957
|
+
<!-- display 'EXAMPLE' -->
|
4958
|
+
<xsl:apply-templates select="*[local-name()='name']">
|
4959
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
4960
|
+
</xsl:apply-templates>
|
4961
|
+
|
4847
4962
|
<xsl:choose>
|
4848
|
-
<xsl:when test="contains(normalize-space($
|
4849
|
-
<fo:block xsl:use-attribute-sets="example-body-style">
|
4850
|
-
<
|
4851
|
-
|
4963
|
+
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
4964
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style">
|
4965
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
4966
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
4967
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
4968
|
+
</xsl:apply-templates>
|
4969
|
+
</fo:block-container>
|
4970
|
+
</fo:block-container>
|
4852
4971
|
</xsl:when>
|
4853
4972
|
<xsl:otherwise>
|
4854
4973
|
<fo:inline>
|
4855
|
-
<xsl:apply-templates
|
4974
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
4975
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
4976
|
+
</xsl:apply-templates>
|
4856
4977
|
</fo:inline>
|
4857
4978
|
</xsl:otherwise>
|
4858
4979
|
</xsl:choose>
|
4859
4980
|
|
4860
4981
|
</fo:block>
|
4861
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"
|
4862
|
-
|
4863
|
-
|
4864
|
-
block
|
4865
|
-
|
4866
|
-
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
4867
|
-
</xsl:variable>
|
4982
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
|
4983
|
+
<xsl:param name="fo_element">block</xsl:param>
|
4984
|
+
|
4868
4985
|
<xsl:choose>
|
4869
4986
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
4870
4987
|
<fo:inline>
|
4871
4988
|
<xsl:apply-templates/>
|
4872
4989
|
</fo:inline>
|
4873
4990
|
</xsl:when>
|
4874
|
-
<xsl:when test="contains(normalize-space($
|
4991
|
+
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
4875
4992
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
4876
4993
|
<xsl:apply-templates/>
|
4877
4994
|
</fo:block>
|
@@ -4884,14 +5001,15 @@
|
|
4884
5001
|
</xsl:choose>
|
4885
5002
|
|
4886
5003
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
5004
|
+
<xsl:param name="fo_element">block</xsl:param>
|
5005
|
+
|
4887
5006
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
4888
5007
|
<xsl:variable name="element">
|
4889
|
-
block
|
4890
|
-
|
4891
5008
|
|
5009
|
+
<xsl:value-of select="$fo_element"/>
|
4892
5010
|
</xsl:variable>
|
4893
5011
|
<xsl:choose>
|
4894
|
-
<xsl:when test="normalize-space($element)
|
5012
|
+
<xsl:when test="starts-with(normalize-space($element), 'block')">
|
4895
5013
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
4896
5014
|
|
4897
5015
|
<xsl:apply-templates/>
|
@@ -4910,62 +5028,66 @@
|
|
4910
5028
|
<xsl:variable name="termsource_text">
|
4911
5029
|
<xsl:apply-templates/>
|
4912
5030
|
</xsl:variable>
|
4913
|
-
|
4914
|
-
<xsl:choose>
|
5031
|
+
<xsl:copy-of select="$termsource_text"/>
|
5032
|
+
<!-- <xsl:choose>
|
4915
5033
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4916
|
-
<!-- <xsl:apply-templates /> -->
|
4917
5034
|
<xsl:copy-of select="$termsource_text"/>
|
4918
5035
|
</xsl:when>
|
4919
5036
|
<xsl:otherwise>
|
4920
|
-
|
4921
|
-
|
5037
|
+
<xsl:if test="$namespace = 'bsi'">
|
5038
|
+
<xsl:choose>
|
5039
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
|
5040
|
+
<xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
|
5041
|
+
</xsl:choose>
|
5042
|
+
</xsl:if>
|
5043
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
4922
5044
|
<xsl:text>[</xsl:text>
|
4923
|
-
|
4924
|
-
<!-- <xsl:apply-templates /> -->
|
5045
|
+
</xsl:if>
|
4925
5046
|
<xsl:copy-of select="$termsource_text"/>
|
4926
|
-
|
4927
|
-
|
5047
|
+
<xsl:if test="$namespace = 'bsi'">
|
5048
|
+
<xsl:choose>
|
5049
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
|
5050
|
+
<xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
|
5051
|
+
</xsl:choose>
|
5052
|
+
</xsl:if>
|
5053
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
4928
5054
|
<xsl:text>]</xsl:text>
|
4929
|
-
|
5055
|
+
</xsl:if>
|
4930
5056
|
</xsl:otherwise>
|
4931
|
-
</xsl:choose>
|
5057
|
+
</xsl:choose> -->
|
4932
5058
|
</fo:block>
|
4933
5059
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
4934
5060
|
<xsl:if test="normalize-space() != ''">
|
4935
5061
|
<xsl:value-of select="."/>
|
4936
5062
|
</xsl:if>
|
4937
|
-
</xsl:template><xsl:
|
4938
|
-
<
|
4939
|
-
|
4940
|
-
|
4941
|
-
|
5063
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
|
5064
|
+
<fo:inline>
|
5065
|
+
|
5066
|
+
|
5067
|
+
<xsl:value-of select="."/>
|
5068
|
+
</fo:inline>
|
5069
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
4942
5070
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4943
5071
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4944
5072
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4945
5073
|
</xsl:if>
|
4946
|
-
|
4947
|
-
|
4948
|
-
<fo:inline>
|
4949
|
-
|
4950
|
-
|
4951
|
-
|
4952
|
-
|
4953
|
-
|
4954
|
-
|
4955
|
-
|
4956
|
-
<xsl:call-template name="getTitle">
|
4957
|
-
<xsl:with-param name="name" select="'title-source'"/>
|
4958
|
-
</xsl:call-template>
|
4959
|
-
<xsl:text>: </xsl:text>
|
4960
|
-
|
4961
|
-
|
4962
|
-
</fo:inline>
|
4963
|
-
|
4964
5074
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4965
5075
|
<xsl:apply-templates/>
|
4966
5076
|
</fo:inline>
|
4967
|
-
|
4968
|
-
|
5077
|
+
</fo:basic-link>
|
5078
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
5079
|
+
<xsl:variable name="title-modified">
|
5080
|
+
<xsl:call-template name="getLocalizedString">
|
5081
|
+
<xsl:with-param name="key">modified</xsl:with-param>
|
5082
|
+
</xsl:call-template>
|
5083
|
+
</xsl:variable>
|
5084
|
+
|
5085
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
5086
|
+
<xsl:choose>
|
5087
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
5088
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
5089
|
+
</xsl:choose>
|
5090
|
+
<xsl:apply-templates/>
|
4969
5091
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4970
5092
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
4971
5093
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
@@ -5150,25 +5272,29 @@
|
|
5150
5272
|
</fo:block>
|
5151
5273
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
5152
5274
|
<xsl:variable name="title-deprecated">
|
5153
|
-
|
5154
|
-
|
5155
|
-
|
5156
|
-
<xsl:with-param name="name" select="'title-deprecated'"/>
|
5157
|
-
</xsl:call-template>
|
5158
|
-
|
5275
|
+
<xsl:call-template name="getLocalizedString">
|
5276
|
+
<xsl:with-param name="key">deprecated</xsl:with-param>
|
5277
|
+
</xsl:call-template>
|
5159
5278
|
</xsl:variable>
|
5160
5279
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
5161
5280
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
5162
5281
|
</fo:block>
|
5282
|
+
</xsl:template><xsl:template name="setStyle_preferred">
|
5283
|
+
<xsl:if test="*[local-name() = 'strong']">
|
5284
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
5285
|
+
</xsl:if>
|
5286
|
+
</xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
|
5287
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
|
5163
5288
|
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
5164
5289
|
<fo:block xsl:use-attribute-sets="definition-style">
|
5165
5290
|
<xsl:apply-templates/>
|
5166
5291
|
</fo:block>
|
5167
5292
|
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
|
5168
5293
|
<xsl:apply-templates/>
|
5169
|
-
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
|
5294
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
|
5170
5295
|
<fo:inline> <xsl:apply-templates/></fo:inline>
|
5171
|
-
<fo:block
|
5296
|
+
<!-- <fo:block> </fo:block> -->
|
5297
|
+
<fo:block/>
|
5172
5298
|
</xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
|
5173
5299
|
|
5174
5300
|
<fo:block>
|
@@ -5224,6 +5350,51 @@
|
|
5224
5350
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
5225
5351
|
<!-- 0xA0 to space replacement -->
|
5226
5352
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
5353
|
+
</xsl:template><xsl:variable name="ul_labels_">
|
5354
|
+
|
5355
|
+
|
5356
|
+
|
5357
|
+
|
5358
|
+
|
5359
|
+
|
5360
|
+
<label>—</label> <!-- em dash -->
|
5361
|
+
|
5362
|
+
|
5363
|
+
|
5364
|
+
|
5365
|
+
|
5366
|
+
|
5367
|
+
|
5368
|
+
|
5369
|
+
|
5370
|
+
|
5371
|
+
|
5372
|
+
|
5373
|
+
</xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
|
5374
|
+
<xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
|
5375
|
+
<xsl:variable name="list_level">
|
5376
|
+
<xsl:choose>
|
5377
|
+
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
5378
|
+
<xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
|
5379
|
+
</xsl:choose>
|
5380
|
+
</xsl:variable>
|
5381
|
+
<xsl:choose>
|
5382
|
+
<xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
|
5383
|
+
<xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
|
5384
|
+
</xsl:when>
|
5385
|
+
<xsl:when test="$list_level mod 3 = 0">
|
5386
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
|
5387
|
+
</xsl:when>
|
5388
|
+
<xsl:when test="$list_level mod 2 = 0">
|
5389
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
|
5390
|
+
</xsl:when>
|
5391
|
+
<xsl:otherwise>
|
5392
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
|
5393
|
+
</xsl:otherwise>
|
5394
|
+
</xsl:choose>
|
5395
|
+
</xsl:template><xsl:template match="label" mode="ul_labels">
|
5396
|
+
<xsl:copy-of select="@*[not(local-name() = 'level')]"/>
|
5397
|
+
<xsl:value-of select="."/>
|
5227
5398
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
5228
5399
|
<xsl:choose>
|
5229
5400
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
@@ -5434,7 +5605,12 @@
|
|
5434
5605
|
|
5435
5606
|
|
5436
5607
|
|
5437
|
-
|
5608
|
+
|
5609
|
+
|
5610
|
+
|
5611
|
+
|
5612
|
+
|
5613
|
+
|
5438
5614
|
|
5439
5615
|
|
5440
5616
|
|
@@ -5539,10 +5715,19 @@
|
|
5539
5715
|
|
5540
5716
|
|
5541
5717
|
|
5718
|
+
|
5719
|
+
|
5720
|
+
|
5721
|
+
|
5722
|
+
<!-- end MPFD bibitem processing -->
|
5542
5723
|
|
5724
|
+
<!-- start M3D bibitem processing -->
|
5725
|
+
|
5726
|
+
|
5727
|
+
|
5543
5728
|
|
5544
5729
|
</xsl:template><xsl:template name="processBibitemDocId">
|
5545
|
-
<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')]"/>
|
5730
|
+
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
5546
5731
|
<xsl:choose>
|
5547
5732
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
5548
5733
|
<!-- <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"/>
|
@@ -5556,7 +5741,7 @@
|
|
5556
5741
|
<xsl:if test="$type != ''">
|
5557
5742
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
5558
5743
|
</xsl:if> -->
|
5559
|
-
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
5744
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
|
5560
5745
|
</xsl:otherwise>
|
5561
5746
|
</xsl:choose>
|
5562
5747
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
@@ -5661,7 +5846,35 @@
|
|
5661
5846
|
<fo:block-container border="1pt solid black" width="50%">
|
5662
5847
|
<fo:block> </fo:block>
|
5663
5848
|
</fo:block-container>
|
5664
|
-
</xsl:template><xsl:
|
5849
|
+
</xsl:template><xsl:variable name="toc_level">
|
5850
|
+
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
5851
|
+
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
|
5852
|
+
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
5853
|
+
<xsl:choose>
|
5854
|
+
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
5855
|
+
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
5856
|
+
<xsl:otherwise><!-- default value -->
|
5857
|
+
|
5858
|
+
|
5859
|
+
|
5860
|
+
|
5861
|
+
|
5862
|
+
|
5863
|
+
2
|
5864
|
+
|
5865
|
+
|
5866
|
+
|
5867
|
+
|
5868
|
+
|
5869
|
+
|
5870
|
+
|
5871
|
+
|
5872
|
+
|
5873
|
+
|
5874
|
+
|
5875
|
+
</xsl:otherwise>
|
5876
|
+
</xsl:choose>
|
5877
|
+
</xsl:variable><xsl:template match="*[local-name() = 'toc']">
|
5665
5878
|
<xsl:param name="colwidths"/>
|
5666
5879
|
<xsl:variable name="colwidths_">
|
5667
5880
|
<xsl:choose>
|
@@ -5741,7 +5954,7 @@
|
|
5741
5954
|
</td>
|
5742
5955
|
</xsl:for-each>
|
5743
5956
|
<td>333</td> <!-- page number, just for fill -->
|
5744
|
-
</xsl:template><xsl:template match="*[local-name() = 'variant-title']
|
5957
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5745
5958
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5746
5959
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5747
5960
|
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
@@ -5752,6 +5965,10 @@
|
|
5752
5965
|
</svg>
|
5753
5966
|
</fo:instream-foreign-object>
|
5754
5967
|
</fo:inline>
|
5968
|
+
</xsl:template><xsl:template match="@language">
|
5969
|
+
<xsl:copy-of select="."/>
|
5970
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
|
5971
|
+
<xsl:call-template name="title"/>
|
5755
5972
|
</xsl:template><xsl:template name="convertDate">
|
5756
5973
|
<xsl:param name="date"/>
|
5757
5974
|
<xsl:param name="format" select="'short'"/>
|
@@ -6109,9 +6326,15 @@
|
|
6109
6326
|
</xsl:template><xsl:template name="getLocalizedString">
|
6110
6327
|
<xsl:param name="key"/>
|
6111
6328
|
<xsl:param name="formatted">false</xsl:param>
|
6329
|
+
<xsl:param name="lang"/>
|
6112
6330
|
|
6113
6331
|
<xsl:variable name="curr_lang">
|
6114
|
-
<xsl:
|
6332
|
+
<xsl:choose>
|
6333
|
+
<xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
|
6334
|
+
<xsl:otherwise>
|
6335
|
+
<xsl:call-template name="getLang"/>
|
6336
|
+
</xsl:otherwise>
|
6337
|
+
</xsl:choose>
|
6115
6338
|
</xsl:variable>
|
6116
6339
|
|
6117
6340
|
<xsl:variable name="data_value">
|
@@ -6301,4 +6524,14 @@
|
|
6301
6524
|
</xsl:otherwise>
|
6302
6525
|
</xsl:choose>
|
6303
6526
|
</xsl:if>
|
6527
|
+
</xsl:template><xsl:template name="setAltText">
|
6528
|
+
<xsl:param name="value"/>
|
6529
|
+
<xsl:attribute name="fox:alt-text">
|
6530
|
+
<xsl:choose>
|
6531
|
+
<xsl:when test="normalize-space($value) != ''">
|
6532
|
+
<xsl:value-of select="$value"/>
|
6533
|
+
</xsl:when>
|
6534
|
+
<xsl:otherwise>_</xsl:otherwise>
|
6535
|
+
</xsl:choose>
|
6536
|
+
</xsl:attribute>
|
6304
6537
|
</xsl:template></xsl:stylesheet>
|