metanorma-ogc 1.5.3 → 2.0.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 +4 -32
- data/.gitignore +11 -0
- data/Gemfile +1 -0
- data/lib/isodoc/ogc/biblio.rb +7 -6
- data/lib/isodoc/ogc/html/htmlstyle.css +48 -28
- data/lib/isodoc/ogc/html/htmlstyle.scss +18 -11
- data/lib/isodoc/ogc/html/scripts.html +0 -1
- data/lib/isodoc/ogc/html/wordstyle.css +30 -18
- data/lib/isodoc/ogc/html/wordstyle.scss +30 -18
- data/lib/isodoc/ogc/html/wordstyle_wp.css +22 -12
- data/lib/isodoc/ogc/html/wordstyle_wp.scss +22 -12
- data/lib/isodoc/ogc/metadata.rb +1 -0
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +500 -229
- data/lib/isodoc/ogc/ogc.best-practice.xsl +500 -229
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +500 -229
- data/lib/isodoc/ogc/ogc.community-practice.xsl +500 -229
- data/lib/isodoc/ogc/ogc.community-standard.xsl +500 -229
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +500 -229
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +500 -229
- data/lib/isodoc/ogc/ogc.other.xsl +500 -229
- data/lib/isodoc/ogc/ogc.policy.xsl +500 -229
- data/lib/isodoc/ogc/ogc.reference-model.xsl +500 -229
- data/lib/isodoc/ogc/ogc.release-notes.xsl +500 -229
- data/lib/isodoc/ogc/ogc.standard.xsl +500 -229
- data/lib/isodoc/ogc/ogc.test-suite.xsl +500 -229
- data/lib/isodoc/ogc/ogc.user-guide.xsl +500 -229
- data/lib/isodoc/ogc/ogc.white-paper.xsl +467 -215
- data/lib/isodoc/ogc/presentation_xml_convert.rb +29 -5
- data/lib/isodoc/ogc/reqt.rb +1 -1
- data/lib/{asciidoctor → metanorma}/ogc/basicdoc.rng +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/biblio.rng +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/boilerplate.xml +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/cleanup.rb +39 -10
- data/lib/{asciidoctor → metanorma}/ogc/converter.rb +14 -4
- data/lib/{asciidoctor → metanorma}/ogc/front.rb +2 -2
- data/lib/{asciidoctor → metanorma}/ogc/isodoc.rng +49 -2
- data/lib/{asciidoctor → metanorma}/ogc/ogc.rng +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/reqt.rng +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/validate.rb +1 -1
- data/lib/metanorma/ogc/version.rb +1 -1
- data/lib/metanorma/ogc.rb +1 -0
- data/lib/metanorma-ogc.rb +0 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +15 -16
- data/lib/asciidoctor/ogc.rb +0 -6
@@ -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
|
<xsl:variable name="pageWidth" select="215.9"/>
|
11
13
|
<xsl:variable name="pageHeight" select="279.4"/>
|
12
14
|
<xsl:variable name="marginLeftRight1" select="25.4"/>
|
@@ -239,7 +241,9 @@
|
|
239
241
|
<fo:block-container line-height="1.08" font-family="Lato">
|
240
242
|
<fo:block role="TOC">
|
241
243
|
<fo:block xsl:use-attribute-sets="title-toc-style" role="H1">
|
242
|
-
<xsl:
|
244
|
+
<xsl:call-template name="getTitle">
|
245
|
+
<xsl:with-param name="name" select="'title-toc'"/>
|
246
|
+
</xsl:call-template>
|
243
247
|
</fo:block>
|
244
248
|
<xsl:variable name="margin-left">3.9</xsl:variable>
|
245
249
|
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
@@ -384,7 +388,7 @@
|
|
384
388
|
|
385
389
|
<xsl:variable name="display">
|
386
390
|
<xsl:choose>
|
387
|
-
<xsl:when test="$level >
|
391
|
+
<xsl:when test="$level > $toc_level">false</xsl:when>
|
388
392
|
<xsl:otherwise>true</xsl:otherwise>
|
389
393
|
</xsl:choose>
|
390
394
|
</xsl:variable>
|
@@ -528,7 +532,7 @@
|
|
528
532
|
</fo:block>
|
529
533
|
</xsl:template>
|
530
534
|
|
531
|
-
<xsl:template match="ogc:title">
|
535
|
+
<xsl:template match="ogc:title" name="title">
|
532
536
|
|
533
537
|
<xsl:variable name="level">
|
534
538
|
<xsl:call-template name="getLevel"/>
|
@@ -642,32 +646,6 @@
|
|
642
646
|
</xsl:if>
|
643
647
|
</xsl:template>
|
644
648
|
|
645
|
-
<!--
|
646
|
-
<fn reference="1">
|
647
|
-
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
648
|
-
</fn>
|
649
|
-
-->
|
650
|
-
<xsl:template match="ogc:title//ogc:fn | ogc:name//ogc:fn | ogc:p/ogc:fn[not(ancestor::ogc:table)] | ogc:p/*/ogc:fn[not(ancestor::ogc:table)] | ogc:sourcecode/ogc:fn[not(ancestor::ogc:table)]" priority="2">
|
651
|
-
<fo:footnote keep-with-previous.within-line="always">
|
652
|
-
<xsl:variable name="number" select="@reference"/>
|
653
|
-
|
654
|
-
<fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super">
|
655
|
-
<fo:basic-link internal-destination="footnote_{@reference}" fox:alt-text="footnote {@reference}">
|
656
|
-
<xsl:value-of select="$number"/><!-- + count(//ogc:bibitem/ogc:note) -->
|
657
|
-
</fo:basic-link>
|
658
|
-
</fo:inline>
|
659
|
-
<fo:footnote-body>
|
660
|
-
<fo:block font-size="10pt" margin-bottom="12pt" font-weight="normal" text-indent="0" start-indent="0" color="black" text-align="justify">
|
661
|
-
<fo:inline id="footnote_{@reference}" keep-with-next.within-line="always" font-size="60%" vertical-align="super"> <!-- baseline-shift="30%" padding-right="3mm" font-size="60%" alignment-baseline="hanging" -->
|
662
|
-
<xsl:value-of select="$number "/><!-- + count(//ogc:bibitem/ogc:note) -->
|
663
|
-
</fo:inline>
|
664
|
-
<xsl:for-each select="ogc:p">
|
665
|
-
<xsl:apply-templates/>
|
666
|
-
</xsl:for-each>
|
667
|
-
</fo:block>
|
668
|
-
</fo:footnote-body>
|
669
|
-
</fo:footnote>
|
670
|
-
</xsl:template>
|
671
649
|
|
672
650
|
<xsl:template match="ogc:fn/ogc:p">
|
673
651
|
<fo:block>
|
@@ -733,7 +711,9 @@
|
|
733
711
|
<fo:list-item-label end-indent="label-end()">
|
734
712
|
<fo:block>
|
735
713
|
<xsl:choose>
|
736
|
-
<xsl:when test="local-name(..) = 'ul'"
|
714
|
+
<xsl:when test="local-name(..) = 'ul'">
|
715
|
+
<xsl:call-template name="setULLabel"/>
|
716
|
+
</xsl:when>
|
737
717
|
<xsl:otherwise> <!-- for ordered lists -->
|
738
718
|
<xsl:choose>
|
739
719
|
<xsl:when test="../@class = 'steps'">
|
@@ -842,7 +822,6 @@
|
|
842
822
|
</fo:list-block>
|
843
823
|
</xsl:template>
|
844
824
|
|
845
|
-
<xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem" mode="contents"/>
|
846
825
|
|
847
826
|
<xsl:template match="ogc:bibitem/ogc:title">
|
848
827
|
<fo:inline font-style="italic">
|
@@ -972,13 +951,6 @@
|
|
972
951
|
|
973
952
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
|
974
953
|
|
975
|
-
<title-annex lang="en">Annex </title-annex>
|
976
|
-
<title-annex lang="fr">Annexe </title-annex>
|
977
|
-
|
978
|
-
<title-annex lang="zh">Annex </title-annex>
|
979
|
-
|
980
|
-
|
981
|
-
|
982
954
|
<title-edition lang="en">
|
983
955
|
|
984
956
|
|
@@ -992,11 +964,12 @@
|
|
992
964
|
|
993
965
|
</title-edition>
|
994
966
|
|
995
|
-
|
967
|
+
|
968
|
+
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
996
969
|
<title-toc lang="en">
|
997
970
|
|
998
|
-
<xsl:text>Contents</xsl:text>
|
999
971
|
|
972
|
+
<xsl:text>Table of Contents</xsl:text>
|
1000
973
|
|
1001
974
|
|
1002
975
|
</title-toc>
|
@@ -1004,21 +977,11 @@
|
|
1004
977
|
|
1005
978
|
<xsl:text>Sommaire</xsl:text>
|
1006
979
|
|
1007
|
-
|
1008
|
-
</title-toc>
|
980
|
+
</title-toc>
|
1009
981
|
|
1010
982
|
<title-toc lang="zh">Contents</title-toc>
|
1011
983
|
|
1012
984
|
|
1013
|
-
|
1014
|
-
<title-page lang="en">Page</title-page>
|
1015
|
-
<title-page lang="fr">Page</title-page>
|
1016
|
-
|
1017
|
-
<title-key lang="en">Key</title-key>
|
1018
|
-
<title-key lang="fr">Légende</title-key>
|
1019
|
-
|
1020
|
-
<title-where lang="en">where</title-where>
|
1021
|
-
<title-where lang="fr">où</title-where>
|
1022
985
|
|
1023
986
|
<title-descriptors lang="en">Descriptors</title-descriptors>
|
1024
987
|
|
@@ -1041,25 +1004,6 @@
|
|
1041
1004
|
|
1042
1005
|
</title-subpart>
|
1043
1006
|
|
1044
|
-
<title-modified lang="en">modified</title-modified>
|
1045
|
-
<title-modified lang="fr">modifiée</title-modified>
|
1046
|
-
|
1047
|
-
<title-modified lang="zh">modified</title-modified>
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
<title-source lang="en">
|
1052
|
-
|
1053
|
-
<xsl:text>SOURCE</xsl:text>
|
1054
|
-
|
1055
|
-
|
1056
|
-
</title-source>
|
1057
|
-
|
1058
|
-
<title-keywords lang="en">Keywords</title-keywords>
|
1059
|
-
|
1060
|
-
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
1061
|
-
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
1062
|
-
|
1063
1007
|
<title-list-tables lang="en">List of Tables</title-list-tables>
|
1064
1008
|
|
1065
1009
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
@@ -1068,37 +1012,8 @@
|
|
1068
1012
|
|
1069
1013
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
1070
1014
|
|
1071
|
-
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
1072
|
-
|
1073
|
-
<title-abstract lang="en">Abstract</title-abstract>
|
1074
|
-
|
1075
1015
|
<title-summary lang="en">Summary</title-summary>
|
1076
1016
|
|
1077
|
-
<title-in lang="en">in </title-in>
|
1078
|
-
|
1079
|
-
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
1080
|
-
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
1081
|
-
|
1082
|
-
<title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
|
1083
|
-
<title-completion-date lang="zh">本稿完成日期</title-completion-date>
|
1084
|
-
|
1085
|
-
<title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
|
1086
|
-
<title-issuance-date lang="zh"># 发布</title-issuance-date>
|
1087
|
-
|
1088
|
-
<title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
|
1089
|
-
<title-implementation-date lang="zh"># 实施</title-implementation-date>
|
1090
|
-
|
1091
|
-
<title-obligation-normative lang="en">normative</title-obligation-normative>
|
1092
|
-
<title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
|
1093
|
-
|
1094
|
-
<title-caution lang="en">CAUTION</title-caution>
|
1095
|
-
<title-caution lang="zh">注意</title-caution>
|
1096
|
-
|
1097
|
-
<title-warning lang="en">WARNING</title-warning>
|
1098
|
-
<title-warning lang="zh">警告</title-warning>
|
1099
|
-
|
1100
|
-
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1101
|
-
|
1102
1017
|
<title-continued lang="en">(continued)</title-continued>
|
1103
1018
|
<title-continued lang="fr">(continué)</title-continued>
|
1104
1019
|
|
@@ -1244,6 +1159,7 @@
|
|
1244
1159
|
|
1245
1160
|
|
1246
1161
|
|
1162
|
+
|
1247
1163
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1248
1164
|
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
1249
1165
|
<xsl:attribute name="margin-right">12.5mm</xsl:attribute>
|
@@ -1256,7 +1172,9 @@
|
|
1256
1172
|
|
1257
1173
|
|
1258
1174
|
|
1175
|
+
|
1259
1176
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1177
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1260
1178
|
|
1261
1179
|
|
1262
1180
|
|
@@ -1273,7 +1191,6 @@
|
|
1273
1191
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1274
1192
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1275
1193
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1276
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1277
1194
|
|
1278
1195
|
|
1279
1196
|
|
@@ -1290,6 +1207,7 @@
|
|
1290
1207
|
|
1291
1208
|
|
1292
1209
|
|
1210
|
+
|
1293
1211
|
|
1294
1212
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
1295
1213
|
|
@@ -1596,7 +1514,80 @@
|
|
1596
1514
|
|
1597
1515
|
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1598
1516
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1599
|
-
</xsl:attribute-set><xsl:
|
1517
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-style">
|
1518
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1519
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-num-style">
|
1520
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1521
|
+
|
1522
|
+
|
1523
|
+
|
1524
|
+
|
1525
|
+
|
1526
|
+
|
1527
|
+
|
1528
|
+
|
1529
|
+
|
1530
|
+
|
1531
|
+
|
1532
|
+
|
1533
|
+
|
1534
|
+
<xsl:attribute name="font-size">65%</xsl:attribute>
|
1535
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1536
|
+
|
1537
|
+
|
1538
|
+
|
1539
|
+
|
1540
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
1541
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1542
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
1543
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1544
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
1545
|
+
|
1546
|
+
|
1547
|
+
|
1548
|
+
|
1549
|
+
|
1550
|
+
|
1551
|
+
|
1552
|
+
|
1553
|
+
|
1554
|
+
|
1555
|
+
|
1556
|
+
|
1557
|
+
|
1558
|
+
|
1559
|
+
|
1560
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1561
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1562
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
1563
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1564
|
+
|
1565
|
+
|
1566
|
+
|
1567
|
+
|
1568
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
1569
|
+
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
1570
|
+
|
1571
|
+
|
1572
|
+
|
1573
|
+
|
1574
|
+
|
1575
|
+
|
1576
|
+
|
1577
|
+
|
1578
|
+
|
1579
|
+
|
1580
|
+
|
1581
|
+
|
1582
|
+
|
1583
|
+
|
1584
|
+
<xsl:attribute name="font-size">60%</xsl:attribute>
|
1585
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1586
|
+
|
1587
|
+
|
1588
|
+
|
1589
|
+
|
1590
|
+
</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">
|
1600
1591
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1601
1592
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1602
1593
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -2547,6 +2538,102 @@
|
|
2547
2538
|
|
2548
2539
|
</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">
|
2549
2540
|
<xsl:apply-templates/>
|
2541
|
+
</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">
|
2542
|
+
|
2543
|
+
<!-- list of footnotes to calculate actual footnotes number -->
|
2544
|
+
<xsl:variable name="p_fn_">
|
2545
|
+
<xsl:choose>
|
2546
|
+
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
2547
|
+
<fn gen_id="{generate-id(.)}">
|
2548
|
+
<xsl:copy-of select="@*"/>
|
2549
|
+
<xsl:copy-of select="node()"/>
|
2550
|
+
</fn>
|
2551
|
+
</xsl:when>
|
2552
|
+
<xsl:otherwise>
|
2553
|
+
<!-- itetation for:
|
2554
|
+
footnotes in bibdata/title
|
2555
|
+
footnotes in bibliography
|
2556
|
+
footnotes in document's body (except table's head/body/foot and figure text)
|
2557
|
+
-->
|
2558
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
2559
|
+
<fn gen_id="{generate-id(.)}">
|
2560
|
+
<xsl:copy-of select="@*"/>
|
2561
|
+
<xsl:copy-of select="node()"/>
|
2562
|
+
</fn>
|
2563
|
+
</xsl:for-each>
|
2564
|
+
<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']/*">
|
2565
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2566
|
+
<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])]">
|
2567
|
+
<!-- copy unique fn -->
|
2568
|
+
<fn gen_id="{generate-id(.)}">
|
2569
|
+
<xsl:copy-of select="@*"/>
|
2570
|
+
<xsl:copy-of select="node()"/>
|
2571
|
+
</fn>
|
2572
|
+
</xsl:for-each>
|
2573
|
+
</xsl:for-each>
|
2574
|
+
</xsl:otherwise>
|
2575
|
+
</xsl:choose>
|
2576
|
+
</xsl:variable>
|
2577
|
+
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
2578
|
+
|
2579
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
2580
|
+
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
2581
|
+
<xsl:variable name="reference" select="@reference"/>
|
2582
|
+
<!-- fn sequence number in document -->
|
2583
|
+
<xsl:variable name="current_fn_number">
|
2584
|
+
<xsl:choose>
|
2585
|
+
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
2586
|
+
<xsl:otherwise>
|
2587
|
+
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
2588
|
+
</xsl:otherwise>
|
2589
|
+
</xsl:choose>
|
2590
|
+
</xsl:variable>
|
2591
|
+
<xsl:variable name="current_fn_number_text">
|
2592
|
+
<xsl:value-of select="$current_fn_number"/>
|
2593
|
+
|
2594
|
+
|
2595
|
+
</xsl:variable>
|
2596
|
+
|
2597
|
+
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
2598
|
+
<xsl:variable name="footnote_inline">
|
2599
|
+
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
2600
|
+
|
2601
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
2602
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
2603
|
+
</fo:basic-link>
|
2604
|
+
</fo:inline>
|
2605
|
+
</xsl:variable>
|
2606
|
+
<!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
|
2607
|
+
gen_id=<xsl:value-of select="$gen_id"/> -->
|
2608
|
+
<xsl:choose>
|
2609
|
+
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
2610
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2611
|
+
</xsl:when>
|
2612
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
2613
|
+
<fo:footnote xsl:use-attribute-sets="fn-style">
|
2614
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2615
|
+
<fo:footnote-body>
|
2616
|
+
|
2617
|
+
<fo:block-container text-indent="0" start-indent="0">
|
2618
|
+
|
2619
|
+
|
2620
|
+
<fo:block xsl:use-attribute-sets="fn-body-style">
|
2621
|
+
|
2622
|
+
|
2623
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
2624
|
+
|
2625
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
2626
|
+
</fo:inline>
|
2627
|
+
<xsl:apply-templates/>
|
2628
|
+
</fo:block>
|
2629
|
+
</fo:block-container>
|
2630
|
+
</fo:footnote-body>
|
2631
|
+
</fo:footnote>
|
2632
|
+
</xsl:when>
|
2633
|
+
<xsl:otherwise>
|
2634
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2635
|
+
</xsl:otherwise>
|
2636
|
+
</xsl:choose>
|
2550
2637
|
</xsl:template><xsl:template name="fn_display">
|
2551
2638
|
<xsl:variable name="references">
|
2552
2639
|
|
@@ -2755,6 +2842,8 @@
|
|
2755
2842
|
|
2756
2843
|
</fo:basic-link>
|
2757
2844
|
</fo:inline>
|
2845
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
2846
|
+
<fo:inline><xsl:value-of select="."/></fo:inline>
|
2758
2847
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
2759
2848
|
<fo:inline>
|
2760
2849
|
<xsl:apply-templates/>
|
@@ -2803,12 +2892,9 @@
|
|
2803
2892
|
<fo:block margin-bottom="12pt" text-align="left">
|
2804
2893
|
|
2805
2894
|
<xsl:variable name="title-where">
|
2806
|
-
|
2807
|
-
|
2808
|
-
|
2809
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2810
|
-
</xsl:call-template>
|
2811
|
-
|
2895
|
+
<xsl:call-template name="getLocalizedString">
|
2896
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
2897
|
+
</xsl:call-template>
|
2812
2898
|
</xsl:variable>
|
2813
2899
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2814
2900
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -2824,12 +2910,9 @@
|
|
2824
2910
|
|
2825
2911
|
|
2826
2912
|
<xsl:variable name="title-where">
|
2827
|
-
|
2828
|
-
|
2829
|
-
|
2830
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2831
|
-
</xsl:call-template>
|
2832
|
-
|
2913
|
+
<xsl:call-template name="getLocalizedString">
|
2914
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
2915
|
+
</xsl:call-template>
|
2833
2916
|
</xsl:variable>
|
2834
2917
|
<xsl:value-of select="$title-where"/>
|
2835
2918
|
</fo:block>
|
@@ -2841,12 +2924,9 @@
|
|
2841
2924
|
|
2842
2925
|
|
2843
2926
|
<xsl:variable name="title-key">
|
2844
|
-
|
2845
|
-
|
2846
|
-
|
2847
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
2848
|
-
</xsl:call-template>
|
2849
|
-
|
2927
|
+
<xsl:call-template name="getLocalizedString">
|
2928
|
+
<xsl:with-param name="key">key</xsl:with-param>
|
2929
|
+
</xsl:call-template>
|
2850
2930
|
</xsl:variable>
|
2851
2931
|
<xsl:value-of select="$title-key"/>
|
2852
2932
|
</fo:block>
|
@@ -3115,6 +3195,7 @@
|
|
3115
3195
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
3116
3196
|
<xsl:apply-templates/>
|
3117
3197
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
3198
|
+
<xsl:apply-templates select="@language"/>
|
3118
3199
|
<xsl:apply-templates/>
|
3119
3200
|
</xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
3120
3201
|
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
@@ -3176,6 +3257,15 @@
|
|
3176
3257
|
</fo:inline>
|
3177
3258
|
</xsl:template><xsl:template match="*[local-name()='add']">
|
3178
3259
|
<xsl:choose>
|
3260
|
+
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
|
3261
|
+
<fo:inline>
|
3262
|
+
<xsl:call-template name="insertTag">
|
3263
|
+
<xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
|
3264
|
+
<xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
3265
|
+
<xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
3266
|
+
</xsl:call-template>
|
3267
|
+
</fo:inline>
|
3268
|
+
</xsl:when>
|
3179
3269
|
<xsl:when test="@amendment">
|
3180
3270
|
<fo:inline>
|
3181
3271
|
<xsl:call-template name="insertTag">
|
@@ -3210,7 +3300,6 @@
|
|
3210
3300
|
</fo:inline>
|
3211
3301
|
</xsl:otherwise>
|
3212
3302
|
</xsl:choose>
|
3213
|
-
|
3214
3303
|
</xsl:template><xsl:template name="insertTag">
|
3215
3304
|
<xsl:param name="type"/>
|
3216
3305
|
<xsl:param name="kind"/>
|
@@ -3226,14 +3315,14 @@
|
|
3226
3315
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3227
3316
|
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
3228
3317
|
<g>
|
3229
|
-
<xsl:if test="$type = 'closing'">
|
3318
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
3230
3319
|
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
3231
3320
|
</xsl:if>
|
3232
3321
|
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
3233
3322
|
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
3234
3323
|
</g>
|
3235
3324
|
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
3236
|
-
<xsl:if test="$type = 'closing'">
|
3325
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
3237
3326
|
<xsl:attribute name="x">25</xsl:attribute>
|
3238
3327
|
</xsl:if>
|
3239
3328
|
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
@@ -3726,9 +3815,9 @@
|
|
3726
3815
|
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
3727
3816
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
3728
3817
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
3729
|
-
<xsl:apply-templates select="*[local-name()='name']"
|
3818
|
+
<xsl:apply-templates select="*[local-name()='name']"/>
|
3730
3819
|
</fo:block>
|
3731
|
-
<xsl:apply-templates/>
|
3820
|
+
<xsl:apply-templates select="node()[not(local-name()='name')]"/>
|
3732
3821
|
</xsl:template><xsl:template match="*[local-name() = 'callout']">
|
3733
3822
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
3734
3823
|
</xsl:template><xsl:template match="*[local-name() = 'annotation']">
|
@@ -3748,22 +3837,6 @@
|
|
3748
3837
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
3749
3838
|
<xsl:apply-templates/>
|
3750
3839
|
</fo:inline>
|
3751
|
-
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
3752
|
-
<xsl:variable name="title-modified">
|
3753
|
-
|
3754
|
-
|
3755
|
-
<xsl:call-template name="getTitle">
|
3756
|
-
<xsl:with-param name="name" select="'title-modified'"/>
|
3757
|
-
</xsl:call-template>
|
3758
|
-
|
3759
|
-
</xsl:variable>
|
3760
|
-
|
3761
|
-
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
3762
|
-
<xsl:choose>
|
3763
|
-
<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>
|
3764
|
-
<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>
|
3765
|
-
</xsl:choose>
|
3766
|
-
<xsl:apply-templates/>
|
3767
3840
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3768
3841
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3769
3842
|
|
@@ -4343,11 +4416,58 @@
|
|
4343
4416
|
<xsl:value-of select="."/>
|
4344
4417
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4345
4418
|
<xsl:apply-templates mode="contents"/>
|
4419
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
|
4420
|
+
<xsl:variable name="level">
|
4421
|
+
<xsl:call-template name="getLevel">
|
4422
|
+
<xsl:with-param name="depth" select="@depth"/>
|
4423
|
+
</xsl:call-template>
|
4424
|
+
</xsl:variable>
|
4425
|
+
|
4426
|
+
<xsl:variable name="section">
|
4427
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
4428
|
+
</xsl:variable>
|
4429
|
+
|
4430
|
+
<xsl:variable name="type">floating-title</xsl:variable>
|
4431
|
+
|
4432
|
+
<xsl:variable name="display">
|
4433
|
+
<xsl:choose>
|
4434
|
+
<xsl:when test="normalize-space(@id) = ''">false</xsl:when>
|
4435
|
+
<xsl:when test="$level <= $toc_level">true</xsl:when>
|
4436
|
+
<xsl:otherwise>false</xsl:otherwise>
|
4437
|
+
</xsl:choose>
|
4438
|
+
</xsl:variable>
|
4439
|
+
|
4440
|
+
<xsl:variable name="skip">false</xsl:variable>
|
4441
|
+
|
4442
|
+
<xsl:if test="$skip = 'false'">
|
4443
|
+
|
4444
|
+
<xsl:variable name="title">
|
4445
|
+
<xsl:choose>
|
4446
|
+
<xsl:when test="*[local-name() = 'tab']">
|
4447
|
+
<xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
4448
|
+
</xsl:when>
|
4449
|
+
<xsl:otherwise>
|
4450
|
+
<xsl:copy-of select="node()"/>
|
4451
|
+
</xsl:otherwise>
|
4452
|
+
</xsl:choose>
|
4453
|
+
</xsl:variable>
|
4454
|
+
|
4455
|
+
<xsl:variable name="root">
|
4456
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
|
4457
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
|
4458
|
+
</xsl:variable>
|
4459
|
+
|
4460
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
|
4461
|
+
<title>
|
4462
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
4463
|
+
</title>
|
4464
|
+
</item>
|
4465
|
+
</xsl:if>
|
4346
4466
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4347
4467
|
<xsl:apply-templates mode="bookmarks"/>
|
4348
4468
|
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
4349
4469
|
<xsl:apply-templates select="."/>
|
4350
|
-
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4470
|
+
</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">
|
4351
4471
|
<xsl:apply-templates mode="bookmarks"/>
|
4352
4472
|
</xsl:template><xsl:template name="addBookmarks">
|
4353
4473
|
<xsl:param name="contents"/>
|
@@ -4551,7 +4671,10 @@
|
|
4551
4671
|
</fo:block>
|
4552
4672
|
</xsl:if>
|
4553
4673
|
</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">
|
4554
|
-
<xsl:
|
4674
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
4675
|
+
<xsl:apply-templates mode="contents_item">
|
4676
|
+
<xsl:with-param name="mode" select="$mode"/>
|
4677
|
+
</xsl:apply-templates>
|
4555
4678
|
<!-- <xsl:text> </xsl:text> -->
|
4556
4679
|
</xsl:template><xsl:template name="getSection">
|
4557
4680
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
@@ -4624,6 +4747,18 @@
|
|
4624
4747
|
<xsl:copy-of select="."/>
|
4625
4748
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4626
4749
|
<xsl:text> </xsl:text>
|
4750
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
|
4751
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
4752
|
+
<xsl:apply-templates mode="contents_item">
|
4753
|
+
<xsl:with-param name="mode" select="$mode"/>
|
4754
|
+
</xsl:apply-templates>
|
4755
|
+
</xsl:template><xsl:template match="*[local-name() = 'add'][starts-with(text(), $ace_tag)]" mode="contents_item">
|
4756
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
4757
|
+
<xsl:if test="$mode = 'contents'">
|
4758
|
+
<xsl:copy>
|
4759
|
+
<xsl:apply-templates mode="contents_item"/>
|
4760
|
+
</xsl:copy>
|
4761
|
+
</xsl:if>
|
4627
4762
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4628
4763
|
|
4629
4764
|
<fo:block-container margin-left="0mm">
|
@@ -4970,42 +5105,48 @@
|
|
4970
5105
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4971
5106
|
|
4972
5107
|
|
4973
|
-
<xsl:
|
4974
|
-
|
4975
|
-
<xsl:variable name="element">
|
5108
|
+
<xsl:variable name="fo_element">
|
5109
|
+
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
|
4976
5110
|
block
|
4977
5111
|
|
4978
|
-
|
5112
|
+
|
4979
5113
|
</xsl:variable>
|
4980
5114
|
|
5115
|
+
<!-- display 'EXAMPLE' -->
|
5116
|
+
<xsl:apply-templates select="*[local-name()='name']">
|
5117
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5118
|
+
</xsl:apply-templates>
|
5119
|
+
|
4981
5120
|
<xsl:choose>
|
4982
|
-
<xsl:when test="contains(normalize-space($
|
4983
|
-
<fo:block xsl:use-attribute-sets="example-body-style">
|
4984
|
-
<
|
4985
|
-
|
5121
|
+
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
5122
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style">
|
5123
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
5124
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
5125
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5126
|
+
</xsl:apply-templates>
|
5127
|
+
</fo:block-container>
|
5128
|
+
</fo:block-container>
|
4986
5129
|
</xsl:when>
|
4987
5130
|
<xsl:otherwise>
|
4988
5131
|
<fo:inline>
|
4989
|
-
<xsl:apply-templates
|
5132
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
5133
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5134
|
+
</xsl:apply-templates>
|
4990
5135
|
</fo:inline>
|
4991
5136
|
</xsl:otherwise>
|
4992
5137
|
</xsl:choose>
|
4993
5138
|
|
4994
5139
|
</fo:block>
|
4995
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"
|
4996
|
-
|
4997
|
-
|
4998
|
-
block
|
4999
|
-
|
5000
|
-
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
5001
|
-
</xsl:variable>
|
5140
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
|
5141
|
+
<xsl:param name="fo_element">block</xsl:param>
|
5142
|
+
|
5002
5143
|
<xsl:choose>
|
5003
5144
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
5004
5145
|
<fo:inline>
|
5005
5146
|
<xsl:apply-templates/>
|
5006
5147
|
</fo:inline>
|
5007
5148
|
</xsl:when>
|
5008
|
-
<xsl:when test="contains(normalize-space($
|
5149
|
+
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
5009
5150
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
5010
5151
|
<xsl:apply-templates/>
|
5011
5152
|
</fo:block>
|
@@ -5018,14 +5159,15 @@
|
|
5018
5159
|
</xsl:choose>
|
5019
5160
|
|
5020
5161
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
5162
|
+
<xsl:param name="fo_element">block</xsl:param>
|
5163
|
+
|
5021
5164
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
5022
5165
|
<xsl:variable name="element">
|
5023
|
-
block
|
5024
|
-
|
5025
5166
|
|
5167
|
+
<xsl:value-of select="$fo_element"/>
|
5026
5168
|
</xsl:variable>
|
5027
5169
|
<xsl:choose>
|
5028
|
-
<xsl:when test="normalize-space($element)
|
5170
|
+
<xsl:when test="starts-with(normalize-space($element), 'block')">
|
5029
5171
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
5030
5172
|
|
5031
5173
|
<xsl:apply-templates/>
|
@@ -5044,62 +5186,66 @@
|
|
5044
5186
|
<xsl:variable name="termsource_text">
|
5045
5187
|
<xsl:apply-templates/>
|
5046
5188
|
</xsl:variable>
|
5047
|
-
|
5048
|
-
<xsl:choose>
|
5189
|
+
<xsl:copy-of select="$termsource_text"/>
|
5190
|
+
<!-- <xsl:choose>
|
5049
5191
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
5050
|
-
<!-- <xsl:apply-templates /> -->
|
5051
5192
|
<xsl:copy-of select="$termsource_text"/>
|
5052
5193
|
</xsl:when>
|
5053
5194
|
<xsl:otherwise>
|
5054
|
-
|
5055
|
-
|
5195
|
+
<xsl:if test="$namespace = 'bsi'">
|
5196
|
+
<xsl:choose>
|
5197
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
|
5198
|
+
<xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
|
5199
|
+
</xsl:choose>
|
5200
|
+
</xsl:if>
|
5201
|
+
<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'">
|
5056
5202
|
<xsl:text>[</xsl:text>
|
5057
|
-
|
5058
|
-
<!-- <xsl:apply-templates /> -->
|
5203
|
+
</xsl:if>
|
5059
5204
|
<xsl:copy-of select="$termsource_text"/>
|
5060
|
-
|
5061
|
-
|
5205
|
+
<xsl:if test="$namespace = 'bsi'">
|
5206
|
+
<xsl:choose>
|
5207
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
|
5208
|
+
<xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
|
5209
|
+
</xsl:choose>
|
5210
|
+
</xsl:if>
|
5211
|
+
<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'">
|
5062
5212
|
<xsl:text>]</xsl:text>
|
5063
|
-
|
5213
|
+
</xsl:if>
|
5064
5214
|
</xsl:otherwise>
|
5065
|
-
</xsl:choose>
|
5215
|
+
</xsl:choose> -->
|
5066
5216
|
</fo:block>
|
5067
5217
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
5068
5218
|
<xsl:if test="normalize-space() != ''">
|
5069
5219
|
<xsl:value-of select="."/>
|
5070
5220
|
</xsl:if>
|
5071
|
-
</xsl:template><xsl:
|
5072
|
-
<
|
5073
|
-
|
5074
|
-
|
5075
|
-
|
5221
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
|
5222
|
+
<fo:inline>
|
5223
|
+
|
5224
|
+
|
5225
|
+
<xsl:value-of select="."/>
|
5226
|
+
</fo:inline>
|
5227
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
5076
5228
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5077
5229
|
<xsl:if test="normalize-space(@citeas) = ''">
|
5078
5230
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5079
5231
|
</xsl:if>
|
5080
|
-
|
5081
|
-
|
5082
|
-
<fo:inline>
|
5083
|
-
|
5084
|
-
|
5085
|
-
|
5086
|
-
|
5087
|
-
|
5088
|
-
|
5089
|
-
|
5090
|
-
<xsl:call-template name="getTitle">
|
5091
|
-
<xsl:with-param name="name" select="'title-source'"/>
|
5092
|
-
</xsl:call-template>
|
5093
|
-
<xsl:text>: </xsl:text>
|
5094
|
-
|
5095
|
-
|
5096
|
-
</fo:inline>
|
5097
|
-
|
5098
5232
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
5099
5233
|
<xsl:apply-templates/>
|
5100
5234
|
</fo:inline>
|
5101
|
-
|
5102
|
-
|
5235
|
+
</fo:basic-link>
|
5236
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
5237
|
+
<xsl:variable name="title-modified">
|
5238
|
+
<xsl:call-template name="getLocalizedString">
|
5239
|
+
<xsl:with-param name="key">modified</xsl:with-param>
|
5240
|
+
</xsl:call-template>
|
5241
|
+
</xsl:variable>
|
5242
|
+
|
5243
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
5244
|
+
<xsl:choose>
|
5245
|
+
<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>
|
5246
|
+
<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>
|
5247
|
+
</xsl:choose>
|
5248
|
+
<xsl:apply-templates/>
|
5103
5249
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
5104
5250
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5105
5251
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
@@ -5287,12 +5433,9 @@
|
|
5287
5433
|
</fo:block>
|
5288
5434
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
5289
5435
|
<xsl:variable name="title-deprecated">
|
5290
|
-
|
5291
|
-
<xsl:
|
5292
|
-
|
5293
|
-
</xsl:call-template>
|
5294
|
-
|
5295
|
-
|
5436
|
+
<xsl:call-template name="getLocalizedString">
|
5437
|
+
<xsl:with-param name="key">deprecated</xsl:with-param>
|
5438
|
+
</xsl:call-template>
|
5296
5439
|
</xsl:variable>
|
5297
5440
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
5298
5441
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -5301,6 +5444,8 @@
|
|
5301
5444
|
<xsl:if test="*[local-name() = 'strong']">
|
5302
5445
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
5303
5446
|
</xsl:if>
|
5447
|
+
</xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
|
5448
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
|
5304
5449
|
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
5305
5450
|
<fo:block xsl:use-attribute-sets="definition-style">
|
5306
5451
|
<xsl:apply-templates/>
|
@@ -5371,6 +5516,51 @@
|
|
5371
5516
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
5372
5517
|
<!-- 0xA0 to space replacement -->
|
5373
5518
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
5519
|
+
</xsl:template><xsl:variable name="ul_labels_">
|
5520
|
+
|
5521
|
+
|
5522
|
+
|
5523
|
+
|
5524
|
+
|
5525
|
+
|
5526
|
+
|
5527
|
+
|
5528
|
+
|
5529
|
+
|
5530
|
+
|
5531
|
+
|
5532
|
+
|
5533
|
+
|
5534
|
+
<label>—</label> <!-- em dash -->
|
5535
|
+
|
5536
|
+
|
5537
|
+
|
5538
|
+
|
5539
|
+
</xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
|
5540
|
+
<xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
|
5541
|
+
<xsl:variable name="list_level">
|
5542
|
+
<xsl:choose>
|
5543
|
+
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
5544
|
+
<xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
|
5545
|
+
</xsl:choose>
|
5546
|
+
</xsl:variable>
|
5547
|
+
<xsl:choose>
|
5548
|
+
<xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
|
5549
|
+
<xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
|
5550
|
+
</xsl:when>
|
5551
|
+
<xsl:when test="$list_level mod 3 = 0">
|
5552
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
|
5553
|
+
</xsl:when>
|
5554
|
+
<xsl:when test="$list_level mod 2 = 0">
|
5555
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
|
5556
|
+
</xsl:when>
|
5557
|
+
<xsl:otherwise>
|
5558
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
|
5559
|
+
</xsl:otherwise>
|
5560
|
+
</xsl:choose>
|
5561
|
+
</xsl:template><xsl:template match="label" mode="ul_labels">
|
5562
|
+
<xsl:copy-of select="@*[not(local-name() = 'level')]"/>
|
5563
|
+
<xsl:value-of select="."/>
|
5374
5564
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
5375
5565
|
<xsl:choose>
|
5376
5566
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
@@ -5582,6 +5772,26 @@
|
|
5582
5772
|
|
5583
5773
|
|
5584
5774
|
|
5775
|
+
|
5776
|
+
|
5777
|
+
|
5778
|
+
|
5779
|
+
|
5780
|
+
|
5781
|
+
|
5782
|
+
|
5783
|
+
|
5784
|
+
|
5785
|
+
|
5786
|
+
|
5787
|
+
|
5788
|
+
|
5789
|
+
<!-- end MPFD bibitem processing -->
|
5790
|
+
|
5791
|
+
<!-- start M3D bibitem processing -->
|
5792
|
+
|
5793
|
+
|
5794
|
+
|
5585
5795
|
<!-- start OGC bibtem processing -->
|
5586
5796
|
<xsl:choose>
|
5587
5797
|
<xsl:when test="*[local-name() = 'formattedref']">
|
@@ -5723,14 +5933,8 @@
|
|
5723
5933
|
<!-- end OGC bibitem processing-->
|
5724
5934
|
|
5725
5935
|
|
5726
|
-
|
5727
|
-
|
5728
|
-
|
5729
|
-
|
5730
|
-
|
5731
|
-
|
5732
5936
|
</xsl:template><xsl:template name="processBibitemDocId">
|
5733
|
-
<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')]"/>
|
5937
|
+
<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')]"/>
|
5734
5938
|
<xsl:choose>
|
5735
5939
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
5736
5940
|
<!-- <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"/>
|
@@ -5744,7 +5948,7 @@
|
|
5744
5948
|
<xsl:if test="$type != ''">
|
5745
5949
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
5746
5950
|
</xsl:if> -->
|
5747
|
-
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
5951
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
|
5748
5952
|
</xsl:otherwise>
|
5749
5953
|
</xsl:choose>
|
5750
5954
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
@@ -5849,7 +6053,35 @@
|
|
5849
6053
|
<fo:block-container border="1pt solid black" width="50%">
|
5850
6054
|
<fo:block> </fo:block>
|
5851
6055
|
</fo:block-container>
|
5852
|
-
</xsl:template><xsl:
|
6056
|
+
</xsl:template><xsl:variable name="toc_level">
|
6057
|
+
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
6058
|
+
<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:-->
|
6059
|
+
<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 -->
|
6060
|
+
<xsl:choose>
|
6061
|
+
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
6062
|
+
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
6063
|
+
<xsl:otherwise><!-- default value -->
|
6064
|
+
|
6065
|
+
|
6066
|
+
|
6067
|
+
|
6068
|
+
|
6069
|
+
|
6070
|
+
|
6071
|
+
|
6072
|
+
|
6073
|
+
|
6074
|
+
|
6075
|
+
|
6076
|
+
|
6077
|
+
|
6078
|
+
3
|
6079
|
+
|
6080
|
+
|
6081
|
+
|
6082
|
+
</xsl:otherwise>
|
6083
|
+
</xsl:choose>
|
6084
|
+
</xsl:variable><xsl:template match="*[local-name() = 'toc']">
|
5853
6085
|
<xsl:param name="colwidths"/>
|
5854
6086
|
<xsl:variable name="colwidths_">
|
5855
6087
|
<xsl:choose>
|
@@ -5929,7 +6161,7 @@
|
|
5929
6161
|
</td>
|
5930
6162
|
</xsl:for-each>
|
5931
6163
|
<td>333</td> <!-- page number, just for fill -->
|
5932
|
-
</xsl:template><xsl:template match="*[local-name() = 'variant-title']
|
6164
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5933
6165
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5934
6166
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5935
6167
|
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
@@ -5940,6 +6172,10 @@
|
|
5940
6172
|
</svg>
|
5941
6173
|
</fo:instream-foreign-object>
|
5942
6174
|
</fo:inline>
|
6175
|
+
</xsl:template><xsl:template match="@language">
|
6176
|
+
<xsl:copy-of select="."/>
|
6177
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
|
6178
|
+
<xsl:call-template name="title"/>
|
5943
6179
|
</xsl:template><xsl:template name="convertDate">
|
5944
6180
|
<xsl:param name="date"/>
|
5945
6181
|
<xsl:param name="format" select="'short'"/>
|
@@ -6297,9 +6533,15 @@
|
|
6297
6533
|
</xsl:template><xsl:template name="getLocalizedString">
|
6298
6534
|
<xsl:param name="key"/>
|
6299
6535
|
<xsl:param name="formatted">false</xsl:param>
|
6536
|
+
<xsl:param name="lang"/>
|
6300
6537
|
|
6301
6538
|
<xsl:variable name="curr_lang">
|
6302
|
-
<xsl:
|
6539
|
+
<xsl:choose>
|
6540
|
+
<xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
|
6541
|
+
<xsl:otherwise>
|
6542
|
+
<xsl:call-template name="getLang"/>
|
6543
|
+
</xsl:otherwise>
|
6544
|
+
</xsl:choose>
|
6303
6545
|
</xsl:variable>
|
6304
6546
|
|
6305
6547
|
<xsl:variable name="data_value">
|
@@ -6489,4 +6731,14 @@
|
|
6489
6731
|
</xsl:otherwise>
|
6490
6732
|
</xsl:choose>
|
6491
6733
|
</xsl:if>
|
6734
|
+
</xsl:template><xsl:template name="setAltText">
|
6735
|
+
<xsl:param name="value"/>
|
6736
|
+
<xsl:attribute name="fox:alt-text">
|
6737
|
+
<xsl:choose>
|
6738
|
+
<xsl:when test="normalize-space($value) != ''">
|
6739
|
+
<xsl:value-of select="$value"/>
|
6740
|
+
</xsl:when>
|
6741
|
+
<xsl:otherwise>_</xsl:otherwise>
|
6742
|
+
</xsl:choose>
|
6743
|
+
</xsl:attribute>
|
6492
6744
|
</xsl:template></xsl:stylesheet>
|