metanorma-ogc 1.2.3 → 1.2.8
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 +62 -0
- data/README.adoc +3 -4
- data/lib/asciidoctor/ogc/basicdoc.rng +4 -11
- data/lib/asciidoctor/ogc/boilerplate.xml +2 -2
- data/lib/asciidoctor/ogc/converter.rb +25 -1
- data/lib/asciidoctor/ogc/isodoc.rng +27 -50
- data/lib/asciidoctor/ogc/ogc.rng +8 -1
- data/lib/asciidoctor/ogc/validate.rb +1 -1
- data/lib/isodoc/ogc/base_convert.rb +0 -1
- data/lib/isodoc/ogc/biblio.rb +1 -0
- data/lib/isodoc/ogc/html/_coverpage.css +6 -0
- data/lib/isodoc/ogc/html/_coverpage.scss +8 -0
- data/lib/isodoc/ogc/html/html_ogc_titlepage.html +3 -3
- data/lib/isodoc/ogc/html/htmlstyle.css +211 -201
- data/lib/isodoc/ogc/html/htmlstyle.scss +4 -4
- data/lib/isodoc/ogc/html/ogc.css +21 -21
- data/lib/isodoc/ogc/html/ogc.scss +21 -21
- data/lib/isodoc/ogc/html/ogc_wp.css +35 -35
- data/lib/isodoc/ogc/html/ogc_wp.scss +35 -35
- data/lib/isodoc/ogc/html/word_ogc_titlepage.html +1 -1
- data/lib/isodoc/ogc/html/wordstyle.css +19 -19
- data/lib/isodoc/ogc/html/wordstyle.scss +19 -19
- data/lib/isodoc/ogc/html/wordstyle_wp.css +23 -23
- data/lib/isodoc/ogc/html/wordstyle_wp.scss +23 -23
- data/lib/isodoc/ogc/html_convert.rb +5 -1
- data/lib/isodoc/ogc/i18n-en.yaml +10 -0
- data/lib/isodoc/ogc/init.rb +1 -1
- data/lib/isodoc/ogc/metadata.rb +1 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +671 -138
- data/lib/isodoc/ogc/ogc.best-practice.xsl +671 -138
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +671 -138
- data/lib/isodoc/ogc/ogc.community-practice.xsl +671 -138
- data/lib/isodoc/ogc/ogc.community-standard.xsl +671 -138
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +671 -138
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +671 -138
- data/lib/isodoc/ogc/ogc.other.xsl +671 -138
- data/lib/isodoc/ogc/ogc.policy.xsl +671 -138
- data/lib/isodoc/ogc/ogc.reference-model.xsl +671 -138
- data/lib/isodoc/ogc/ogc.release-notes.xsl +671 -138
- data/lib/isodoc/ogc/ogc.standard.xsl +671 -138
- data/lib/isodoc/ogc/ogc.test-suite.xsl +671 -138
- data/lib/isodoc/ogc/ogc.user-guide.xsl +671 -138
- data/lib/isodoc/ogc/ogc.white-paper.xsl +584 -89
- data/lib/isodoc/ogc/presentation_xml_convert.rb +25 -0
- data/lib/isodoc/ogc/sections.rb +6 -1
- data/lib/isodoc/ogc/word_convert.rb +8 -1
- data/lib/isodoc/ogc/xref.rb +30 -5
- data/lib/metanorma/ogc.rb +7 -0
- data/lib/metanorma/ogc/fonts_manifest.yaml +6 -0
- data/lib/metanorma/ogc/processor.rb +0 -8
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +2 -2
- metadata +8 -9
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
@@ -91,7 +91,7 @@
|
|
91
91
|
|
92
92
|
<xsl:template match="/">
|
93
93
|
<xsl:call-template name="namespaceCheck"/>
|
94
|
-
<fo:root font-family="Arial,
|
94
|
+
<fo:root font-family="Arial, STIX Two Math, Source Han Sans" font-size="11pt" xml:lang="{$lang}">
|
95
95
|
<fo:layout-master-set>
|
96
96
|
|
97
97
|
<!-- Document pages -->
|
@@ -107,6 +107,10 @@
|
|
107
107
|
|
108
108
|
<xsl:call-template name="addPDFUAmeta"/>
|
109
109
|
|
110
|
+
<xsl:call-template name="addBookmarks">
|
111
|
+
<xsl:with-param name="contents" select="$contents"/>
|
112
|
+
</xsl:call-template>
|
113
|
+
|
110
114
|
<!-- Cover Page -->
|
111
115
|
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
112
116
|
<xsl:call-template name="insertHeaderFooter"/>
|
@@ -120,7 +124,7 @@
|
|
120
124
|
</fo:block-container>
|
121
125
|
</fo:block-container>
|
122
126
|
|
123
|
-
<fo:block font-family="Lato
|
127
|
+
<fo:block font-family="Lato" font-weight="300" font-size="14pt" font-style="italic" margin-top="6pt" color="rgb(21, 43, 77)">
|
124
128
|
<xsl:text>Additional context, inspirational quote, etc. fits into this subheading area</xsl:text>
|
125
129
|
</fo:block>
|
126
130
|
|
@@ -168,10 +172,13 @@
|
|
168
172
|
<xsl:text>Table of Contents</xsl:text>
|
169
173
|
</fo:block>
|
170
174
|
<xsl:variable name="margin-left">3.9</xsl:variable>
|
171
|
-
<xsl:for-each select="xalan:nodeset($contents)//item">
|
175
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
172
176
|
<fo:block margin-top="8pt" margin-bottom="5pt" margin-left="{(@level - 1) * $margin-left}mm" text-align-last="justify">
|
173
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
174
|
-
<xsl:
|
177
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
178
|
+
<xsl:if test="@section != ''">
|
179
|
+
<xsl:value-of select="@section"/><xsl:text> </xsl:text>
|
180
|
+
</xsl:if>
|
181
|
+
<xsl:apply-templates select="title"/>
|
175
182
|
<fo:inline keep-together.within-line="always">
|
176
183
|
<fo:leader leader-pattern="dots"/>
|
177
184
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
@@ -262,6 +269,25 @@
|
|
262
269
|
</fo:root>
|
263
270
|
</xsl:template>
|
264
271
|
|
272
|
+
|
273
|
+
<xsl:variable name="thinspace" select="' '"/>
|
274
|
+
|
275
|
+
<!-- Lato font doesn't contain 'thin space' glyph -->
|
276
|
+
<xsl:template match="text()" priority="1">
|
277
|
+
<xsl:value-of select="translate(., $thinspace, ' ')"/>
|
278
|
+
</xsl:template>
|
279
|
+
|
280
|
+
<xsl:template match="text()" priority="3" mode="contents">
|
281
|
+
<xsl:value-of select="translate(., $thinspace, ' ')"/>
|
282
|
+
</xsl:template>
|
283
|
+
|
284
|
+
<xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text()" priority="2">
|
285
|
+
<xsl:variable name="content">
|
286
|
+
<xsl:call-template name="add-zero-spaces"/>
|
287
|
+
</xsl:variable>
|
288
|
+
<xsl:value-of select="translate($content, $thinspace, ' ')"/>
|
289
|
+
</xsl:template>
|
290
|
+
|
265
291
|
<xsl:template match="node()">
|
266
292
|
<xsl:apply-templates/>
|
267
293
|
</xsl:template>
|
@@ -282,15 +308,21 @@
|
|
282
308
|
</xsl:variable>
|
283
309
|
|
284
310
|
<xsl:variable name="display">
|
285
|
-
<xsl:choose>
|
286
|
-
<xsl:when test="ancestor-or-self::ogc:bibitem">false</xsl:when>
|
287
|
-
<xsl:when test="ancestor-or-self::ogc:term">false</xsl:when>
|
311
|
+
<xsl:choose>
|
288
312
|
<xsl:when test="$level > 3">false</xsl:when>
|
289
313
|
<xsl:otherwise>true</xsl:otherwise>
|
290
314
|
</xsl:choose>
|
291
315
|
</xsl:variable>
|
292
316
|
|
293
|
-
<xsl:
|
317
|
+
<xsl:variable name="skip">
|
318
|
+
<xsl:choose>
|
319
|
+
<xsl:when test="ancestor-or-self::ogc:bibitem">true</xsl:when>
|
320
|
+
<xsl:when test="ancestor-or-self::ogc:term">true</xsl:when>
|
321
|
+
<xsl:otherwise>false</xsl:otherwise>
|
322
|
+
</xsl:choose>
|
323
|
+
</xsl:variable>
|
324
|
+
|
325
|
+
<xsl:if test="$skip = 'false'">
|
294
326
|
|
295
327
|
<xsl:variable name="section">
|
296
328
|
<xsl:call-template name="getSection"/>
|
@@ -304,10 +336,12 @@
|
|
304
336
|
<xsl:value-of select="local-name()"/>
|
305
337
|
</xsl:variable>
|
306
338
|
|
307
|
-
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
|
308
|
-
<
|
339
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
340
|
+
<title>
|
341
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
342
|
+
</title>
|
343
|
+
<xsl:apply-templates mode="contents"/>
|
309
344
|
</item>
|
310
|
-
<xsl:apply-templates mode="contents"/>
|
311
345
|
</xsl:if>
|
312
346
|
|
313
347
|
</xsl:template>
|
@@ -835,6 +869,12 @@
|
|
835
869
|
|
836
870
|
</title-edition>
|
837
871
|
|
872
|
+
<title-edition lang="fr">
|
873
|
+
|
874
|
+
<xsl:text>Édition </xsl:text>
|
875
|
+
|
876
|
+
</title-edition>
|
877
|
+
|
838
878
|
|
839
879
|
<title-toc lang="en">
|
840
880
|
|
@@ -843,7 +883,12 @@
|
|
843
883
|
|
844
884
|
|
845
885
|
</title-toc>
|
846
|
-
<title-toc lang="fr">
|
886
|
+
<title-toc lang="fr">
|
887
|
+
|
888
|
+
<xsl:text>Sommaire</xsl:text>
|
889
|
+
|
890
|
+
|
891
|
+
</title-toc>
|
847
892
|
|
848
893
|
<title-toc lang="zh">Contents</title-toc>
|
849
894
|
|
@@ -863,13 +908,22 @@
|
|
863
908
|
<title-part lang="en">
|
864
909
|
|
865
910
|
|
911
|
+
|
866
912
|
</title-part>
|
867
913
|
<title-part lang="fr">
|
868
914
|
|
869
915
|
|
916
|
+
|
870
917
|
</title-part>
|
871
918
|
<title-part lang="zh">第 # 部分:</title-part>
|
872
919
|
|
920
|
+
<title-subpart lang="en">
|
921
|
+
|
922
|
+
</title-subpart>
|
923
|
+
<title-subpart lang="fr">
|
924
|
+
|
925
|
+
</title-subpart>
|
926
|
+
|
873
927
|
<title-modified lang="en">modified</title-modified>
|
874
928
|
<title-modified lang="fr">modifiée</title-modified>
|
875
929
|
|
@@ -931,10 +985,19 @@
|
|
931
985
|
|
932
986
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
933
987
|
<xsl:param name="name"/>
|
934
|
-
<xsl:
|
935
|
-
|
988
|
+
<xsl:param name="lang"/>
|
989
|
+
<xsl:variable name="lang_">
|
990
|
+
<xsl:choose>
|
991
|
+
<xsl:when test="$lang != ''">
|
992
|
+
<xsl:value-of select="$lang"/>
|
993
|
+
</xsl:when>
|
994
|
+
<xsl:otherwise>
|
995
|
+
<xsl:call-template name="getLang"/>
|
996
|
+
</xsl:otherwise>
|
997
|
+
</xsl:choose>
|
936
998
|
</xsl:variable>
|
937
|
-
<xsl:variable name="
|
999
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1000
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
938
1001
|
<xsl:choose>
|
939
1002
|
<xsl:when test="normalize-space($title_) != ''">
|
940
1003
|
<xsl:value-of select="$title_"/>
|
@@ -943,7 +1006,9 @@
|
|
943
1006
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
944
1007
|
</xsl:otherwise>
|
945
1008
|
</xsl:choose>
|
946
|
-
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="
|
1009
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
1010
|
+
|
1011
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
947
1012
|
|
948
1013
|
<xsl:attribute name="color">blue</xsl:attribute>
|
949
1014
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
@@ -1130,6 +1195,7 @@
|
|
1130
1195
|
|
1131
1196
|
|
1132
1197
|
|
1198
|
+
|
1133
1199
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1134
1200
|
|
1135
1201
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -1181,6 +1247,7 @@
|
|
1181
1247
|
|
1182
1248
|
|
1183
1249
|
|
1250
|
+
|
1184
1251
|
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
1185
1252
|
|
1186
1253
|
|
@@ -1261,6 +1328,7 @@
|
|
1261
1328
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1262
1329
|
|
1263
1330
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1331
|
+
|
1264
1332
|
|
1265
1333
|
|
1266
1334
|
|
@@ -1391,6 +1459,10 @@
|
|
1391
1459
|
|
1392
1460
|
|
1393
1461
|
|
1462
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1463
|
+
<fo:block> </fo:block>
|
1464
|
+
</xsl:if> -->
|
1465
|
+
|
1394
1466
|
<!-- $namespace = 'iso' or -->
|
1395
1467
|
|
1396
1468
|
|
@@ -1426,6 +1498,7 @@
|
|
1426
1498
|
<xsl:with-param name="table" select="$simple-table"/>
|
1427
1499
|
</xsl:call-template>
|
1428
1500
|
</xsl:variable>
|
1501
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1429
1502
|
|
1430
1503
|
<!-- <xsl:variable name="colwidths2">
|
1431
1504
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1446,37 +1519,59 @@
|
|
1446
1519
|
|
1447
1520
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1448
1521
|
|
1522
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1449
1523
|
|
1450
1524
|
|
1525
|
+
|
1526
|
+
|
1527
|
+
|
1451
1528
|
|
1452
1529
|
|
1453
1530
|
|
1454
1531
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1455
1532
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1456
1533
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1457
|
-
|
1534
|
+
|
1458
1535
|
|
1459
1536
|
|
1460
1537
|
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1538
|
+
|
1539
|
+
|
1540
|
+
|
1541
|
+
|
1542
|
+
<xsl:variable name="table_attributes">
|
1543
|
+
<attribute name="table-layout">fixed</attribute>
|
1544
|
+
<attribute name="width">100%</attribute>
|
1545
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1546
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1470
1547
|
|
1471
1548
|
|
1472
1549
|
|
1473
1550
|
|
1474
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1475
1551
|
|
1552
|
+
<attribute name="margin-left">0mm</attribute>
|
1553
|
+
<attribute name="margin-right">0mm</attribute>
|
1554
|
+
|
1555
|
+
|
1556
|
+
|
1476
1557
|
|
1558
|
+
|
1477
1559
|
|
1560
|
+
</xsl:variable>
|
1561
|
+
|
1562
|
+
|
1563
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1478
1564
|
|
1565
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1566
|
+
<xsl:attribute name="{@name}">
|
1567
|
+
<xsl:value-of select="."/>
|
1568
|
+
</xsl:attribute>
|
1569
|
+
</xsl:for-each>
|
1479
1570
|
|
1571
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1572
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1573
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1574
|
+
</xsl:if>
|
1480
1575
|
|
1481
1576
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1482
1577
|
<xsl:choose>
|
@@ -1500,6 +1595,33 @@
|
|
1500
1595
|
|
1501
1596
|
</fo:table>
|
1502
1597
|
|
1598
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1599
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1600
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1601
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1602
|
+
</xsl:call-template>
|
1603
|
+
</xsl:for-each>
|
1604
|
+
|
1605
|
+
<!-- insert footer as table -->
|
1606
|
+
<!-- <fo:table>
|
1607
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1608
|
+
<xsl:attribute name="{@name}">
|
1609
|
+
<xsl:value-of select="."/>
|
1610
|
+
</xsl:attribute>
|
1611
|
+
</xsl:for-each>
|
1612
|
+
|
1613
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1614
|
+
<xsl:choose>
|
1615
|
+
<xsl:when test=". = 1 or . = 0">
|
1616
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1617
|
+
</xsl:when>
|
1618
|
+
<xsl:otherwise>
|
1619
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1620
|
+
</xsl:otherwise>
|
1621
|
+
</xsl:choose>
|
1622
|
+
</xsl:for-each>
|
1623
|
+
</fo:table>-->
|
1624
|
+
|
1503
1625
|
|
1504
1626
|
|
1505
1627
|
|
@@ -1511,6 +1633,7 @@
|
|
1511
1633
|
<xsl:if test="normalize-space() != ''">
|
1512
1634
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1513
1635
|
|
1636
|
+
|
1514
1637
|
<xsl:apply-templates/>
|
1515
1638
|
</fo:block>
|
1516
1639
|
</xsl:if>
|
@@ -1566,6 +1689,13 @@
|
|
1566
1689
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1567
1690
|
<xsl:variable name="td_text">
|
1568
1691
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1692
|
+
|
1693
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1694
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1695
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1696
|
+
</xsl:for-each>
|
1697
|
+
</xsl:if> -->
|
1698
|
+
|
1569
1699
|
</xsl:variable>
|
1570
1700
|
<xsl:variable name="words">
|
1571
1701
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1625,11 +1755,14 @@
|
|
1625
1755
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1626
1756
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1627
1757
|
<xsl:value-of select="@target"/>
|
1758
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1759
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1760
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1628
1761
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1629
1762
|
<xsl:param name="cols-count"/>
|
1630
1763
|
<!-- font-weight="bold" -->
|
1631
1764
|
<fo:table-header>
|
1632
|
-
|
1765
|
+
|
1633
1766
|
<xsl:apply-templates/>
|
1634
1767
|
</fo:table-header>
|
1635
1768
|
</xsl:template><xsl:template name="table-header-title">
|
@@ -1654,6 +1787,13 @@
|
|
1654
1787
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1655
1788
|
<xsl:apply-templates/>
|
1656
1789
|
</xsl:template><xsl:template name="insertTableFooter">
|
1790
|
+
<xsl:param name="cols-count"/>
|
1791
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1792
|
+
<fo:table-footer>
|
1793
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1794
|
+
</fo:table-footer>
|
1795
|
+
</xsl:if>
|
1796
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1657
1797
|
<xsl:param name="cols-count"/>
|
1658
1798
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1659
1799
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1675,11 +1815,29 @@
|
|
1675
1815
|
<!-- fn will be processed inside 'note' processing -->
|
1676
1816
|
|
1677
1817
|
|
1818
|
+
|
1819
|
+
|
1820
|
+
|
1821
|
+
|
1678
1822
|
<!-- except gb -->
|
1679
1823
|
|
1680
1824
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1681
1825
|
|
1682
1826
|
|
1827
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
1828
|
+
<!-- empty, because notes show at page side in main sections -->
|
1829
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1830
|
+
<xsl:choose>
|
1831
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1832
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1833
|
+
</xsl:when>
|
1834
|
+
<xsl:otherwise>
|
1835
|
+
<fo:block/>
|
1836
|
+
</xsl:otherwise>
|
1837
|
+
</xsl:choose>
|
1838
|
+
</xsl:if> -->
|
1839
|
+
|
1840
|
+
|
1683
1841
|
<!-- horizontal row separator -->
|
1684
1842
|
|
1685
1843
|
|
@@ -1693,6 +1851,88 @@
|
|
1693
1851
|
</fo:table-footer>
|
1694
1852
|
|
1695
1853
|
</xsl:if>
|
1854
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
1855
|
+
<xsl:param name="table_attributes"/>
|
1856
|
+
<xsl:param name="colwidths"/>
|
1857
|
+
|
1858
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1859
|
+
|
1860
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1861
|
+
|
1862
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
1863
|
+
|
1864
|
+
<fo:table keep-with-previous="always">
|
1865
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1866
|
+
<xsl:choose>
|
1867
|
+
<xsl:when test="@name = 'border-top'">
|
1868
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
1869
|
+
</xsl:when>
|
1870
|
+
<xsl:when test="@name = 'border'">
|
1871
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1872
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
1873
|
+
</xsl:when>
|
1874
|
+
<xsl:otherwise>
|
1875
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1876
|
+
</xsl:otherwise>
|
1877
|
+
</xsl:choose>
|
1878
|
+
</xsl:for-each>
|
1879
|
+
|
1880
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1881
|
+
<xsl:choose>
|
1882
|
+
<xsl:when test=". = 1 or . = 0">
|
1883
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1884
|
+
</xsl:when>
|
1885
|
+
<xsl:otherwise>
|
1886
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1887
|
+
</xsl:otherwise>
|
1888
|
+
</xsl:choose>
|
1889
|
+
</xsl:for-each>
|
1890
|
+
|
1891
|
+
<fo:table-body>
|
1892
|
+
<fo:table-row>
|
1893
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
1894
|
+
|
1895
|
+
|
1896
|
+
|
1897
|
+
<!-- fn will be processed inside 'note' processing -->
|
1898
|
+
|
1899
|
+
|
1900
|
+
|
1901
|
+
|
1902
|
+
|
1903
|
+
|
1904
|
+
|
1905
|
+
<!-- except gb -->
|
1906
|
+
|
1907
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1908
|
+
|
1909
|
+
|
1910
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1911
|
+
<xsl:choose>
|
1912
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1913
|
+
show Note under table in preface (ex. abstract) sections
|
1914
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1915
|
+
</xsl:when>
|
1916
|
+
<xsl:otherwise>
|
1917
|
+
empty, because notes show at page side in main sections
|
1918
|
+
<fo:block/>
|
1919
|
+
</xsl:otherwise>
|
1920
|
+
</xsl:choose>
|
1921
|
+
</xsl:if> -->
|
1922
|
+
|
1923
|
+
|
1924
|
+
<!-- horizontal row separator -->
|
1925
|
+
|
1926
|
+
|
1927
|
+
<!-- fn processing -->
|
1928
|
+
<xsl:call-template name="fn_display"/>
|
1929
|
+
|
1930
|
+
</fo:table-cell>
|
1931
|
+
</fo:table-row>
|
1932
|
+
</fo:table-body>
|
1933
|
+
|
1934
|
+
</fo:table>
|
1935
|
+
</xsl:if>
|
1696
1936
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1697
1937
|
|
1698
1938
|
<xsl:variable name="cols-count">
|
@@ -1745,8 +1985,12 @@
|
|
1745
1985
|
|
1746
1986
|
</xsl:if>
|
1747
1987
|
|
1748
|
-
|
1749
|
-
|
1988
|
+
|
1989
|
+
|
1990
|
+
|
1991
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1992
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
1993
|
+
</xsl:if> -->
|
1750
1994
|
|
1751
1995
|
<xsl:apply-templates/>
|
1752
1996
|
</fo:table-row>
|
@@ -1776,6 +2020,7 @@
|
|
1776
2020
|
|
1777
2021
|
|
1778
2022
|
|
2023
|
+
|
1779
2024
|
<xsl:if test="@colspan">
|
1780
2025
|
<xsl:attribute name="number-columns-spanned">
|
1781
2026
|
<xsl:value-of select="@colspan"/>
|
@@ -1815,7 +2060,7 @@
|
|
1815
2060
|
|
1816
2061
|
|
1817
2062
|
|
1818
|
-
|
2063
|
+
|
1819
2064
|
|
1820
2065
|
|
1821
2066
|
|
@@ -1826,6 +2071,7 @@
|
|
1826
2071
|
|
1827
2072
|
|
1828
2073
|
|
2074
|
+
|
1829
2075
|
<xsl:if test="@colspan">
|
1830
2076
|
<xsl:attribute name="number-columns-spanned">
|
1831
2077
|
<xsl:value-of select="@colspan"/>
|
@@ -1837,7 +2083,8 @@
|
|
1837
2083
|
</xsl:attribute>
|
1838
2084
|
</xsl:if>
|
1839
2085
|
<xsl:call-template name="display-align"/>
|
1840
|
-
<fo:block>
|
2086
|
+
<fo:block>
|
2087
|
+
|
1841
2088
|
<xsl:apply-templates/>
|
1842
2089
|
</fo:block>
|
1843
2090
|
</fo:table-cell>
|
@@ -1849,14 +2096,17 @@
|
|
1849
2096
|
|
1850
2097
|
|
1851
2098
|
|
2099
|
+
|
2100
|
+
|
1852
2101
|
<fo:inline padding-right="2mm">
|
1853
2102
|
|
1854
2103
|
|
1855
2104
|
|
1856
|
-
|
2105
|
+
|
1857
2106
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
1858
2107
|
|
1859
2108
|
</fo:inline>
|
2109
|
+
|
1860
2110
|
<xsl:apply-templates mode="process"/>
|
1861
2111
|
</fo:block>
|
1862
2112
|
|
@@ -1886,6 +2136,7 @@
|
|
1886
2136
|
|
1887
2137
|
|
1888
2138
|
|
2139
|
+
|
1889
2140
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
1890
2141
|
|
1891
2142
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -1895,12 +2146,15 @@
|
|
1895
2146
|
|
1896
2147
|
|
1897
2148
|
|
2149
|
+
|
1898
2150
|
<xsl:value-of select="@reference"/>
|
1899
2151
|
|
2152
|
+
|
1900
2153
|
</fo:inline>
|
1901
2154
|
<fo:inline>
|
1902
2155
|
|
1903
|
-
<xsl:apply-templates/>
|
2156
|
+
<!-- <xsl:apply-templates /> -->
|
2157
|
+
<xsl:copy-of select="./node()"/>
|
1904
2158
|
</fo:inline>
|
1905
2159
|
</fo:block>
|
1906
2160
|
</xsl:if>
|
@@ -1937,7 +2191,20 @@
|
|
1937
2191
|
<xsl:variable name="following_dl_colwidths">
|
1938
2192
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
1939
2193
|
<xsl:variable name="html-table">
|
1940
|
-
<xsl:variable name="
|
2194
|
+
<xsl:variable name="doc_ns">
|
2195
|
+
|
2196
|
+
</xsl:variable>
|
2197
|
+
<xsl:variable name="ns">
|
2198
|
+
<xsl:choose>
|
2199
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2200
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2201
|
+
</xsl:when>
|
2202
|
+
<xsl:otherwise>
|
2203
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2204
|
+
</xsl:otherwise>
|
2205
|
+
</xsl:choose>
|
2206
|
+
</xsl:variable>
|
2207
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
1941
2208
|
<xsl:element name="{$ns}:table">
|
1942
2209
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
1943
2210
|
<tbody>
|
@@ -2002,7 +2269,8 @@
|
|
2002
2269
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2003
2270
|
</xsl:if>
|
2004
2271
|
|
2005
|
-
<xsl:apply-templates/>
|
2272
|
+
<!-- <xsl:apply-templates /> -->
|
2273
|
+
<xsl:copy-of select="./node()"/>
|
2006
2274
|
</fo:block>
|
2007
2275
|
</fo:table-cell>
|
2008
2276
|
</fo:table-row>
|
@@ -2026,6 +2294,7 @@
|
|
2026
2294
|
|
2027
2295
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2028
2296
|
|
2297
|
+
|
2029
2298
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2030
2299
|
|
2031
2300
|
<xsl:attribute name="internal-destination">
|
@@ -2033,7 +2302,9 @@
|
|
2033
2302
|
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
2034
2303
|
</xsl:attribute>
|
2035
2304
|
|
2305
|
+
|
2036
2306
|
<xsl:value-of select="@reference"/>
|
2307
|
+
|
2037
2308
|
</fo:basic-link>
|
2038
2309
|
</fo:inline>
|
2039
2310
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -2041,7 +2312,11 @@
|
|
2041
2312
|
<xsl:apply-templates/>
|
2042
2313
|
</fo:inline>
|
2043
2314
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2044
|
-
<fo:block-container
|
2315
|
+
<fo:block-container>
|
2316
|
+
|
2317
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2318
|
+
|
2319
|
+
|
2045
2320
|
<xsl:if test="parent::*[local-name() = 'note']">
|
2046
2321
|
<xsl:attribute name="margin-left">
|
2047
2322
|
<xsl:choose>
|
@@ -2051,8 +2326,11 @@
|
|
2051
2326
|
</xsl:attribute>
|
2052
2327
|
|
2053
2328
|
</xsl:if>
|
2054
|
-
<fo:block-container
|
2055
|
-
|
2329
|
+
<fo:block-container>
|
2330
|
+
|
2331
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2332
|
+
|
2333
|
+
|
2056
2334
|
<xsl:variable name="parent" select="local-name(..)"/>
|
2057
2335
|
|
2058
2336
|
<xsl:variable name="key_iso">
|
@@ -2066,9 +2344,12 @@
|
|
2066
2344
|
<fo:block margin-bottom="12pt" text-align="left">
|
2067
2345
|
|
2068
2346
|
<xsl:variable name="title-where">
|
2069
|
-
|
2070
|
-
|
2071
|
-
|
2347
|
+
|
2348
|
+
|
2349
|
+
<xsl:call-template name="getTitle">
|
2350
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2351
|
+
</xsl:call-template>
|
2352
|
+
|
2072
2353
|
</xsl:variable>
|
2073
2354
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2074
2355
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -2084,9 +2365,12 @@
|
|
2084
2365
|
|
2085
2366
|
|
2086
2367
|
<xsl:variable name="title-where">
|
2087
|
-
|
2088
|
-
|
2089
|
-
|
2368
|
+
|
2369
|
+
|
2370
|
+
<xsl:call-template name="getTitle">
|
2371
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2372
|
+
</xsl:call-template>
|
2373
|
+
|
2090
2374
|
</xsl:variable>
|
2091
2375
|
<xsl:value-of select="$title-where"/>
|
2092
2376
|
</fo:block>
|
@@ -2097,9 +2381,12 @@
|
|
2097
2381
|
|
2098
2382
|
|
2099
2383
|
<xsl:variable name="title-key">
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2384
|
+
|
2385
|
+
|
2386
|
+
<xsl:call-template name="getTitle">
|
2387
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2388
|
+
</xsl:call-template>
|
2389
|
+
|
2103
2390
|
</xsl:variable>
|
2104
2391
|
<xsl:value-of select="$title-key"/>
|
2105
2392
|
</fo:block>
|
@@ -2131,7 +2418,20 @@
|
|
2131
2418
|
</xsl:choose>
|
2132
2419
|
<!-- create virtual html table for dl/[dt and dd] -->
|
2133
2420
|
<xsl:variable name="html-table">
|
2134
|
-
<xsl:variable name="
|
2421
|
+
<xsl:variable name="doc_ns">
|
2422
|
+
|
2423
|
+
</xsl:variable>
|
2424
|
+
<xsl:variable name="ns">
|
2425
|
+
<xsl:choose>
|
2426
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2427
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2428
|
+
</xsl:when>
|
2429
|
+
<xsl:otherwise>
|
2430
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2431
|
+
</xsl:otherwise>
|
2432
|
+
</xsl:choose>
|
2433
|
+
</xsl:variable>
|
2434
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2135
2435
|
<xsl:element name="{$ns}:table">
|
2136
2436
|
<tbody>
|
2137
2437
|
<xsl:apply-templates mode="dl"/>
|
@@ -2278,6 +2578,7 @@
|
|
2278
2578
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
2279
2579
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2280
2580
|
|
2581
|
+
|
2281
2582
|
<xsl:apply-templates/>
|
2282
2583
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2283
2584
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2331,6 +2632,7 @@
|
|
2331
2632
|
</fo:inline>
|
2332
2633
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
2333
2634
|
<fo:inline font-weight="bold">
|
2635
|
+
|
2334
2636
|
<xsl:apply-templates/>
|
2335
2637
|
</fo:inline>
|
2336
2638
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -2344,18 +2646,18 @@
|
|
2344
2646
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2345
2647
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2346
2648
|
<xsl:variable name="_font-size">
|
2347
|
-
|
2348
|
-
|
2349
|
-
|
2350
2649
|
|
2351
2650
|
|
2352
2651
|
|
2353
2652
|
|
2354
2653
|
|
2355
2654
|
|
2356
|
-
|
2357
2655
|
|
2358
|
-
|
2656
|
+
|
2657
|
+
|
2658
|
+
|
2659
|
+
|
2660
|
+
10
|
2359
2661
|
|
2360
2662
|
|
2361
2663
|
</xsl:variable>
|
@@ -2659,7 +2961,18 @@
|
|
2659
2961
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
2660
2962
|
</xsl:apply-templates>
|
2661
2963
|
</xsl:template><xsl:template name="getLang">
|
2662
|
-
<xsl:variable name="
|
2964
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
2965
|
+
<xsl:variable name="language">
|
2966
|
+
<xsl:choose>
|
2967
|
+
<xsl:when test="$language_current != ''">
|
2968
|
+
<xsl:value-of select="$language_current"/>
|
2969
|
+
</xsl:when>
|
2970
|
+
<xsl:otherwise>
|
2971
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
2972
|
+
</xsl:otherwise>
|
2973
|
+
</xsl:choose>
|
2974
|
+
</xsl:variable>
|
2975
|
+
|
2663
2976
|
<xsl:choose>
|
2664
2977
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
2665
2978
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -2693,7 +3006,8 @@
|
|
2693
3006
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2694
3007
|
<xsl:value-of select="substring($str, 2)"/>
|
2695
3008
|
</xsl:template><xsl:template match="mathml:math">
|
2696
|
-
<fo:inline font-family="
|
3009
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3010
|
+
|
2697
3011
|
<xsl:variable name="mathml">
|
2698
3012
|
<xsl:apply-templates select="." mode="mathml"/>
|
2699
3013
|
</xsl:variable>
|
@@ -2723,6 +3037,7 @@
|
|
2723
3037
|
</xsl:choose>
|
2724
3038
|
</xsl:variable>
|
2725
3039
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3040
|
+
|
2726
3041
|
<xsl:choose>
|
2727
3042
|
<xsl:when test="$target = ''">
|
2728
3043
|
<xsl:apply-templates/>
|
@@ -2776,10 +3091,14 @@
|
|
2776
3091
|
</fo:inline>
|
2777
3092
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
2778
3093
|
<xsl:variable name="title-modified">
|
2779
|
-
|
2780
|
-
|
2781
|
-
|
3094
|
+
|
3095
|
+
|
3096
|
+
<xsl:call-template name="getTitle">
|
3097
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
3098
|
+
</xsl:call-template>
|
3099
|
+
|
2782
3100
|
</xsl:variable>
|
3101
|
+
|
2783
3102
|
<xsl:choose>
|
2784
3103
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
2785
3104
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -2787,7 +3106,7 @@
|
|
2787
3106
|
<xsl:apply-templates/>
|
2788
3107
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2789
3108
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2790
|
-
|
3109
|
+
|
2791
3110
|
<xsl:apply-templates/>
|
2792
3111
|
</fo:basic-link>
|
2793
3112
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -2844,6 +3163,8 @@
|
|
2844
3163
|
|
2845
3164
|
|
2846
3165
|
|
3166
|
+
|
3167
|
+
|
2847
3168
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
2848
3169
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2849
3170
|
</fo:inline>
|
@@ -2934,7 +3255,8 @@
|
|
2934
3255
|
</fo:inline>
|
2935
3256
|
</xsl:if>
|
2936
3257
|
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
2937
|
-
<fo:block-container id="{@id}">
|
3258
|
+
<fo:block-container id="{@id}">
|
3259
|
+
|
2938
3260
|
<fo:block>
|
2939
3261
|
<xsl:apply-templates/>
|
2940
3262
|
</fo:block>
|
@@ -2969,15 +3291,120 @@
|
|
2969
3291
|
|
2970
3292
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2971
3293
|
</fo:block>
|
2972
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
3294
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
2973
3295
|
<xsl:apply-templates mode="contents"/>
|
2974
3296
|
<xsl:text> </xsl:text>
|
2975
|
-
</xsl:template><xsl:template match="
|
3297
|
+
</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">
|
3298
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3299
|
+
<xsl:text> </xsl:text>
|
3300
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3301
|
+
<xsl:value-of select="."/>
|
3302
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
2976
3303
|
<xsl:value-of select="."/>
|
2977
|
-
</xsl:template><xsl:template match="
|
3304
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3305
|
+
<xsl:apply-templates mode="contents"/>
|
3306
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3307
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3308
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3309
|
+
<xsl:apply-templates select="."/>
|
3310
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3311
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3312
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3313
|
+
<xsl:param name="contents"/>
|
3314
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3315
|
+
<fo:bookmark-tree>
|
3316
|
+
<xsl:choose>
|
3317
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3318
|
+
<xsl:choose>
|
3319
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3320
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3321
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3322
|
+
<fo:bookmark-title>
|
3323
|
+
<xsl:variable name="bookmark-title_">
|
3324
|
+
<xsl:call-template name="getLangVersion">
|
3325
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3326
|
+
</xsl:call-template>
|
3327
|
+
</xsl:variable>
|
3328
|
+
<xsl:choose>
|
3329
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3330
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3331
|
+
</xsl:when>
|
3332
|
+
<xsl:otherwise>
|
3333
|
+
<xsl:choose>
|
3334
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3335
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3336
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3337
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3338
|
+
</xsl:choose>
|
3339
|
+
</xsl:otherwise>
|
3340
|
+
</xsl:choose>
|
3341
|
+
</fo:bookmark-title>
|
3342
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3343
|
+
</fo:bookmark>
|
3344
|
+
|
3345
|
+
</xsl:for-each>
|
3346
|
+
</xsl:when>
|
3347
|
+
<xsl:otherwise>
|
3348
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3349
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3350
|
+
</xsl:for-each>
|
3351
|
+
</xsl:otherwise>
|
3352
|
+
</xsl:choose>
|
3353
|
+
</xsl:when>
|
3354
|
+
<xsl:otherwise>
|
3355
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3356
|
+
</xsl:otherwise>
|
3357
|
+
</xsl:choose>
|
3358
|
+
|
3359
|
+
|
3360
|
+
|
3361
|
+
<xsl:if test="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
|
3362
|
+
<fo:bookmark internal-destination="{//*[local-name() = 'figure'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
|
3363
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
3364
|
+
<xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
|
3365
|
+
<fo:bookmark internal-destination="{@id}">
|
3366
|
+
<fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']/text()" mode="bookmarks"/></fo:bookmark-title>
|
3367
|
+
</fo:bookmark>
|
3368
|
+
</xsl:for-each>
|
3369
|
+
</fo:bookmark>
|
3370
|
+
</xsl:if>
|
3371
|
+
|
3372
|
+
|
3373
|
+
|
3374
|
+
|
3375
|
+
|
3376
|
+
|
3377
|
+
</fo:bookmark-tree>
|
3378
|
+
</xsl:if>
|
3379
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3380
|
+
<xsl:param name="lang"/>
|
3381
|
+
<xsl:choose>
|
3382
|
+
<xsl:when test="$lang = 'en'">
|
3383
|
+
|
3384
|
+
|
3385
|
+
</xsl:when>
|
3386
|
+
<xsl:when test="$lang = 'fr'">
|
3387
|
+
|
3388
|
+
|
3389
|
+
</xsl:when>
|
3390
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3391
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3392
|
+
</xsl:choose>
|
3393
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3394
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3395
|
+
<fo:bookmark-title>
|
3396
|
+
<xsl:if test="@section != ''">
|
3397
|
+
<xsl:value-of select="@section"/>
|
3398
|
+
<xsl:text> </xsl:text>
|
3399
|
+
</xsl:if>
|
3400
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3401
|
+
</fo:bookmark-title>
|
3402
|
+
<xsl:apply-templates mode="bookmark"/>
|
3403
|
+
</fo:bookmark>
|
3404
|
+
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
2978
3405
|
<xsl:if test="normalize-space() != ''">
|
2979
3406
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2980
|
-
|
3407
|
+
|
2981
3408
|
<xsl:apply-templates/>
|
2982
3409
|
</fo:block>
|
2983
3410
|
</xsl:if>
|
@@ -3032,7 +3459,7 @@
|
|
3032
3459
|
<xsl:apply-templates/>
|
3033
3460
|
</xsl:otherwise>
|
3034
3461
|
</xsl:choose>
|
3035
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3462
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3036
3463
|
<xsl:text> </xsl:text>
|
3037
3464
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
3038
3465
|
<xsl:copy>
|
@@ -3422,9 +3849,14 @@
|
|
3422
3849
|
|
3423
3850
|
<fo:inline>
|
3424
3851
|
|
3425
|
-
|
3426
|
-
|
3427
|
-
|
3852
|
+
|
3853
|
+
|
3854
|
+
|
3855
|
+
<xsl:call-template name="getTitle">
|
3856
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
3857
|
+
</xsl:call-template>
|
3858
|
+
|
3859
|
+
|
3428
3860
|
<xsl:text>: </xsl:text>
|
3429
3861
|
</fo:inline>
|
3430
3862
|
|
@@ -3580,9 +4012,12 @@
|
|
3580
4012
|
</fo:block>
|
3581
4013
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
3582
4014
|
<xsl:variable name="title-deprecated">
|
3583
|
-
|
3584
|
-
|
3585
|
-
|
4015
|
+
|
4016
|
+
|
4017
|
+
<xsl:call-template name="getTitle">
|
4018
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
4019
|
+
</xsl:call-template>
|
4020
|
+
|
3586
4021
|
</xsl:variable>
|
3587
4022
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
3588
4023
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -3629,13 +4064,14 @@
|
|
3629
4064
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3630
4065
|
<fo:block>
|
3631
4066
|
<xsl:call-template name="setId"/>
|
4067
|
+
|
3632
4068
|
<xsl:apply-templates/>
|
3633
4069
|
</fo:block>
|
3634
4070
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
3635
4071
|
<fo:block id="{@id}">
|
3636
4072
|
<xsl:apply-templates/>
|
3637
4073
|
</fo:block>
|
3638
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
4074
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3639
4075
|
|
3640
4076
|
<fo:block id="{@id}">
|
3641
4077
|
<xsl:apply-templates/>
|
@@ -3654,20 +4090,30 @@
|
|
3654
4090
|
<!-- 0xA0 to space replacement -->
|
3655
4091
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3656
4092
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
3657
|
-
<
|
3658
|
-
<xsl:
|
3659
|
-
<
|
3660
|
-
<xsl:
|
3661
|
-
<xsl:
|
3662
|
-
|
3663
|
-
|
3664
|
-
|
3665
|
-
|
3666
|
-
|
3667
|
-
|
3668
|
-
|
3669
|
-
|
3670
|
-
|
4093
|
+
<xsl:choose>
|
4094
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
4095
|
+
<fo:block-container>
|
4096
|
+
<xsl:attribute name="margin-left">
|
4097
|
+
<xsl:choose>
|
4098
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4099
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4100
|
+
</xsl:choose>
|
4101
|
+
</xsl:attribute>
|
4102
|
+
|
4103
|
+
|
4104
|
+
<fo:block-container margin-left="0mm">
|
4105
|
+
<fo:block>
|
4106
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4107
|
+
</fo:block>
|
4108
|
+
</fo:block-container>
|
4109
|
+
</fo:block-container>
|
4110
|
+
</xsl:when>
|
4111
|
+
<xsl:otherwise>
|
4112
|
+
<fo:block>
|
4113
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4114
|
+
</fo:block>
|
4115
|
+
</xsl:otherwise>
|
4116
|
+
</xsl:choose>
|
3671
4117
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3672
4118
|
<!-- <row>
|
3673
4119
|
<date>05-07-2013</date>
|
@@ -3976,6 +4422,7 @@
|
|
3976
4422
|
<dc:title>
|
3977
4423
|
<xsl:variable name="title">
|
3978
4424
|
|
4425
|
+
|
3979
4426
|
|
3980
4427
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
|
3981
4428
|
|
@@ -3994,6 +4441,7 @@
|
|
3994
4441
|
<dc:creator>
|
3995
4442
|
|
3996
4443
|
|
4444
|
+
|
3997
4445
|
</dc:creator>
|
3998
4446
|
<dc:description>
|
3999
4447
|
<xsl:variable name="abstract">
|
@@ -4003,6 +4451,7 @@
|
|
4003
4451
|
|
4004
4452
|
<xsl:copy-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'abstract']//text()"/>
|
4005
4453
|
|
4454
|
+
|
4006
4455
|
</xsl:variable>
|
4007
4456
|
<xsl:value-of select="normalize-space($abstract)"/>
|
4008
4457
|
</dc:description>
|
@@ -4074,13 +4523,22 @@
|
|
4074
4523
|
</xsl:template><xsl:template name="split">
|
4075
4524
|
<xsl:param name="pText" select="."/>
|
4076
4525
|
<xsl:param name="sep" select="','"/>
|
4526
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
4077
4527
|
<xsl:if test="string-length($pText) >0">
|
4078
4528
|
<item>
|
4079
|
-
<xsl:
|
4529
|
+
<xsl:choose>
|
4530
|
+
<xsl:when test="$normalize-space = 'true'">
|
4531
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
4532
|
+
</xsl:when>
|
4533
|
+
<xsl:otherwise>
|
4534
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
4535
|
+
</xsl:otherwise>
|
4536
|
+
</xsl:choose>
|
4080
4537
|
</item>
|
4081
4538
|
<xsl:call-template name="split">
|
4082
4539
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
4083
4540
|
<xsl:with-param name="sep" select="$sep"/>
|
4541
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
4084
4542
|
</xsl:call-template>
|
4085
4543
|
</xsl:if>
|
4086
4544
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -4103,6 +4561,7 @@
|
|
4103
4561
|
|
4104
4562
|
|
4105
4563
|
|
4564
|
+
|
4106
4565
|
</xsl:variable>
|
4107
4566
|
<xsl:if test="$documentNS != $XSLNS">
|
4108
4567
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4128,4 +4587,40 @@
|
|
4128
4587
|
</xsl:otherwise>
|
4129
4588
|
</xsl:choose>
|
4130
4589
|
</xsl:attribute>
|
4590
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4591
|
+
<xsl:param name="text"/>
|
4592
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4593
|
+
<xsl:if test="string-length($text) > 0">
|
4594
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4595
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4596
|
+
<xsl:if test="$char = '®'">
|
4597
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4598
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4599
|
+
</xsl:if>
|
4600
|
+
<xsl:value-of select="$char"/>
|
4601
|
+
</fo:inline>
|
4602
|
+
<xsl:call-template name="add-letter-spacing">
|
4603
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4604
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4605
|
+
</xsl:call-template>
|
4606
|
+
</xsl:if>
|
4607
|
+
</xsl:template><xsl:template name="repeat">
|
4608
|
+
<xsl:param name="char" select="'*'"/>
|
4609
|
+
<xsl:param name="count"/>
|
4610
|
+
<xsl:if test="$count > 0">
|
4611
|
+
<xsl:value-of select="$char"/>
|
4612
|
+
<xsl:call-template name="repeat">
|
4613
|
+
<xsl:with-param name="char" select="$char"/>
|
4614
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
4615
|
+
</xsl:call-template>
|
4616
|
+
</xsl:if>
|
4617
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
4618
|
+
<xsl:param name="key"/>
|
4619
|
+
|
4620
|
+
<xsl:variable name="curr_lang">
|
4621
|
+
<xsl:call-template name="getLang"/>
|
4622
|
+
</xsl:variable>
|
4623
|
+
|
4624
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4625
|
+
|
4131
4626
|
</xsl:template></xsl:stylesheet>
|