metanorma-un 0.7.2 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +4 -32
- data/.gitignore +10 -0
- data/lib/isodoc/un/html/htmlstyle.css +28 -17
- data/lib/isodoc/un/html/htmlstyle.scss +20 -17
- data/lib/isodoc/un/html/scripts.html +0 -1
- data/lib/isodoc/un/html/unece.css +0 -1
- data/lib/isodoc/un/html/unece.scss +0 -1
- data/lib/isodoc/un/html/wordstyle.css +30 -18
- data/lib/isodoc/un/html/wordstyle.scss +30 -18
- data/lib/isodoc/un/un.plenary-attachment.xsl +487 -211
- data/lib/isodoc/un/un.plenary.xsl +487 -211
- data/lib/isodoc/un/un.recommendation.xsl +483 -207
- data/lib/{asciidoctor → metanorma}/un/basicdoc.rng +0 -0
- data/lib/{asciidoctor → metanorma}/un/biblio.rng +0 -0
- data/lib/{asciidoctor → metanorma}/un/boilerplate.xml +0 -0
- data/lib/{asciidoctor → metanorma}/un/converter.rb +3 -3
- data/lib/{asciidoctor → metanorma}/un/isodoc.rng +61 -18
- data/lib/{asciidoctor → metanorma}/un/reqt.rng +0 -0
- data/lib/{asciidoctor → metanorma}/un/un.rng +0 -0
- data/lib/{asciidoctor → metanorma}/un/validate.rb +1 -1
- data/lib/metanorma/un/version.rb +1 -1
- data/lib/metanorma/un.rb +1 -0
- data/lib/metanorma-un.rb +0 -1
- data/metanorma-unece.gemspec +2 -2
- metadata +18 -19
- data/lib/asciidoctor/un.rb +0 -7
@@ -7,6 +7,8 @@
|
|
7
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
8
8
|
<xsl:param name="basepath"/>
|
9
9
|
|
10
|
+
<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"/>
|
11
|
+
|
10
12
|
|
11
13
|
|
12
14
|
|
@@ -202,8 +204,9 @@
|
|
202
204
|
</xsl:variable>
|
203
205
|
<fo:block font-size="14pt" margin-top="4pt" margin-bottom="8pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
|
204
206
|
<xsl:variable name="title-page">
|
205
|
-
<xsl:call-template name="
|
206
|
-
<xsl:with-param name="
|
207
|
+
<xsl:call-template name="getLocalizedString">
|
208
|
+
<xsl:with-param name="key">locality.page</xsl:with-param>
|
209
|
+
<xsl:with-param name="lang" select="$lang"/>
|
207
210
|
</xsl:call-template>
|
208
211
|
</xsl:variable>
|
209
212
|
<fo:block font-size="9pt" text-align="right" font-style="italic" margin-bottom="6pt"><xsl:value-of select="$title-page"/></fo:block>
|
@@ -217,7 +220,7 @@
|
|
217
220
|
<xsl:attribute name="margin-left">20mm</xsl:attribute>
|
218
221
|
</xsl:if>
|
219
222
|
<xsl:if test="@level >= 3 and @section != ''">
|
220
|
-
<xsl:attribute name="margin-left"
|
223
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="(@level - 2) * 28"/>mm</xsl:attribute>
|
221
224
|
</xsl:if>
|
222
225
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
223
226
|
<xsl:if test="@section != ''">
|
@@ -362,7 +365,7 @@
|
|
362
365
|
<xsl:variable name="display">
|
363
366
|
<xsl:choose>
|
364
367
|
<xsl:when test="ancestor-or-self::un:annex and $level >= 2">false</xsl:when>
|
365
|
-
<xsl:when test="$level >
|
368
|
+
<xsl:when test="$level > $toc_level">false</xsl:when>
|
366
369
|
<xsl:when test="@inline-header='true'">false</xsl:when>
|
367
370
|
<xsl:otherwise>true</xsl:otherwise>
|
368
371
|
</xsl:choose>
|
@@ -410,9 +413,6 @@
|
|
410
413
|
<fo:inline> </fo:inline>
|
411
414
|
</xsl:template>
|
412
415
|
|
413
|
-
|
414
|
-
<xsl:template match="un:bibitem" mode="contents"/>
|
415
|
-
|
416
416
|
<xsl:template match="un:references" mode="contents">
|
417
417
|
<xsl:apply-templates mode="contents"/>
|
418
418
|
</xsl:template>
|
@@ -593,31 +593,6 @@
|
|
593
593
|
</fo:block>
|
594
594
|
</xsl:template>
|
595
595
|
|
596
|
-
|
597
|
-
<!-- un:fn[not(ancestor::un:un-standard)] means fn element in virtual variable $title -->
|
598
|
-
<xsl:template match="un:title//un:fn | un:p/un:fn[not(ancestor::un:table)]" priority="2">
|
599
|
-
<fo:footnote keep-with-previous.within-line="always">
|
600
|
-
<xsl:variable name="number">
|
601
|
-
<xsl:number level="any" count="un:fn[not(ancestor::un:table)]"/>
|
602
|
-
</xsl:variable>
|
603
|
-
<fo:inline font-size="55%" keep-with-previous.within-line="always" vertical-align="super"> <!-- 60% -->
|
604
|
-
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
605
|
-
<xsl:value-of select="$number + count(//un:bibitem/un:note)"/>
|
606
|
-
</fo:basic-link>
|
607
|
-
</fo:inline>
|
608
|
-
<fo:footnote-body>
|
609
|
-
<fo:block font-size="9pt" line-height="125%" font-weight="normal" text-indent="0">
|
610
|
-
<fo:inline id="footnote_{@reference}_{$number}" font-size="60%" padding-right="1mm" keep-with-next.within-line="always" vertical-align="super"> <!-- alignment-baseline="hanging" -->
|
611
|
-
<xsl:value-of select="$number + count(//un:bibitem/un:note)"/>
|
612
|
-
</fo:inline>
|
613
|
-
<xsl:for-each select="un:p">
|
614
|
-
<xsl:apply-templates/>
|
615
|
-
</xsl:for-each>
|
616
|
-
</fo:block>
|
617
|
-
</fo:footnote-body>
|
618
|
-
</fo:footnote>
|
619
|
-
</xsl:template>
|
620
|
-
|
621
596
|
<xsl:template match="un:fn/un:p">
|
622
597
|
<fo:block>
|
623
598
|
<xsl:apply-templates/>
|
@@ -653,8 +628,9 @@
|
|
653
628
|
<fo:list-item-label end-indent="label-end()">
|
654
629
|
<fo:block>
|
655
630
|
<xsl:choose>
|
656
|
-
|
657
|
-
|
631
|
+
<xsl:when test="local-name(..) = 'ul'">
|
632
|
+
<xsl:call-template name="setULLabel"/>
|
633
|
+
</xsl:when>
|
658
634
|
<xsl:otherwise> <!-- for ordered lists -->
|
659
635
|
<xsl:choose>
|
660
636
|
<xsl:when test="../@type = 'arabic'">
|
@@ -786,7 +762,7 @@
|
|
786
762
|
|
787
763
|
<xsl:template match="un:title[parent::un:clause[@inline-header = 'true']]" priority="3"/>
|
788
764
|
|
789
|
-
<xsl:template match="un:title">
|
765
|
+
<xsl:template match="un:title" name="title">
|
790
766
|
|
791
767
|
<xsl:variable name="level">
|
792
768
|
<xsl:call-template name="getLevel"/>
|
@@ -915,7 +891,7 @@
|
|
915
891
|
</xsl:when>
|
916
892
|
<xsl:otherwise>
|
917
893
|
<xsl:apply-templates select="un:formattedref"/>
|
918
|
-
<xsl:apply-templates select="un:docidentifier[@type != 'metanorma' or not(@type)]" mode="process"/>
|
894
|
+
<xsl:apply-templates select="un:docidentifier[(@type != 'metanorma' and @type != 'metanorma-ordinal') or not(@type)]" mode="process"/>
|
919
895
|
</xsl:otherwise>
|
920
896
|
</xsl:choose>
|
921
897
|
</xsl:if>
|
@@ -955,10 +931,10 @@
|
|
955
931
|
<xsl:apply-templates/>
|
956
932
|
</xsl:template>
|
957
933
|
|
958
|
-
<xsl:template match="un:docidentifier[@type = 'metanorma']" mode="process">
|
934
|
+
<xsl:template match="un:docidentifier[@type = 'metanorma' or @type = 'metanorma-ordinal']" mode="process">
|
959
935
|
<xsl:apply-templates/>
|
960
936
|
</xsl:template>
|
961
|
-
<xsl:template match="un:docidentifier[@type != 'metanorma' or not(@type)]" mode="process">
|
937
|
+
<xsl:template match="un:docidentifier[(@type != 'metanorma' and @type != 'metanorma-ordinal') or not(@type)]" mode="process">
|
962
938
|
<xsl:text> [</xsl:text><xsl:apply-templates/><xsl:text>]</xsl:text>
|
963
939
|
</xsl:template>
|
964
940
|
<xsl:template match="un:docidentifier"/>
|
@@ -1070,13 +1046,6 @@
|
|
1070
1046
|
|
1071
1047
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
|
1072
1048
|
|
1073
|
-
<title-annex lang="en">Annex </title-annex>
|
1074
|
-
<title-annex lang="fr">Annexe </title-annex>
|
1075
|
-
|
1076
|
-
<title-annex lang="zh">Annex </title-annex>
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
1049
|
<title-edition lang="en">
|
1081
1050
|
|
1082
1051
|
<xsl:text>Edition </xsl:text>
|
@@ -1090,7 +1059,8 @@
|
|
1090
1059
|
|
1091
1060
|
</title-edition>
|
1092
1061
|
|
1093
|
-
|
1062
|
+
|
1063
|
+
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
1094
1064
|
<title-toc lang="en">
|
1095
1065
|
|
1096
1066
|
<xsl:text>Contents</xsl:text>
|
@@ -1102,21 +1072,11 @@
|
|
1102
1072
|
|
1103
1073
|
<xsl:text>Sommaire</xsl:text>
|
1104
1074
|
|
1105
|
-
|
1106
|
-
</title-toc>
|
1075
|
+
</title-toc>
|
1107
1076
|
|
1108
1077
|
<title-toc lang="zh">Contents</title-toc>
|
1109
1078
|
|
1110
1079
|
|
1111
|
-
|
1112
|
-
<title-page lang="en">Page</title-page>
|
1113
|
-
<title-page lang="fr">Page</title-page>
|
1114
|
-
|
1115
|
-
<title-key lang="en">Key</title-key>
|
1116
|
-
<title-key lang="fr">Légende</title-key>
|
1117
|
-
|
1118
|
-
<title-where lang="en">where</title-where>
|
1119
|
-
<title-where lang="fr">où</title-where>
|
1120
1080
|
|
1121
1081
|
<title-descriptors lang="en">Descriptors</title-descriptors>
|
1122
1082
|
|
@@ -1139,25 +1099,6 @@
|
|
1139
1099
|
|
1140
1100
|
</title-subpart>
|
1141
1101
|
|
1142
|
-
<title-modified lang="en">modified</title-modified>
|
1143
|
-
<title-modified lang="fr">modifiée</title-modified>
|
1144
|
-
|
1145
|
-
<title-modified lang="zh">modified</title-modified>
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
<title-source lang="en">
|
1150
|
-
|
1151
|
-
<xsl:text>SOURCE</xsl:text>
|
1152
|
-
|
1153
|
-
|
1154
|
-
</title-source>
|
1155
|
-
|
1156
|
-
<title-keywords lang="en">Keywords</title-keywords>
|
1157
|
-
|
1158
|
-
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
1159
|
-
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
1160
|
-
|
1161
1102
|
<title-list-tables lang="en">List of Tables</title-list-tables>
|
1162
1103
|
|
1163
1104
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
@@ -1166,37 +1107,8 @@
|
|
1166
1107
|
|
1167
1108
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
1168
1109
|
|
1169
|
-
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
1170
|
-
|
1171
|
-
<title-abstract lang="en">Abstract</title-abstract>
|
1172
|
-
|
1173
1110
|
<title-summary lang="en">Summary</title-summary>
|
1174
1111
|
|
1175
|
-
<title-in lang="en">in </title-in>
|
1176
|
-
|
1177
|
-
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
1178
|
-
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
1179
|
-
|
1180
|
-
<title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
|
1181
|
-
<title-completion-date lang="zh">本稿完成日期</title-completion-date>
|
1182
|
-
|
1183
|
-
<title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
|
1184
|
-
<title-issuance-date lang="zh"># 发布</title-issuance-date>
|
1185
|
-
|
1186
|
-
<title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
|
1187
|
-
<title-implementation-date lang="zh"># 实施</title-implementation-date>
|
1188
|
-
|
1189
|
-
<title-obligation-normative lang="en">normative</title-obligation-normative>
|
1190
|
-
<title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
|
1191
|
-
|
1192
|
-
<title-caution lang="en">CAUTION</title-caution>
|
1193
|
-
<title-caution lang="zh">注意</title-caution>
|
1194
|
-
|
1195
|
-
<title-warning lang="en">WARNING</title-warning>
|
1196
|
-
<title-warning lang="zh">警告</title-warning>
|
1197
|
-
|
1198
|
-
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1199
|
-
|
1200
1112
|
<title-continued lang="en">(continued)</title-continued>
|
1201
1113
|
<title-continued lang="fr">(continué)</title-continued>
|
1202
1114
|
|
@@ -1300,11 +1212,14 @@
|
|
1300
1212
|
|
1301
1213
|
|
1302
1214
|
|
1215
|
+
|
1303
1216
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1304
1217
|
|
1305
1218
|
|
1306
1219
|
|
1220
|
+
|
1307
1221
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1222
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1308
1223
|
|
1309
1224
|
|
1310
1225
|
|
@@ -1321,7 +1236,6 @@
|
|
1321
1236
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1322
1237
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1323
1238
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1324
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1325
1239
|
|
1326
1240
|
|
1327
1241
|
|
@@ -1339,6 +1253,7 @@
|
|
1339
1253
|
|
1340
1254
|
|
1341
1255
|
|
1256
|
+
|
1342
1257
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1343
1258
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1344
1259
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -1603,7 +1518,79 @@
|
|
1603
1518
|
|
1604
1519
|
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1605
1520
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1606
|
-
</xsl:attribute-set><xsl:
|
1521
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-style">
|
1522
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1523
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-num-style">
|
1524
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1525
|
+
|
1526
|
+
|
1527
|
+
|
1528
|
+
|
1529
|
+
|
1530
|
+
|
1531
|
+
|
1532
|
+
|
1533
|
+
|
1534
|
+
|
1535
|
+
|
1536
|
+
|
1537
|
+
|
1538
|
+
|
1539
|
+
|
1540
|
+
|
1541
|
+
<xsl:attribute name="font-size">55%</xsl:attribute>
|
1542
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1543
|
+
|
1544
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
1545
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1546
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
1547
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1548
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
1549
|
+
|
1550
|
+
|
1551
|
+
|
1552
|
+
|
1553
|
+
|
1554
|
+
|
1555
|
+
|
1556
|
+
|
1557
|
+
|
1558
|
+
|
1559
|
+
|
1560
|
+
|
1561
|
+
|
1562
|
+
|
1563
|
+
|
1564
|
+
|
1565
|
+
|
1566
|
+
|
1567
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
1568
|
+
<xsl:attribute name="line-height">125%</xsl:attribute>
|
1569
|
+
|
1570
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
1571
|
+
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
1572
|
+
|
1573
|
+
|
1574
|
+
|
1575
|
+
|
1576
|
+
|
1577
|
+
|
1578
|
+
|
1579
|
+
|
1580
|
+
|
1581
|
+
|
1582
|
+
|
1583
|
+
|
1584
|
+
|
1585
|
+
|
1586
|
+
|
1587
|
+
|
1588
|
+
|
1589
|
+
<xsl:attribute name="font-size">60%</xsl:attribute>
|
1590
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1591
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1592
|
+
|
1593
|
+
</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">
|
1607
1594
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1608
1595
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1609
1596
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -1628,7 +1615,8 @@
|
|
1628
1615
|
<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"/>
|
1629
1616
|
|
1630
1617
|
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1631
|
-
|
1618
|
+
|
1619
|
+
<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']]">
|
1632
1620
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1633
1621
|
<xsl:apply-templates select="." mode="contents"/>
|
1634
1622
|
</xsl:for-each>
|
@@ -1638,7 +1626,7 @@
|
|
1638
1626
|
<xsl:apply-templates select="." mode="contents"/>
|
1639
1627
|
</xsl:for-each>
|
1640
1628
|
|
1641
|
-
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1629
|
+
<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')]]">
|
1642
1630
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1643
1631
|
<xsl:apply-templates select="." mode="contents"/>
|
1644
1632
|
</xsl:for-each>
|
@@ -2576,6 +2564,102 @@
|
|
2576
2564
|
|
2577
2565
|
</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">
|
2578
2566
|
<xsl:apply-templates/>
|
2567
|
+
</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">
|
2568
|
+
|
2569
|
+
<!-- list of footnotes to calculate actual footnotes number -->
|
2570
|
+
<xsl:variable name="p_fn_">
|
2571
|
+
<xsl:choose>
|
2572
|
+
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
2573
|
+
<fn gen_id="{generate-id(.)}">
|
2574
|
+
<xsl:copy-of select="@*"/>
|
2575
|
+
<xsl:copy-of select="node()"/>
|
2576
|
+
</fn>
|
2577
|
+
</xsl:when>
|
2578
|
+
<xsl:otherwise>
|
2579
|
+
<!-- itetation for:
|
2580
|
+
footnotes in bibdata/title
|
2581
|
+
footnotes in bibliography
|
2582
|
+
footnotes in document's body (except table's head/body/foot and figure text)
|
2583
|
+
-->
|
2584
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
2585
|
+
<fn gen_id="{generate-id(.)}">
|
2586
|
+
<xsl:copy-of select="@*"/>
|
2587
|
+
<xsl:copy-of select="node()"/>
|
2588
|
+
</fn>
|
2589
|
+
</xsl:for-each>
|
2590
|
+
<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']/*">
|
2591
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2592
|
+
<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])]">
|
2593
|
+
<!-- copy unique fn -->
|
2594
|
+
<fn gen_id="{generate-id(.)}">
|
2595
|
+
<xsl:copy-of select="@*"/>
|
2596
|
+
<xsl:copy-of select="node()"/>
|
2597
|
+
</fn>
|
2598
|
+
</xsl:for-each>
|
2599
|
+
</xsl:for-each>
|
2600
|
+
</xsl:otherwise>
|
2601
|
+
</xsl:choose>
|
2602
|
+
</xsl:variable>
|
2603
|
+
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
2604
|
+
|
2605
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
2606
|
+
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
2607
|
+
<xsl:variable name="reference" select="@reference"/>
|
2608
|
+
<!-- fn sequence number in document -->
|
2609
|
+
<xsl:variable name="current_fn_number">
|
2610
|
+
<xsl:choose>
|
2611
|
+
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
2612
|
+
<xsl:otherwise>
|
2613
|
+
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
2614
|
+
</xsl:otherwise>
|
2615
|
+
</xsl:choose>
|
2616
|
+
</xsl:variable>
|
2617
|
+
<xsl:variable name="current_fn_number_text">
|
2618
|
+
<xsl:value-of select="$current_fn_number"/>
|
2619
|
+
|
2620
|
+
|
2621
|
+
</xsl:variable>
|
2622
|
+
|
2623
|
+
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
2624
|
+
<xsl:variable name="footnote_inline">
|
2625
|
+
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
2626
|
+
|
2627
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
2628
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
2629
|
+
</fo:basic-link>
|
2630
|
+
</fo:inline>
|
2631
|
+
</xsl:variable>
|
2632
|
+
<!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
|
2633
|
+
gen_id=<xsl:value-of select="$gen_id"/> -->
|
2634
|
+
<xsl:choose>
|
2635
|
+
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
2636
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2637
|
+
</xsl:when>
|
2638
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
2639
|
+
<fo:footnote xsl:use-attribute-sets="fn-style">
|
2640
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2641
|
+
<fo:footnote-body>
|
2642
|
+
|
2643
|
+
<fo:block-container text-indent="0" start-indent="0">
|
2644
|
+
|
2645
|
+
|
2646
|
+
<fo:block xsl:use-attribute-sets="fn-body-style">
|
2647
|
+
|
2648
|
+
|
2649
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
2650
|
+
|
2651
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
2652
|
+
</fo:inline>
|
2653
|
+
<xsl:apply-templates/>
|
2654
|
+
</fo:block>
|
2655
|
+
</fo:block-container>
|
2656
|
+
</fo:footnote-body>
|
2657
|
+
</fo:footnote>
|
2658
|
+
</xsl:when>
|
2659
|
+
<xsl:otherwise>
|
2660
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2661
|
+
</xsl:otherwise>
|
2662
|
+
</xsl:choose>
|
2579
2663
|
</xsl:template><xsl:template name="fn_display">
|
2580
2664
|
<xsl:variable name="references">
|
2581
2665
|
|
@@ -2768,6 +2852,8 @@
|
|
2768
2852
|
|
2769
2853
|
</fo:basic-link>
|
2770
2854
|
</fo:inline>
|
2855
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
2856
|
+
<fo:inline><xsl:value-of select="."/></fo:inline>
|
2771
2857
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
2772
2858
|
<fo:inline>
|
2773
2859
|
<xsl:apply-templates/>
|
@@ -2816,12 +2902,9 @@
|
|
2816
2902
|
<fo:block margin-bottom="12pt" text-align="left">
|
2817
2903
|
|
2818
2904
|
<xsl:variable name="title-where">
|
2819
|
-
|
2820
|
-
|
2821
|
-
|
2822
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2823
|
-
</xsl:call-template>
|
2824
|
-
|
2905
|
+
<xsl:call-template name="getLocalizedString">
|
2906
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
2907
|
+
</xsl:call-template>
|
2825
2908
|
</xsl:variable>
|
2826
2909
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2827
2910
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -2837,12 +2920,9 @@
|
|
2837
2920
|
|
2838
2921
|
|
2839
2922
|
<xsl:variable name="title-where">
|
2840
|
-
|
2841
|
-
|
2842
|
-
|
2843
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2844
|
-
</xsl:call-template>
|
2845
|
-
|
2923
|
+
<xsl:call-template name="getLocalizedString">
|
2924
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
2925
|
+
</xsl:call-template>
|
2846
2926
|
</xsl:variable>
|
2847
2927
|
<xsl:value-of select="$title-where"/>
|
2848
2928
|
</fo:block>
|
@@ -2854,12 +2934,9 @@
|
|
2854
2934
|
|
2855
2935
|
|
2856
2936
|
<xsl:variable name="title-key">
|
2857
|
-
|
2858
|
-
|
2859
|
-
|
2860
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
2861
|
-
</xsl:call-template>
|
2862
|
-
|
2937
|
+
<xsl:call-template name="getLocalizedString">
|
2938
|
+
<xsl:with-param name="key">key</xsl:with-param>
|
2939
|
+
</xsl:call-template>
|
2863
2940
|
</xsl:variable>
|
2864
2941
|
<xsl:value-of select="$title-key"/>
|
2865
2942
|
</fo:block>
|
@@ -3125,6 +3202,7 @@
|
|
3125
3202
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
3126
3203
|
<xsl:apply-templates/>
|
3127
3204
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
3205
|
+
<xsl:apply-templates select="@language"/>
|
3128
3206
|
<xsl:apply-templates/>
|
3129
3207
|
</xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
3130
3208
|
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
@@ -3186,6 +3264,15 @@
|
|
3186
3264
|
</fo:inline>
|
3187
3265
|
</xsl:template><xsl:template match="*[local-name()='add']">
|
3188
3266
|
<xsl:choose>
|
3267
|
+
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
|
3268
|
+
<fo:inline>
|
3269
|
+
<xsl:call-template name="insertTag">
|
3270
|
+
<xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
|
3271
|
+
<xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
3272
|
+
<xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
3273
|
+
</xsl:call-template>
|
3274
|
+
</fo:inline>
|
3275
|
+
</xsl:when>
|
3189
3276
|
<xsl:when test="@amendment">
|
3190
3277
|
<fo:inline>
|
3191
3278
|
<xsl:call-template name="insertTag">
|
@@ -3220,7 +3307,6 @@
|
|
3220
3307
|
</fo:inline>
|
3221
3308
|
</xsl:otherwise>
|
3222
3309
|
</xsl:choose>
|
3223
|
-
|
3224
3310
|
</xsl:template><xsl:template name="insertTag">
|
3225
3311
|
<xsl:param name="type"/>
|
3226
3312
|
<xsl:param name="kind"/>
|
@@ -3236,14 +3322,14 @@
|
|
3236
3322
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3237
3323
|
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
3238
3324
|
<g>
|
3239
|
-
<xsl:if test="$type = 'closing'">
|
3325
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
3240
3326
|
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
3241
3327
|
</xsl:if>
|
3242
3328
|
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
3243
3329
|
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
3244
3330
|
</g>
|
3245
3331
|
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
3246
|
-
<xsl:if test="$type = 'closing'">
|
3332
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
3247
3333
|
<xsl:attribute name="x">25</xsl:attribute>
|
3248
3334
|
</xsl:if>
|
3249
3335
|
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
@@ -3736,9 +3822,9 @@
|
|
3736
3822
|
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
3737
3823
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
3738
3824
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
3739
|
-
<xsl:apply-templates select="*[local-name()='name']"
|
3825
|
+
<xsl:apply-templates select="*[local-name()='name']"/>
|
3740
3826
|
</fo:block>
|
3741
|
-
<xsl:apply-templates/>
|
3827
|
+
<xsl:apply-templates select="node()[not(local-name()='name')]"/>
|
3742
3828
|
</xsl:template><xsl:template match="*[local-name() = 'callout']">
|
3743
3829
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
3744
3830
|
</xsl:template><xsl:template match="*[local-name() = 'annotation']">
|
@@ -3758,22 +3844,6 @@
|
|
3758
3844
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
3759
3845
|
<xsl:apply-templates/>
|
3760
3846
|
</fo:inline>
|
3761
|
-
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
3762
|
-
<xsl:variable name="title-modified">
|
3763
|
-
|
3764
|
-
|
3765
|
-
<xsl:call-template name="getTitle">
|
3766
|
-
<xsl:with-param name="name" select="'title-modified'"/>
|
3767
|
-
</xsl:call-template>
|
3768
|
-
|
3769
|
-
</xsl:variable>
|
3770
|
-
|
3771
|
-
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
3772
|
-
<xsl:choose>
|
3773
|
-
<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>
|
3774
|
-
<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>
|
3775
|
-
</xsl:choose>
|
3776
|
-
<xsl:apply-templates/>
|
3777
3847
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3778
3848
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3779
3849
|
|
@@ -4360,20 +4430,67 @@
|
|
4360
4430
|
</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">
|
4361
4431
|
<xsl:apply-templates mode="contents"/>
|
4362
4432
|
<xsl:text> </xsl:text>
|
4363
|
-
</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">
|
4433
|
+
</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">
|
4364
4434
|
<xsl:apply-templates mode="bookmarks"/>
|
4365
4435
|
<xsl:text> </xsl:text>
|
4366
4436
|
</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">
|
4367
4437
|
<xsl:value-of select="."/>
|
4368
|
-
</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">
|
4438
|
+
</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">
|
4369
4439
|
<xsl:value-of select="."/>
|
4370
4440
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4371
4441
|
<xsl:apply-templates mode="contents"/>
|
4442
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
|
4443
|
+
<xsl:variable name="level">
|
4444
|
+
<xsl:call-template name="getLevel">
|
4445
|
+
<xsl:with-param name="depth" select="@depth"/>
|
4446
|
+
</xsl:call-template>
|
4447
|
+
</xsl:variable>
|
4448
|
+
|
4449
|
+
<xsl:variable name="section">
|
4450
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
4451
|
+
</xsl:variable>
|
4452
|
+
|
4453
|
+
<xsl:variable name="type">floating-title</xsl:variable>
|
4454
|
+
|
4455
|
+
<xsl:variable name="display">
|
4456
|
+
<xsl:choose>
|
4457
|
+
<xsl:when test="normalize-space(@id) = ''">false</xsl:when>
|
4458
|
+
<xsl:when test="$level <= $toc_level">true</xsl:when>
|
4459
|
+
<xsl:otherwise>false</xsl:otherwise>
|
4460
|
+
</xsl:choose>
|
4461
|
+
</xsl:variable>
|
4462
|
+
|
4463
|
+
<xsl:variable name="skip">false</xsl:variable>
|
4464
|
+
|
4465
|
+
<xsl:if test="$skip = 'false'">
|
4466
|
+
|
4467
|
+
<xsl:variable name="title">
|
4468
|
+
<xsl:choose>
|
4469
|
+
<xsl:when test="*[local-name() = 'tab']">
|
4470
|
+
<xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
4471
|
+
</xsl:when>
|
4472
|
+
<xsl:otherwise>
|
4473
|
+
<xsl:copy-of select="node()"/>
|
4474
|
+
</xsl:otherwise>
|
4475
|
+
</xsl:choose>
|
4476
|
+
</xsl:variable>
|
4477
|
+
|
4478
|
+
<xsl:variable name="root">
|
4479
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
|
4480
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
|
4481
|
+
</xsl:variable>
|
4482
|
+
|
4483
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
|
4484
|
+
<title>
|
4485
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
4486
|
+
</title>
|
4487
|
+
</item>
|
4488
|
+
</xsl:if>
|
4372
4489
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4373
4490
|
<xsl:apply-templates mode="bookmarks"/>
|
4374
4491
|
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
4375
4492
|
<xsl:apply-templates select="."/>
|
4376
|
-
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4493
|
+
</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">
|
4377
4494
|
<xsl:apply-templates mode="bookmarks"/>
|
4378
4495
|
</xsl:template><xsl:template name="addBookmarks">
|
4379
4496
|
<xsl:param name="contents"/>
|
@@ -4544,7 +4661,10 @@
|
|
4544
4661
|
</fo:block>
|
4545
4662
|
</xsl:if>
|
4546
4663
|
</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">
|
4547
|
-
<xsl:
|
4664
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
4665
|
+
<xsl:apply-templates mode="contents_item">
|
4666
|
+
<xsl:with-param name="mode" select="$mode"/>
|
4667
|
+
</xsl:apply-templates>
|
4548
4668
|
<!-- <xsl:text> </xsl:text> -->
|
4549
4669
|
</xsl:template><xsl:template name="getSection">
|
4550
4670
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
@@ -4617,6 +4737,18 @@
|
|
4617
4737
|
<xsl:copy-of select="."/>
|
4618
4738
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4619
4739
|
<xsl:text> </xsl:text>
|
4740
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
|
4741
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
4742
|
+
<xsl:apply-templates mode="contents_item">
|
4743
|
+
<xsl:with-param name="mode" select="$mode"/>
|
4744
|
+
</xsl:apply-templates>
|
4745
|
+
</xsl:template><xsl:template match="*[local-name() = 'add'][starts-with(text(), $ace_tag)]" mode="contents_item">
|
4746
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
4747
|
+
<xsl:if test="$mode = 'contents'">
|
4748
|
+
<xsl:copy>
|
4749
|
+
<xsl:apply-templates mode="contents_item"/>
|
4750
|
+
</xsl:copy>
|
4751
|
+
</xsl:if>
|
4620
4752
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4621
4753
|
|
4622
4754
|
<fo:block-container margin-left="0mm">
|
@@ -4635,6 +4767,8 @@
|
|
4635
4767
|
|
4636
4768
|
|
4637
4769
|
|
4770
|
+
|
4771
|
+
|
4638
4772
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
4639
4773
|
<xsl:variable name="_font-size">
|
4640
4774
|
|
@@ -4668,13 +4802,17 @@
|
|
4668
4802
|
|
4669
4803
|
|
4670
4804
|
|
4805
|
+
|
4806
|
+
|
4671
4807
|
<xsl:apply-templates/>
|
4672
4808
|
</fo:block>
|
4673
|
-
|
4809
|
+
|
4674
4810
|
|
4675
4811
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4676
4812
|
|
4677
4813
|
|
4814
|
+
|
4815
|
+
|
4678
4816
|
</fo:block-container>
|
4679
4817
|
</fo:block-container>
|
4680
4818
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -4947,42 +5085,48 @@
|
|
4947
5085
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4948
5086
|
|
4949
5087
|
|
4950
|
-
<xsl:
|
4951
|
-
|
4952
|
-
<xsl:variable name="element">
|
5088
|
+
<xsl:variable name="fo_element">
|
5089
|
+
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
|
4953
5090
|
block
|
4954
5091
|
|
4955
|
-
|
5092
|
+
|
4956
5093
|
</xsl:variable>
|
4957
5094
|
|
5095
|
+
<!-- display 'EXAMPLE' -->
|
5096
|
+
<xsl:apply-templates select="*[local-name()='name']">
|
5097
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5098
|
+
</xsl:apply-templates>
|
5099
|
+
|
4958
5100
|
<xsl:choose>
|
4959
|
-
<xsl:when test="contains(normalize-space($
|
4960
|
-
<fo:block xsl:use-attribute-sets="example-body-style">
|
4961
|
-
<
|
4962
|
-
|
5101
|
+
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
5102
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style">
|
5103
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
5104
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
5105
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5106
|
+
</xsl:apply-templates>
|
5107
|
+
</fo:block-container>
|
5108
|
+
</fo:block-container>
|
4963
5109
|
</xsl:when>
|
4964
5110
|
<xsl:otherwise>
|
4965
5111
|
<fo:inline>
|
4966
|
-
<xsl:apply-templates
|
5112
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
5113
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5114
|
+
</xsl:apply-templates>
|
4967
5115
|
</fo:inline>
|
4968
5116
|
</xsl:otherwise>
|
4969
5117
|
</xsl:choose>
|
4970
5118
|
|
4971
5119
|
</fo:block>
|
4972
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"
|
4973
|
-
|
4974
|
-
|
4975
|
-
block
|
4976
|
-
|
4977
|
-
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
4978
|
-
</xsl:variable>
|
5120
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
|
5121
|
+
<xsl:param name="fo_element">block</xsl:param>
|
5122
|
+
|
4979
5123
|
<xsl:choose>
|
4980
5124
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
4981
5125
|
<fo:inline>
|
4982
5126
|
<xsl:apply-templates/>
|
4983
5127
|
</fo:inline>
|
4984
5128
|
</xsl:when>
|
4985
|
-
<xsl:when test="contains(normalize-space($
|
5129
|
+
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
4986
5130
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
4987
5131
|
<xsl:apply-templates/>
|
4988
5132
|
</fo:block>
|
@@ -4995,17 +5139,17 @@
|
|
4995
5139
|
</xsl:choose>
|
4996
5140
|
|
4997
5141
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
5142
|
+
<xsl:param name="fo_element">block</xsl:param>
|
5143
|
+
|
4998
5144
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
4999
5145
|
<xsl:variable name="element">
|
5000
|
-
block
|
5001
|
-
|
5002
5146
|
|
5147
|
+
<xsl:value-of select="$fo_element"/>
|
5003
5148
|
</xsl:variable>
|
5004
5149
|
<xsl:choose>
|
5005
|
-
<xsl:when test="normalize-space($element)
|
5150
|
+
<xsl:when test="starts-with(normalize-space($element), 'block')">
|
5006
5151
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
5007
5152
|
|
5008
|
-
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
5009
5153
|
<xsl:if test="$num = 1">
|
5010
5154
|
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
5011
5155
|
</xsl:if>
|
@@ -5026,45 +5170,66 @@
|
|
5026
5170
|
<xsl:variable name="termsource_text">
|
5027
5171
|
<xsl:apply-templates/>
|
5028
5172
|
</xsl:variable>
|
5029
|
-
|
5030
|
-
<xsl:choose>
|
5173
|
+
<xsl:copy-of select="$termsource_text"/>
|
5174
|
+
<!-- <xsl:choose>
|
5031
5175
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
5032
|
-
<!-- <xsl:apply-templates /> -->
|
5033
5176
|
<xsl:copy-of select="$termsource_text"/>
|
5034
5177
|
</xsl:when>
|
5035
5178
|
<xsl:otherwise>
|
5036
|
-
|
5037
|
-
|
5179
|
+
<xsl:if test="$namespace = 'bsi'">
|
5180
|
+
<xsl:choose>
|
5181
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
|
5182
|
+
<xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
|
5183
|
+
</xsl:choose>
|
5184
|
+
</xsl:if>
|
5185
|
+
<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'">
|
5038
5186
|
<xsl:text>[</xsl:text>
|
5039
|
-
|
5040
|
-
<!-- <xsl:apply-templates /> -->
|
5187
|
+
</xsl:if>
|
5041
5188
|
<xsl:copy-of select="$termsource_text"/>
|
5042
|
-
|
5043
|
-
|
5189
|
+
<xsl:if test="$namespace = 'bsi'">
|
5190
|
+
<xsl:choose>
|
5191
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
|
5192
|
+
<xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
|
5193
|
+
</xsl:choose>
|
5194
|
+
</xsl:if>
|
5195
|
+
<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'">
|
5044
5196
|
<xsl:text>]</xsl:text>
|
5045
|
-
|
5197
|
+
</xsl:if>
|
5046
5198
|
</xsl:otherwise>
|
5047
|
-
</xsl:choose>
|
5199
|
+
</xsl:choose> -->
|
5048
5200
|
</fo:block>
|
5049
5201
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
5050
5202
|
<xsl:if test="normalize-space() != ''">
|
5051
5203
|
<xsl:value-of select="."/>
|
5052
5204
|
</xsl:if>
|
5053
|
-
</xsl:template><xsl:
|
5054
|
-
<
|
5055
|
-
|
5056
|
-
|
5057
|
-
|
5205
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
|
5206
|
+
<fo:inline>
|
5207
|
+
|
5208
|
+
|
5209
|
+
<xsl:value-of select="."/>
|
5210
|
+
</fo:inline>
|
5211
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
5058
5212
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5059
5213
|
<xsl:if test="normalize-space(@citeas) = ''">
|
5060
5214
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5061
5215
|
</xsl:if>
|
5062
|
-
|
5063
5216
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
5064
5217
|
<xsl:apply-templates/>
|
5065
5218
|
</fo:inline>
|
5066
|
-
|
5067
|
-
|
5219
|
+
</fo:basic-link>
|
5220
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
5221
|
+
<xsl:variable name="title-modified">
|
5222
|
+
<xsl:call-template name="getLocalizedString">
|
5223
|
+
<xsl:with-param name="key">modified</xsl:with-param>
|
5224
|
+
</xsl:call-template>
|
5225
|
+
</xsl:variable>
|
5226
|
+
|
5227
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
5228
|
+
<xsl:choose>
|
5229
|
+
<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>
|
5230
|
+
<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>
|
5231
|
+
</xsl:choose>
|
5232
|
+
<xsl:apply-templates/>
|
5068
5233
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
5069
5234
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5070
5235
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
@@ -5245,25 +5410,29 @@
|
|
5245
5410
|
</fo:block>
|
5246
5411
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
5247
5412
|
<xsl:variable name="title-deprecated">
|
5248
|
-
|
5249
|
-
|
5250
|
-
|
5251
|
-
<xsl:with-param name="name" select="'title-deprecated'"/>
|
5252
|
-
</xsl:call-template>
|
5253
|
-
|
5413
|
+
<xsl:call-template name="getLocalizedString">
|
5414
|
+
<xsl:with-param name="key">deprecated</xsl:with-param>
|
5415
|
+
</xsl:call-template>
|
5254
5416
|
</xsl:variable>
|
5255
5417
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
5256
5418
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
5257
5419
|
</fo:block>
|
5420
|
+
</xsl:template><xsl:template name="setStyle_preferred">
|
5421
|
+
<xsl:if test="*[local-name() = 'strong']">
|
5422
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
5423
|
+
</xsl:if>
|
5424
|
+
</xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
|
5425
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
|
5258
5426
|
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
5259
5427
|
<fo:block xsl:use-attribute-sets="definition-style">
|
5260
5428
|
<xsl:apply-templates/>
|
5261
5429
|
</fo:block>
|
5262
5430
|
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
|
5263
5431
|
<xsl:apply-templates/>
|
5264
|
-
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
|
5432
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
|
5265
5433
|
<fo:inline> <xsl:apply-templates/></fo:inline>
|
5266
|
-
<fo:block
|
5434
|
+
<!-- <fo:block> </fo:block> -->
|
5435
|
+
<fo:block/>
|
5267
5436
|
</xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
|
5268
5437
|
|
5269
5438
|
<fo:block break-after="page"/>
|
@@ -5331,6 +5500,51 @@
|
|
5331
5500
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
5332
5501
|
<!-- 0xA0 to space replacement -->
|
5333
5502
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
5503
|
+
</xsl:template><xsl:variable name="ul_labels_">
|
5504
|
+
|
5505
|
+
|
5506
|
+
|
5507
|
+
|
5508
|
+
|
5509
|
+
|
5510
|
+
|
5511
|
+
|
5512
|
+
|
5513
|
+
|
5514
|
+
|
5515
|
+
|
5516
|
+
|
5517
|
+
|
5518
|
+
|
5519
|
+
|
5520
|
+
|
5521
|
+
<label>•</label>
|
5522
|
+
|
5523
|
+
</xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
|
5524
|
+
<xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
|
5525
|
+
<xsl:variable name="list_level">
|
5526
|
+
<xsl:choose>
|
5527
|
+
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
5528
|
+
<xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
|
5529
|
+
</xsl:choose>
|
5530
|
+
</xsl:variable>
|
5531
|
+
<xsl:choose>
|
5532
|
+
<xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
|
5533
|
+
<xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
|
5534
|
+
</xsl:when>
|
5535
|
+
<xsl:when test="$list_level mod 3 = 0">
|
5536
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
|
5537
|
+
</xsl:when>
|
5538
|
+
<xsl:when test="$list_level mod 2 = 0">
|
5539
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
|
5540
|
+
</xsl:when>
|
5541
|
+
<xsl:otherwise>
|
5542
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
|
5543
|
+
</xsl:otherwise>
|
5544
|
+
</xsl:choose>
|
5545
|
+
</xsl:template><xsl:template match="label" mode="ul_labels">
|
5546
|
+
<xsl:copy-of select="@*[not(local-name() = 'level')]"/>
|
5547
|
+
<xsl:value-of select="."/>
|
5334
5548
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
5335
5549
|
<xsl:choose>
|
5336
5550
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
@@ -5541,16 +5755,30 @@
|
|
5541
5755
|
|
5542
5756
|
|
5543
5757
|
|
5544
|
-
|
5758
|
+
|
5759
|
+
|
5760
|
+
|
5761
|
+
|
5762
|
+
|
5763
|
+
|
5545
5764
|
|
5546
5765
|
|
5547
5766
|
|
5548
5767
|
|
5549
5768
|
|
5769
|
+
|
5770
|
+
|
5771
|
+
|
5772
|
+
|
5773
|
+
<!-- end MPFD bibitem processing -->
|
5774
|
+
|
5775
|
+
<!-- start M3D bibitem processing -->
|
5550
5776
|
|
5551
5777
|
|
5778
|
+
|
5779
|
+
|
5552
5780
|
</xsl:template><xsl:template name="processBibitemDocId">
|
5553
|
-
<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')]"/>
|
5781
|
+
<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')]"/>
|
5554
5782
|
<xsl:choose>
|
5555
5783
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
5556
5784
|
<!-- <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"/>
|
@@ -5564,7 +5792,7 @@
|
|
5564
5792
|
<xsl:if test="$type != ''">
|
5565
5793
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
5566
5794
|
</xsl:if> -->
|
5567
|
-
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
5795
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
|
5568
5796
|
</xsl:otherwise>
|
5569
5797
|
</xsl:choose>
|
5570
5798
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
@@ -5669,7 +5897,35 @@
|
|
5669
5897
|
<fo:block-container border="1pt solid black" width="50%">
|
5670
5898
|
<fo:block> </fo:block>
|
5671
5899
|
</fo:block-container>
|
5672
|
-
</xsl:template><xsl:
|
5900
|
+
</xsl:template><xsl:variable name="toc_level">
|
5901
|
+
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
5902
|
+
<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:-->
|
5903
|
+
<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 -->
|
5904
|
+
<xsl:choose>
|
5905
|
+
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
5906
|
+
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
5907
|
+
<xsl:otherwise><!-- default value -->
|
5908
|
+
|
5909
|
+
|
5910
|
+
|
5911
|
+
|
5912
|
+
|
5913
|
+
|
5914
|
+
|
5915
|
+
|
5916
|
+
|
5917
|
+
|
5918
|
+
|
5919
|
+
|
5920
|
+
|
5921
|
+
|
5922
|
+
|
5923
|
+
|
5924
|
+
|
5925
|
+
3
|
5926
|
+
</xsl:otherwise>
|
5927
|
+
</xsl:choose>
|
5928
|
+
</xsl:variable><xsl:template match="*[local-name() = 'toc']">
|
5673
5929
|
<xsl:param name="colwidths"/>
|
5674
5930
|
<xsl:variable name="colwidths_">
|
5675
5931
|
<xsl:choose>
|
@@ -5749,7 +6005,7 @@
|
|
5749
6005
|
</td>
|
5750
6006
|
</xsl:for-each>
|
5751
6007
|
<td>333</td> <!-- page number, just for fill -->
|
5752
|
-
</xsl:template><xsl:template match="*[local-name() = 'variant-title']
|
6008
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5753
6009
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5754
6010
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5755
6011
|
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
@@ -5760,6 +6016,10 @@
|
|
5760
6016
|
</svg>
|
5761
6017
|
</fo:instream-foreign-object>
|
5762
6018
|
</fo:inline>
|
6019
|
+
</xsl:template><xsl:template match="@language">
|
6020
|
+
<xsl:copy-of select="."/>
|
6021
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
|
6022
|
+
<xsl:call-template name="title"/>
|
5763
6023
|
</xsl:template><xsl:template name="convertDate">
|
5764
6024
|
<xsl:param name="date"/>
|
5765
6025
|
<xsl:param name="format" select="'short'"/>
|
@@ -6117,9 +6377,15 @@
|
|
6117
6377
|
</xsl:template><xsl:template name="getLocalizedString">
|
6118
6378
|
<xsl:param name="key"/>
|
6119
6379
|
<xsl:param name="formatted">false</xsl:param>
|
6380
|
+
<xsl:param name="lang"/>
|
6120
6381
|
|
6121
6382
|
<xsl:variable name="curr_lang">
|
6122
|
-
<xsl:
|
6383
|
+
<xsl:choose>
|
6384
|
+
<xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
|
6385
|
+
<xsl:otherwise>
|
6386
|
+
<xsl:call-template name="getLang"/>
|
6387
|
+
</xsl:otherwise>
|
6388
|
+
</xsl:choose>
|
6123
6389
|
</xsl:variable>
|
6124
6390
|
|
6125
6391
|
<xsl:variable name="data_value">
|
@@ -6309,4 +6575,14 @@
|
|
6309
6575
|
</xsl:otherwise>
|
6310
6576
|
</xsl:choose>
|
6311
6577
|
</xsl:if>
|
6578
|
+
</xsl:template><xsl:template name="setAltText">
|
6579
|
+
<xsl:param name="value"/>
|
6580
|
+
<xsl:attribute name="fox:alt-text">
|
6581
|
+
<xsl:choose>
|
6582
|
+
<xsl:when test="normalize-space($value) != ''">
|
6583
|
+
<xsl:value-of select="$value"/>
|
6584
|
+
</xsl:when>
|
6585
|
+
<xsl:otherwise>_</xsl:otherwise>
|
6586
|
+
</xsl:choose>
|
6587
|
+
</xsl:attribute>
|
6312
6588
|
</xsl:template></xsl:stylesheet>
|