metanorma-mpfa 0.5.3 → 0.5.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 +6 -6
- data/lib/asciidoctor/mpfa/basicdoc.rng +4 -11
- data/lib/asciidoctor/mpfa/converter.rb +2 -1
- data/lib/asciidoctor/mpfa/fonts_manifest.yaml +5 -0
- data/lib/asciidoctor/mpfa/isodoc.rng +27 -50
- data/lib/asciidoctor/mpfa/mpfd.rng +7 -0
- data/lib/isodoc/mpfa/html/htmlstyle.css +8 -4
- data/lib/isodoc/mpfa/html/htmlstyle.scss +2 -2
- data/lib/isodoc/mpfa/html/rsd.css +19 -20
- data/lib/isodoc/mpfa/html/rsd.scss +19 -20
- data/lib/isodoc/mpfa/html/wordstyle.css +19 -19
- data/lib/isodoc/mpfa/html/wordstyle.scss +19 -19
- data/lib/isodoc/mpfa/html_convert.rb +3 -1
- data/lib/isodoc/mpfa/mpfd.circular.xsl +550 -87
- data/lib/isodoc/mpfa/mpfd.compliance-standards-for-mpf-trustees.xsl +550 -87
- data/lib/isodoc/mpfa/mpfd.guidelines.xsl +550 -87
- data/lib/isodoc/mpfa/mpfd.standards.xsl +550 -87
- data/lib/isodoc/mpfa/mpfd.supervision-of-mpf-intermediaries.xsl +550 -87
- data/lib/isodoc/mpfa/presentation_xml_convert.rb +9 -0
- data/lib/isodoc/mpfa/word_convert.rb +5 -1
- data/lib/isodoc/mpfa/xref.rb +3 -3
- data/lib/metanorma/mpfa/processor.rb +0 -7
- data/lib/metanorma/mpfa/version.rb +1 -1
- data/metanorma-mpfd.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
@@ -96,6 +96,10 @@
|
|
96
96
|
|
97
97
|
<xsl:call-template name="addPDFUAmeta"/>
|
98
98
|
|
99
|
+
<xsl:call-template name="addBookmarks">
|
100
|
+
<xsl:with-param name="contents" select="$contents"/>
|
101
|
+
</xsl:call-template>
|
102
|
+
|
99
103
|
<fo:page-sequence master-reference="cover" force-page-count="no-force">
|
100
104
|
<fo:static-content flow-name="cover-header">
|
101
105
|
<fo:block-container height="100%">
|
@@ -171,7 +175,7 @@
|
|
171
175
|
</xsl:variable>
|
172
176
|
<fo:block font-size="14pt" margin-bottom="15.5pt"><xsl:value-of select="$title-toc"/></fo:block>
|
173
177
|
<fo:block line-height="115%">
|
174
|
-
<xsl:for-each select="xalan:nodeset($contents)//item">
|
178
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
175
179
|
<fo:block>
|
176
180
|
<xsl:if test="@level = 1">
|
177
181
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -193,8 +197,8 @@
|
|
193
197
|
</fo:list-item-label>
|
194
198
|
<fo:list-item-body start-indent="body-start()">
|
195
199
|
<fo:block text-align-last="justify">
|
196
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="
|
197
|
-
<xsl:apply-templates/>
|
200
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
201
|
+
<xsl:apply-templates select="title"/>
|
198
202
|
<fo:inline keep-together.within-line="always">
|
199
203
|
<fo:leader leader-pattern="dots"/>
|
200
204
|
<fo:page-number-citation ref-id="{@id}"/>
|
@@ -274,25 +278,34 @@
|
|
274
278
|
</xsl:variable>
|
275
279
|
|
276
280
|
<xsl:variable name="display">
|
277
|
-
<xsl:choose>
|
278
|
-
<xsl:when test="ancestor-or-self::mpfd:bibitem">false</xsl:when>
|
279
|
-
<xsl:when test="ancestor-or-self::mpfd:term">false</xsl:when>
|
281
|
+
<xsl:choose>
|
280
282
|
<xsl:when test="$level >= 3">false</xsl:when>
|
281
283
|
<xsl:otherwise>true</xsl:otherwise>
|
282
284
|
</xsl:choose>
|
283
285
|
</xsl:variable>
|
284
286
|
|
285
|
-
<xsl:
|
287
|
+
<xsl:variable name="skip">
|
288
|
+
<xsl:choose>
|
289
|
+
<xsl:when test="ancestor-or-self::mpfd:bibitem">true</xsl:when>
|
290
|
+
<xsl:when test="ancestor-or-self::mpfd:term">true</xsl:when>
|
291
|
+
<xsl:otherwise>false</xsl:otherwise>
|
292
|
+
</xsl:choose>
|
293
|
+
</xsl:variable>
|
294
|
+
|
295
|
+
<xsl:if test="$skip = 'false'">
|
286
296
|
|
287
297
|
<xsl:variable name="title">
|
288
298
|
<xsl:call-template name="getName"/>
|
289
299
|
</xsl:variable>
|
290
300
|
|
291
|
-
<item level="{$level}" section="{$section}" type="{$type}">
|
301
|
+
<item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
292
302
|
<xsl:call-template name="setId"/>
|
293
|
-
<
|
303
|
+
<title>
|
304
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
305
|
+
</title>
|
306
|
+
<xsl:apply-templates mode="contents"/>
|
294
307
|
</item>
|
295
|
-
|
308
|
+
|
296
309
|
</xsl:if>
|
297
310
|
|
298
311
|
</xsl:template>
|
@@ -783,6 +796,12 @@
|
|
783
796
|
|
784
797
|
</title-edition>
|
785
798
|
|
799
|
+
<title-edition lang="fr">
|
800
|
+
|
801
|
+
<xsl:text>Édition </xsl:text>
|
802
|
+
|
803
|
+
</title-edition>
|
804
|
+
|
786
805
|
|
787
806
|
<title-toc lang="en">
|
788
807
|
|
@@ -791,7 +810,12 @@
|
|
791
810
|
|
792
811
|
|
793
812
|
</title-toc>
|
794
|
-
<title-toc lang="fr">
|
813
|
+
<title-toc lang="fr">
|
814
|
+
|
815
|
+
<xsl:text>Sommaire</xsl:text>
|
816
|
+
|
817
|
+
|
818
|
+
</title-toc>
|
795
819
|
|
796
820
|
|
797
821
|
|
@@ -809,13 +833,22 @@
|
|
809
833
|
<title-part lang="en">
|
810
834
|
|
811
835
|
|
836
|
+
|
812
837
|
</title-part>
|
813
838
|
<title-part lang="fr">
|
814
839
|
|
815
840
|
|
841
|
+
|
816
842
|
</title-part>
|
817
843
|
<title-part lang="zh">第 # 部分:</title-part>
|
818
844
|
|
845
|
+
<title-subpart lang="en">
|
846
|
+
|
847
|
+
</title-subpart>
|
848
|
+
<title-subpart lang="fr">
|
849
|
+
|
850
|
+
</title-subpart>
|
851
|
+
|
819
852
|
<title-modified lang="en">modified</title-modified>
|
820
853
|
<title-modified lang="fr">modifiée</title-modified>
|
821
854
|
|
@@ -877,10 +910,19 @@
|
|
877
910
|
|
878
911
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
879
912
|
<xsl:param name="name"/>
|
880
|
-
<xsl:
|
881
|
-
|
913
|
+
<xsl:param name="lang"/>
|
914
|
+
<xsl:variable name="lang_">
|
915
|
+
<xsl:choose>
|
916
|
+
<xsl:when test="$lang != ''">
|
917
|
+
<xsl:value-of select="$lang"/>
|
918
|
+
</xsl:when>
|
919
|
+
<xsl:otherwise>
|
920
|
+
<xsl:call-template name="getLang"/>
|
921
|
+
</xsl:otherwise>
|
922
|
+
</xsl:choose>
|
882
923
|
</xsl:variable>
|
883
|
-
<xsl:variable name="
|
924
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
925
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
884
926
|
<xsl:choose>
|
885
927
|
<xsl:when test="normalize-space($title_) != ''">
|
886
928
|
<xsl:value-of select="$title_"/>
|
@@ -889,7 +931,9 @@
|
|
889
931
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
890
932
|
</xsl:otherwise>
|
891
933
|
</xsl:choose>
|
892
|
-
</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="
|
934
|
+
</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">
|
935
|
+
|
936
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
893
937
|
|
894
938
|
<xsl:attribute name="color">blue</xsl:attribute>
|
895
939
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
@@ -1015,11 +1059,12 @@
|
|
1015
1059
|
|
1016
1060
|
|
1017
1061
|
|
1018
|
-
|
1062
|
+
|
1019
1063
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1020
1064
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1021
1065
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1022
1066
|
|
1067
|
+
|
1023
1068
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1024
1069
|
|
1025
1070
|
|
@@ -1057,6 +1102,7 @@
|
|
1057
1102
|
|
1058
1103
|
|
1059
1104
|
|
1105
|
+
|
1060
1106
|
</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">
|
1061
1107
|
|
1062
1108
|
|
@@ -1121,6 +1167,7 @@
|
|
1121
1167
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1122
1168
|
|
1123
1169
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1170
|
+
|
1124
1171
|
|
1125
1172
|
|
1126
1173
|
|
@@ -1240,6 +1287,10 @@
|
|
1240
1287
|
|
1241
1288
|
|
1242
1289
|
|
1290
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1291
|
+
<fo:block> </fo:block>
|
1292
|
+
</xsl:if> -->
|
1293
|
+
|
1243
1294
|
<!-- $namespace = 'iso' or -->
|
1244
1295
|
|
1245
1296
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -1277,6 +1328,7 @@
|
|
1277
1328
|
<xsl:with-param name="table" select="$simple-table"/>
|
1278
1329
|
</xsl:call-template>
|
1279
1330
|
</xsl:variable>
|
1331
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1280
1332
|
|
1281
1333
|
<!-- <xsl:variable name="colwidths2">
|
1282
1334
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1298,10 +1350,13 @@
|
|
1298
1350
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1299
1351
|
|
1300
1352
|
|
1353
|
+
|
1354
|
+
|
1355
|
+
|
1301
1356
|
|
1302
1357
|
|
1358
|
+
|
1303
1359
|
|
1304
|
-
|
1305
1360
|
|
1306
1361
|
|
1307
1362
|
|
@@ -1309,23 +1364,42 @@
|
|
1309
1364
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1310
1365
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1311
1366
|
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1367
|
+
|
1368
|
+
|
1369
|
+
|
1370
|
+
<xsl:variable name="table_attributes">
|
1371
|
+
<attribute name="table-layout">fixed</attribute>
|
1372
|
+
<attribute name="width">100%</attribute>
|
1373
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1374
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1318
1375
|
|
1319
1376
|
|
1320
1377
|
|
1321
1378
|
|
1379
|
+
|
1380
|
+
|
1381
|
+
|
1322
1382
|
|
1323
1383
|
|
1384
|
+
<attribute name="border-top">2pt solid black</attribute>
|
1385
|
+
<attribute name="border-bottom">2pt solid black</attribute>
|
1386
|
+
|
1324
1387
|
|
1388
|
+
</xsl:variable>
|
1389
|
+
|
1390
|
+
|
1391
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1325
1392
|
|
1326
|
-
|
1327
|
-
<xsl:attribute name="
|
1393
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1394
|
+
<xsl:attribute name="{@name}">
|
1395
|
+
<xsl:value-of select="."/>
|
1396
|
+
</xsl:attribute>
|
1397
|
+
</xsl:for-each>
|
1328
1398
|
|
1399
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1400
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1401
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1402
|
+
</xsl:if>
|
1329
1403
|
|
1330
1404
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1331
1405
|
<xsl:choose>
|
@@ -1349,6 +1423,33 @@
|
|
1349
1423
|
|
1350
1424
|
</fo:table>
|
1351
1425
|
|
1426
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1427
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1428
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1429
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1430
|
+
</xsl:call-template>
|
1431
|
+
</xsl:for-each>
|
1432
|
+
|
1433
|
+
<!-- insert footer as table -->
|
1434
|
+
<!-- <fo:table>
|
1435
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1436
|
+
<xsl:attribute name="{@name}">
|
1437
|
+
<xsl:value-of select="."/>
|
1438
|
+
</xsl:attribute>
|
1439
|
+
</xsl:for-each>
|
1440
|
+
|
1441
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1442
|
+
<xsl:choose>
|
1443
|
+
<xsl:when test=". = 1 or . = 0">
|
1444
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1445
|
+
</xsl:when>
|
1446
|
+
<xsl:otherwise>
|
1447
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1448
|
+
</xsl:otherwise>
|
1449
|
+
</xsl:choose>
|
1450
|
+
</xsl:for-each>
|
1451
|
+
</fo:table>-->
|
1452
|
+
|
1352
1453
|
|
1353
1454
|
|
1354
1455
|
|
@@ -1358,6 +1459,7 @@
|
|
1358
1459
|
<xsl:if test="normalize-space() != ''">
|
1359
1460
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1360
1461
|
|
1462
|
+
|
1361
1463
|
<xsl:apply-templates/>
|
1362
1464
|
</fo:block>
|
1363
1465
|
</xsl:if>
|
@@ -1413,6 +1515,13 @@
|
|
1413
1515
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1414
1516
|
<xsl:variable name="td_text">
|
1415
1517
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1518
|
+
|
1519
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1520
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1521
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1522
|
+
</xsl:for-each>
|
1523
|
+
</xsl:if> -->
|
1524
|
+
|
1416
1525
|
</xsl:variable>
|
1417
1526
|
<xsl:variable name="words">
|
1418
1527
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1472,11 +1581,14 @@
|
|
1472
1581
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1473
1582
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1474
1583
|
<xsl:value-of select="@target"/>
|
1584
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1585
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1586
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1475
1587
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1476
1588
|
<xsl:param name="cols-count"/>
|
1477
1589
|
<!-- font-weight="bold" -->
|
1478
1590
|
<fo:table-header>
|
1479
|
-
|
1591
|
+
|
1480
1592
|
<xsl:apply-templates/>
|
1481
1593
|
</fo:table-header>
|
1482
1594
|
</xsl:template><xsl:template name="table-header-title">
|
@@ -1501,6 +1613,13 @@
|
|
1501
1613
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1502
1614
|
<xsl:apply-templates/>
|
1503
1615
|
</xsl:template><xsl:template name="insertTableFooter">
|
1616
|
+
<xsl:param name="cols-count"/>
|
1617
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1618
|
+
<fo:table-footer>
|
1619
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1620
|
+
</fo:table-footer>
|
1621
|
+
</xsl:if>
|
1622
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1504
1623
|
<xsl:param name="cols-count"/>
|
1505
1624
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1506
1625
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1522,11 +1641,29 @@
|
|
1522
1641
|
<!-- fn will be processed inside 'note' processing -->
|
1523
1642
|
|
1524
1643
|
|
1644
|
+
|
1645
|
+
|
1646
|
+
|
1647
|
+
|
1525
1648
|
<!-- except gb -->
|
1526
1649
|
|
1527
1650
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1528
1651
|
|
1529
1652
|
|
1653
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
1654
|
+
<!-- empty, because notes show at page side in main sections -->
|
1655
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1656
|
+
<xsl:choose>
|
1657
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1658
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1659
|
+
</xsl:when>
|
1660
|
+
<xsl:otherwise>
|
1661
|
+
<fo:block/>
|
1662
|
+
</xsl:otherwise>
|
1663
|
+
</xsl:choose>
|
1664
|
+
</xsl:if> -->
|
1665
|
+
|
1666
|
+
|
1530
1667
|
<!-- horizontal row separator -->
|
1531
1668
|
|
1532
1669
|
|
@@ -1540,6 +1677,88 @@
|
|
1540
1677
|
</fo:table-footer>
|
1541
1678
|
|
1542
1679
|
</xsl:if>
|
1680
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
1681
|
+
<xsl:param name="table_attributes"/>
|
1682
|
+
<xsl:param name="colwidths"/>
|
1683
|
+
|
1684
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1685
|
+
|
1686
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1687
|
+
|
1688
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
1689
|
+
|
1690
|
+
<fo:table keep-with-previous="always">
|
1691
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1692
|
+
<xsl:choose>
|
1693
|
+
<xsl:when test="@name = 'border-top'">
|
1694
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
1695
|
+
</xsl:when>
|
1696
|
+
<xsl:when test="@name = 'border'">
|
1697
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1698
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
1699
|
+
</xsl:when>
|
1700
|
+
<xsl:otherwise>
|
1701
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1702
|
+
</xsl:otherwise>
|
1703
|
+
</xsl:choose>
|
1704
|
+
</xsl:for-each>
|
1705
|
+
|
1706
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1707
|
+
<xsl:choose>
|
1708
|
+
<xsl:when test=". = 1 or . = 0">
|
1709
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1710
|
+
</xsl:when>
|
1711
|
+
<xsl:otherwise>
|
1712
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1713
|
+
</xsl:otherwise>
|
1714
|
+
</xsl:choose>
|
1715
|
+
</xsl:for-each>
|
1716
|
+
|
1717
|
+
<fo:table-body>
|
1718
|
+
<fo:table-row>
|
1719
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
1720
|
+
|
1721
|
+
|
1722
|
+
|
1723
|
+
<!-- fn will be processed inside 'note' processing -->
|
1724
|
+
|
1725
|
+
|
1726
|
+
|
1727
|
+
|
1728
|
+
|
1729
|
+
|
1730
|
+
|
1731
|
+
<!-- except gb -->
|
1732
|
+
|
1733
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1734
|
+
|
1735
|
+
|
1736
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1737
|
+
<xsl:choose>
|
1738
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1739
|
+
show Note under table in preface (ex. abstract) sections
|
1740
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1741
|
+
</xsl:when>
|
1742
|
+
<xsl:otherwise>
|
1743
|
+
empty, because notes show at page side in main sections
|
1744
|
+
<fo:block/>
|
1745
|
+
</xsl:otherwise>
|
1746
|
+
</xsl:choose>
|
1747
|
+
</xsl:if> -->
|
1748
|
+
|
1749
|
+
|
1750
|
+
<!-- horizontal row separator -->
|
1751
|
+
|
1752
|
+
|
1753
|
+
<!-- fn processing -->
|
1754
|
+
<xsl:call-template name="fn_display"/>
|
1755
|
+
|
1756
|
+
</fo:table-cell>
|
1757
|
+
</fo:table-row>
|
1758
|
+
</fo:table-body>
|
1759
|
+
|
1760
|
+
</fo:table>
|
1761
|
+
</xsl:if>
|
1543
1762
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1544
1763
|
|
1545
1764
|
<xsl:variable name="cols-count">
|
@@ -1592,8 +1811,12 @@
|
|
1592
1811
|
|
1593
1812
|
</xsl:if>
|
1594
1813
|
|
1595
|
-
|
1596
|
-
|
1814
|
+
|
1815
|
+
|
1816
|
+
|
1817
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1818
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
1819
|
+
</xsl:if> -->
|
1597
1820
|
|
1598
1821
|
<xsl:apply-templates/>
|
1599
1822
|
</fo:table-row>
|
@@ -1618,7 +1841,8 @@
|
|
1618
1841
|
|
1619
1842
|
|
1620
1843
|
<xsl:attribute name="border-top">solid black 2pt</xsl:attribute>
|
1621
|
-
<xsl:attribute name="border-bottom">solid black 2pt</xsl:attribute>
|
1844
|
+
<xsl:attribute name="border-bottom">solid black 2pt</xsl:attribute>
|
1845
|
+
|
1622
1846
|
|
1623
1847
|
<xsl:if test="@colspan">
|
1624
1848
|
<xsl:attribute name="number-columns-spanned">
|
@@ -1659,7 +1883,8 @@
|
|
1659
1883
|
|
1660
1884
|
|
1661
1885
|
|
1662
|
-
|
1886
|
+
|
1887
|
+
|
1663
1888
|
|
1664
1889
|
|
1665
1890
|
|
@@ -1677,7 +1902,8 @@
|
|
1677
1902
|
</xsl:attribute>
|
1678
1903
|
</xsl:if>
|
1679
1904
|
<xsl:call-template name="display-align"/>
|
1680
|
-
<fo:block>
|
1905
|
+
<fo:block>
|
1906
|
+
|
1681
1907
|
<xsl:apply-templates/>
|
1682
1908
|
</fo:block>
|
1683
1909
|
</fo:table-cell>
|
@@ -1689,14 +1915,17 @@
|
|
1689
1915
|
|
1690
1916
|
|
1691
1917
|
|
1918
|
+
|
1919
|
+
|
1692
1920
|
<fo:inline padding-right="2mm">
|
1693
1921
|
|
1694
1922
|
|
1695
1923
|
|
1696
|
-
|
1924
|
+
|
1697
1925
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
1698
1926
|
|
1699
1927
|
</fo:inline>
|
1928
|
+
|
1700
1929
|
<xsl:apply-templates mode="process"/>
|
1701
1930
|
</fo:block>
|
1702
1931
|
|
@@ -1720,6 +1949,7 @@
|
|
1720
1949
|
|
1721
1950
|
|
1722
1951
|
|
1952
|
+
|
1723
1953
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
1724
1954
|
|
1725
1955
|
|
@@ -1727,12 +1957,15 @@
|
|
1727
1957
|
|
1728
1958
|
|
1729
1959
|
|
1960
|
+
|
1730
1961
|
<xsl:value-of select="@reference"/>
|
1731
1962
|
|
1963
|
+
|
1732
1964
|
</fo:inline>
|
1733
1965
|
<fo:inline>
|
1734
1966
|
|
1735
|
-
<xsl:apply-templates/>
|
1967
|
+
<!-- <xsl:apply-templates /> -->
|
1968
|
+
<xsl:copy-of select="./node()"/>
|
1736
1969
|
</fo:inline>
|
1737
1970
|
</fo:block>
|
1738
1971
|
</xsl:if>
|
@@ -1769,7 +2002,20 @@
|
|
1769
2002
|
<xsl:variable name="following_dl_colwidths">
|
1770
2003
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
1771
2004
|
<xsl:variable name="html-table">
|
1772
|
-
<xsl:variable name="
|
2005
|
+
<xsl:variable name="doc_ns">
|
2006
|
+
|
2007
|
+
</xsl:variable>
|
2008
|
+
<xsl:variable name="ns">
|
2009
|
+
<xsl:choose>
|
2010
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2011
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2012
|
+
</xsl:when>
|
2013
|
+
<xsl:otherwise>
|
2014
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2015
|
+
</xsl:otherwise>
|
2016
|
+
</xsl:choose>
|
2017
|
+
</xsl:variable>
|
2018
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
1773
2019
|
<xsl:element name="{$ns}:table">
|
1774
2020
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
1775
2021
|
<tbody>
|
@@ -1834,7 +2080,8 @@
|
|
1834
2080
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
1835
2081
|
</xsl:if>
|
1836
2082
|
|
1837
|
-
<xsl:apply-templates/>
|
2083
|
+
<!-- <xsl:apply-templates /> -->
|
2084
|
+
<xsl:copy-of select="./node()"/>
|
1838
2085
|
</fo:block>
|
1839
2086
|
</fo:table-cell>
|
1840
2087
|
</fo:table-row>
|
@@ -1853,9 +2100,12 @@
|
|
1853
2100
|
|
1854
2101
|
|
1855
2102
|
|
2103
|
+
|
1856
2104
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
1857
2105
|
|
2106
|
+
|
1858
2107
|
<xsl:value-of select="@reference"/>
|
2108
|
+
|
1859
2109
|
</fo:basic-link>
|
1860
2110
|
</fo:inline>
|
1861
2111
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -1863,7 +2113,11 @@
|
|
1863
2113
|
<xsl:apply-templates/>
|
1864
2114
|
</fo:inline>
|
1865
2115
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
1866
|
-
<fo:block-container
|
2116
|
+
<fo:block-container>
|
2117
|
+
|
2118
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2119
|
+
|
2120
|
+
|
1867
2121
|
<xsl:if test="parent::*[local-name() = 'note']">
|
1868
2122
|
<xsl:attribute name="margin-left">
|
1869
2123
|
<xsl:choose>
|
@@ -1873,8 +2127,11 @@
|
|
1873
2127
|
</xsl:attribute>
|
1874
2128
|
|
1875
2129
|
</xsl:if>
|
1876
|
-
<fo:block-container
|
1877
|
-
|
2130
|
+
<fo:block-container>
|
2131
|
+
|
2132
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2133
|
+
|
2134
|
+
|
1878
2135
|
<xsl:variable name="parent" select="local-name(..)"/>
|
1879
2136
|
|
1880
2137
|
<xsl:variable name="key_iso">
|
@@ -1888,9 +2145,12 @@
|
|
1888
2145
|
<fo:block margin-bottom="12pt" text-align="left">
|
1889
2146
|
|
1890
2147
|
<xsl:variable name="title-where">
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
2148
|
+
|
2149
|
+
|
2150
|
+
<xsl:call-template name="getTitle">
|
2151
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2152
|
+
</xsl:call-template>
|
2153
|
+
|
1894
2154
|
</xsl:variable>
|
1895
2155
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
1896
2156
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -1906,9 +2166,12 @@
|
|
1906
2166
|
|
1907
2167
|
|
1908
2168
|
<xsl:variable name="title-where">
|
1909
|
-
|
1910
|
-
|
1911
|
-
|
2169
|
+
|
2170
|
+
|
2171
|
+
<xsl:call-template name="getTitle">
|
2172
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2173
|
+
</xsl:call-template>
|
2174
|
+
|
1912
2175
|
</xsl:variable>
|
1913
2176
|
<xsl:value-of select="$title-where"/>
|
1914
2177
|
</fo:block>
|
@@ -1919,9 +2182,12 @@
|
|
1919
2182
|
|
1920
2183
|
|
1921
2184
|
<xsl:variable name="title-key">
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
2185
|
+
|
2186
|
+
|
2187
|
+
<xsl:call-template name="getTitle">
|
2188
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2189
|
+
</xsl:call-template>
|
2190
|
+
|
1925
2191
|
</xsl:variable>
|
1926
2192
|
<xsl:value-of select="$title-key"/>
|
1927
2193
|
</fo:block>
|
@@ -1953,7 +2219,20 @@
|
|
1953
2219
|
</xsl:choose>
|
1954
2220
|
<!-- create virtual html table for dl/[dt and dd] -->
|
1955
2221
|
<xsl:variable name="html-table">
|
1956
|
-
<xsl:variable name="
|
2222
|
+
<xsl:variable name="doc_ns">
|
2223
|
+
|
2224
|
+
</xsl:variable>
|
2225
|
+
<xsl:variable name="ns">
|
2226
|
+
<xsl:choose>
|
2227
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2228
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2229
|
+
</xsl:when>
|
2230
|
+
<xsl:otherwise>
|
2231
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2232
|
+
</xsl:otherwise>
|
2233
|
+
</xsl:choose>
|
2234
|
+
</xsl:variable>
|
2235
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
1957
2236
|
<xsl:element name="{$ns}:table">
|
1958
2237
|
<tbody>
|
1959
2238
|
<xsl:apply-templates mode="dl"/>
|
@@ -2097,6 +2376,7 @@
|
|
2097
2376
|
|
2098
2377
|
|
2099
2378
|
|
2379
|
+
|
2100
2380
|
<xsl:apply-templates/>
|
2101
2381
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2102
2382
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2150,6 +2430,7 @@
|
|
2150
2430
|
</fo:inline>
|
2151
2431
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
2152
2432
|
<fo:inline font-weight="bold">
|
2433
|
+
|
2153
2434
|
<xsl:apply-templates/>
|
2154
2435
|
</fo:inline>
|
2155
2436
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -2163,18 +2444,18 @@
|
|
2163
2444
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2164
2445
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2165
2446
|
<xsl:variable name="_font-size">
|
2166
|
-
|
2167
|
-
|
2168
|
-
|
2169
2447
|
|
2170
2448
|
|
2171
2449
|
|
2172
2450
|
|
2173
2451
|
|
2174
2452
|
|
2175
|
-
|
2176
2453
|
|
2177
|
-
|
2454
|
+
|
2455
|
+
|
2456
|
+
|
2457
|
+
|
2458
|
+
|
2178
2459
|
|
2179
2460
|
|
2180
2461
|
</xsl:variable>
|
@@ -2478,7 +2759,18 @@
|
|
2478
2759
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
2479
2760
|
</xsl:apply-templates>
|
2480
2761
|
</xsl:template><xsl:template name="getLang">
|
2481
|
-
<xsl:variable name="
|
2762
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
2763
|
+
<xsl:variable name="language">
|
2764
|
+
<xsl:choose>
|
2765
|
+
<xsl:when test="$language_current != ''">
|
2766
|
+
<xsl:value-of select="$language_current"/>
|
2767
|
+
</xsl:when>
|
2768
|
+
<xsl:otherwise>
|
2769
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
2770
|
+
</xsl:otherwise>
|
2771
|
+
</xsl:choose>
|
2772
|
+
</xsl:variable>
|
2773
|
+
|
2482
2774
|
<xsl:choose>
|
2483
2775
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
2484
2776
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -2512,7 +2804,8 @@
|
|
2512
2804
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2513
2805
|
<xsl:value-of select="substring($str, 2)"/>
|
2514
2806
|
</xsl:template><xsl:template match="mathml:math">
|
2515
|
-
<fo:inline font-family="
|
2807
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
2808
|
+
|
2516
2809
|
<xsl:variable name="mathml">
|
2517
2810
|
<xsl:apply-templates select="." mode="mathml"/>
|
2518
2811
|
</xsl:variable>
|
@@ -2542,6 +2835,7 @@
|
|
2542
2835
|
</xsl:choose>
|
2543
2836
|
</xsl:variable>
|
2544
2837
|
<fo:inline xsl:use-attribute-sets="link-style">
|
2838
|
+
|
2545
2839
|
<xsl:choose>
|
2546
2840
|
<xsl:when test="$target = ''">
|
2547
2841
|
<xsl:apply-templates/>
|
@@ -2595,10 +2889,14 @@
|
|
2595
2889
|
</fo:inline>
|
2596
2890
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
2597
2891
|
<xsl:variable name="title-modified">
|
2598
|
-
|
2599
|
-
|
2600
|
-
|
2892
|
+
|
2893
|
+
|
2894
|
+
<xsl:call-template name="getTitle">
|
2895
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
2896
|
+
</xsl:call-template>
|
2897
|
+
|
2601
2898
|
</xsl:variable>
|
2899
|
+
|
2602
2900
|
<xsl:choose>
|
2603
2901
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
2604
2902
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -2606,7 +2904,7 @@
|
|
2606
2904
|
<xsl:apply-templates/>
|
2607
2905
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2608
2906
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2609
|
-
|
2907
|
+
|
2610
2908
|
<xsl:apply-templates/>
|
2611
2909
|
</fo:basic-link>
|
2612
2910
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -2659,6 +2957,8 @@
|
|
2659
2957
|
|
2660
2958
|
|
2661
2959
|
|
2960
|
+
|
2961
|
+
|
2662
2962
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
2663
2963
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2664
2964
|
</fo:inline>
|
@@ -2747,7 +3047,8 @@
|
|
2747
3047
|
</fo:inline>
|
2748
3048
|
</xsl:if>
|
2749
3049
|
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
2750
|
-
<fo:block-container id="{@id}">
|
3050
|
+
<fo:block-container id="{@id}">
|
3051
|
+
|
2751
3052
|
<fo:block>
|
2752
3053
|
<xsl:apply-templates/>
|
2753
3054
|
</fo:block>
|
@@ -2782,15 +3083,109 @@
|
|
2782
3083
|
|
2783
3084
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2784
3085
|
</fo:block>
|
2785
|
-
</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">
|
3086
|
+
</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">
|
2786
3087
|
<xsl:apply-templates mode="contents"/>
|
2787
3088
|
<xsl:text> </xsl:text>
|
2788
|
-
</xsl:template><xsl:template match="
|
3089
|
+
</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">
|
3090
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3091
|
+
<xsl:text> </xsl:text>
|
3092
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
2789
3093
|
<xsl:value-of select="."/>
|
2790
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3094
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3095
|
+
<xsl:value-of select="."/>
|
3096
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3097
|
+
<xsl:apply-templates mode="contents"/>
|
3098
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3099
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3100
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3101
|
+
<xsl:apply-templates select="."/>
|
3102
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3103
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3104
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3105
|
+
<xsl:param name="contents"/>
|
3106
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3107
|
+
<fo:bookmark-tree>
|
3108
|
+
<xsl:choose>
|
3109
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3110
|
+
<xsl:choose>
|
3111
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3112
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3113
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3114
|
+
<fo:bookmark-title>
|
3115
|
+
<xsl:variable name="bookmark-title_">
|
3116
|
+
<xsl:call-template name="getLangVersion">
|
3117
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3118
|
+
</xsl:call-template>
|
3119
|
+
</xsl:variable>
|
3120
|
+
<xsl:choose>
|
3121
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3122
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3123
|
+
</xsl:when>
|
3124
|
+
<xsl:otherwise>
|
3125
|
+
<xsl:choose>
|
3126
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3127
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3128
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3129
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3130
|
+
</xsl:choose>
|
3131
|
+
</xsl:otherwise>
|
3132
|
+
</xsl:choose>
|
3133
|
+
</fo:bookmark-title>
|
3134
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3135
|
+
</fo:bookmark>
|
3136
|
+
|
3137
|
+
</xsl:for-each>
|
3138
|
+
</xsl:when>
|
3139
|
+
<xsl:otherwise>
|
3140
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3141
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3142
|
+
</xsl:for-each>
|
3143
|
+
</xsl:otherwise>
|
3144
|
+
</xsl:choose>
|
3145
|
+
</xsl:when>
|
3146
|
+
<xsl:otherwise>
|
3147
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3148
|
+
</xsl:otherwise>
|
3149
|
+
</xsl:choose>
|
3150
|
+
|
3151
|
+
|
3152
|
+
|
3153
|
+
|
3154
|
+
|
3155
|
+
|
3156
|
+
|
3157
|
+
|
3158
|
+
</fo:bookmark-tree>
|
3159
|
+
</xsl:if>
|
3160
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3161
|
+
<xsl:param name="lang"/>
|
3162
|
+
<xsl:choose>
|
3163
|
+
<xsl:when test="$lang = 'en'">
|
3164
|
+
|
3165
|
+
|
3166
|
+
</xsl:when>
|
3167
|
+
<xsl:when test="$lang = 'fr'">
|
3168
|
+
|
3169
|
+
|
3170
|
+
</xsl:when>
|
3171
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3172
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3173
|
+
</xsl:choose>
|
3174
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3175
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3176
|
+
<fo:bookmark-title>
|
3177
|
+
<xsl:if test="@section != ''">
|
3178
|
+
<xsl:value-of select="@section"/>
|
3179
|
+
<xsl:text> </xsl:text>
|
3180
|
+
</xsl:if>
|
3181
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3182
|
+
</fo:bookmark-title>
|
3183
|
+
<xsl:apply-templates mode="bookmark"/>
|
3184
|
+
</fo:bookmark>
|
3185
|
+
</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">
|
2791
3186
|
<xsl:if test="normalize-space() != ''">
|
2792
3187
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2793
|
-
|
3188
|
+
|
2794
3189
|
<xsl:apply-templates/>
|
2795
3190
|
</fo:block>
|
2796
3191
|
</xsl:if>
|
@@ -2845,7 +3240,7 @@
|
|
2845
3240
|
<xsl:apply-templates/>
|
2846
3241
|
</xsl:otherwise>
|
2847
3242
|
</xsl:choose>
|
2848
|
-
</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">
|
3243
|
+
</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">
|
2849
3244
|
<xsl:text> </xsl:text>
|
2850
3245
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
2851
3246
|
<xsl:copy>
|
@@ -3223,9 +3618,14 @@
|
|
3223
3618
|
|
3224
3619
|
<fo:inline>
|
3225
3620
|
|
3226
|
-
|
3227
|
-
|
3228
|
-
|
3621
|
+
|
3622
|
+
|
3623
|
+
|
3624
|
+
<xsl:call-template name="getTitle">
|
3625
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
3626
|
+
</xsl:call-template>
|
3627
|
+
|
3628
|
+
|
3229
3629
|
<xsl:text>: </xsl:text>
|
3230
3630
|
</fo:inline>
|
3231
3631
|
|
@@ -3372,9 +3772,12 @@
|
|
3372
3772
|
</fo:block>
|
3373
3773
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
3374
3774
|
<xsl:variable name="title-deprecated">
|
3375
|
-
|
3376
|
-
|
3377
|
-
|
3775
|
+
|
3776
|
+
|
3777
|
+
<xsl:call-template name="getTitle">
|
3778
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
3779
|
+
</xsl:call-template>
|
3780
|
+
|
3378
3781
|
</xsl:variable>
|
3379
3782
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
3380
3783
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -3416,13 +3819,14 @@
|
|
3416
3819
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3417
3820
|
<fo:block>
|
3418
3821
|
<xsl:call-template name="setId"/>
|
3822
|
+
|
3419
3823
|
<xsl:apply-templates/>
|
3420
3824
|
</fo:block>
|
3421
3825
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
3422
3826
|
<fo:block id="{@id}">
|
3423
3827
|
<xsl:apply-templates/>
|
3424
3828
|
</fo:block>
|
3425
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3829
|
+
</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']">
|
3426
3830
|
|
3427
3831
|
<fo:block id="{@id}">
|
3428
3832
|
<xsl:apply-templates/>
|
@@ -3441,20 +3845,30 @@
|
|
3441
3845
|
<!-- 0xA0 to space replacement -->
|
3442
3846
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3443
3847
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
3444
|
-
<
|
3445
|
-
<xsl:
|
3446
|
-
<
|
3447
|
-
<xsl:
|
3448
|
-
<xsl:
|
3449
|
-
|
3450
|
-
|
3451
|
-
|
3452
|
-
|
3453
|
-
|
3454
|
-
|
3455
|
-
|
3456
|
-
|
3457
|
-
|
3848
|
+
<xsl:choose>
|
3849
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
3850
|
+
<fo:block-container>
|
3851
|
+
<xsl:attribute name="margin-left">
|
3852
|
+
<xsl:choose>
|
3853
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3854
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3855
|
+
</xsl:choose>
|
3856
|
+
</xsl:attribute>
|
3857
|
+
|
3858
|
+
|
3859
|
+
<fo:block-container margin-left="0mm">
|
3860
|
+
<fo:block>
|
3861
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3862
|
+
</fo:block>
|
3863
|
+
</fo:block-container>
|
3864
|
+
</fo:block-container>
|
3865
|
+
</xsl:when>
|
3866
|
+
<xsl:otherwise>
|
3867
|
+
<fo:block>
|
3868
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3869
|
+
</fo:block>
|
3870
|
+
</xsl:otherwise>
|
3871
|
+
</xsl:choose>
|
3458
3872
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3459
3873
|
<!-- <row>
|
3460
3874
|
<date>05-07-2013</date>
|
@@ -3623,6 +4037,7 @@
|
|
3623
4037
|
<dc:title>
|
3624
4038
|
<xsl:variable name="title">
|
3625
4039
|
|
4040
|
+
|
3626
4041
|
|
3627
4042
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
|
3628
4043
|
|
@@ -3641,6 +4056,7 @@
|
|
3641
4056
|
<dc:creator>
|
3642
4057
|
|
3643
4058
|
|
4059
|
+
|
3644
4060
|
</dc:creator>
|
3645
4061
|
<dc:description>
|
3646
4062
|
<xsl:variable name="abstract">
|
@@ -3648,6 +4064,7 @@
|
|
3648
4064
|
|
3649
4065
|
|
3650
4066
|
|
4067
|
+
|
3651
4068
|
</xsl:variable>
|
3652
4069
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3653
4070
|
</dc:description>
|
@@ -3719,13 +4136,22 @@
|
|
3719
4136
|
</xsl:template><xsl:template name="split">
|
3720
4137
|
<xsl:param name="pText" select="."/>
|
3721
4138
|
<xsl:param name="sep" select="','"/>
|
4139
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
3722
4140
|
<xsl:if test="string-length($pText) >0">
|
3723
4141
|
<item>
|
3724
|
-
<xsl:
|
4142
|
+
<xsl:choose>
|
4143
|
+
<xsl:when test="$normalize-space = 'true'">
|
4144
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
4145
|
+
</xsl:when>
|
4146
|
+
<xsl:otherwise>
|
4147
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
4148
|
+
</xsl:otherwise>
|
4149
|
+
</xsl:choose>
|
3725
4150
|
</item>
|
3726
4151
|
<xsl:call-template name="split">
|
3727
4152
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
3728
4153
|
<xsl:with-param name="sep" select="$sep"/>
|
4154
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
3729
4155
|
</xsl:call-template>
|
3730
4156
|
</xsl:if>
|
3731
4157
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -3748,6 +4174,7 @@
|
|
3748
4174
|
|
3749
4175
|
<xsl:value-of select="document('')//*/namespace::mpfd"/>
|
3750
4176
|
|
4177
|
+
|
3751
4178
|
</xsl:variable>
|
3752
4179
|
<xsl:if test="$documentNS != $XSLNS">
|
3753
4180
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3773,4 +4200,40 @@
|
|
3773
4200
|
</xsl:otherwise>
|
3774
4201
|
</xsl:choose>
|
3775
4202
|
</xsl:attribute>
|
4203
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4204
|
+
<xsl:param name="text"/>
|
4205
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4206
|
+
<xsl:if test="string-length($text) > 0">
|
4207
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4208
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4209
|
+
<xsl:if test="$char = '®'">
|
4210
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4211
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4212
|
+
</xsl:if>
|
4213
|
+
<xsl:value-of select="$char"/>
|
4214
|
+
</fo:inline>
|
4215
|
+
<xsl:call-template name="add-letter-spacing">
|
4216
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4217
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4218
|
+
</xsl:call-template>
|
4219
|
+
</xsl:if>
|
4220
|
+
</xsl:template><xsl:template name="repeat">
|
4221
|
+
<xsl:param name="char" select="'*'"/>
|
4222
|
+
<xsl:param name="count"/>
|
4223
|
+
<xsl:if test="$count > 0">
|
4224
|
+
<xsl:value-of select="$char"/>
|
4225
|
+
<xsl:call-template name="repeat">
|
4226
|
+
<xsl:with-param name="char" select="$char"/>
|
4227
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
4228
|
+
</xsl:call-template>
|
4229
|
+
</xsl:if>
|
4230
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
4231
|
+
<xsl:param name="key"/>
|
4232
|
+
|
4233
|
+
<xsl:variable name="curr_lang">
|
4234
|
+
<xsl:call-template name="getLang"/>
|
4235
|
+
</xsl:variable>
|
4236
|
+
|
4237
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4238
|
+
|
3776
4239
|
</xsl:template></xsl:stylesheet>
|