metanorma-ribose 1.6.4 → 1.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,7 +55,7 @@
55
55
 
56
56
  <xsl:template match="/">
57
57
  <xsl:call-template name="namespaceCheck"/>
58
- <fo:root font-family="SourceSansPro-Light, STIX2Math" font-size="10.5pt" xml:lang="{$lang}">
58
+ <fo:root font-family="Source Sans Pro, STIX Two Math" font-weight="300" font-size="10.5pt" xml:lang="{$lang}">
59
59
  <fo:layout-master-set>
60
60
 
61
61
  <fo:simple-page-master master-name="odd" page-width="{$pageWidth}" page-height="{$pageHeight}">
@@ -107,12 +107,12 @@
107
107
  <fo:flow flow-name="xsl-region-body">
108
108
  <fo:block font-size="16pt" margin-bottom="16pt"> </fo:block>
109
109
  <fo:block font-size="16pt" margin-bottom="16pt"> </fo:block>
110
- <fo:block font-size="22pt" font-weight="bold" margin-bottom="12pt"><xsl:value-of select="$doctitle"/></fo:block>
110
+ <fo:block font-size="22pt" font-weight="normal" margin-bottom="12pt"><xsl:value-of select="$doctitle"/></fo:block>
111
111
  <fo:block font-size="22pt" margin-bottom="14pt"> </fo:block>
112
112
  <fo:block font-size="22pt" margin-bottom="14pt"> </fo:block>
113
113
  <fo:block font-size="22pt" margin-bottom="6pt"> </fo:block>
114
114
 
115
- <fo:block font-family="SourceSerifPro" font-size="12pt" line-height="230%">
115
+ <fo:block font-family="Source Serif Pro" font-size="12pt" line-height="230%">
116
116
  <fo:block>Ronald Tse</fo:block>
117
117
  <fo:block>Wai Kit Wong</fo:block>
118
118
  <fo:block>Daniel Wyatt</fo:block>
@@ -144,7 +144,7 @@
144
144
  </xsl:call-template>
145
145
  </fo:block>
146
146
 
147
- <fo:block font-size="12pt" font-weight="bold" font-style="italic" margin-bottom="12pt">
147
+ <fo:block font-size="12pt" font-weight="normal" font-style="italic" margin-bottom="12pt">
148
148
  <xsl:text>Unrestricted</xsl:text>
149
149
  </fo:block>
150
150
 
@@ -165,8 +165,8 @@
165
165
  <xsl:with-param name="name" select="'title-toc'"/>
166
166
  </xsl:call-template>
167
167
  </xsl:variable>
168
- <fo:block font-size="14pt" font-weight="bold" margin-bottom="15.5pt"><xsl:value-of select="$title-toc"/></fo:block>
169
- <fo:block font-weight="bold" line-height="125%">
168
+ <fo:block font-size="14pt" font-weight="normal" margin-bottom="15.5pt"><xsl:value-of select="$title-toc"/></fo:block>
169
+ <fo:block font-weight="normal" line-height="125%">
170
170
  <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
171
171
  <fo:block>
172
172
  <xsl:if test="@level = 1">
@@ -225,7 +225,7 @@
225
225
 
226
226
  <fo:block line-height="130%">
227
227
 
228
- <fo:block font-size="16pt" font-weight="bold" margin-bottom="18pt"><xsl:value-of select="$doctitle"/></fo:block>
228
+ <fo:block font-size="16pt" font-weight="normal" margin-bottom="18pt"><xsl:value-of select="$doctitle"/></fo:block>
229
229
 
230
230
  <xsl:apply-templates select="/rsd:rsd-standard/rsd:preface/rsd:abstract"/>
231
231
  <xsl:apply-templates select="/rsd:rsd-standard/rsd:preface/rsd:foreword"/>
@@ -328,7 +328,7 @@
328
328
  </xsl:template>
329
329
 
330
330
  <xsl:template match="rsd:license-statement//rsd:title">
331
- <fo:block text-align="center" font-weight="bold" margin-top="4pt">
331
+ <fo:block text-align="center" font-weight="normal" margin-top="4pt">
332
332
  <xsl:apply-templates/>
333
333
  </fo:block>
334
334
  </xsl:template>
@@ -349,7 +349,7 @@
349
349
  </xsl:template>
350
350
 
351
351
  <xsl:template match="rsd:copyright-statement//rsd:title">
352
- <fo:block font-weight="bold" text-align="center">
352
+ <fo:block font-weight="normal" text-align="center">
353
353
  <xsl:apply-templates/>
354
354
  </fo:block>
355
355
  </xsl:template>
@@ -373,7 +373,7 @@
373
373
  </xsl:template>
374
374
 
375
375
  <xsl:template match="rsd:legal-statement//rsd:title">
376
- <fo:block font-weight="bold" padding-top="2mm" margin-bottom="6pt">
376
+ <fo:block font-weight="normal" padding-top="2mm" margin-bottom="6pt">
377
377
  <xsl:apply-templates/>
378
378
  </fo:block>
379
379
  </xsl:template>
@@ -434,7 +434,7 @@
434
434
 
435
435
  <xsl:element name="{$element-name}">
436
436
  <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
437
- <xsl:attribute name="font-weight">bold</xsl:attribute>
437
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
438
438
  <xsl:attribute name="space-before">13.5pt</xsl:attribute>
439
439
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
440
440
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -529,7 +529,7 @@
529
529
 
530
530
 
531
531
  <xsl:template match="rsd:bibitem">
532
- <fo:block font-family="SourceSansPro" font-size="11pt" id="{@id}" margin-bottom="12pt" start-indent="12mm" text-indent="-12mm">
532
+ <fo:block font-family="Source Sans Pro" font-size="11pt" id="{@id}" margin-bottom="12pt" start-indent="12mm" text-indent="-12mm">
533
533
  <xsl:if test=".//rsd:fn">
534
534
  <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
535
535
  </xsl:if>
@@ -674,13 +674,13 @@
674
674
  <xsl:otherwise> <!-- for ordered lists -->
675
675
  <xsl:choose>
676
676
  <xsl:when test="../@type = 'arabic'">
677
- <xsl:number format="a)"/>
677
+ <xsl:number format="a)" lang="en"/>
678
678
  </xsl:when>
679
679
  <xsl:when test="../@type = 'alphabet'">
680
680
  <xsl:number format="1)"/>
681
681
  </xsl:when>
682
682
  <xsl:when test="../@type = 'alphabet_upper'">
683
- <xsl:number format="A)"/>
683
+ <xsl:number format="A)" lang="en"/>
684
684
  </xsl:when>
685
685
 
686
686
  <xsl:when test="../@type = 'roman'">
@@ -727,10 +727,10 @@
727
727
  </xsl:choose>
728
728
  </xsl:variable>
729
729
  <fo:block font-size="{$font-size}">
730
- <fo:block font-weight="bold" keep-with-next="always">
730
+ <fo:block font-weight="normal" keep-with-next="always">
731
731
  <xsl:apply-templates select="ancestor::rsd:term/rsd:name" mode="presentation"/>
732
732
  </fo:block>
733
- <fo:block font-weight="bold" keep-with-next="always" line-height="1">
733
+ <fo:block font-weight="normal" keep-with-next="always" line-height="1">
734
734
  <xsl:apply-templates/>
735
735
  </fo:block>
736
736
  </fo:block>
@@ -774,7 +774,7 @@
774
774
  <xsl:template match="rsd:admonition">
775
775
  <fo:block-container border="0.5pt solid rgb(79, 129, 189)" color="rgb(79, 129, 189)" margin-left="16mm" margin-right="16mm" margin-bottom="12pt">
776
776
  <fo:block-container margin-left="0mm" margin-right="0mm" padding="2mm" padding-top="3mm">
777
- <fo:block font-size="11pt" margin-bottom="6pt" font-weight="bold" font-style="italic" text-align="center">
777
+ <fo:block font-size="11pt" margin-bottom="6pt" font-weight="normal" font-style="italic" text-align="center">
778
778
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
779
779
  </fo:block>
780
780
  <fo:block font-style="italic">
@@ -820,7 +820,7 @@
820
820
  </xsl:template>
821
821
 
822
822
  <xsl:template name="insertHeaderFooter">
823
- <xsl:param name="font-weight" select="'bold'"/>
823
+ <xsl:param name="font-weight" select="'normal'"/>
824
824
  <fo:static-content flow-name="header-odd">
825
825
  <fo:block-container height="100%" display-align="after">
826
826
  <fo:block text-align="right">
@@ -925,7 +925,12 @@
925
925
 
926
926
 
927
927
  </title-toc>
928
- <title-toc lang="fr">Sommaire</title-toc>
928
+ <title-toc lang="fr">
929
+
930
+ <xsl:text>Sommaire</xsl:text>
931
+
932
+
933
+ </title-toc>
929
934
 
930
935
  <title-toc lang="zh">Contents</title-toc>
931
936
 
@@ -945,13 +950,22 @@
945
950
  <title-part lang="en">
946
951
 
947
952
 
953
+
948
954
  </title-part>
949
955
  <title-part lang="fr">
950
956
 
951
957
 
958
+
952
959
  </title-part>
953
960
  <title-part lang="zh">第 # 部分:</title-part>
954
961
 
962
+ <title-subpart lang="en">
963
+
964
+ </title-subpart>
965
+ <title-subpart lang="fr">
966
+
967
+ </title-subpart>
968
+
955
969
  <title-modified lang="en">modified</title-modified>
956
970
  <title-modified lang="fr">modifiée</title-modified>
957
971
 
@@ -1013,10 +1027,19 @@
1013
1027
 
1014
1028
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1015
1029
  <xsl:param name="name"/>
1016
- <xsl:variable name="lang">
1017
- <xsl:call-template name="getLang"/>
1030
+ <xsl:param name="lang"/>
1031
+ <xsl:variable name="lang_">
1032
+ <xsl:choose>
1033
+ <xsl:when test="$lang != ''">
1034
+ <xsl:value-of select="$lang"/>
1035
+ </xsl:when>
1036
+ <xsl:otherwise>
1037
+ <xsl:call-template name="getLang"/>
1038
+ </xsl:otherwise>
1039
+ </xsl:choose>
1018
1040
  </xsl:variable>
1019
- <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $lang]"/>
1041
+ <xsl:variable name="language" select="normalize-space($lang_)"/>
1042
+ <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
1020
1043
  <xsl:choose>
1021
1044
  <xsl:when test="normalize-space($title_) != ''">
1022
1045
  <xsl:value-of select="$title_"/>
@@ -1039,7 +1062,7 @@
1039
1062
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1040
1063
 
1041
1064
 
1042
- <xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
1065
+ <xsl:attribute name="font-family">Source Code Pro</xsl:attribute>
1043
1066
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1044
1067
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1045
1068
  <xsl:attribute name="line-height">113%</xsl:attribute>
@@ -1079,8 +1102,8 @@
1079
1102
 
1080
1103
 
1081
1104
 
1082
-
1083
- <xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
1105
+
1106
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1084
1107
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1085
1108
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1086
1109
 
@@ -1119,11 +1142,10 @@
1119
1142
 
1120
1143
 
1121
1144
 
1122
- <xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
1123
1145
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1124
1146
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1125
1147
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1126
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1148
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1127
1149
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1128
1150
 
1129
1151
 
@@ -1167,12 +1189,13 @@
1167
1189
 
1168
1190
 
1169
1191
 
1192
+
1170
1193
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1171
1194
 
1172
1195
 
1173
1196
 
1174
1197
  <xsl:attribute name="font-size">12pt</xsl:attribute>
1175
- <xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
1198
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1176
1199
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1177
1200
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1178
1201
 
@@ -1180,7 +1203,7 @@
1180
1203
 
1181
1204
 
1182
1205
 
1183
- <xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
1206
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1184
1207
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1185
1208
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1186
1209
 
@@ -1218,6 +1241,7 @@
1218
1241
 
1219
1242
 
1220
1243
 
1244
+
1221
1245
  </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">
1222
1246
 
1223
1247
 
@@ -1298,6 +1322,7 @@
1298
1322
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1299
1323
 
1300
1324
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1325
+
1301
1326
 
1302
1327
 
1303
1328
 
@@ -1310,9 +1335,8 @@
1310
1335
 
1311
1336
 
1312
1337
 
1313
- <xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
1314
1338
  <xsl:attribute name="font-size">12pt</xsl:attribute>
1315
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1339
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1316
1340
  <xsl:attribute name="text-align">center</xsl:attribute>
1317
1341
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1318
1342
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -1346,7 +1370,7 @@
1346
1370
 
1347
1371
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
1348
1372
 
1349
- <xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
1373
+ <xsl:attribute name="font-family">Source Code Pro</xsl:attribute>
1350
1374
 
1351
1375
 
1352
1376
 
@@ -1358,7 +1382,7 @@
1358
1382
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1359
1383
 
1360
1384
  <xsl:attribute name="font-size">12pt</xsl:attribute>
1361
- <xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
1385
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1362
1386
 
1363
1387
  </xsl:attribute-set><xsl:attribute-set name="domain-style">
1364
1388
 
@@ -1425,6 +1449,10 @@
1425
1449
 
1426
1450
 
1427
1451
 
1452
+ <!-- <xsl:if test="$namespace = 'bipm'">
1453
+ <fo:block>&#xA0;</fo:block>
1454
+ </xsl:if> -->
1455
+
1428
1456
  <!-- $namespace = 'iso' or -->
1429
1457
 
1430
1458
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -1455,11 +1483,14 @@
1455
1483
 
1456
1484
 
1457
1485
  <xsl:variable name="colwidths">
1458
- <xsl:call-template name="calculate-column-widths">
1459
- <xsl:with-param name="cols-count" select="$cols-count"/>
1460
- <xsl:with-param name="table" select="$simple-table"/>
1461
- </xsl:call-template>
1486
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1487
+ <xsl:call-template name="calculate-column-widths">
1488
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1489
+ <xsl:with-param name="table" select="$simple-table"/>
1490
+ </xsl:call-template>
1491
+ </xsl:if>
1462
1492
  </xsl:variable>
1493
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1463
1494
 
1464
1495
  <!-- <xsl:variable name="colwidths2">
1465
1496
  <xsl:call-template name="calculate-column-widths">
@@ -1481,27 +1512,97 @@
1481
1512
  <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1482
1513
 
1483
1514
 
1515
+
1516
+
1517
+
1518
+
1519
+
1520
+
1484
1521
 
1485
1522
 
1486
1523
 
1487
-
1488
1524
 
1489
1525
 
1490
1526
 
1491
- <fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
1492
-
1493
-
1527
+
1528
+ <xsl:variable name="table_attributes">
1529
+ <attribute name="table-layout">fixed</attribute>
1530
+ <attribute name="width">100%</attribute>
1531
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1532
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1494
1533
 
1495
1534
 
1496
1535
 
1497
1536
 
1537
+
1538
+
1539
+
1498
1540
 
1541
+
1499
1542
 
1543
+ </xsl:variable>
1544
+
1545
+
1546
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
1500
1547
 
1548
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1549
+ <xsl:attribute name="{@name}">
1550
+ <xsl:value-of select="."/>
1551
+ </xsl:attribute>
1552
+ </xsl:for-each>
1501
1553
 
1554
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1555
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1556
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1557
+ </xsl:if>
1502
1558
 
1559
+ <xsl:choose>
1560
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1561
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1562
+ <fo:table-column column-width="{@width}"/>
1563
+ </xsl:for-each>
1564
+ </xsl:when>
1565
+ <xsl:otherwise>
1566
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1567
+ <xsl:choose>
1568
+ <xsl:when test=". = 1 or . = 0">
1569
+ <fo:table-column column-width="proportional-column-width(2)"/>
1570
+ </xsl:when>
1571
+ <xsl:otherwise>
1572
+ <fo:table-column column-width="proportional-column-width({.})"/>
1573
+ </xsl:otherwise>
1574
+ </xsl:choose>
1575
+ </xsl:for-each>
1576
+ </xsl:otherwise>
1577
+ </xsl:choose>
1503
1578
 
1579
+ <xsl:choose>
1580
+ <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1581
+ <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1582
+ </xsl:when>
1583
+ <xsl:otherwise>
1584
+ <xsl:apply-templates/>
1585
+ </xsl:otherwise>
1586
+ </xsl:choose>
1504
1587
 
1588
+ </fo:table>
1589
+
1590
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1591
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1592
+ <xsl:call-template name="insertTableFooterInSeparateTable">
1593
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
1594
+ <xsl:with-param name="colwidths" select="$colwidths"/>
1595
+ <xsl:with-param name="colgroup" select="$colgroup"/>
1596
+ </xsl:call-template>
1597
+ </xsl:for-each>
1598
+
1599
+ <!-- insert footer as table -->
1600
+ <!-- <fo:table>
1601
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1602
+ <xsl:attribute name="{@name}">
1603
+ <xsl:value-of select="."/>
1604
+ </xsl:attribute>
1605
+ </xsl:for-each>
1505
1606
 
1506
1607
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1507
1608
  <xsl:choose>
@@ -1513,17 +1614,7 @@
1513
1614
  </xsl:otherwise>
1514
1615
  </xsl:choose>
1515
1616
  </xsl:for-each>
1516
-
1517
- <xsl:choose>
1518
- <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1519
- <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1520
- </xsl:when>
1521
- <xsl:otherwise>
1522
- <xsl:apply-templates/>
1523
- </xsl:otherwise>
1524
- </xsl:choose>
1525
-
1526
- </fo:table>
1617
+ </fo:table>-->
1527
1618
 
1528
1619
 
1529
1620
 
@@ -1534,6 +1625,7 @@
1534
1625
  <xsl:if test="normalize-space() != ''">
1535
1626
  <fo:block xsl:use-attribute-sets="table-name-style">
1536
1627
 
1628
+
1537
1629
  <xsl:apply-templates/>
1538
1630
  </fo:block>
1539
1631
  </xsl:if>
@@ -1589,6 +1681,13 @@
1589
1681
  <xsl:for-each select="xalan:nodeset($table)//tr">
1590
1682
  <xsl:variable name="td_text">
1591
1683
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
1684
+
1685
+ <!-- <xsl:if test="$namespace = 'bipm'">
1686
+ <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
1687
+ <word><xsl:value-of select="normalize-space(.)"/></word>
1688
+ </xsl:for-each>
1689
+ </xsl:if> -->
1690
+
1592
1691
  </xsl:variable>
1593
1692
  <xsl:variable name="words">
1594
1693
  <xsl:variable name="string_with_added_zerospaces">
@@ -1648,11 +1747,14 @@
1648
1747
  <xsl:value-of select="*[local-name()='origin']/@citeas"/>
1649
1748
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
1650
1749
  <xsl:value-of select="@target"/>
1750
+ </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
1751
+ <xsl:variable name="math_text" select="normalize-space(.)"/>
1752
+ <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
1651
1753
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1652
1754
  <xsl:param name="cols-count"/>
1653
1755
  <!-- font-weight="bold" -->
1654
1756
  <fo:table-header>
1655
-
1757
+
1656
1758
  <xsl:apply-templates/>
1657
1759
  </fo:table-header>
1658
1760
  </xsl:template><xsl:template name="table-header-title">
@@ -1677,6 +1779,13 @@
1677
1779
  </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
1678
1780
  <xsl:apply-templates/>
1679
1781
  </xsl:template><xsl:template name="insertTableFooter">
1782
+ <xsl:param name="cols-count"/>
1783
+ <xsl:if test="../*[local-name()='tfoot']">
1784
+ <fo:table-footer>
1785
+ <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
1786
+ </fo:table-footer>
1787
+ </xsl:if>
1788
+ </xsl:template><xsl:template name="insertTableFooter2">
1680
1789
  <xsl:param name="cols-count"/>
1681
1790
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1682
1791
  <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
@@ -1698,11 +1807,29 @@
1698
1807
  <!-- fn will be processed inside 'note' processing -->
1699
1808
 
1700
1809
 
1810
+
1811
+
1812
+
1813
+
1701
1814
  <!-- except gb -->
1702
1815
 
1703
1816
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1704
1817
 
1705
1818
 
1819
+ <!-- show Note under table in preface (ex. abstract) sections -->
1820
+ <!-- empty, because notes show at page side in main sections -->
1821
+ <!-- <xsl:if test="$namespace = 'bipm'">
1822
+ <xsl:choose>
1823
+ <xsl:when test="ancestor::*[local-name()='preface']">
1824
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1825
+ </xsl:when>
1826
+ <xsl:otherwise>
1827
+ <fo:block/>
1828
+ </xsl:otherwise>
1829
+ </xsl:choose>
1830
+ </xsl:if> -->
1831
+
1832
+
1706
1833
  <!-- horizontal row separator -->
1707
1834
 
1708
1835
 
@@ -1716,6 +1843,107 @@
1716
1843
  </fo:table-footer>
1717
1844
 
1718
1845
  </xsl:if>
1846
+ </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
1847
+ <xsl:param name="table_attributes"/>
1848
+ <xsl:param name="colwidths"/>
1849
+ <xsl:param name="colgroup"/>
1850
+
1851
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1852
+
1853
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1854
+
1855
+ <xsl:variable name="cols-count">
1856
+ <xsl:choose>
1857
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
1858
+ <xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
1859
+ </xsl:when>
1860
+ <xsl:otherwise>
1861
+ <xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
1862
+ </xsl:otherwise>
1863
+ </xsl:choose>
1864
+ </xsl:variable>
1865
+
1866
+ <fo:table keep-with-previous="always">
1867
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1868
+ <xsl:choose>
1869
+ <xsl:when test="@name = 'border-top'">
1870
+ <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
1871
+ </xsl:when>
1872
+ <xsl:when test="@name = 'border'">
1873
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
1874
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
1875
+ </xsl:when>
1876
+ <xsl:otherwise>
1877
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
1878
+ </xsl:otherwise>
1879
+ </xsl:choose>
1880
+ </xsl:for-each>
1881
+
1882
+ <xsl:choose>
1883
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
1884
+ <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
1885
+ <fo:table-column column-width="{@width}"/>
1886
+ </xsl:for-each>
1887
+ </xsl:when>
1888
+ <xsl:otherwise>
1889
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1890
+ <xsl:choose>
1891
+ <xsl:when test=". = 1 or . = 0">
1892
+ <fo:table-column column-width="proportional-column-width(2)"/>
1893
+ </xsl:when>
1894
+ <xsl:otherwise>
1895
+ <fo:table-column column-width="proportional-column-width({.})"/>
1896
+ </xsl:otherwise>
1897
+ </xsl:choose>
1898
+ </xsl:for-each>
1899
+ </xsl:otherwise>
1900
+ </xsl:choose>
1901
+
1902
+ <fo:table-body>
1903
+ <fo:table-row>
1904
+ <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
1905
+
1906
+
1907
+
1908
+ <!-- fn will be processed inside 'note' processing -->
1909
+
1910
+
1911
+
1912
+
1913
+
1914
+
1915
+
1916
+ <!-- except gb -->
1917
+
1918
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1919
+
1920
+
1921
+ <!-- <xsl:if test="$namespace = 'bipm'">
1922
+ <xsl:choose>
1923
+ <xsl:when test="ancestor::*[local-name()='preface']">
1924
+ show Note under table in preface (ex. abstract) sections
1925
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1926
+ </xsl:when>
1927
+ <xsl:otherwise>
1928
+ empty, because notes show at page side in main sections
1929
+ <fo:block/>
1930
+ </xsl:otherwise>
1931
+ </xsl:choose>
1932
+ </xsl:if> -->
1933
+
1934
+
1935
+ <!-- horizontal row separator -->
1936
+
1937
+
1938
+ <!-- fn processing -->
1939
+ <xsl:call-template name="fn_display"/>
1940
+
1941
+ </fo:table-cell>
1942
+ </fo:table-row>
1943
+ </fo:table-body>
1944
+
1945
+ </fo:table>
1946
+ </xsl:if>
1719
1947
  </xsl:template><xsl:template match="*[local-name()='tbody']">
1720
1948
 
1721
1949
  <xsl:variable name="cols-count">
@@ -1768,8 +1996,12 @@
1768
1996
 
1769
1997
  </xsl:if>
1770
1998
 
1771
-
1772
-
1999
+
2000
+
2001
+
2002
+ <!-- <xsl:if test="$namespace = 'bipm'">
2003
+ <xsl:attribute name="height">8mm</xsl:attribute>
2004
+ </xsl:if> -->
1773
2005
 
1774
2006
  <xsl:apply-templates/>
1775
2007
  </fo:table-row>
@@ -1793,6 +2025,7 @@
1793
2025
 
1794
2026
 
1795
2027
 
2028
+
1796
2029
  <xsl:if test="@colspan">
1797
2030
  <xsl:attribute name="number-columns-spanned">
1798
2031
  <xsl:value-of select="@colspan"/>
@@ -1832,7 +2065,8 @@
1832
2065
 
1833
2066
 
1834
2067
 
1835
-
2068
+
2069
+
1836
2070
 
1837
2071
 
1838
2072
 
@@ -1850,7 +2084,8 @@
1850
2084
  </xsl:attribute>
1851
2085
  </xsl:if>
1852
2086
  <xsl:call-template name="display-align"/>
1853
- <fo:block>
2087
+ <fo:block>
2088
+
1854
2089
  <xsl:apply-templates/>
1855
2090
  </fo:block>
1856
2091
  </fo:table-cell>
@@ -1862,14 +2097,17 @@
1862
2097
 
1863
2098
 
1864
2099
 
2100
+
2101
+
1865
2102
  <fo:inline padding-right="2mm">
1866
2103
 
1867
2104
 
1868
2105
 
1869
-
2106
+
1870
2107
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
1871
2108
 
1872
2109
  </fo:inline>
2110
+
1873
2111
  <xsl:apply-templates mode="process"/>
1874
2112
  </fo:block>
1875
2113
 
@@ -1893,6 +2131,7 @@
1893
2131
 
1894
2132
 
1895
2133
 
2134
+
1896
2135
  <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
1897
2136
 
1898
2137
 
@@ -1900,12 +2139,15 @@
1900
2139
 
1901
2140
 
1902
2141
 
2142
+
1903
2143
  <xsl:value-of select="@reference"/>
1904
2144
 
2145
+
1905
2146
  </fo:inline>
1906
2147
  <fo:inline>
1907
2148
 
1908
- <xsl:apply-templates/>
2149
+ <!-- <xsl:apply-templates /> -->
2150
+ <xsl:copy-of select="./node()"/>
1909
2151
  </fo:inline>
1910
2152
  </fo:block>
1911
2153
  </xsl:if>
@@ -1942,7 +2184,20 @@
1942
2184
  <xsl:variable name="following_dl_colwidths">
1943
2185
  <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
1944
2186
  <xsl:variable name="html-table">
1945
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2187
+ <xsl:variable name="doc_ns">
2188
+
2189
+ </xsl:variable>
2190
+ <xsl:variable name="ns">
2191
+ <xsl:choose>
2192
+ <xsl:when test="normalize-space($doc_ns) != ''">
2193
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2194
+ </xsl:when>
2195
+ <xsl:otherwise>
2196
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2197
+ </xsl:otherwise>
2198
+ </xsl:choose>
2199
+ </xsl:variable>
2200
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
1946
2201
  <xsl:element name="{$ns}:table">
1947
2202
  <xsl:for-each select="*[local-name() = 'dl'][1]">
1948
2203
  <tbody>
@@ -2007,7 +2262,8 @@
2007
2262
  <xsl:attribute name="margin-bottom">0</xsl:attribute>
2008
2263
  </xsl:if>
2009
2264
 
2010
- <xsl:apply-templates/>
2265
+ <!-- <xsl:apply-templates /> -->
2266
+ <xsl:copy-of select="./node()"/>
2011
2267
  </fo:block>
2012
2268
  </fo:table-cell>
2013
2269
  </fo:table-row>
@@ -2026,9 +2282,12 @@
2026
2282
 
2027
2283
 
2028
2284
 
2285
+
2029
2286
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2030
2287
 
2288
+
2031
2289
  <xsl:value-of select="@reference"/>
2290
+
2032
2291
  </fo:basic-link>
2033
2292
  </fo:inline>
2034
2293
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
@@ -2036,7 +2295,11 @@
2036
2295
  <xsl:apply-templates/>
2037
2296
  </fo:inline>
2038
2297
  </xsl:template><xsl:template match="*[local-name()='dl']">
2039
- <fo:block-container margin-left="0mm">
2298
+ <fo:block-container>
2299
+
2300
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2301
+
2302
+
2040
2303
  <xsl:if test="parent::*[local-name() = 'note']">
2041
2304
  <xsl:attribute name="margin-left">
2042
2305
  <xsl:choose>
@@ -2046,8 +2309,11 @@
2046
2309
  </xsl:attribute>
2047
2310
 
2048
2311
  </xsl:if>
2049
- <fo:block-container margin-left="0mm">
2050
-
2312
+ <fo:block-container>
2313
+
2314
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2315
+
2316
+
2051
2317
  <xsl:variable name="parent" select="local-name(..)"/>
2052
2318
 
2053
2319
  <xsl:variable name="key_iso">
@@ -2061,9 +2327,12 @@
2061
2327
  <fo:block margin-bottom="12pt" text-align="left">
2062
2328
 
2063
2329
  <xsl:variable name="title-where">
2064
- <xsl:call-template name="getTitle">
2065
- <xsl:with-param name="name" select="'title-where'"/>
2066
- </xsl:call-template>
2330
+
2331
+
2332
+ <xsl:call-template name="getTitle">
2333
+ <xsl:with-param name="name" select="'title-where'"/>
2334
+ </xsl:call-template>
2335
+
2067
2336
  </xsl:variable>
2068
2337
  <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2069
2338
  <xsl:apply-templates select="*[local-name()='dt']/*"/>
@@ -2079,9 +2348,12 @@
2079
2348
 
2080
2349
 
2081
2350
  <xsl:variable name="title-where">
2082
- <xsl:call-template name="getTitle">
2083
- <xsl:with-param name="name" select="'title-where'"/>
2084
- </xsl:call-template>
2351
+
2352
+
2353
+ <xsl:call-template name="getTitle">
2354
+ <xsl:with-param name="name" select="'title-where'"/>
2355
+ </xsl:call-template>
2356
+
2085
2357
  </xsl:variable>
2086
2358
  <xsl:value-of select="$title-where"/>
2087
2359
  </fo:block>
@@ -2092,9 +2364,12 @@
2092
2364
 
2093
2365
 
2094
2366
  <xsl:variable name="title-key">
2095
- <xsl:call-template name="getTitle">
2096
- <xsl:with-param name="name" select="'title-key'"/>
2097
- </xsl:call-template>
2367
+
2368
+
2369
+ <xsl:call-template name="getTitle">
2370
+ <xsl:with-param name="name" select="'title-key'"/>
2371
+ </xsl:call-template>
2372
+
2098
2373
  </xsl:variable>
2099
2374
  <xsl:value-of select="$title-key"/>
2100
2375
  </fo:block>
@@ -2126,7 +2401,20 @@
2126
2401
  </xsl:choose>
2127
2402
  <!-- create virtual html table for dl/[dt and dd] -->
2128
2403
  <xsl:variable name="html-table">
2129
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2404
+ <xsl:variable name="doc_ns">
2405
+
2406
+ </xsl:variable>
2407
+ <xsl:variable name="ns">
2408
+ <xsl:choose>
2409
+ <xsl:when test="normalize-space($doc_ns) != ''">
2410
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2411
+ </xsl:when>
2412
+ <xsl:otherwise>
2413
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2414
+ </xsl:otherwise>
2415
+ </xsl:choose>
2416
+ </xsl:variable>
2417
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2130
2418
  <xsl:element name="{$ns}:table">
2131
2419
  <tbody>
2132
2420
  <xsl:apply-templates mode="dl"/>
@@ -2270,6 +2558,7 @@
2270
2558
 
2271
2559
 
2272
2560
 
2561
+
2273
2562
  <xsl:apply-templates/>
2274
2563
  <!-- <xsl:if test="$namespace = 'gb'">
2275
2564
  <xsl:if test="ancestor::*[local-name()='formula']">
@@ -2323,6 +2612,9 @@
2323
2612
  </fo:inline>
2324
2613
  </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
2325
2614
  <fo:inline font-weight="bold">
2615
+
2616
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2617
+
2326
2618
  <xsl:apply-templates/>
2327
2619
  </fo:inline>
2328
2620
  </xsl:template><xsl:template match="*[local-name()='sup']">
@@ -2336,18 +2628,18 @@
2336
2628
  </xsl:template><xsl:template match="*[local-name()='tt']">
2337
2629
  <fo:inline xsl:use-attribute-sets="tt-style">
2338
2630
  <xsl:variable name="_font-size">
2339
-
2340
-
2341
-
2342
2631
 
2343
2632
 
2344
2633
 
2345
2634
 
2346
2635
 
2347
2636
 
2348
-
2349
2637
 
2350
-
2638
+
2639
+
2640
+
2641
+
2642
+
2351
2643
  10
2352
2644
 
2353
2645
  </xsl:variable>
@@ -2651,7 +2943,18 @@
2651
2943
  <xsl:with-param name="previousRow" select="$newRow"/>
2652
2944
  </xsl:apply-templates>
2653
2945
  </xsl:template><xsl:template name="getLang">
2654
- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
2946
+ <xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
2947
+ <xsl:variable name="language">
2948
+ <xsl:choose>
2949
+ <xsl:when test="$language_current != ''">
2950
+ <xsl:value-of select="$language_current"/>
2951
+ </xsl:when>
2952
+ <xsl:otherwise>
2953
+ <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
2954
+ </xsl:otherwise>
2955
+ </xsl:choose>
2956
+ </xsl:variable>
2957
+
2655
2958
  <xsl:choose>
2656
2959
  <xsl:when test="$language = 'English'">en</xsl:when>
2657
2960
  <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
@@ -2685,7 +2988,8 @@
2685
2988
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
2686
2989
  <xsl:value-of select="substring($str, 2)"/>
2687
2990
  </xsl:template><xsl:template match="mathml:math">
2688
- <fo:inline font-family="STIX2Math">
2991
+ <fo:inline font-family="STIX Two Math"> <!-- -->
2992
+
2689
2993
  <xsl:variable name="mathml">
2690
2994
  <xsl:apply-templates select="." mode="mathml"/>
2691
2995
  </xsl:variable>
@@ -2715,6 +3019,7 @@
2715
3019
  </xsl:choose>
2716
3020
  </xsl:variable>
2717
3021
  <fo:inline xsl:use-attribute-sets="link-style">
3022
+
2718
3023
  <xsl:choose>
2719
3024
  <xsl:when test="$target = ''">
2720
3025
  <xsl:apply-templates/>
@@ -2768,10 +3073,14 @@
2768
3073
  </fo:inline>
2769
3074
  </xsl:template><xsl:template match="*[local-name() = 'modification']">
2770
3075
  <xsl:variable name="title-modified">
2771
- <xsl:call-template name="getTitle">
2772
- <xsl:with-param name="name" select="'title-modified'"/>
2773
- </xsl:call-template>
3076
+
3077
+
3078
+ <xsl:call-template name="getTitle">
3079
+ <xsl:with-param name="name" select="'title-modified'"/>
3080
+ </xsl:call-template>
3081
+
2774
3082
  </xsl:variable>
3083
+
2775
3084
  <xsl:choose>
2776
3085
  <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
2777
3086
  <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
@@ -2779,7 +3088,7 @@
2779
3088
  <xsl:apply-templates/>
2780
3089
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
2781
3090
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
2782
-
3091
+
2783
3092
  <xsl:apply-templates/>
2784
3093
  </fo:basic-link>
2785
3094
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -2836,6 +3145,8 @@
2836
3145
 
2837
3146
 
2838
3147
 
3148
+
3149
+
2839
3150
  <fo:inline xsl:use-attribute-sets="note-name-style">
2840
3151
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2841
3152
  </fo:inline>
@@ -2928,7 +3239,8 @@
2928
3239
  </fo:inline>
2929
3240
  </xsl:if>
2930
3241
  </xsl:template><xsl:template match="*[local-name() = 'figure']">
2931
- <fo:block-container id="{@id}">
3242
+ <fo:block-container id="{@id}">
3243
+
2932
3244
  <fo:block>
2933
3245
  <xsl:apply-templates/>
2934
3246
  </fo:block>
@@ -2979,7 +3291,7 @@
2979
3291
  <xsl:apply-templates mode="bookmarks"/>
2980
3292
  </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
2981
3293
  <xsl:apply-templates select="."/>
2982
- </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3294
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
2983
3295
  <xsl:apply-templates mode="bookmarks"/>
2984
3296
  </xsl:template><xsl:template name="addBookmarks">
2985
3297
  <xsl:param name="contents"/>
@@ -2993,18 +3305,9 @@
2993
3305
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
2994
3306
  <fo:bookmark-title>
2995
3307
  <xsl:variable name="bookmark-title_">
2996
- <xsl:choose>
2997
- <xsl:when test="@lang = 'en'">
2998
-
2999
-
3000
- </xsl:when>
3001
- <xsl:when test="@lang = 'fr'">
3002
-
3003
-
3004
- </xsl:when>
3005
- <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3006
- <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3007
- </xsl:choose>
3308
+ <xsl:call-template name="getLangVersion">
3309
+ <xsl:with-param name="lang" select="@lang"/>
3310
+ </xsl:call-template>
3008
3311
  </xsl:variable>
3009
3312
  <xsl:choose>
3010
3313
  <xsl:when test="normalize-space($bookmark-title_) != ''">
@@ -3046,6 +3349,20 @@
3046
3349
 
3047
3350
  </fo:bookmark-tree>
3048
3351
  </xsl:if>
3352
+ </xsl:template><xsl:template name="getLangVersion">
3353
+ <xsl:param name="lang"/>
3354
+ <xsl:choose>
3355
+ <xsl:when test="$lang = 'en'">
3356
+
3357
+
3358
+ </xsl:when>
3359
+ <xsl:when test="$lang = 'fr'">
3360
+
3361
+
3362
+ </xsl:when>
3363
+ <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
3364
+ <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
3365
+ </xsl:choose>
3049
3366
  </xsl:template><xsl:template match="item" mode="bookmark">
3050
3367
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
3051
3368
  <fo:bookmark-title>
@@ -3060,7 +3377,7 @@
3060
3377
  </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">
3061
3378
  <xsl:if test="normalize-space() != ''">
3062
3379
  <fo:block xsl:use-attribute-sets="figure-name-style">
3063
-
3380
+
3064
3381
  <xsl:apply-templates/>
3065
3382
  </fo:block>
3066
3383
  </xsl:if>
@@ -3497,9 +3814,14 @@
3497
3814
 
3498
3815
  <fo:inline>
3499
3816
 
3500
- <xsl:call-template name="getTitle">
3501
- <xsl:with-param name="name" select="'title-source'"/>
3502
- </xsl:call-template>
3817
+
3818
+
3819
+
3820
+ <xsl:call-template name="getTitle">
3821
+ <xsl:with-param name="name" select="'title-source'"/>
3822
+ </xsl:call-template>
3823
+
3824
+
3503
3825
  <xsl:text>: </xsl:text>
3504
3826
  </fo:inline>
3505
3827
 
@@ -3643,9 +3965,12 @@
3643
3965
  </fo:block>
3644
3966
  </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
3645
3967
  <xsl:variable name="title-deprecated">
3646
- <xsl:call-template name="getTitle">
3647
- <xsl:with-param name="name" select="'title-deprecated'"/>
3648
- </xsl:call-template>
3968
+
3969
+
3970
+ <xsl:call-template name="getTitle">
3971
+ <xsl:with-param name="name" select="'title-deprecated'"/>
3972
+ </xsl:call-template>
3973
+
3649
3974
  </xsl:variable>
3650
3975
  <fo:block xsl:use-attribute-sets="deprecates-style">
3651
3976
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
@@ -3692,13 +4017,14 @@
3692
4017
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
3693
4018
  <fo:block>
3694
4019
  <xsl:call-template name="setId"/>
4020
+
3695
4021
  <xsl:apply-templates/>
3696
4022
  </fo:block>
3697
4023
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
3698
4024
  <fo:block id="{@id}">
3699
4025
  <xsl:apply-templates/>
3700
4026
  </fo:block>
3701
- </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
4027
+ </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']">
3702
4028
 
3703
4029
  <fo:block id="{@id}">
3704
4030
  <xsl:apply-templates/>
@@ -3727,6 +4053,7 @@
3727
4053
  </xsl:choose>
3728
4054
  </xsl:attribute>
3729
4055
 
4056
+
3730
4057
  <fo:block-container margin-left="0mm">
3731
4058
  <fo:block>
3732
4059
  <xsl:apply-templates select="." mode="ul_ol"/>
@@ -3754,7 +4081,8 @@
3754
4081
  <fo:table-column column-width="107mm"/>
3755
4082
  <fo:table-column column-width="15mm"/>
3756
4083
  <fo:table-body>
3757
- <fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
4084
+ <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
4085
+
3758
4086
  <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
3759
4087
  <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
3760
4088
  <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
@@ -3772,6 +4100,10 @@
3772
4100
  <fo:block><xsl:apply-templates/></fo:block>
3773
4101
  </fo:table-cell>
3774
4102
  </xsl:template><xsl:template name="processBibitem">
4103
+
4104
+
4105
+ <!-- end BIPM bibitem processing-->
4106
+
3775
4107
 
3776
4108
 
3777
4109
 
@@ -3908,6 +4240,7 @@
3908
4240
  <dc:title>
3909
4241
  <xsl:variable name="title">
3910
4242
 
4243
+
3911
4244
 
3912
4245
  <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
3913
4246
 
@@ -3926,6 +4259,7 @@
3926
4259
  <dc:creator>
3927
4260
 
3928
4261
 
4262
+
3929
4263
  </dc:creator>
3930
4264
  <dc:description>
3931
4265
  <xsl:variable name="abstract">
@@ -3935,6 +4269,7 @@
3935
4269
 
3936
4270
  <xsl:copy-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'abstract']//text()"/>
3937
4271
 
4272
+
3938
4273
  </xsl:variable>
3939
4274
  <xsl:value-of select="normalize-space($abstract)"/>
3940
4275
  </dc:description>
@@ -4006,13 +4341,22 @@
4006
4341
  </xsl:template><xsl:template name="split">
4007
4342
  <xsl:param name="pText" select="."/>
4008
4343
  <xsl:param name="sep" select="','"/>
4344
+ <xsl:param name="normalize-space" select="'true'"/>
4009
4345
  <xsl:if test="string-length($pText) &gt;0">
4010
4346
  <item>
4011
- <xsl:value-of select="normalize-space(substring-before(concat($pText, ','), $sep))"/>
4347
+ <xsl:choose>
4348
+ <xsl:when test="$normalize-space = 'true'">
4349
+ <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
4350
+ </xsl:when>
4351
+ <xsl:otherwise>
4352
+ <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
4353
+ </xsl:otherwise>
4354
+ </xsl:choose>
4012
4355
  </item>
4013
4356
  <xsl:call-template name="split">
4014
4357
  <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
4015
4358
  <xsl:with-param name="sep" select="$sep"/>
4359
+ <xsl:with-param name="normalize-space" select="$normalize-space"/>
4016
4360
  </xsl:call-template>
4017
4361
  </xsl:if>
4018
4362
  </xsl:template><xsl:template name="getDocumentId">
@@ -4078,4 +4422,23 @@
4078
4422
  <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
4079
4423
  </xsl:call-template>
4080
4424
  </xsl:if>
4425
+ </xsl:template><xsl:template name="repeat">
4426
+ <xsl:param name="char" select="'*'"/>
4427
+ <xsl:param name="count"/>
4428
+ <xsl:if test="$count &gt; 0">
4429
+ <xsl:value-of select="$char"/>
4430
+ <xsl:call-template name="repeat">
4431
+ <xsl:with-param name="char" select="$char"/>
4432
+ <xsl:with-param name="count" select="$count - 1"/>
4433
+ </xsl:call-template>
4434
+ </xsl:if>
4435
+ </xsl:template><xsl:template name="getLocalizedString">
4436
+ <xsl:param name="key"/>
4437
+
4438
+ <xsl:variable name="curr_lang">
4439
+ <xsl:call-template name="getLang"/>
4440
+ </xsl:variable>
4441
+
4442
+ <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
4443
+
4081
4444
  </xsl:template></xsl:stylesheet>