metanorma-ogc 2.0.0 → 2.0.1

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.
@@ -154,7 +154,7 @@
154
154
 
155
155
  <xsl:template match="/">
156
156
  <xsl:call-template name="namespaceCheck"/>
157
- <fo:root font-family="Lato, STIX Two Math, Source Han Sans" font-size="11pt" color="{$color_main}" xml:lang="{$lang}">
157
+ <fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
158
158
  <fo:layout-master-set>
159
159
  <!-- Cover page -->
160
160
  <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
@@ -767,9 +767,6 @@
767
767
  <!-- ============================= -->
768
768
  <!-- CONTENTS -->
769
769
  <!-- ============================= -->
770
- <xsl:template match="node()" mode="contents">
771
- <xsl:apply-templates mode="contents"/>
772
- </xsl:template>
773
770
 
774
771
  <!-- element with title -->
775
772
  <xsl:template match="*[ogc:title]" mode="contents">
@@ -917,12 +914,6 @@
917
914
  <!-- title -->
918
915
  <!-- ====== -->
919
916
 
920
- <xsl:template match="ogc:annex2/ogc:title">
921
- <fo:block font-size="12pt" text-align="center" margin-bottom="12pt" keep-with-next="always">
922
- <xsl:apply-templates/>
923
- </fo:block>
924
- </xsl:template>
925
-
926
917
  <xsl:template match="ogc:title" name="title">
927
918
 
928
919
  <xsl:variable name="level">
@@ -947,7 +938,6 @@
947
938
  </xsl:choose>
948
939
  </xsl:variable>
949
940
 
950
-
951
941
  <xsl:variable name="element-name">
952
942
  <xsl:choose>
953
943
  <xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
@@ -977,10 +967,6 @@
977
967
  <fo:table-cell>
978
968
  <fo:block space-before="36pt">
979
969
  <xsl:variable name="title">
980
- <!-- <xsl:call-template name="extractTitle"/> -->
981
- <!-- <xsl:for-each select="..">
982
- <xsl:call-template name="getName"/>
983
- </xsl:for-each> -->
984
970
  <xsl:choose>
985
971
  <xsl:when test="*[local-name() = 'tab']">
986
972
  <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
@@ -1096,46 +1082,6 @@
1096
1082
  </fo:block>
1097
1083
  </xsl:template>
1098
1084
 
1099
-
1100
-
1101
- <xsl:template match="ogc:bibitem">
1102
- <fo:block id="{@id}" margin-bottom="12pt" start-indent="25mm" text-indent="-25mm" line-height="115%">
1103
- <xsl:if test=".//ogc:fn">
1104
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
1105
- </xsl:if>
1106
- <xsl:call-template name="processBibitem"/>
1107
- </fo:block>
1108
- </xsl:template>
1109
-
1110
-
1111
- <xsl:template match="ogc:bibitem/ogc:note" priority="2">
1112
- <fo:footnote>
1113
- <xsl:variable name="number">
1114
- <xsl:choose>
1115
- <xsl:when test="ancestor::ogc:references[preceding-sibling::ogc:references]">
1116
- <xsl:number level="any" count="ogc:references[preceding-sibling::ogc:references]//ogc:bibitem/ogc:note"/>
1117
- </xsl:when>
1118
- <xsl:otherwise>
1119
- <xsl:number level="any" count="ogc:bibitem/ogc:note"/>
1120
- </xsl:otherwise>
1121
- </xsl:choose>
1122
- </xsl:variable>
1123
- <fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super"> <!-- 60% baseline-shift="35%" -->
1124
- <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
1125
- <xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
1126
- </fo:basic-link>
1127
- </fo:inline>
1128
- <fo:footnote-body>
1129
- <fo:block font-size="10pt" margin-bottom="12pt" start-indent="0pt">
1130
- <fo:inline id="{generate-id()}" keep-with-next.within-line="always" font-size="60%" vertical-align="super"><!-- baseline-shift="30%" padding-right="9mm" alignment-baseline="hanging" -->
1131
- <xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
1132
- </fo:inline>
1133
- <xsl:apply-templates/>
1134
- </fo:block>
1135
- </fo:footnote-body>
1136
- </fo:footnote>
1137
- </xsl:template>
1138
-
1139
1085
 
1140
1086
 
1141
1087
  <xsl:template match="ogc:ul | ogc:ol" mode="ul_ol">
@@ -1227,8 +1173,8 @@
1227
1173
  <fo:list-item-label><fo:block/></fo:list-item-label>
1228
1174
  <fo:list-item-body>
1229
1175
  <fo:block>
1230
- <xsl:apply-templates select="ogc:name" mode="presentation"/>
1231
- <xsl:apply-templates/>
1176
+ <xsl:apply-templates select="ogc:name"/>
1177
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
1232
1178
  </fo:block>
1233
1179
  </fo:list-item-body>
1234
1180
  </fo:list-item>
@@ -1239,22 +1185,40 @@
1239
1185
  <xsl:call-template name="getLevelTermName"/>
1240
1186
  </xsl:variable>
1241
1187
  <fo:block space-before="36pt" margin-bottom="10pt" keep-with-next="always" role="H{$levelTerm}">
1242
- <fo:block color="{$color_blue}" keep-with-next="always">
1243
- <fo:inline font-size="18pt" padding-right="1mm"><xsl:apply-templates/></fo:inline>
1244
- <xsl:apply-templates select="../ogc:preferred | ../ogc:deprecated | ../ogc:admitted" mode="term_name"/>
1245
- </fo:block>
1246
- <xsl:call-template name="insertOrangeHorizontalLine"/>
1188
+ <fo:list-block color="{$color_blue}" keep-with-next="always" provisional-distance-between-starts="{string-length()*3}mm">
1189
+ <fo:list-item>
1190
+ <fo:list-item-label end-indent="label-end()">
1191
+ <fo:block><fo:inline font-size="18pt" padding-right="1mm"><xsl:apply-templates/></fo:inline></fo:block>
1192
+ </fo:list-item-label>
1193
+ <fo:list-item-body start-indent="body-start()">
1194
+ <fo:block>
1195
+ <xsl:apply-templates select="../ogc:preferred | ../ogc:deprecated | ../ogc:admitted" mode="term_name"/>
1196
+ </fo:block>
1197
+ </fo:list-item-body>
1198
+ </fo:list-item>
1199
+ </fo:list-block>
1200
+ <xsl:call-template name="insertShortHorizontalLine"/>
1247
1201
  </fo:block>
1248
1202
  </xsl:template>
1249
1203
 
1250
1204
  <xsl:template match="ogc:preferred | ogc:deprecated | ogc:admitted" priority="2"/>
1251
1205
 
1252
- <xsl:template match="ogc:preferred" mode="term_name">
1206
+ <!-- first preferred displays on the same line as term/name -->
1207
+ <xsl:template match="ogc:preferred[not(preceding-sibling::ogc:preferred)]" mode="term_name" priority="2">
1253
1208
  <fo:inline font-size="18pt" padding-right="3mm"><xsl:call-template name="setStyle_preferred"/><xsl:apply-templates/></fo:inline>
1254
1209
  <fo:inline padding-right="2mm"> </fo:inline>
1255
1210
  </xsl:template>
1256
1211
 
1257
- <xsl:template match="ogc:deprecated | ogc:admitted" mode="term_name">
1212
+ <xsl:template match="ogc:preferred | ogc:deprecated | ogc:admitted" mode="term_name">
1213
+ <xsl:choose>
1214
+ <xsl:when test="preceding-sibling::*[self::ogc:preferred or self::deprecated or self::admitted]">
1215
+ <fo:block space-before="6pt"><xsl:call-template name="displayTerm"/></fo:block> <!-- block wrapper -->
1216
+ </xsl:when>
1217
+ <xsl:otherwise><xsl:call-template name="displayTerm"/></xsl:otherwise>
1218
+ </xsl:choose>
1219
+ </xsl:template>
1220
+
1221
+ <xsl:template name="displayTerm">
1258
1222
  <fo:inline font-size="18pt" padding-right="3mm"><xsl:apply-templates/></fo:inline>
1259
1223
  <fo:inline font-size="11pt" padding="1mm" padding-bottom="0.5mm" baseline-shift="25%">
1260
1224
  <xsl:variable name="kind" select="local-name()"/>
@@ -1269,67 +1233,13 @@
1269
1233
  <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($kind))"/>
1270
1234
  </xsl:call-template>
1271
1235
  </fo:inline>
1272
- <fo:inline padding-right="2mm"> </fo:inline>
1236
+ <xsl:if test="following-sibling::*[self::ogc:preferred or self::deprecated or self::admitted]">
1237
+ <fo:inline padding-right="2mm"> </fo:inline>
1238
+ </xsl:if>
1273
1239
  </xsl:template>
1274
1240
 
1275
- <!-- [position() &gt; 1] -->
1276
- <xsl:template match="ogc:references[not(@normative='true')]">
1277
- <fo:block break-after="page"/>
1278
- <fo:block id="{@id}" line-height="120%">
1279
- <xsl:apply-templates/>
1280
- </fo:block>
1281
- </xsl:template>
1282
-
1283
- <xsl:template match="ogc:annex//ogc:references">
1284
- <fo:block id="{@id}">
1285
- <xsl:apply-templates/>
1286
- </fo:block>
1287
- </xsl:template>
1288
-
1289
- <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
1290
- <xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem">
1291
- <fo:list-block id="{@id}" margin-bottom="12pt" provisional-distance-between-starts="13mm">
1292
- <fo:list-item>
1293
- <fo:list-item-label end-indent="label-end()">
1294
- <fo:block>
1295
- <fo:inline>
1296
- <xsl:number format="1."/>
1297
- </fo:inline>
1298
- </fo:block>
1299
- </fo:list-item-label>
1300
- <fo:list-item-body start-indent="body-start()">
1301
- <fo:block>
1302
- <xsl:call-template name="processBibitem"/>
1303
- </fo:block>
1304
- </fo:list-item-body>
1305
- </fo:list-item>
1306
- </fo:list-block>
1307
- </xsl:template>
1308
1241
 
1309
1242
 
1310
- <xsl:template match="ogc:bibitem/ogc:title">
1311
- <fo:inline font-style="italic">
1312
- <xsl:apply-templates/>
1313
- </fo:inline>
1314
- </xsl:template>
1315
-
1316
-
1317
- <xsl:template match="ogc:admonition">
1318
- <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">
1319
- <fo:block-container margin-left="0mm" margin-right="0mm" padding="2mm" padding-top="3mm">
1320
- <fo:block font-size="11pt" margin-bottom="6pt" font-weight="bold" font-style="italic" text-align="center">
1321
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
1322
- </fo:block>
1323
- <fo:block font-style="italic">
1324
- <xsl:apply-templates/>
1325
- </fo:block>
1326
- </fo:block-container>
1327
- </fo:block-container>
1328
-
1329
-
1330
- </xsl:template>
1331
-
1332
-
1333
1243
  <xsl:template match="ogc:formula/ogc:stem">
1334
1244
  <fo:block margin-top="6pt" margin-bottom="12pt">
1335
1245
  <fo:table table-layout="fixed" width="100%">
@@ -1344,7 +1254,7 @@
1344
1254
  </fo:table-cell>
1345
1255
  <fo:table-cell display-align="center">
1346
1256
  <fo:block text-align="right">
1347
- <xsl:apply-templates select="../ogc:name" mode="presentation"/>
1257
+ <xsl:apply-templates select="../ogc:name" mode="formula_number"/>
1348
1258
  </fo:block>
1349
1259
  </fo:table-cell>
1350
1260
  </fo:table-row>
@@ -1363,13 +1273,13 @@
1363
1273
  <xsl:template match="ogc:figure" priority="2">
1364
1274
  <fo:block-container id="{@id}" margin-top="12pt" margin-bottom="12pt">
1365
1275
  <fo:block>
1366
- <xsl:apply-templates/>
1276
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
1367
1277
  </fo:block>
1368
1278
  <xsl:call-template name="fn_display_figure"/>
1369
1279
  <xsl:for-each select="ogc:note">
1370
1280
  <xsl:call-template name="note"/>
1371
1281
  </xsl:for-each>
1372
- <xsl:apply-templates select="ogc:name" mode="presentation"/>
1282
+ <xsl:apply-templates select="ogc:name"/>
1373
1283
  </fo:block-container>
1374
1284
  </xsl:template>
1375
1285
 
@@ -1604,7 +1514,7 @@
1604
1514
  </xsl:if>
1605
1515
 
1606
1516
  </fo:block>
1607
- <xsl:call-template name="insertOrangeHorizontalLine"/>
1517
+ <xsl:call-template name="insertShortHorizontalLine"/>
1608
1518
  </fo:block>
1609
1519
  </xsl:template>
1610
1520
 
@@ -1669,7 +1579,7 @@
1669
1579
  </xsl:choose>
1670
1580
  </xsl:template>
1671
1581
 
1672
- <xsl:template name="insertOrangeHorizontalLine">
1582
+ <xsl:template name="insertShortHorizontalLine">
1673
1583
  <fo:block-container width="12.7mm" border-top="1pt solid {$color_design}" margin-top="3mm">
1674
1584
  <fo:block font-size="1pt"> </fo:block>
1675
1585
  </fo:block-container>
@@ -1683,22 +1593,18 @@
1683
1593
  </fo:static-content>
1684
1594
  </xsl:template>
1685
1595
 
1686
- <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
1596
+ <xsl:variable name="titles_">
1687
1597
 
1688
1598
  <title-edition lang="en">
1689
1599
 
1690
-
1691
- <xsl:text>Version</xsl:text>
1692
-
1600
+ <xsl:text>Version</xsl:text>
1601
+
1693
1602
  </title-edition>
1694
1603
 
1695
1604
  <title-edition lang="fr">
1696
-
1697
- <xsl:text>Édition </xsl:text>
1698
-
1605
+ <xsl:text>Édition </xsl:text>
1699
1606
  </title-edition>
1700
1607
 
1701
-
1702
1608
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
1703
1609
  <title-toc lang="en">
1704
1610
 
@@ -1708,14 +1614,13 @@
1708
1614
 
1709
1615
  </title-toc>
1710
1616
  <title-toc lang="fr">
1617
+ <xsl:text>Sommaire</xsl:text>
1618
+ </title-toc>
1619
+ <title-toc lang="zh">
1711
1620
 
1712
- <xsl:text>Sommaire</xsl:text>
1713
-
1621
+ <xsl:text>Contents</xsl:text>
1622
+
1714
1623
  </title-toc>
1715
-
1716
- <title-toc lang="zh">Contents</title-toc>
1717
-
1718
-
1719
1624
 
1720
1625
  <title-descriptors lang="en">Descriptors</title-descriptors>
1721
1626
 
@@ -1731,12 +1636,8 @@
1731
1636
  </title-part>
1732
1637
  <title-part lang="zh">第 # 部分:</title-part>
1733
1638
 
1734
- <title-subpart lang="en">
1735
-
1736
- </title-subpart>
1737
- <title-subpart lang="fr">
1738
-
1739
- </title-subpart>
1639
+ <title-subpart lang="en">Sub-part #</title-subpart>
1640
+ <title-subpart lang="fr">Partie de sub #</title-subpart>
1740
1641
 
1741
1642
  <title-list-tables lang="en">List of Tables</title-list-tables>
1742
1643
 
@@ -1751,7 +1652,7 @@
1751
1652
  <title-continued lang="en">(continued)</title-continued>
1752
1653
  <title-continued lang="fr">(continué)</title-continued>
1753
1654
 
1754
- </xsl:variable><xsl:variable name="bibdata">
1655
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
1755
1656
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1756
1657
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
1757
1658
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
@@ -1780,15 +1681,35 @@
1780
1681
  </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="'&#8232;'"/><xsl:attribute-set name="root-style">
1781
1682
 
1782
1683
 
1684
+
1685
+
1686
+
1687
+
1688
+
1689
+
1690
+
1691
+
1692
+
1693
+
1694
+
1695
+ <xsl:attribute name="font-family">Lato, STIX Two Math, Source Han Sans</xsl:attribute>
1696
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1697
+ <xsl:attribute name="color"><xsl:value-of select="$color_main"/></xsl:attribute>
1698
+
1699
+
1700
+
1701
+
1783
1702
  </xsl:attribute-set><xsl:attribute-set name="link-style">
1784
1703
 
1785
1704
 
1786
1705
 
1787
1706
 
1788
- <!-- <xsl:attribute name="color">rgb(33, 55, 92)</xsl:attribute> -->
1789
1707
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1790
1708
 
1791
1709
 
1710
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
1711
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1712
+
1792
1713
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1793
1714
  <xsl:attribute name="white-space">pre</xsl:attribute>
1794
1715
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1798,6 +1719,11 @@
1798
1719
 
1799
1720
 
1800
1721
 
1722
+
1723
+
1724
+
1725
+
1726
+
1801
1727
 
1802
1728
 
1803
1729
  <xsl:attribute name="font-family">Fira Code</xsl:attribute>
@@ -1806,6 +1732,8 @@
1806
1732
 
1807
1733
 
1808
1734
 
1735
+
1736
+
1809
1737
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
1810
1738
 
1811
1739
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
@@ -1954,55 +1882,39 @@
1954
1882
 
1955
1883
  </xsl:attribute-set><xsl:variable name="table-border_">
1956
1884
 
1957
- </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
1958
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1959
-
1960
-
1885
+ </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
1886
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1887
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1961
1888
 
1962
1889
 
1963
1890
 
1964
-
1965
-
1966
-
1967
- <xsl:attribute name="text-align">left</xsl:attribute>
1968
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1969
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1970
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1971
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1972
1891
 
1973
1892
 
1974
-
1975
1893
 
1976
1894
 
1977
1895
 
1978
1896
 
1979
- </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1980
1897
 
1981
- </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1982
-
1983
- <xsl:attribute name="font-size">12pt</xsl:attribute>
1984
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1985
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1986
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1987
1898
 
1988
1899
 
1989
1900
 
1990
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1991
1901
 
1992
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1993
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
1994
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1995
1902
 
1996
1903
 
1904
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
1997
1905
 
1998
- </xsl:attribute-set><xsl:attribute-set name="xref-style">
1999
1906
 
2000
1907
 
1908
+
2001
1909
 
2002
1910
 
1911
+ </xsl:attribute-set><xsl:attribute-set name="table-style">
1912
+ <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
1913
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
1914
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1915
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2003
1916
 
2004
1917
 
2005
- </xsl:attribute-set><xsl:attribute-set name="eref-style">
2006
1918
 
2007
1919
 
2008
1920
 
@@ -2010,210 +1922,444 @@
2010
1922
 
2011
1923
 
2012
1924
 
2013
- </xsl:attribute-set><xsl:attribute-set name="note-style">
2014
1925
 
2015
1926
 
2016
1927
 
2017
1928
 
2018
-
2019
1929
 
2020
1930
 
2021
1931
 
1932
+
2022
1933
 
2023
1934
 
2024
-
2025
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2026
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2027
1935
 
2028
1936
 
2029
1937
 
1938
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1939
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1940
+
2030
1941
 
2031
1942
 
2032
1943
 
2033
- </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">
2034
1944
 
1945
+
2035
1946
 
1947
+
1948
+ <xsl:attribute name="text-align">left</xsl:attribute>
1949
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1950
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1951
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1952
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2036
1953
 
2037
1954
 
1955
+
2038
1956
 
2039
1957
 
2040
1958
 
2041
1959
 
1960
+ </xsl:attribute-set><xsl:attribute-set name="table-row-style">
1961
+ <xsl:attribute name="min-height">4mm</xsl:attribute>
2042
1962
 
2043
1963
 
2044
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2045
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
2046
1964
 
1965
+ <xsl:attribute name="min-height">8.5mm</xsl:attribute>
2047
1966
 
2048
1967
 
1968
+ </xsl:attribute-set><xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
1969
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2049
1970
 
2050
- </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
2051
1971
 
2052
1972
 
2053
1973
 
2054
1974
 
2055
- </xsl:attribute-set><xsl:attribute-set name="note-p-style">
2056
1975
 
2057
1976
 
1977
+ <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
1978
+ <xsl:attribute name="color">white</xsl:attribute>
2058
1979
 
2059
1980
 
2060
1981
 
1982
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
2061
1983
 
2062
1984
 
2063
1985
 
1986
+ </xsl:attribute-set><xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
1987
+
1988
+ </xsl:attribute-set><xsl:attribute-set name="table-header-cell-style">
1989
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1990
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1991
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1992
+ <xsl:attribute name="display-align">center</xsl:attribute>
2064
1993
 
2065
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2066
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2067
1994
 
2068
1995
 
2069
1996
 
2070
1997
 
2071
1998
 
2072
- </xsl:attribute-set><xsl:attribute-set name="termnote-style">
2073
1999
 
2074
2000
 
2001
+
2002
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2075
2003
 
2076
2004
 
2077
2005
 
2078
-
2079
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2080
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2081
2006
 
2082
2007
 
2083
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
2008
+ </xsl:attribute-set><xsl:attribute-set name="table-cell-style">
2009
+ <xsl:attribute name="display-align">center</xsl:attribute>
2010
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2011
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
2084
2012
 
2085
2013
 
2086
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2087
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
2088
-
2089
2014
 
2090
2015
 
2091
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
2092
- <xsl:attribute name="role">BlockQuote</xsl:attribute>
2093
2016
 
2094
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2095
- <xsl:attribute name="margin-left">13mm</xsl:attribute>
2096
- <xsl:attribute name="margin-right">12mm</xsl:attribute>
2097
2017
 
2098
2018
 
2099
2019
 
2100
2020
 
2021
+ <xsl:attribute name="border">solid 0pt white</xsl:attribute>
2022
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2023
+ <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
2101
2024
 
2102
2025
 
2103
2026
 
2104
- </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
2105
2027
 
2106
- <xsl:attribute name="text-align">right</xsl:attribute>
2107
- <xsl:attribute name="margin-right">25mm</xsl:attribute>
2108
2028
 
2109
-
2110
-
2111
- </xsl:attribute-set><xsl:attribute-set name="termsource-style">
2029
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
2030
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2031
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
2032
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
2033
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2112
2034
 
2113
2035
 
2114
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2115
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2116
2036
 
2117
2037
 
2118
2038
 
2119
2039
 
2120
2040
 
2041
+
2121
2042
 
2122
- </xsl:attribute-set><xsl:attribute-set name="origin-style">
2123
2043
 
2044
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2124
2045
 
2125
2046
 
2047
+ </xsl:attribute-set><xsl:attribute-set name="table-note-style">
2048
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2049
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2126
2050
 
2127
2051
 
2128
- </xsl:attribute-set><xsl:attribute-set name="term-style">
2129
2052
 
2130
- </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
2131
2053
 
2132
2054
 
2133
-
2134
2055
 
2135
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2136
- <!-- <xsl:attribute name="margin-top">12pt</xsl:attribute> -->
2137
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
2138
- <!-- <xsl:attribute name="margin-bottom">6pt</xsl:attribute> -->
2139
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2140
- <!-- <xsl:attribute name="keep-with-next">always</xsl:attribute> -->
2141
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2142
- <xsl:attribute name="text-align">center</xsl:attribute>
2143
2056
 
2144
2057
 
2058
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
2059
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2145
2060
 
2146
2061
 
2147
2062
 
2148
2063
 
2149
2064
 
2150
2065
 
2066
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
2067
+ <xsl:attribute name="font-size">80%</xsl:attribute>
2068
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
2151
2069
 
2152
2070
 
2153
2071
 
2154
2072
 
2155
-
2156
2073
 
2157
2074
 
2158
2075
 
2159
-
2160
- </xsl:attribute-set><xsl:attribute-set name="formula-style">
2161
2076
 
2162
- </xsl:attribute-set><xsl:attribute-set name="image-style">
2163
- <xsl:attribute name="text-align">center</xsl:attribute>
2164
2077
 
2165
2078
 
2166
- <xsl:attribute name="space-before">12pt</xsl:attribute>
2167
- <xsl:attribute name="space-after">6pt</xsl:attribute>
2168
2079
 
2080
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2169
2081
 
2170
2082
 
2083
+ </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
2084
+ <xsl:attribute name="text-indent">0</xsl:attribute>
2085
+ <xsl:attribute name="start-indent">0</xsl:attribute>
2171
2086
 
2172
2087
 
2173
- </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
2088
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-body-style">
2174
2089
 
2175
- </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
2090
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-number-style">
2091
+ <xsl:attribute name="font-size">80%</xsl:attribute>
2092
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
2093
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2176
2094
 
2095
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-body-style">
2096
+ <xsl:attribute name="text-align">justify</xsl:attribute>
2097
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2177
2098
 
2178
- <xsl:attribute name="width">100%</xsl:attribute>
2179
- <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
2180
- <xsl:attribute name="scaling">uniform</xsl:attribute>
2099
+ </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
2181
2100
 
2101
+ <xsl:attribute name="min-height">8.5mm</xsl:attribute>
2182
2102
 
2183
2103
 
2184
-
2185
-
2186
- </xsl:attribute-set><xsl:attribute-set name="tt-style">
2104
+ </xsl:attribute-set><xsl:attribute-set name="dt-style">
2105
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
2187
2106
 
2188
2107
 
2189
2108
 
2190
- <xsl:attribute name="font-family">Fira Code</xsl:attribute>
2191
2109
 
2192
- </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
2193
- <xsl:attribute name="font-size">11pt</xsl:attribute>
2194
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2195
- <xsl:attribute name="text-align">center</xsl:attribute>
2196
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2197
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2198
2110
 
2199
- </xsl:attribute-set><xsl:attribute-set name="domain-style">
2200
-
2201
- </xsl:attribute-set><xsl:attribute-set name="admitted-style">
2202
2111
 
2203
- <xsl:attribute name="font-size">11pt</xsl:attribute>
2204
2112
 
2205
2113
 
2206
2114
 
2207
- </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
2115
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
2116
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2208
2117
 
2209
2118
 
2210
- </xsl:attribute-set><xsl:attribute-set name="definition-style">
2119
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
2120
+
2121
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
2122
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2123
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2124
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2211
2125
 
2212
- <xsl:attribute name="space-after">6pt</xsl:attribute>
2213
2126
 
2214
2127
 
2128
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
2215
2129
 
2216
- </xsl:attribute-set><xsl:variable name="color-added-text">
2130
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2131
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
2132
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2133
+
2134
+
2135
+
2136
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
2137
+
2138
+
2139
+
2140
+
2141
+
2142
+
2143
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
2144
+
2145
+
2146
+
2147
+
2148
+
2149
+
2150
+
2151
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
2152
+
2153
+
2154
+
2155
+
2156
+
2157
+
2158
+
2159
+
2160
+
2161
+
2162
+
2163
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2164
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2165
+
2166
+
2167
+
2168
+
2169
+
2170
+
2171
+ </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">
2172
+
2173
+
2174
+
2175
+
2176
+
2177
+
2178
+
2179
+
2180
+
2181
+
2182
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2183
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
2184
+
2185
+
2186
+
2187
+
2188
+ </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
2189
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
2190
+
2191
+
2192
+
2193
+
2194
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
2195
+
2196
+
2197
+
2198
+
2199
+
2200
+
2201
+
2202
+
2203
+
2204
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2205
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2206
+
2207
+
2208
+
2209
+
2210
+
2211
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
2212
+
2213
+
2214
+
2215
+
2216
+
2217
+
2218
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2219
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2220
+
2221
+
2222
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
2223
+
2224
+
2225
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2226
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
2227
+
2228
+
2229
+
2230
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
2231
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
2232
+
2233
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2234
+ <xsl:attribute name="margin-left">13mm</xsl:attribute>
2235
+ <xsl:attribute name="margin-right">12mm</xsl:attribute>
2236
+
2237
+
2238
+
2239
+
2240
+
2241
+
2242
+
2243
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
2244
+
2245
+ <xsl:attribute name="text-align">right</xsl:attribute>
2246
+ <xsl:attribute name="margin-right">25mm</xsl:attribute>
2247
+
2248
+
2249
+
2250
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
2251
+
2252
+
2253
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2254
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2255
+
2256
+
2257
+
2258
+
2259
+
2260
+
2261
+ </xsl:attribute-set><xsl:attribute-set name="termsource-text-style">
2262
+
2263
+
2264
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
2265
+
2266
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
2267
+
2268
+
2269
+
2270
+
2271
+
2272
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
2273
+
2274
+ </xsl:attribute-set><xsl:attribute-set name="figure-style">
2275
+
2276
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
2277
+
2278
+
2279
+
2280
+
2281
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2282
+ <!-- <xsl:attribute name="margin-top">12pt</xsl:attribute> -->
2283
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
2284
+ <!-- <xsl:attribute name="margin-bottom">6pt</xsl:attribute> -->
2285
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2286
+ <!-- <xsl:attribute name="keep-with-next">always</xsl:attribute> -->
2287
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2288
+ <xsl:attribute name="text-align">center</xsl:attribute>
2289
+
2290
+
2291
+
2292
+
2293
+
2294
+
2295
+
2296
+
2297
+
2298
+
2299
+
2300
+
2301
+
2302
+
2303
+
2304
+
2305
+
2306
+ </xsl:attribute-set><xsl:attribute-set name="formula-style">
2307
+
2308
+ </xsl:attribute-set><xsl:attribute-set name="image-style">
2309
+ <xsl:attribute name="text-align">center</xsl:attribute>
2310
+
2311
+
2312
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
2313
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
2314
+
2315
+
2316
+
2317
+
2318
+
2319
+ </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
2320
+
2321
+ </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
2322
+
2323
+
2324
+ <xsl:attribute name="width">100%</xsl:attribute>
2325
+ <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
2326
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
2327
+
2328
+
2329
+
2330
+
2331
+
2332
+ </xsl:attribute-set><xsl:attribute-set name="tt-style">
2333
+
2334
+
2335
+
2336
+ <xsl:attribute name="font-family">Fira Code</xsl:attribute>
2337
+
2338
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
2339
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2340
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2341
+ <xsl:attribute name="text-align">center</xsl:attribute>
2342
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2343
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2344
+
2345
+ </xsl:attribute-set><xsl:attribute-set name="domain-style">
2346
+
2347
+ </xsl:attribute-set><xsl:attribute-set name="admitted-style">
2348
+
2349
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2350
+
2351
+
2352
+
2353
+ </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
2354
+
2355
+
2356
+ </xsl:attribute-set><xsl:attribute-set name="definition-style">
2357
+
2358
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
2359
+
2360
+
2361
+
2362
+ </xsl:attribute-set><xsl:variable name="color-added-text">
2217
2363
  <xsl:text>rgb(0, 255, 0)</xsl:text>
2218
2364
  </xsl:variable><xsl:attribute-set name="add-style">
2219
2365
  <xsl:attribute name="color">red</xsl:attribute>
@@ -2235,6 +2381,19 @@
2235
2381
 
2236
2382
  </xsl:attribute-set><xsl:attribute-set name="toc-style">
2237
2383
  <xsl:attribute name="line-height">135%</xsl:attribute>
2384
+ </xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
2385
+ <xsl:attribute name="font-size">80%</xsl:attribute>
2386
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2387
+
2388
+
2389
+
2390
+
2391
+
2392
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2393
+
2394
+
2395
+
2396
+
2238
2397
  </xsl:attribute-set><xsl:attribute-set name="fn-style">
2239
2398
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2240
2399
  </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
@@ -2309,30 +2468,215 @@
2309
2468
 
2310
2469
 
2311
2470
 
2312
- </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
2313
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2314
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
2315
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
2316
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
2317
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
2318
- </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
2471
+ </xsl:attribute-set><xsl:attribute-set name="admonition-style">
2472
+
2473
+
2474
+
2475
+
2476
+
2477
+
2478
+
2479
+
2480
+
2481
+
2482
+
2483
+ <xsl:attribute name="border">0.5pt solid rgb(79, 129, 189)</xsl:attribute>
2484
+ <xsl:attribute name="color">rgb(79, 129, 189)</xsl:attribute>
2485
+ <xsl:attribute name="margin-left">16mm</xsl:attribute>
2486
+ <xsl:attribute name="margin-right">16mm</xsl:attribute>
2487
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2488
+
2489
+
2490
+
2491
+
2492
+ </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
2493
+
2494
+
2495
+
2496
+
2497
+
2498
+
2499
+
2500
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2501
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2502
+ <xsl:attribute name="padding">2mm</xsl:attribute>
2503
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
2504
+
2505
+
2506
+
2507
+
2508
+ </xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
2509
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2510
+
2511
+
2512
+
2513
+
2514
+
2515
+
2516
+
2517
+
2518
+
2519
+
2520
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2521
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2522
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2523
+ <xsl:attribute name="font-style">italic</xsl:attribute>
2524
+ <xsl:attribute name="text-align">center</xsl:attribute>
2525
+
2526
+
2527
+
2528
+
2529
+ </xsl:attribute-set><xsl:attribute-set name="admonition-p-style">
2530
+
2531
+
2532
+
2533
+
2534
+
2535
+
2536
+
2537
+
2538
+ <xsl:attribute name="font-style">italic</xsl:attribute>
2539
+
2540
+
2541
+
2542
+
2543
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
2544
+
2545
+
2546
+
2547
+
2548
+
2549
+
2550
+
2551
+
2552
+
2553
+
2554
+
2555
+
2556
+
2557
+
2558
+
2559
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2560
+ <xsl:attribute name="start-indent">25mm</xsl:attribute>
2561
+ <xsl:attribute name="text-indent">-25mm</xsl:attribute>
2562
+ <xsl:attribute name="line-height">115%</xsl:attribute>
2563
+
2564
+
2565
+
2566
+
2567
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-style">
2568
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
2569
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2570
+
2571
+
2572
+
2573
+
2574
+
2575
+
2576
+
2577
+
2578
+
2579
+
2580
+ <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
2581
+
2582
+
2583
+
2584
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
2585
+
2586
+
2587
+
2588
+
2589
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-style">
2590
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
2591
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2592
+
2593
+
2594
+
2595
+
2596
+
2597
+
2598
+
2599
+
2600
+
2601
+
2602
+ <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
2603
+
2604
+
2605
+
2606
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
2607
+
2608
+
2609
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
2610
+
2611
+
2612
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
2613
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2614
+ <xsl:attribute name="font-size">65%</xsl:attribute>
2615
+
2616
+
2617
+
2618
+
2619
+
2620
+
2621
+
2622
+
2623
+
2624
+
2625
+
2626
+
2627
+
2628
+
2629
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2630
+
2631
+
2632
+
2633
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
2634
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
2635
+
2636
+
2637
+
2638
+
2639
+
2640
+
2641
+
2642
+
2643
+
2644
+
2645
+
2646
+
2647
+
2648
+
2649
+ <xsl:attribute name="font-size">60%</xsl:attribute>
2650
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2651
+
2652
+
2653
+
2654
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
2655
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2656
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2657
+ <xsl:attribute name="start-indent">0pt</xsl:attribute>
2658
+
2659
+
2660
+
2661
+
2662
+
2663
+
2664
+
2665
+
2666
+
2667
+
2668
+
2669
+ </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
2670
+
2671
+
2672
+
2673
+ <xsl:attribute name="line-height">120%</xsl:attribute>
2674
+
2675
+ </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
2319
2676
  <xsl:for-each select="/*/*[local-name()='preface']/*">
2320
2677
  <xsl:sort select="@displayorder" data-type="number"/>
2321
2678
  <xsl:apply-templates select="." mode="contents"/>
2322
2679
  </xsl:for-each>
2323
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
2324
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
2325
-
2326
- <!-- Normative references -->
2327
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]" mode="contents"/>
2328
- <!-- Terms and definitions -->
2329
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
2330
- <!-- Another main sections -->
2331
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
2332
- <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
2333
- <!-- Bibliography -->
2334
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
2335
-
2336
2680
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2337
2681
 
2338
2682
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
@@ -2349,29 +2693,11 @@
2349
2693
  <xsl:sort select="@displayorder" data-type="number"/>
2350
2694
  <xsl:apply-templates select="." mode="contents"/>
2351
2695
  </xsl:for-each>
2352
- </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
2353
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
2354
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
2355
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
2356
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
2357
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
2358
2696
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2359
2697
  <xsl:for-each select="/*/*[local-name()='preface']/*">
2360
2698
  <xsl:sort select="@displayorder" data-type="number"/>
2361
2699
  <xsl:apply-templates select="."/>
2362
2700
  </xsl:for-each>
2363
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
2364
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
2365
-
2366
- <!-- Normative references -->
2367
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
2368
- <!-- Terms and definitions -->
2369
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
2370
- <!-- Another main sections -->
2371
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
2372
- <xsl:apply-templates select="/*/*[local-name()='annex']"/>
2373
- <!-- Bibliography -->
2374
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
2375
2701
  </xsl:template><xsl:template name="processMainSectionsDefault">
2376
2702
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2377
2703
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -2410,43 +2736,19 @@
2410
2736
  <xsl:call-template name="getSimpleTable"/>
2411
2737
  </xsl:variable>
2412
2738
 
2413
- <!-- <xsl:if test="$namespace = 'bipm'">
2414
- <fo:block>&#xA0;</fo:block>
2415
- </xsl:if> -->
2416
-
2417
2739
 
2418
2740
  <!-- Display table's name before table as standalone block -->
2419
2741
  <!-- $namespace = 'iso' or -->
2420
2742
 
2421
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2422
-
2423
-
2424
-
2425
-
2743
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
2744
+
2426
2745
 
2427
- <xsl:call-template name="fn_name_display"/>
2428
2746
 
2747
+ <xsl:call-template name="table_name_fn_display"/>
2429
2748
 
2430
2749
 
2431
2750
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
2432
2751
 
2433
- <!-- <xsl:variable name="cols-count">
2434
- <xsl:choose>
2435
- <xsl:when test="*[local-name()='thead']">
2436
- <xsl:call-template name="calculate-columns-numbers">
2437
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
2438
- </xsl:call-template>
2439
- </xsl:when>
2440
- <xsl:otherwise>
2441
- <xsl:call-template name="calculate-columns-numbers">
2442
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
2443
- </xsl:call-template>
2444
- </xsl:otherwise>
2445
- </xsl:choose>
2446
- </xsl:variable> -->
2447
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
2448
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
2449
-
2450
2752
  <xsl:variable name="colwidths">
2451
2753
  <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
2452
2754
  <xsl:call-template name="calculate-column-widths">
@@ -2457,17 +2759,8 @@
2457
2759
  </xsl:variable>
2458
2760
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2459
2761
 
2460
- <!-- <xsl:variable name="colwidths2">
2461
- <xsl:call-template name="calculate-column-widths">
2462
- <xsl:with-param name="cols-count" select="$cols-count"/>
2463
- </xsl:call-template>
2464
- </xsl:variable> -->
2465
-
2466
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
2467
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
2468
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
2469
2762
 
2470
- <xsl:variable name="margin-left">
2763
+ <xsl:variable name="margin-side">
2471
2764
  <xsl:choose>
2472
2765
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
2473
2766
  <xsl:otherwise>0</xsl:otherwise>
@@ -2475,20 +2768,20 @@
2475
2768
  </xsl:variable>
2476
2769
 
2477
2770
 
2478
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
2771
+ <fo:block-container xsl:use-attribute-sets="table-container-style">
2772
+
2479
2773
 
2774
+
2480
2775
 
2776
+
2481
2777
 
2482
-
2483
-
2484
-
2778
+
2485
2779
 
2486
2780
 
2487
2781
 
2488
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2489
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2490
- <xsl:attribute name="space-after">12pt</xsl:attribute>
2491
-
2782
+
2783
+
2784
+
2492
2785
 
2493
2786
  <xsl:if test="ancestor::*[local-name()='sections']">
2494
2787
  <xsl:attribute name="font-size">9pt</xsl:attribute>
@@ -2496,58 +2789,49 @@
2496
2789
 
2497
2790
 
2498
2791
 
2499
-
2500
-
2501
-
2502
-
2503
-
2504
-
2505
-
2792
+ <!-- end table block-container attributes -->
2506
2793
 
2507
2794
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
2508
2795
 
2509
2796
 
2510
- <xsl:variable name="table_width">
2511
- <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
2512
-
2513
-
2514
-
2515
- <xsl:choose>
2516
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
2517
- <xsl:otherwise>100%</xsl:otherwise>
2518
- </xsl:choose>
2519
-
2520
- </xsl:variable>
2521
-
2522
- <xsl:variable name="table_attributes">
2523
- <attribute name="table-layout">fixed</attribute>
2524
- <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
2525
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
2526
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
2527
-
2528
-
2529
-
2530
-
2531
-
2532
-
2533
-
2534
-
2535
- <attribute name="margin-left">0mm</attribute>
2536
- <attribute name="margin-right">0mm</attribute>
2537
-
2538
-
2539
-
2540
-
2541
-
2542
-
2797
+ <xsl:variable name="table_width_default">100%</xsl:variable>
2798
+ <xsl:variable name="table_width">
2799
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
2543
2800
 
2801
+ <xsl:choose>
2802
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
2803
+ <xsl:otherwise><xsl:value-of select="$table_width_default"/></xsl:otherwise>
2804
+ </xsl:choose>
2805
+
2806
+ </xsl:variable>
2807
+
2808
+
2809
+ <xsl:variable name="table_attributes">
2810
+
2811
+ <xsl:element name="table_attributes" use-attribute-sets="table-style">
2812
+ <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
2813
+
2814
+
2815
+
2816
+
2817
+
2818
+
2819
+
2820
+
2821
+
2822
+
2823
+
2824
+
2825
+
2826
+
2827
+ </xsl:element>
2544
2828
  </xsl:variable>
2545
2829
 
2546
2830
 
2547
- <fo:table id="{@id}" table-omit-footer-at-break="true">
2831
+ <fo:table id="{@id}">
2548
2832
 
2549
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2550
- <xsl:attribute name="{@name}">
2833
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2834
+ <xsl:attribute name="{local-name()}">
2551
2835
  <xsl:value-of select="."/>
2552
2836
  </xsl:attribute>
2553
2837
  </xsl:for-each>
@@ -2558,7 +2842,6 @@
2558
2842
  </xsl:if>
2559
2843
 
2560
2844
 
2561
-
2562
2845
  <xsl:choose>
2563
2846
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2564
2847
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -2584,7 +2867,7 @@
2584
2867
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2585
2868
  </xsl:when>
2586
2869
  <xsl:otherwise>
2587
- <xsl:apply-templates/>
2870
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
2588
2871
  </xsl:otherwise>
2589
2872
  </xsl:choose>
2590
2873
 
@@ -2599,25 +2882,6 @@
2599
2882
  </xsl:call-template>
2600
2883
  </xsl:for-each>
2601
2884
 
2602
- <!-- insert footer as table -->
2603
- <!-- <fo:table>
2604
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
2605
- <xsl:attribute name="{@name}">
2606
- <xsl:value-of select="."/>
2607
- </xsl:attribute>
2608
- </xsl:for-each>
2609
-
2610
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2611
- <xsl:choose>
2612
- <xsl:when test=". = 1 or . = 0">
2613
- <fo:table-column column-width="proportional-column-width(2)"/>
2614
- </xsl:when>
2615
- <xsl:otherwise>
2616
- <fo:table-column column-width="proportional-column-width({.})"/>
2617
- </xsl:otherwise>
2618
- </xsl:choose>
2619
- </xsl:for-each>
2620
- </fo:table>-->
2621
2885
 
2622
2886
 
2623
2887
 
@@ -2675,18 +2939,17 @@
2675
2939
  </xsl:otherwise>
2676
2940
  </xsl:choose>
2677
2941
 
2678
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
2942
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
2679
2943
  <xsl:param name="continued"/>
2680
2944
  <xsl:if test="normalize-space() != ''">
2681
2945
  <fo:block xsl:use-attribute-sets="table-name-style">
2682
-
2946
+
2683
2947
 
2684
2948
 
2685
2949
 
2686
2950
 
2687
2951
  <xsl:choose>
2688
2952
  <xsl:when test="$continued = 'true'">
2689
- <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
2690
2953
 
2691
2954
  </xsl:when>
2692
2955
  <xsl:otherwise>
@@ -2749,13 +3012,6 @@
2749
3012
  <xsl:for-each select="xalan:nodeset($table)/*/tr">
2750
3013
  <xsl:variable name="td_text">
2751
3014
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
2752
-
2753
- <!-- <xsl:if test="$namespace = 'bipm'">
2754
- <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
2755
- <word><xsl:value-of select="normalize-space(.)"/></word>
2756
- </xsl:for-each>
2757
- </xsl:if> -->
2758
-
2759
3015
  </xsl:variable>
2760
3016
  <xsl:variable name="words">
2761
3017
  <xsl:variable name="string_with_added_zerospaces">
@@ -2792,7 +3048,6 @@
2792
3048
  </xsl:otherwise>
2793
3049
  </xsl:choose>
2794
3050
  </xsl:variable>
2795
-
2796
3051
 
2797
3052
  <column>
2798
3053
  <xsl:for-each select="xalan:nodeset($widths)//width">
@@ -2828,7 +3083,6 @@
2828
3083
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2829
3084
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2830
3085
  <xsl:param name="cols-count"/>
2831
- <!-- font-weight="bold" -->
2832
3086
  <fo:table-header>
2833
3087
 
2834
3088
 
@@ -2840,13 +3094,12 @@
2840
3094
  <fo:table-row>
2841
3095
  <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
2842
3096
 
2843
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
3097
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
2844
3098
  <xsl:with-param name="continued">true</xsl:with-param>
2845
3099
  </xsl:apply-templates>
2846
3100
 
2847
3101
 
2848
3102
 
2849
-
2850
3103
  </fo:table-cell>
2851
3104
  </fo:table-row>
2852
3105
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -2862,66 +3115,6 @@
2862
3115
  <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2863
3116
  </fo:table-footer>
2864
3117
  </xsl:if>
2865
- </xsl:template><xsl:template name="insertTableFooter2">
2866
- <xsl:param name="cols-count"/>
2867
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2868
- <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
2869
-
2870
- <fo:table-footer>
2871
-
2872
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2873
-
2874
- <!-- if there are note(s) or fn(s) then create footer row -->
2875
- <xsl:if test="$isNoteOrFnExist = 'true'">
2876
-
2877
-
2878
-
2879
- <fo:table-row>
2880
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2881
-
2882
-
2883
-
2884
- <!-- fn will be processed inside 'note' processing -->
2885
-
2886
-
2887
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2888
-
2889
-
2890
-
2891
-
2892
-
2893
- <!-- except gb -->
2894
-
2895
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2896
-
2897
-
2898
- <!-- show Note under table in preface (ex. abstract) sections -->
2899
- <!-- empty, because notes show at page side in main sections -->
2900
- <!-- <xsl:if test="$namespace = 'bipm'">
2901
- <xsl:choose>
2902
- <xsl:when test="ancestor::*[local-name()='preface']">
2903
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2904
- </xsl:when>
2905
- <xsl:otherwise>
2906
- <fo:block/>
2907
- </xsl:otherwise>
2908
- </xsl:choose>
2909
- </xsl:if> -->
2910
-
2911
-
2912
- <!-- horizontal row separator -->
2913
-
2914
-
2915
- <!-- fn processing -->
2916
- <xsl:call-template name="fn_display"/>
2917
-
2918
- </fo:table-cell>
2919
- </fo:table-row>
2920
-
2921
- </xsl:if>
2922
- </fo:table-footer>
2923
-
2924
- </xsl:if>
2925
3118
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
2926
3119
  <xsl:param name="table_attributes"/>
2927
3120
  <xsl:param name="colwidths"/>
@@ -2947,17 +3140,18 @@
2947
3140
  </xsl:variable>
2948
3141
 
2949
3142
  <fo:table keep-with-previous="always">
2950
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
3143
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
3144
+ <xsl:variable name="name" select="local-name()"/>
2951
3145
  <xsl:choose>
2952
- <xsl:when test="@name = 'border-top'">
2953
- <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
3146
+ <xsl:when test="$name = 'border-top'">
3147
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
2954
3148
  </xsl:when>
2955
- <xsl:when test="@name = 'border'">
2956
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
3149
+ <xsl:when test="$name = 'border'">
3150
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2957
3151
  <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
2958
3152
  </xsl:when>
2959
3153
  <xsl:otherwise>
2960
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
3154
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2961
3155
  </xsl:otherwise>
2962
3156
  </xsl:choose>
2963
3157
  </xsl:for-each>
@@ -2986,19 +3180,15 @@
2986
3180
 
2987
3181
  <fo:table-body>
2988
3182
  <fo:table-row>
2989
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
3183
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
2990
3184
 
2991
3185
 
3186
+
2992
3187
 
2993
3188
 
2994
3189
  <!-- fn will be processed inside 'note' processing -->
2995
3190
 
2996
3191
 
2997
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2998
-
2999
-
3000
-
3001
-
3002
3192
 
3003
3193
 
3004
3194
 
@@ -3006,31 +3196,17 @@
3006
3196
  <!-- for BSI (not PAS) display Notes before footnotes -->
3007
3197
 
3008
3198
 
3009
- <!-- except gb -->
3010
-
3011
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3012
-
3199
+ <!-- except gb and bsi -->
3013
3200
 
3014
- <!-- <xsl:if test="$namespace = 'bipm'">
3015
- <xsl:choose>
3016
- <xsl:when test="ancestor::*[local-name()='preface']">
3017
- show Note under table in preface (ex. abstract) sections
3018
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3019
- </xsl:when>
3020
- <xsl:otherwise>
3021
- empty, because notes show at page side in main sections
3022
- <fo:block/>
3023
- </xsl:otherwise>
3024
- </xsl:choose>
3025
- </xsl:if> -->
3201
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3202
+
3026
3203
 
3027
3204
 
3028
3205
  <!-- horizontal row separator -->
3029
3206
 
3030
3207
 
3031
3208
  <!-- fn processing -->
3032
- <xsl:call-template name="fn_display"/>
3033
-
3209
+ <xsl:call-template name="table_fn_display"/>
3034
3210
 
3035
3211
  <!-- for PAS display Notes after footnotes -->
3036
3212
 
@@ -3072,92 +3248,62 @@
3072
3248
 
3073
3249
 
3074
3250
  <xsl:apply-templates/>
3075
- <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
3076
-
3251
+
3077
3252
  </fo:table-body>
3078
3253
 
3079
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
3080
- <xsl:choose>
3081
- <xsl:when test="substring-after(., '—') != ''">
3082
- <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
3083
- </xsl:when>
3084
- <xsl:otherwise>
3085
- <xsl:value-of select="."/>
3086
- </xsl:otherwise>
3087
- </xsl:choose>
3088
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
3089
- <xsl:apply-templates mode="presentation_name"/>
3090
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
3091
- <xsl:apply-templates select="."/>
3092
- </xsl:template><xsl:template match="*[local-name()='tr']">
3093
- <xsl:variable name="parent-name" select="local-name(..)"/>
3094
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
3095
- <fo:table-row min-height="4mm">
3096
- <xsl:if test="$parent-name = 'thead'">
3097
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3098
-
3099
-
3100
-
3101
-
3102
-
3103
-
3104
-
3105
-
3106
- </xsl:if>
3107
- <xsl:if test="$parent-name = 'tfoot'">
3108
-
3109
-
3110
-
3111
- </xsl:if>
3112
-
3113
-
3114
-
3115
- <xsl:attribute name="min-height">8.5mm</xsl:attribute>
3116
- <xsl:if test="$parent-name = 'thead'">
3117
- <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
3118
- <xsl:attribute name="color">white</xsl:attribute>
3119
- </xsl:if>
3120
- <xsl:if test="$parent-name = 'tbody'">
3121
- <xsl:variable name="number"><xsl:number/></xsl:variable>
3122
- <xsl:if test="$number mod 2 = 0">
3123
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3124
- </xsl:if>
3125
- </xsl:if>
3126
-
3127
-
3128
-
3129
-
3130
-
3131
-
3132
-
3133
-
3134
- <!-- <xsl:if test="$namespace = 'bipm'">
3135
- <xsl:attribute name="height">8mm</xsl:attribute>
3136
- </xsl:if> -->
3137
-
3254
+ </xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
3255
+ <fo:table-row xsl:use-attribute-sets="table-header-row-style">
3256
+
3257
+
3258
+
3259
+
3260
+
3261
+
3262
+
3263
+ <xsl:call-template name="setTableRowAttributes"/>
3264
+
3138
3265
  <xsl:apply-templates/>
3139
3266
  </fo:table-row>
3140
- </xsl:template><xsl:template match="*[local-name()='th']">
3141
- <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
3142
- <xsl:attribute name="text-align">
3143
- <xsl:choose>
3144
- <xsl:when test="@align">
3145
- <xsl:call-template name="setAlignment"/>
3146
- <!-- <xsl:value-of select="@align"/> -->
3147
- </xsl:when>
3148
- <xsl:otherwise>center</xsl:otherwise>
3149
- </xsl:choose>
3150
- </xsl:attribute>
3267
+ </xsl:template><xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
3268
+ <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
3151
3269
 
3270
+ <xsl:call-template name="setTableRowAttributes"/>
3271
+ <xsl:apply-templates/>
3272
+ </fo:table-row>
3273
+ </xsl:template><xsl:template match="*[local-name()='tr']">
3274
+ <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3275
+
3152
3276
 
3277
+ <xsl:variable name="number"><xsl:number/></xsl:variable>
3278
+ <xsl:if test="$number mod 2 = 0">
3279
+ <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3280
+ </xsl:if>
3153
3281
 
3282
+
3154
3283
 
3284
+
3285
+ <xsl:call-template name="setTableRowAttributes"/>
3286
+ <xsl:apply-templates/>
3287
+ </fo:table-row>
3288
+ </xsl:template><xsl:template name="setTableRowAttributes">
3289
+
3290
+
3291
+
3292
+
3293
+
3294
+
3295
+
3296
+
3297
+ </xsl:template><xsl:template match="*[local-name()='th']">
3298
+ <fo:table-cell xsl:use-attribute-sets="table-header-cell-style"> <!-- text-align="{@align}" -->
3299
+ <xsl:call-template name="setTextAlignment">
3300
+ <xsl:with-param name="default">center</xsl:with-param>
3301
+ </xsl:call-template>
3155
3302
 
3156
-
3157
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3158
3303
 
3159
3304
 
3160
3305
 
3306
+
3161
3307
 
3162
3308
 
3163
3309
 
@@ -3166,21 +3312,25 @@
3166
3312
  <xsl:if test="$lang = 'ar'">
3167
3313
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3168
3314
  </xsl:if>
3169
- <xsl:if test="@colspan">
3170
- <xsl:attribute name="number-columns-spanned">
3171
- <xsl:value-of select="@colspan"/>
3172
- </xsl:attribute>
3173
- </xsl:if>
3174
- <xsl:if test="@rowspan">
3175
- <xsl:attribute name="number-rows-spanned">
3176
- <xsl:value-of select="@rowspan"/>
3177
- </xsl:attribute>
3178
- </xsl:if>
3179
- <xsl:call-template name="display-align"/>
3315
+
3316
+ <xsl:call-template name="setTableCellAttributes"/>
3317
+
3180
3318
  <fo:block>
3181
3319
  <xsl:apply-templates/>
3182
3320
  </fo:block>
3183
3321
  </fo:table-cell>
3322
+ </xsl:template><xsl:template name="setTableCellAttributes">
3323
+ <xsl:if test="@colspan">
3324
+ <xsl:attribute name="number-columns-spanned">
3325
+ <xsl:value-of select="@colspan"/>
3326
+ </xsl:attribute>
3327
+ </xsl:if>
3328
+ <xsl:if test="@rowspan">
3329
+ <xsl:attribute name="number-rows-spanned">
3330
+ <xsl:value-of select="@rowspan"/>
3331
+ </xsl:attribute>
3332
+ </xsl:if>
3333
+ <xsl:call-template name="display-align"/>
3184
3334
  </xsl:template><xsl:template name="display-align">
3185
3335
  <xsl:if test="@valign">
3186
3336
  <xsl:attribute name="display-align">
@@ -3193,62 +3343,56 @@
3193
3343
  </xsl:attribute>
3194
3344
  </xsl:if>
3195
3345
  </xsl:template><xsl:template match="*[local-name()='td']">
3196
- <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
3197
- <xsl:attribute name="text-align">
3198
- <xsl:choose>
3199
- <xsl:when test="@align">
3200
- <xsl:call-template name="setAlignment"/>
3201
- <!-- <xsl:value-of select="@align"/> -->
3202
- </xsl:when>
3203
- <xsl:otherwise>left</xsl:otherwise>
3204
- </xsl:choose>
3205
- </xsl:attribute>
3346
+ <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
3347
+ <xsl:call-template name="setTextAlignment">
3348
+ <xsl:with-param name="default">left</xsl:with-param>
3349
+ </xsl:call-template>
3350
+
3206
3351
  <xsl:if test="$lang = 'ar'">
3207
3352
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3208
3353
  </xsl:if>
3209
3354
 
3210
3355
 
3211
3356
 
3357
+ <!-- bsi -->
3212
3358
 
3213
3359
 
3214
3360
 
3215
3361
 
3216
3362
 
3217
- <xsl:attribute name="border">solid 0pt white</xsl:attribute>
3218
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
3219
- <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
3220
3363
 
3221
3364
 
3222
3365
 
3366
+
3223
3367
 
3224
3368
 
3225
3369
 
3226
3370
 
3227
3371
 
3228
3372
 
3229
- <xsl:if test=".//*[local-name() = 'table']">
3373
+ <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
3230
3374
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3231
3375
  </xsl:if>
3232
- <xsl:if test="@colspan">
3233
- <xsl:attribute name="number-columns-spanned">
3234
- <xsl:value-of select="@colspan"/>
3235
- </xsl:attribute>
3236
- </xsl:if>
3237
- <xsl:if test="@rowspan">
3238
- <xsl:attribute name="number-rows-spanned">
3239
- <xsl:value-of select="@rowspan"/>
3240
- </xsl:attribute>
3241
- </xsl:if>
3242
- <xsl:call-template name="display-align"/>
3376
+
3377
+ <xsl:call-template name="setTableCellAttributes"/>
3378
+
3243
3379
  <fo:block>
3244
-
3380
+
3381
+
3382
+
3245
3383
  <xsl:apply-templates/>
3246
3384
  </fo:block>
3247
3385
  </fo:table-cell>
3248
3386
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
3387
+
3388
+ <fo:block xsl:use-attribute-sets="table-note-style">
3389
+
3390
+
3391
+
3392
+
3249
3393
 
3250
-
3251
- <fo:block font-size="10pt" margin-bottom="12pt">
3394
+ <!-- Table's note name (NOTE, for example) -->
3395
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
3252
3396
 
3253
3397
 
3254
3398
 
@@ -3256,23 +3400,14 @@
3256
3400
 
3257
3401
 
3258
3402
 
3259
-
3260
- <!-- Table's note name (NOTE, for example) -->
3261
-
3262
- <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
3403
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3263
3404
 
3264
-
3265
-
3266
-
3267
-
3268
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3269
-
3270
- </fo:inline>
3271
-
3272
-
3273
-
3274
- <xsl:apply-templates mode="process"/>
3275
- </fo:block>
3405
+ </fo:inline>
3406
+
3407
+
3408
+
3409
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
3410
+ </fo:block>
3276
3411
 
3277
3412
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
3278
3413
  <xsl:apply-templates/>
@@ -3352,8 +3487,7 @@
3352
3487
  <xsl:copy-of select="$footnote_inline"/>
3353
3488
  <fo:footnote-body>
3354
3489
 
3355
- <fo:block-container text-indent="0" start-indent="0">
3356
-
3490
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
3357
3491
 
3358
3492
  <fo:block xsl:use-attribute-sets="fn-body-style">
3359
3493
 
@@ -3372,7 +3506,7 @@
3372
3506
  <xsl:copy-of select="$footnote_inline"/>
3373
3507
  </xsl:otherwise>
3374
3508
  </xsl:choose>
3375
- </xsl:template><xsl:template name="fn_display">
3509
+ </xsl:template><xsl:template name="table_fn_display">
3376
3510
  <xsl:variable name="references">
3377
3511
 
3378
3512
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
@@ -3383,33 +3517,26 @@
3383
3517
  <xsl:for-each select="xalan:nodeset($references)//fn">
3384
3518
  <xsl:variable name="reference" select="@reference"/>
3385
3519
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
3386
- <fo:block margin-bottom="12pt">
3520
+ <fo:block xsl:use-attribute-sets="table-fn-style">
3387
3521
 
3388
3522
 
3389
3523
 
3390
-
3391
-
3392
-
3393
-
3394
- <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
3524
+ <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
3395
3525
 
3396
- <xsl:attribute name="vertical-align">super</xsl:attribute>
3397
3526
 
3398
3527
 
3399
3528
 
3400
3529
 
3530
+ <xsl:value-of select="@reference"/>
3401
3531
 
3402
3532
 
3403
3533
 
3404
3534
 
3405
- <xsl:value-of select="@reference"/>
3406
3535
 
3407
3536
 
3408
3537
 
3409
3538
  </fo:inline>
3410
- <fo:inline>
3411
-
3412
- <!-- <xsl:apply-templates /> -->
3539
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
3413
3540
  <xsl:copy-of select="./node()"/>
3414
3541
  </fo:inline>
3415
3542
  </fo:block>
@@ -3427,15 +3554,7 @@
3427
3554
 
3428
3555
  <xsl:apply-templates/>
3429
3556
  </fn>
3430
- </xsl:template><xsl:template name="fn_name_display">
3431
- <!-- <xsl:variable name="references">
3432
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
3433
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
3434
- <xsl:apply-templates />
3435
- </fn>
3436
- </xsl:for-each>
3437
- </xsl:variable>
3438
- $references=<xsl:copy-of select="$references"/> -->
3557
+ </xsl:template><xsl:template name="table_name_fn_display">
3439
3558
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
3440
3559
  <xsl:variable name="reference" select="@reference"/>
3441
3560
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
@@ -3444,9 +3563,7 @@
3444
3563
  </fo:block>
3445
3564
  </xsl:for-each>
3446
3565
  </xsl:template><xsl:template name="fn_display_figure">
3447
- <xsl:variable name="key_iso">
3448
- <!-- and (not(@class) or @class !='pseudocode') -->
3449
- </xsl:variable>
3566
+
3450
3567
  <xsl:variable name="references">
3451
3568
  <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
3452
3569
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -3454,50 +3571,52 @@
3454
3571
  </fn>
3455
3572
  </xsl:for-each>
3456
3573
  </xsl:variable>
3574
+
3575
+ <xsl:if test="xalan:nodeset($references)//fn">
3457
3576
 
3458
- <!-- current hierarchy is 'figure' element -->
3459
- <xsl:variable name="following_dl_colwidths">
3460
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3461
- <xsl:variable name="html-table">
3462
- <xsl:variable name="doc_ns">
3463
-
3464
- </xsl:variable>
3465
- <xsl:variable name="ns">
3466
- <xsl:choose>
3467
- <xsl:when test="normalize-space($doc_ns) != ''">
3468
- <xsl:value-of select="normalize-space($doc_ns)"/>
3469
- </xsl:when>
3470
- <xsl:otherwise>
3471
- <xsl:value-of select="substring-before(name(/*), '-')"/>
3472
- </xsl:otherwise>
3473
- </xsl:choose>
3474
- </xsl:variable>
3475
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
3476
- <!-- <xsl:element name="{$ns}:table"> -->
3577
+ <xsl:variable name="key_iso">
3578
+
3579
+ </xsl:variable>
3580
+
3581
+ <!-- current hierarchy is 'figure' element -->
3582
+ <xsl:variable name="following_dl_colwidths">
3583
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3584
+ <xsl:variable name="html-table">
3585
+ <xsl:variable name="doc_ns">
3586
+
3587
+ </xsl:variable>
3588
+ <xsl:variable name="ns">
3589
+ <xsl:choose>
3590
+ <xsl:when test="normalize-space($doc_ns) != ''">
3591
+ <xsl:value-of select="normalize-space($doc_ns)"/>
3592
+ </xsl:when>
3593
+ <xsl:otherwise>
3594
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
3595
+ </xsl:otherwise>
3596
+ </xsl:choose>
3597
+ </xsl:variable>
3598
+
3477
3599
  <xsl:for-each select="*[local-name() = 'dl'][1]">
3478
3600
  <tbody>
3479
3601
  <xsl:apply-templates mode="dl"/>
3480
3602
  </tbody>
3481
3603
  </xsl:for-each>
3482
- <!-- </xsl:element> -->
3483
- </xsl:variable>
3484
-
3485
- <xsl:call-template name="calculate-column-widths">
3486
- <xsl:with-param name="cols-count" select="2"/>
3487
- <xsl:with-param name="table" select="$html-table"/>
3488
- </xsl:call-template>
3489
-
3490
- </xsl:if>
3491
- </xsl:variable>
3492
-
3493
-
3494
- <xsl:variable name="maxlength_dt">
3495
- <xsl:for-each select="*[local-name() = 'dl'][1]">
3496
- <xsl:call-template name="getMaxLength_dt"/>
3497
- </xsl:for-each>
3498
- </xsl:variable>
3499
-
3500
- <xsl:if test="xalan:nodeset($references)//fn">
3604
+ </xsl:variable>
3605
+
3606
+ <xsl:call-template name="calculate-column-widths">
3607
+ <xsl:with-param name="cols-count" select="2"/>
3608
+ <xsl:with-param name="table" select="$html-table"/>
3609
+ </xsl:call-template>
3610
+
3611
+ </xsl:if>
3612
+ </xsl:variable>
3613
+
3614
+ <xsl:variable name="maxlength_dt">
3615
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
3616
+ <xsl:call-template name="getMaxLength_dt"/>
3617
+ </xsl:for-each>
3618
+ </xsl:variable>
3619
+
3501
3620
  <fo:block>
3502
3621
  <fo:table width="95%" table-layout="fixed">
3503
3622
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -3524,20 +3643,18 @@
3524
3643
  <fo:table-row>
3525
3644
  <fo:table-cell>
3526
3645
  <fo:block>
3527
- <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
3528
-
3646
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
3529
3647
  <xsl:value-of select="@reference"/>
3530
3648
  </fo:inline>
3531
3649
  </fo:block>
3532
3650
  </fo:table-cell>
3533
3651
  <fo:table-cell>
3534
- <fo:block text-align="justify" margin-bottom="12pt">
3535
-
3652
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
3536
3653
  <xsl:if test="normalize-space($key_iso) = 'true'">
3537
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
3654
+
3655
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
3656
+
3538
3657
  </xsl:if>
3539
-
3540
- <!-- <xsl:apply-templates /> -->
3541
3658
  <xsl:copy-of select="./node()"/>
3542
3659
  </fo:block>
3543
3660
  </fo:table-cell>
@@ -3550,16 +3667,8 @@
3550
3667
  </xsl:if>
3551
3668
 
3552
3669
  </xsl:template><xsl:template match="*[local-name()='fn']">
3553
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
3554
- <fo:inline font-size="80%" keep-with-previous.within-line="always">
3555
-
3556
-
3557
-
3558
-
3559
-
3560
-
3561
- <xsl:attribute name="vertical-align">super</xsl:attribute>
3562
-
3670
+ <fo:inline xsl:use-attribute-sets="fn-reference-style">
3671
+
3563
3672
 
3564
3673
 
3565
3674
 
@@ -3588,10 +3697,10 @@
3588
3697
  <xsl:variable name="isDeleted" select="@deleted"/>
3589
3698
  <fo:block-container>
3590
3699
 
3591
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
3592
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
3593
- </xsl:if>
3594
-
3700
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
3701
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
3702
+ </xsl:if>
3703
+
3595
3704
 
3596
3705
  <xsl:if test="parent::*[local-name() = 'note']">
3597
3706
  <xsl:attribute name="margin-left">
@@ -3608,11 +3717,11 @@
3608
3717
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3609
3718
  </xsl:call-template>
3610
3719
 
3611
- <fo:block-container>
3612
-
3613
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
3614
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
3720
+ <fo:block-container margin-left="0mm">
3721
+
3615
3722
 
3723
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3724
+
3616
3725
 
3617
3726
  <xsl:variable name="parent" select="local-name(..)"/>
3618
3727
 
@@ -3623,20 +3732,19 @@
3623
3732
  <xsl:choose>
3624
3733
  <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
3625
3734
 
3626
-
3627
- <fo:block margin-bottom="12pt" text-align="left">
3628
-
3629
- <xsl:variable name="title-where">
3630
- <xsl:call-template name="getLocalizedString">
3631
- <xsl:with-param name="key">where</xsl:with-param>
3632
- </xsl:call-template>
3633
- </xsl:variable>
3634
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
3635
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
3636
- <xsl:text/>
3637
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3638
- </fo:block>
3639
-
3735
+ <fo:block margin-bottom="12pt" text-align="left">
3736
+
3737
+ <xsl:variable name="title-where">
3738
+ <xsl:call-template name="getLocalizedString">
3739
+ <xsl:with-param name="key">where</xsl:with-param>
3740
+ </xsl:call-template>
3741
+ </xsl:variable>
3742
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
3743
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
3744
+ <xsl:text/>
3745
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3746
+ </fo:block>
3747
+
3640
3748
  </xsl:when>
3641
3749
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
3642
3750
  <fo:block margin-bottom="12pt" text-align="left">
@@ -3683,9 +3791,7 @@
3683
3791
  <fo:table width="95%" table-layout="fixed">
3684
3792
 
3685
3793
  <xsl:choose>
3686
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
3687
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
3688
- </xsl:when>
3794
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
3689
3795
  <xsl:when test="normalize-space($key_iso) = 'true'">
3690
3796
  <xsl:attribute name="font-size">10pt</xsl:attribute>
3691
3797
 
@@ -3706,12 +3812,9 @@
3706
3812
  </xsl:otherwise>
3707
3813
  </xsl:choose>
3708
3814
  </xsl:variable>
3709
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
3710
- <!-- <xsl:element name="{$ns}:table"> -->
3711
- <tbody>
3712
- <xsl:apply-templates mode="dl"/>
3713
- </tbody>
3714
- <!-- </xsl:element> -->
3815
+ <tbody>
3816
+ <xsl:apply-templates mode="dl"/>
3817
+ </tbody>
3715
3818
  </xsl:variable>
3716
3819
  <!-- html-table<xsl:copy-of select="$html-table"/> -->
3717
3820
  <xsl:variable name="colwidths">
@@ -3791,8 +3894,6 @@
3791
3894
  </xsl:for-each>
3792
3895
  </xsl:otherwise>
3793
3896
  </xsl:choose>
3794
- <!-- <fo:table-column column-width="15%"/>
3795
- <fo:table-column column-width="85%"/> -->
3796
3897
  </xsl:otherwise>
3797
3898
  </xsl:choose>
3798
3899
  </xsl:template><xsl:template name="getMaxLength_dt">
@@ -3807,12 +3908,6 @@
3807
3908
  </xsl:for-each>
3808
3909
  </xsl:variable>
3809
3910
  <xsl:variable name="maxLength">
3810
- <!-- <xsl:for-each select="*[local-name()='dt']">
3811
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3812
- <xsl:if test="position() = 1">
3813
- <xsl:value-of select="string-length(normalize-space(.))"/>
3814
- </xsl:if>
3815
- </xsl:for-each> -->
3816
3911
  <xsl:for-each select="xalan:nodeset($lengths)/length">
3817
3912
  <xsl:sort select="." data-type="number" order="descending"/>
3818
3913
  <xsl:if test="position() = 1">
@@ -3838,12 +3933,12 @@
3838
3933
  <xsl:if test="normalize-space($key_iso) = 'true'">
3839
3934
  <xsl:attribute name="margin-top">0</xsl:attribute>
3840
3935
  </xsl:if>
3841
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3936
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3842
3937
  </fo:block>
3843
3938
  </fo:table-cell>
3844
3939
  <fo:table-cell>
3845
3940
  <fo:block>
3846
- <xsl:apply-templates/>
3941
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3847
3942
  </fo:block>
3848
3943
  </fo:table-cell>
3849
3944
  </fo:table-row>
@@ -3854,81 +3949,37 @@
3854
3949
  </td>
3855
3950
  <td>
3856
3951
 
3857
-
3858
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3859
-
3952
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3953
+
3860
3954
  </td>
3861
3955
  </tr>
3862
3956
 
3863
3957
  </xsl:template><xsl:template match="*[local-name()='dt']">
3864
3958
  <xsl:param name="key_iso"/>
3865
3959
 
3866
- <fo:table-row>
3867
-
3868
- <xsl:attribute name="min-height">8.5mm</xsl:attribute>
3869
-
3870
-
3960
+ <fo:table-row xsl:use-attribute-sets="dt-row-style">
3871
3961
  <fo:table-cell>
3872
3962
 
3873
- <fo:block margin-top="6pt">
3963
+ <fo:block xsl:use-attribute-sets="dt-style">
3874
3964
  <xsl:copy-of select="@id"/>
3875
3965
 
3876
-
3877
3966
  <xsl:if test="normalize-space($key_iso) = 'true'">
3878
3967
  <xsl:attribute name="margin-top">0</xsl:attribute>
3879
-
3880
3968
  </xsl:if>
3881
3969
 
3882
3970
 
3883
3971
 
3884
-
3885
-
3886
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
3887
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3888
-
3889
-
3890
-
3891
3972
  <xsl:apply-templates/>
3892
- <!-- <xsl:if test="$namespace = 'gb'">
3893
- <xsl:if test="ancestor::*[local-name()='formula']">
3894
- <xsl:text>—</xsl:text>
3895
- </xsl:if>
3896
- </xsl:if> -->
3897
3973
  </fo:block>
3898
3974
  </fo:table-cell>
3899
3975
  <fo:table-cell>
3900
3976
  <fo:block>
3901
3977
 
3902
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3903
- <xsl:if test="local-name(*[1]) != 'stem'">
3904
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3905
- </xsl:if>
3906
- </xsl:if> -->
3907
-
3908
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3909
-
3978
+
3979
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3910
3980
  </fo:block>
3911
3981
  </fo:table-cell>
3912
3982
  </fo:table-row>
3913
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3914
- <xsl:if test="local-name(*[1]) = 'stem'">
3915
- <fo:table-row>
3916
- <fo:table-cell>
3917
- <fo:block margin-top="6pt">
3918
- <xsl:if test="normalize-space($key_iso) = 'true'">
3919
- <xsl:attribute name="margin-top">0</xsl:attribute>
3920
- </xsl:if>
3921
- <xsl:text>&#xA0;</xsl:text>
3922
- </fo:block>
3923
- </fo:table-cell>
3924
- <fo:table-cell>
3925
- <fo:block>
3926
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3927
- </fo:block>
3928
- </fo:table-cell>
3929
- </fo:table-row>
3930
- </xsl:if>
3931
- </xsl:if> -->
3932
3983
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
3933
3984
  <xsl:apply-templates/>
3934
3985
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -3957,6 +4008,7 @@
3957
4008
  </fo:inline>
3958
4009
  </xsl:template><xsl:template match="*[local-name()='tt']">
3959
4010
  <fo:inline xsl:use-attribute-sets="tt-style">
4011
+
3960
4012
  <xsl:variable name="_font-size">
3961
4013
 
3962
4014
 
@@ -3993,15 +4045,21 @@
3993
4045
  <xsl:apply-templates/>
3994
4046
  </fo:inline>
3995
4047
  </xsl:template><xsl:template match="*[local-name()='add']">
4048
+ <xsl:param name="skip">true</xsl:param>
3996
4049
  <xsl:choose>
3997
4050
  <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
3998
- <fo:inline>
3999
- <xsl:call-template name="insertTag">
4000
- <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
4001
- <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
4002
- <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
4003
- </xsl:call-template>
4004
- </fo:inline>
4051
+ <xsl:choose>
4052
+ <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab'])) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
4053
+ <xsl:otherwise>
4054
+ <fo:inline>
4055
+ <xsl:call-template name="insertTag">
4056
+ <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
4057
+ <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
4058
+ <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
4059
+ </xsl:call-template>
4060
+ </fo:inline>
4061
+ </xsl:otherwise>
4062
+ </xsl:choose>
4005
4063
  </xsl:when>
4006
4064
  <xsl:when test="@amendment">
4007
4065
  <fo:inline>
@@ -4044,8 +4102,6 @@
4044
4102
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
4045
4103
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
4046
4104
  <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
4047
- <!-- <xsl:attribute name="width">7mm</xsl:attribute>
4048
- <xsl:attribute name="content-height">100%</xsl:attribute> -->
4049
4105
  <xsl:attribute name="height">5mm</xsl:attribute>
4050
4106
  <xsl:attribute name="content-width">100%</xsl:attribute>
4051
4107
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -4263,14 +4319,6 @@
4263
4319
 
4264
4320
  <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
4265
4321
 
4266
- <!-- <xsl:choose>
4267
- <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
4268
-
4269
- </xsl:when>
4270
- <xsl:otherwise>
4271
- <xsl:copy-of select="current()"/>
4272
- </xsl:otherwise>
4273
- </xsl:choose> -->
4274
4322
  </xsl:variable>
4275
4323
  <xsl:copy-of select="$simple-table"/>
4276
4324
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
@@ -4389,8 +4437,6 @@
4389
4437
  <xsl:choose>
4390
4438
  <xsl:when test="contains($str2, ' ')">
4391
4439
  <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
4392
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
4393
- <xsl:value-of select="substring($substr, 2)"/> -->
4394
4440
  <xsl:call-template name="capitalize">
4395
4441
  <xsl:with-param name="str" select="$substr"/>
4396
4442
  </xsl:call-template>
@@ -4400,8 +4446,6 @@
4400
4446
  </xsl:call-template>
4401
4447
  </xsl:when>
4402
4448
  <xsl:otherwise>
4403
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
4404
- <xsl:value-of select="substring($str2, 2)"/> -->
4405
4449
  <xsl:call-template name="capitalize">
4406
4450
  <xsl:with-param name="str" select="$str2"/>
4407
4451
  </xsl:call-template>
@@ -4429,6 +4473,7 @@
4429
4473
  <xsl:apply-templates select="." mode="mathml"/>
4430
4474
  </xsl:variable>
4431
4475
  <fo:instream-foreign-object fox:alt-text="Math">
4476
+
4432
4477
 
4433
4478
 
4434
4479
  <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
@@ -4460,7 +4505,7 @@
4460
4505
  </xsl:attribute>
4461
4506
 
4462
4507
 
4463
- <!-- <xsl:copy-of select="."/> -->
4508
+
4464
4509
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
4465
4510
  </fo:instream-foreign-object>
4466
4511
  </fo:inline>
@@ -4519,6 +4564,10 @@
4519
4564
 
4520
4565
 
4521
4566
 
4567
+
4568
+
4569
+
4570
+
4522
4571
  <xsl:choose>
4523
4572
  <xsl:when test="$target_text = ''">
4524
4573
  <xsl:apply-templates/>
@@ -4576,7 +4625,6 @@
4576
4625
  </fo:inline>
4577
4626
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
4578
4627
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
4579
-
4580
4628
  <xsl:apply-templates/>
4581
4629
  </fo:basic-link>
4582
4630
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -4604,13 +4652,17 @@
4604
4652
  <fo:inline>
4605
4653
  <xsl:apply-templates/>
4606
4654
  </fo:inline>
4607
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
4655
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="formula_number"> <!-- show by demand -->
4608
4656
  <xsl:if test="normalize-space() != ''">
4609
4657
  <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
4610
4658
  </xsl:if>
4611
4659
  </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
4612
4660
 
4613
4661
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
4662
+
4663
+
4664
+
4665
+
4614
4666
 
4615
4667
 
4616
4668
  <xsl:if test="ancestor::ogc:ul or ancestor::ogc:ol and not(ancestor::ogc:note[1]/following-sibling::*)">
@@ -4619,38 +4671,49 @@
4619
4671
 
4620
4672
 
4621
4673
 
4674
+
4675
+
4622
4676
 
4623
4677
  <fo:block-container margin-left="0mm">
4678
+
4624
4679
 
4625
4680
 
4626
4681
 
4682
+
4627
4683
 
4628
-
4629
-
4630
-
4631
-
4632
- <fo:block>
4633
-
4634
-
4635
-
4636
-
4637
-
4684
+ <fo:block>
4685
+
4686
+
4638
4687
 
4639
- <fo:inline xsl:use-attribute-sets="note-name-style">
4640
4688
 
4641
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4642
- </fo:inline>
4643
- <xsl:apply-templates/>
4644
- </fo:block>
4645
-
4646
-
4689
+
4690
+
4691
+
4692
+ <fo:inline xsl:use-attribute-sets="note-name-style">
4693
+
4694
+
4695
+
4696
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
4697
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
4698
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
4699
+ <xsl:with-param name="skip">false</xsl:with-param>
4700
+ </xsl:apply-templates>
4701
+ </xsl:if>
4702
+
4703
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4704
+
4705
+ </fo:inline>
4706
+
4707
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4708
+ </fo:block>
4709
+
4647
4710
  </fo:block-container>
4648
4711
  </fo:block-container>
4649
4712
 
4650
4713
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
4651
4714
  <xsl:variable name="num"><xsl:number/></xsl:variable>
4652
4715
  <xsl:choose>
4653
- <xsl:when test="$num = 1">
4716
+ <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
4654
4717
  <fo:inline xsl:use-attribute-sets="note-p-style">
4655
4718
  <xsl:apply-templates/>
4656
4719
  </fo:inline>
@@ -4665,12 +4728,16 @@
4665
4728
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
4666
4729
 
4667
4730
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
4731
+
4732
+
4733
+
4734
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4668
4735
 
4669
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4670
4736
  </fo:inline>
4671
- <xsl:apply-templates/>
4737
+
4738
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4672
4739
  </fo:block>
4673
- </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
4740
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']">
4674
4741
  <xsl:param name="sfx"/>
4675
4742
  <xsl:variable name="suffix">
4676
4743
  <xsl:choose>
@@ -4689,7 +4756,7 @@
4689
4756
  <xsl:apply-templates/>
4690
4757
  <xsl:value-of select="$suffix"/>
4691
4758
  </xsl:if>
4692
- </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
4759
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']">
4693
4760
  <xsl:param name="sfx"/>
4694
4761
  <xsl:variable name="suffix">
4695
4762
  <xsl:choose>
@@ -4716,25 +4783,25 @@
4716
4783
  <xsl:apply-templates/>
4717
4784
  </fo:block>
4718
4785
  </xsl:template><xsl:template match="*[local-name() = 'term']">
4719
- <!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
4720
4786
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
4721
4787
 
4722
4788
 
4789
+
4790
+ <xsl:apply-templates select="ogc:name"/>
4791
+
4792
+
4723
4793
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
4724
4794
 
4725
4795
  </xsl:if>
4726
- <xsl:apply-templates/>
4796
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4727
4797
  </fo:block>
4728
- </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
4798
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
4729
4799
  <xsl:if test="normalize-space() != ''">
4730
4800
  <xsl:variable name="level">
4731
4801
  <xsl:call-template name="getLevelTermName"/>
4732
4802
  </xsl:variable>
4733
4803
  <fo:inline role="H{$level}">
4734
4804
  <xsl:apply-templates/>
4735
- <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
4736
- <xsl:text>.</xsl:text>
4737
- </xsl:if> -->
4738
4805
  </fo:inline>
4739
4806
  </xsl:if>
4740
4807
  </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
@@ -4747,9 +4814,10 @@
4747
4814
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
4748
4815
  </xsl:call-template>
4749
4816
 
4750
- <fo:block>
4751
-
4752
- <xsl:apply-templates/>
4817
+
4818
+
4819
+ <fo:block xsl:use-attribute-sets="figure-style">
4820
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4753
4821
  </fo:block>
4754
4822
  <xsl:call-template name="fn_display_figure"/>
4755
4823
  <xsl:for-each select="*[local-name() = 'note']">
@@ -4757,14 +4825,15 @@
4757
4825
  </xsl:for-each>
4758
4826
 
4759
4827
 
4760
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4828
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
4829
+
4761
4830
 
4762
4831
  </fo:block-container>
4763
4832
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
4764
4833
  <fo:block id="{@id}">
4765
- <xsl:apply-templates/>
4834
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4766
4835
  </fo:block>
4767
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4836
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4768
4837
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
4769
4838
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
4770
4839
  <xsl:apply-templates/>
@@ -4871,9 +4940,7 @@
4871
4940
  <xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
4872
4941
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
4873
4942
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
4874
- <!-- width=<xsl:value-of select="$width"/> -->
4875
4943
  <xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
4876
- <!-- height=<xsl:value-of select="$height"/> -->
4877
4944
  <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
4878
4945
  <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
4879
4946
  <xsl:call-template name="svg_cross">
@@ -5143,7 +5210,7 @@
5143
5210
  </fo:basic-link>
5144
5211
  </fo:block>
5145
5212
  </fo:block-container>
5146
- </xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
5213
+ </xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
5147
5214
  <xsl:apply-templates mode="contents"/>
5148
5215
  <xsl:text> </xsl:text>
5149
5216
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
@@ -5294,8 +5361,6 @@
5294
5361
 
5295
5362
 
5296
5363
 
5297
-
5298
-
5299
5364
  <xsl:variable name="list_of_tables_">
5300
5365
  <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]"> <!-- contains(*[local-name() = 'name'], '—') -->
5301
5366
  <table id="{@id}"><xsl:apply-templates select="*[local-name() = 'name']" mode="bookmarks"/></table>
@@ -5440,7 +5505,7 @@
5440
5505
  <xsl:apply-templates mode="bookmark"/>
5441
5506
  </xsl:otherwise>
5442
5507
  </xsl:choose>
5443
- </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">
5508
+ </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']">
5444
5509
  <xsl:if test="normalize-space() != ''">
5445
5510
  <fo:block xsl:use-attribute-sets="figure-name-style">
5446
5511
 
@@ -5456,12 +5521,6 @@
5456
5521
  <!-- <xsl:text> </xsl:text> -->
5457
5522
  </xsl:template><xsl:template name="getSection">
5458
5523
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
5459
- <!--
5460
- <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
5461
- <xsl:value-of select="."/>
5462
- </xsl:for-each>
5463
- -->
5464
-
5465
5524
  </xsl:template><xsl:template name="getName">
5466
5525
  <xsl:choose>
5467
5526
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -5530,16 +5589,21 @@
5530
5589
  <xsl:apply-templates mode="contents_item">
5531
5590
  <xsl:with-param name="mode" select="$mode"/>
5532
5591
  </xsl:apply-templates>
5533
- </xsl:template><xsl:template match="*[local-name() = 'add'][starts-with(text(), $ace_tag)]" mode="contents_item">
5592
+ </xsl:template><xsl:template match="*[local-name() = 'add']" mode="contents_item">
5534
5593
  <xsl:param name="mode">bookmarks</xsl:param>
5535
- <xsl:if test="$mode = 'contents'">
5536
- <xsl:copy>
5537
- <xsl:apply-templates mode="contents_item"/>
5538
- </xsl:copy>
5539
- </xsl:if>
5594
+ <xsl:choose>
5595
+ <xsl:when test="starts-with(text(), $ace_tag)">
5596
+ <xsl:if test="$mode = 'contents'">
5597
+ <xsl:copy>
5598
+ <xsl:apply-templates mode="contents_item"/>
5599
+ </xsl:copy>
5600
+ </xsl:if>
5601
+ </xsl:when>
5602
+ <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
5603
+ </xsl:choose>
5540
5604
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
5541
5605
 
5542
- <fo:block-container margin-left="0mm">
5606
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
5543
5607
  <xsl:copy-of select="@id"/>
5544
5608
 
5545
5609
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -5580,6 +5644,7 @@
5580
5644
 
5581
5645
 
5582
5646
  </xsl:variable>
5647
+
5583
5648
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
5584
5649
  <xsl:if test="$font-size != ''">
5585
5650
  <xsl:attribute name="font-size">
@@ -5600,11 +5665,11 @@
5600
5665
  </xsl:if>
5601
5666
 
5602
5667
 
5603
- <xsl:apply-templates/>
5668
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5604
5669
  </fo:block>
5605
5670
 
5606
5671
 
5607
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5672
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
5608
5673
 
5609
5674
 
5610
5675
 
@@ -5622,7 +5687,7 @@
5622
5687
  <xsl:call-template name="add-zero-spaces-java">
5623
5688
  <xsl:with-param name="text" select="$text"/>
5624
5689
  </xsl:call-template>
5625
- </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
5690
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
5626
5691
  <xsl:if test="normalize-space() != ''">
5627
5692
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
5628
5693
  <xsl:apply-templates/>
@@ -5630,10 +5695,10 @@
5630
5695
  </xsl:if>
5631
5696
  </xsl:template><xsl:template match="*[local-name() = 'permission']">
5632
5697
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
5633
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5634
- <xsl:apply-templates/>
5698
+ <xsl:apply-templates select="*[local-name()='name']"/>
5699
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5635
5700
  </fo:block>
5636
- </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
5701
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
5637
5702
  <xsl:if test="normalize-space() != ''">
5638
5703
  <fo:block xsl:use-attribute-sets="permission-name-style">
5639
5704
  <xsl:apply-templates/>
@@ -5648,13 +5713,13 @@
5648
5713
  </fo:block>
5649
5714
  </xsl:template><xsl:template match="*[local-name() = 'requirement']">
5650
5715
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
5651
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5652
- <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
5653
- <xsl:apply-templates select="@obligation" mode="presentation"/>
5654
- <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
5655
- <xsl:apply-templates/>
5716
+ <xsl:apply-templates select="*[local-name()='name']"/>
5717
+ <xsl:apply-templates select="*[local-name()='label']"/>
5718
+ <xsl:apply-templates select="@obligation"/>
5719
+ <xsl:apply-templates select="*[local-name()='subject']"/>
5720
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'label') and not(local-name() = 'subject')]"/>
5656
5721
  </fo:block>
5657
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
5722
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
5658
5723
  <xsl:if test="normalize-space() != ''">
5659
5724
  <fo:block xsl:use-attribute-sets="requirement-name-style">
5660
5725
 
@@ -5668,20 +5733,24 @@
5668
5733
 
5669
5734
  </fo:block>
5670
5735
  </xsl:if>
5671
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
5736
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']">
5672
5737
  <fo:block xsl:use-attribute-sets="requirement-label-style">
5673
5738
  <xsl:apply-templates/>
5674
5739
  </fo:block>
5675
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
5740
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation">
5676
5741
  <fo:block>
5677
5742
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
5678
5743
  </fo:block>
5744
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2">
5745
+ <fo:block xsl:use-attribute-sets="subject-style">
5746
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
5747
+ </fo:block>
5679
5748
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
5680
5749
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
5681
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5682
- <xsl:apply-templates/>
5750
+ <xsl:apply-templates select="*[local-name()='name']"/>
5751
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5683
5752
  </fo:block>
5684
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
5753
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
5685
5754
  <xsl:if test="normalize-space() != ''">
5686
5755
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
5687
5756
  <xsl:apply-templates/>
@@ -5692,10 +5761,6 @@
5692
5761
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
5693
5762
  <xsl:apply-templates/>
5694
5763
  </fo:block>
5695
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
5696
- <fo:block xsl:use-attribute-sets="subject-style">
5697
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
5698
- </fo:block>
5699
5764
  </xsl:template><xsl:template match="*[local-name() = 'subject']">
5700
5765
  <fo:block xsl:use-attribute-sets="subject-style">
5701
5766
  <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
@@ -5739,8 +5804,6 @@
5739
5804
  </xsl:variable>
5740
5805
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
5741
5806
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
5742
- <!-- <fo:table-column column-width="35mm"/>
5743
- <fo:table-column column-width="115mm"/> -->
5744
5807
  <fo:table-column column-width="30%"/>
5745
5808
  <fo:table-column column-width="70%"/>
5746
5809
  </xsl:if>
@@ -5750,7 +5813,7 @@
5750
5813
  <xsl:if test=".//*[local-name() = 'fn']">
5751
5814
  <xsl:for-each select="*[local-name() = 'tbody']">
5752
5815
  <fo:block font-size="90%" border-bottom="1pt solid black">
5753
- <xsl:call-template name="fn_display"/>
5816
+ <xsl:call-template name="table_fn_display"/>
5754
5817
  </fo:block>
5755
5818
  </xsl:for-each>
5756
5819
  </xsl:if>
@@ -5767,7 +5830,6 @@
5767
5830
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
5768
5831
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
5769
5832
  <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
5770
- <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
5771
5833
  <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
5772
5834
  </xsl:if>
5773
5835
  <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
@@ -5780,34 +5842,11 @@
5780
5842
  </fo:table-row>
5781
5843
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
5782
5844
  <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
5783
- <xsl:attribute name="text-align">
5784
- <xsl:choose>
5785
- <xsl:when test="@align">
5786
- <xsl:value-of select="@align"/>
5787
- </xsl:when>
5788
- <xsl:otherwise>left</xsl:otherwise>
5789
- </xsl:choose>
5790
- </xsl:attribute>
5791
- <xsl:if test="@colspan">
5792
- <xsl:attribute name="number-columns-spanned">
5793
- <xsl:value-of select="@colspan"/>
5794
- </xsl:attribute>
5795
- </xsl:if>
5796
- <xsl:if test="@rowspan">
5797
- <xsl:attribute name="number-rows-spanned">
5798
- <xsl:value-of select="@rowspan"/>
5799
- </xsl:attribute>
5800
- </xsl:if>
5801
- <xsl:call-template name="display-align"/>
5845
+ <xsl:call-template name="setTextAlignment">
5846
+ <xsl:with-param name="default">left</xsl:with-param>
5847
+ </xsl:call-template>
5802
5848
 
5803
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
5804
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5805
- <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
5806
- </xsl:if>
5807
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
5808
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5809
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
5810
- </xsl:if> -->
5849
+ <xsl:call-template name="setTableCellAttributes"/>
5811
5850
 
5812
5851
  <fo:block>
5813
5852
  <xsl:apply-templates/>
@@ -5819,37 +5858,15 @@
5819
5858
  <xsl:attribute name="padding">0mm</xsl:attribute>
5820
5859
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
5821
5860
  </xsl:if>
5822
- <xsl:attribute name="text-align">
5823
- <xsl:choose>
5824
- <xsl:when test="@align">
5825
- <xsl:value-of select="@align"/>
5826
- </xsl:when>
5827
- <xsl:otherwise>left</xsl:otherwise>
5828
- </xsl:choose>
5829
- </xsl:attribute>
5861
+ <xsl:call-template name="setTextAlignment">
5862
+ <xsl:with-param name="default">left</xsl:with-param>
5863
+ </xsl:call-template>
5864
+
5830
5865
  <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
5831
5866
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5832
5867
  </xsl:if>
5833
- <xsl:if test="@colspan">
5834
- <xsl:attribute name="number-columns-spanned">
5835
- <xsl:value-of select="@colspan"/>
5836
- </xsl:attribute>
5837
- </xsl:if>
5838
- <xsl:if test="@rowspan">
5839
- <xsl:attribute name="number-rows-spanned">
5840
- <xsl:value-of select="@rowspan"/>
5841
- </xsl:attribute>
5842
- </xsl:if>
5843
- <xsl:call-template name="display-align"/>
5844
5868
 
5845
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
5846
- <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
5847
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5848
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
5849
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
5850
- </xsl:if>
5851
- </xsl:if> -->
5852
- <!-- 2nd line and below -->
5869
+ <xsl:call-template name="setTableCellAttributes"/>
5853
5870
 
5854
5871
  <fo:block>
5855
5872
  <xsl:apply-templates/>
@@ -5863,15 +5880,15 @@
5863
5880
  <xsl:apply-templates/>
5864
5881
  </fo:block>
5865
5882
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
5866
- <fo:block> <!-- margin-bottom="10pt" -->
5883
+ <fo:block>
5867
5884
  <xsl:apply-templates/>
5868
5885
  </fo:block>
5869
5886
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
5870
5887
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
5871
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5872
- <xsl:apply-templates/>
5888
+ <xsl:apply-templates select="*[local-name()='name']"/>
5889
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5873
5890
  </fo:block>
5874
- </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
5891
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
5875
5892
  <xsl:if test="normalize-space() != ''">
5876
5893
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
5877
5894
  <xsl:apply-templates/>
@@ -5897,9 +5914,7 @@
5897
5914
 
5898
5915
  <xsl:variable name="fo_element">
5899
5916
  <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
5900
-
5901
5917
  inline
5902
-
5903
5918
  </xsl:variable>
5904
5919
 
5905
5920
  <!-- display 'EXAMPLE' -->
@@ -5972,6 +5987,8 @@
5972
5987
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
5973
5988
  <fo:block xsl:use-attribute-sets="termsource-style">
5974
5989
 
5990
+
5991
+
5975
5992
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
5976
5993
  <xsl:variable name="termsource_text">
5977
5994
  <xsl:apply-templates/>
@@ -6009,11 +6026,7 @@
6009
6026
  <xsl:value-of select="."/>
6010
6027
  </xsl:if>
6011
6028
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
6012
- <fo:inline>
6013
-
6014
-
6015
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
6016
-
6029
+ <fo:inline xsl:use-attribute-sets="termsource-text-style">
6017
6030
  <xsl:value-of select="."/>
6018
6031
  </fo:inline>
6019
6032
  </xsl:template><xsl:template match="*[local-name() = 'origin']">
@@ -6056,7 +6069,6 @@
6056
6069
  <fo:block-container margin-left="0mm">
6057
6070
 
6058
6071
  <fo:block xsl:use-attribute-sets="quote-style">
6059
- <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
6060
6072
 
6061
6073
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
6062
6074
  </fo:block>
@@ -6099,15 +6111,13 @@
6099
6111
  </xsl:variable>
6100
6112
 
6101
6113
  <xsl:choose>
6102
- <xsl:when test="normalize-space($bibitemid) != ''">
6114
+ <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
6103
6115
  <fo:inline xsl:use-attribute-sets="eref-style">
6104
6116
  <xsl:if test="@type = 'footnote'">
6105
-
6106
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
6107
- <xsl:attribute name="font-size">80%</xsl:attribute>
6108
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
6109
- <xsl:attribute name="vertical-align">super</xsl:attribute>
6110
-
6117
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
6118
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
6119
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
6120
+ <xsl:attribute name="font-size">80%</xsl:attribute>
6111
6121
 
6112
6122
  </xsl:if>
6113
6123
 
@@ -6124,8 +6134,6 @@
6124
6134
 
6125
6135
 
6126
6136
 
6127
-
6128
-
6129
6137
  </xsl:if>
6130
6138
 
6131
6139
 
@@ -6183,8 +6191,6 @@
6183
6191
  </xsl:choose>
6184
6192
  </xsl:variable>
6185
6193
 
6186
- <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
6187
-
6188
6194
  <xsl:choose>
6189
6195
  <xsl:when test="$lang = 'zh'">
6190
6196
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -6240,7 +6246,6 @@
6240
6246
  <xsl:apply-templates/>
6241
6247
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
6242
6248
  <fo:inline> <xsl:apply-templates/></fo:inline>
6243
- <!-- <fo:block>&#xA0;</fo:block> -->
6244
6249
  <fo:block/>
6245
6250
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
6246
6251
 
@@ -6281,11 +6286,6 @@
6281
6286
  <xsl:apply-templates/>
6282
6287
  </fo:block>
6283
6288
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
6284
- <fo:block id="{@id}">
6285
- <xsl:apply-templates/>
6286
- </fo:block>
6287
- </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']">
6288
-
6289
6289
  <fo:block id="{@id}">
6290
6290
  <xsl:apply-templates/>
6291
6291
  </fo:block>
@@ -6553,174 +6553,215 @@
6553
6553
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
6554
6554
  <fo:block><xsl:apply-templates/></fo:block>
6555
6555
  </fo:table-cell>
6556
- </xsl:template><xsl:template name="processBibitem">
6557
-
6558
-
6559
-
6560
-
6556
+ </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() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/><xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
6561
6557
 
6562
6558
 
6563
6559
 
6560
+ <fo:block id="{@id}">
6561
+ <xsl:apply-templates/>
6562
+ </fo:block>
6563
+ </xsl:template><xsl:template match="*[local-name() = 'references']">
6564
+ <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
6565
+
6566
+ <fo:block break-after="page"/>
6567
+
6568
+ </xsl:if>
6564
6569
 
6570
+ <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
6571
+ <xsl:if test="$namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'itu'">
6572
+ <fo:block break-after="page"/>
6573
+ </xsl:if>
6574
+ </xsl:if> -->
6565
6575
 
6576
+ <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
6577
+ <xsl:apply-templates/>
6578
+ </fo:block>
6566
6579
 
6567
6580
 
6568
-
6569
6581
 
6570
6582
 
6571
-
6583
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']">
6584
+ <xsl:call-template name="bibitem"/>
6585
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
6572
6586
 
6587
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
6588
+ <xsl:call-template name="processBibitem"/>
6589
+ </fo:block>
6590
+
6573
6591
 
6592
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
6593
+
6594
+ <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
6595
+ $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
6596
+ <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
6597
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
6598
+ <fo:list-item>
6599
+ <fo:list-item-label end-indent="label-end()">
6600
+ <fo:block>
6601
+ <fo:inline>
6602
+
6603
+ <xsl:number format="1."/>
6604
+
6605
+ </fo:inline>
6606
+ </fo:block>
6607
+ </fo:list-item-label>
6608
+ <fo:list-item-body start-indent="body-start()">
6609
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style">
6610
+ <xsl:call-template name="processBibitem"/>
6611
+ </fo:block>
6612
+ </fo:list-item-body>
6613
+ </fo:list-item>
6614
+ </fo:list-block>
6615
+
6574
6616
 
6575
- <!-- end MPFD bibitem processing -->
6576
-
6577
- <!-- start M3D bibitem processing -->
6578
-
6617
+ </xsl:template><xsl:template name="processBibitem">
6579
6618
 
6580
6619
 
6581
- <!-- start OGC bibtem processing -->
6582
- <xsl:choose>
6583
- <xsl:when test="*[local-name() = 'formattedref']">
6584
- <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
6585
- </xsl:when>
6586
- <xsl:otherwise>
6587
- <xsl:variable name="personalAuthors">
6588
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person']">
6589
- <xsl:call-template name="processPersonalAuthor"/>
6590
- </xsl:for-each>
6591
- <xsl:if test="not(*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person'])">
6592
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='editor']/*[local-name() = 'person']">
6620
+ <!-- start OGC bibitem processing -->
6621
+ <xsl:if test=".//ogc:fn">
6622
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
6623
+ </xsl:if>
6624
+ <xsl:choose>
6625
+ <xsl:when test="*[local-name() = 'formattedref']">
6626
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
6627
+ </xsl:when>
6628
+ <xsl:otherwise>
6629
+ <xsl:variable name="personalAuthors">
6630
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person']">
6593
6631
  <xsl:call-template name="processPersonalAuthor"/>
6594
6632
  </xsl:for-each>
6595
- </xsl:if>
6596
- </xsl:variable>
6597
-
6598
- <xsl:variable name="city" select="*[local-name() = 'place']"/>
6599
- <xsl:variable name="year">
6633
+ <xsl:if test="not(*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person'])">
6634
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='editor']/*[local-name() = 'person']">
6635
+ <xsl:call-template name="processPersonalAuthor"/>
6636
+ </xsl:for-each>
6637
+ </xsl:if>
6638
+ </xsl:variable>
6639
+
6640
+ <xsl:variable name="city" select="*[local-name() = 'place']"/>
6641
+ <xsl:variable name="year">
6642
+ <xsl:choose>
6643
+ <xsl:when test="*[local-name() = 'date'][@type = 'published']">
6644
+ <xsl:for-each select="*[local-name() = 'date'][@type = 'published']">
6645
+ <xsl:call-template name="renderDate"/>
6646
+ </xsl:for-each>
6647
+ </xsl:when>
6648
+ <xsl:when test="*[local-name() = 'date'][@type = 'issued']">
6649
+ <xsl:for-each select="*[local-name() = 'date'][@type = 'issued']">
6650
+ <xsl:call-template name="renderDate"/>
6651
+ </xsl:for-each>
6652
+ </xsl:when>
6653
+ <xsl:when test="*[local-name() = 'date'][@type = 'circulated']">
6654
+ <xsl:for-each select="*[local-name() = 'date'][@type = 'circulated']">
6655
+ <xsl:call-template name="renderDate"/>
6656
+ </xsl:for-each>
6657
+ </xsl:when>
6658
+ <xsl:otherwise>
6659
+ <xsl:for-each select="*[local-name() = 'date']">
6660
+ <xsl:call-template name="renderDate"/>
6661
+ </xsl:for-each>
6662
+ </xsl:otherwise>
6663
+ </xsl:choose>
6664
+ </xsl:variable>
6665
+
6666
+ <xsl:variable name="uri" select="*[local-name() = 'uri']"/>
6667
+
6668
+
6669
+ <!-- citation structure:
6670
+ {personal names | organisation}: {document identifier}, {title}. {publisher}, {city} ({year})
6671
+ -->
6672
+
6673
+ <!-- Author(s) -->
6600
6674
  <xsl:choose>
6601
- <xsl:when test="*[local-name() = 'date'][@type = 'published']">
6602
- <xsl:for-each select="*[local-name() = 'date'][@type = 'published']">
6603
- <xsl:call-template name="renderDate"/>
6604
- </xsl:for-each>
6675
+ <xsl:when test="xalan:nodeset($personalAuthors)//author">
6676
+ <xsl:for-each select="xalan:nodeset($personalAuthors)//author">
6677
+ <xsl:apply-templates/>
6678
+ <xsl:if test="position() != last()">, </xsl:if>
6679
+ </xsl:for-each>
6680
+ <xsl:text>: </xsl:text>
6681
+ </xsl:when>
6682
+ <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
6683
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
6684
+ <xsl:value-of select="."/>
6685
+ <xsl:if test="position() != last()">/</xsl:if>
6686
+ </xsl:for-each>
6687
+ <xsl:text>: </xsl:text>
6605
6688
  </xsl:when>
6606
- <xsl:when test="*[local-name() = 'date'][@type = 'issued']">
6607
- <xsl:for-each select="*[local-name() = 'date'][@type = 'issued']">
6608
- <xsl:call-template name="renderDate"/>
6689
+ <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6690
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6691
+ <xsl:value-of select="."/>
6692
+ <xsl:if test="position() != last()">, </xsl:if>
6609
6693
  </xsl:for-each>
6694
+ <xsl:text>: </xsl:text>
6610
6695
  </xsl:when>
6611
- <xsl:when test="*[local-name() = 'date'][@type = 'circulated']">
6612
- <xsl:for-each select="*[local-name() = 'date'][@type = 'circulated']">
6613
- <xsl:call-template name="renderDate"/>
6614
- </xsl:for-each>
6696
+ </xsl:choose>
6697
+
6698
+
6699
+ <xsl:variable name="document_identifier">
6700
+ <xsl:call-template name="processBibitemDocId"/>
6701
+ </xsl:variable>
6702
+
6703
+ <xsl:value-of select="$document_identifier"/>
6704
+
6705
+ <xsl:apply-templates select="*[local-name() = 'note']"/>
6706
+
6707
+ <xsl:variable name="isDraft">
6708
+ <xsl:variable name="stage" select="normalize-space(*[local-name() = 'status']/*[local-name() = 'stage'])"/>
6709
+ <xsl:if test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization'][*[local-name() = 'name']/text() = 'Open Geospatial Consortium'] and $stage != '' and $stage != 'published' and $stage != 'deprecated' and $stage != 'retired'">true</xsl:if>
6710
+ </xsl:variable>
6711
+
6712
+ <xsl:if test="$isDraft = 'true'">
6713
+ <xsl:text> (Draft)</xsl:text>
6714
+ </xsl:if>
6715
+
6716
+ <xsl:text>, </xsl:text>
6717
+
6718
+ <xsl:choose>
6719
+ <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = 'en']">
6720
+ <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
6615
6721
  </xsl:when>
6616
6722
  <xsl:otherwise>
6617
- <xsl:for-each select="*[local-name() = 'date']">
6618
- <xsl:call-template name="renderDate"/>
6619
- </xsl:for-each>
6723
+ <xsl:apply-templates select="*[local-name() = 'title']"/>
6620
6724
  </xsl:otherwise>
6621
6725
  </xsl:choose>
6622
- </xsl:variable>
6623
-
6624
- <xsl:variable name="uri" select="*[local-name() = 'uri']"/>
6625
-
6626
-
6627
- <!-- citation structure:
6628
- {personal names | organisation}: {document identifier}, {title}. {publisher}, {city} ({year})
6629
- -->
6630
-
6631
- <!-- Author(s) -->
6632
- <xsl:choose>
6633
- <xsl:when test="xalan:nodeset($personalAuthors)//author">
6634
- <xsl:for-each select="xalan:nodeset($personalAuthors)//author">
6635
- <xsl:apply-templates/>
6636
- <xsl:if test="position() != last()">, </xsl:if>
6637
- </xsl:for-each>
6638
- <xsl:text>: </xsl:text>
6639
- </xsl:when>
6640
- <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
6641
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
6642
- <xsl:value-of select="."/>
6643
- <xsl:if test="position() != last()">/</xsl:if>
6644
- </xsl:for-each>
6645
- <xsl:text>: </xsl:text>
6646
- </xsl:when>
6647
- <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6726
+
6727
+ <xsl:text>. </xsl:text>
6728
+
6729
+ <xsl:if test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6648
6730
  <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6649
6731
  <xsl:value-of select="."/>
6650
6732
  <xsl:if test="position() != last()">, </xsl:if>
6651
6733
  </xsl:for-each>
6652
- <xsl:text>: </xsl:text>
6653
- </xsl:when>
6654
- </xsl:choose>
6655
-
6656
-
6657
- <xsl:variable name="document_identifier">
6658
- <xsl:call-template name="processBibitemDocId"/>
6659
- </xsl:variable>
6660
-
6661
- <xsl:value-of select="$document_identifier"/>
6662
-
6663
- <xsl:apply-templates select="*[local-name() = 'note']"/>
6664
-
6665
- <xsl:variable name="isDraft">
6666
- <xsl:variable name="stage" select="normalize-space(*[local-name() = 'status']/*[local-name() = 'stage'])"/>
6667
- <xsl:if test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization'][*[local-name() = 'name']/text() = 'Open Geospatial Consortium'] and $stage != '' and $stage != 'published' and $stage != 'deprecated' and $stage != 'retired'">true</xsl:if>
6668
- </xsl:variable>
6669
-
6670
- <xsl:if test="$isDraft = 'true'">
6671
- <xsl:text> (Draft)</xsl:text>
6672
- </xsl:if>
6673
-
6674
- <xsl:text>, </xsl:text>
6675
-
6676
- <xsl:choose>
6677
- <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = 'en']">
6678
- <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
6679
- </xsl:when>
6680
- <xsl:otherwise>
6681
- <xsl:apply-templates select="*[local-name() = 'title']"/>
6682
- </xsl:otherwise>
6683
- </xsl:choose>
6684
-
6685
- <xsl:text>. </xsl:text>
6686
-
6687
- <xsl:if test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6688
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6689
- <xsl:value-of select="."/>
6690
- <xsl:if test="position() != last()">, </xsl:if>
6691
- </xsl:for-each>
6692
- <xsl:if test="normalize-space($city) != ''">, </xsl:if>
6693
- </xsl:if>
6694
-
6695
- <xsl:value-of select="$city"/>
6696
-
6697
- <xsl:if test="(*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name'] or normalize-space($city) != '') and normalize-space($year) != ''">
6698
- <xsl:text> </xsl:text>
6699
- </xsl:if>
6700
-
6701
- <xsl:if test="normalize-space($year) != ''">
6702
- <xsl:text>(</xsl:text>
6703
- <xsl:value-of select="$year"/>
6704
- <xsl:text>). </xsl:text>
6705
- </xsl:if>
6706
-
6707
- <xsl:if test="normalize-space($uri) != ''">
6708
- <fo:inline>
6709
-
6710
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
6711
-
6734
+ <xsl:if test="normalize-space($city) != ''">, </xsl:if>
6735
+ </xsl:if>
6736
+
6737
+ <xsl:value-of select="$city"/>
6738
+
6739
+ <xsl:if test="(*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name'] or normalize-space($city) != '') and normalize-space($year) != ''">
6712
6740
  <xsl:text> </xsl:text>
6713
- <fo:basic-link external-destination="{$uri}" fox:alt-text="{$uri}">
6714
- <xsl:value-of select="$uri"/>
6715
- </fo:basic-link>
6716
- </fo:inline>
6717
- </xsl:if>
6718
-
6719
- </xsl:otherwise>
6720
- </xsl:choose>
6721
- <!-- end OGC bibitem processing-->
6722
-
6723
-
6741
+ </xsl:if>
6742
+
6743
+ <xsl:if test="normalize-space($year) != ''">
6744
+ <xsl:text>(</xsl:text>
6745
+ <xsl:value-of select="$year"/>
6746
+ <xsl:text>). </xsl:text>
6747
+ </xsl:if>
6748
+
6749
+ <xsl:if test="normalize-space($uri) != ''">
6750
+ <fo:inline>
6751
+
6752
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
6753
+
6754
+ <xsl:text> </xsl:text>
6755
+ <fo:basic-link external-destination="{$uri}" fox:alt-text="{$uri}">
6756
+ <xsl:value-of select="$uri"/>
6757
+ </fo:basic-link>
6758
+ </fo:inline>
6759
+ </xsl:if>
6760
+
6761
+ </xsl:otherwise>
6762
+ </xsl:choose>
6763
+ <!-- end OGC bibitem processing-->
6764
+
6724
6765
  </xsl:template><xsl:template name="processBibitemDocId">
6725
6766
  <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
6726
6767
  <xsl:choose>
@@ -6777,6 +6818,55 @@
6777
6818
  <xsl:value-of select="substring(.,1,1)"/>
6778
6819
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
6779
6820
  <fo:inline><xsl:apply-templates/></fo:inline>
6821
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
6822
+ <!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
6823
+ <fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
6824
+ <xsl:apply-templates/>
6825
+ </fo:inline>
6826
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
6827
+ <fo:footnote>
6828
+ <xsl:variable name="number">
6829
+
6830
+ <xsl:choose>
6831
+ <xsl:when test="ancestor::*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]">
6832
+ <xsl:number level="any" count="*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]//*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
6833
+ </xsl:when>
6834
+ <xsl:otherwise>
6835
+ <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
6836
+ </xsl:otherwise>
6837
+ </xsl:choose>
6838
+
6839
+ </xsl:variable>
6840
+ <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
6841
+ <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
6842
+ <xsl:value-of select="$number"/>
6843
+
6844
+ </fo:basic-link>
6845
+ </fo:inline>
6846
+ <fo:footnote-body>
6847
+ <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
6848
+ <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
6849
+ <xsl:value-of select="$number"/>
6850
+
6851
+ </fo:inline>
6852
+ <xsl:apply-templates/>
6853
+ </fo:block>
6854
+ </fo:footnote-body>
6855
+ </fo:footnote>
6856
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
6857
+ <xsl:text> edition </xsl:text>
6858
+ <xsl:value-of select="."/>
6859
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
6860
+ <xsl:text> (</xsl:text>
6861
+ <fo:inline xsl:use-attribute-sets="link-style">
6862
+ <fo:basic-link external-destination="." fox:alt-text=".">
6863
+ <xsl:value-of select="."/>
6864
+ </fo:basic-link>
6865
+ </fo:inline>
6866
+ <xsl:text>)</xsl:text>
6867
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/><xsl:template match="*[local-name() = 'formattedref']">
6868
+
6869
+ <xsl:apply-templates/>
6780
6870
  </xsl:template><xsl:template match="*[local-name() = 'form']">
6781
6871
  <fo:block>
6782
6872
  <xsl:apply-templates/>
@@ -6849,24 +6939,7 @@
6849
6939
  <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
6850
6940
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
6851
6941
  <xsl:otherwise><!-- default value -->
6852
-
6853
-
6854
-
6855
-
6856
-
6857
-
6858
-
6859
-
6860
-
6861
-
6862
-
6863
-
6864
-
6865
6942
  2
6866
-
6867
-
6868
-
6869
-
6870
6943
  </xsl:otherwise>
6871
6944
  </xsl:choose>
6872
6945
  </xsl:variable><xsl:template match="*[local-name() = 'toc']">
@@ -6964,6 +7037,62 @@
6964
7037
  <xsl:copy-of select="."/>
6965
7038
  </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
6966
7039
  <xsl:call-template name="title"/>
7040
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']">
7041
+
7042
+
7043
+
7044
+
7045
+
7046
+ <!-- text in the box -->
7047
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
7048
+
7049
+
7050
+
7051
+
7052
+
7053
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style">
7054
+
7055
+
7056
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
7057
+ <xsl:call-template name="displayAdmonitionName"/>
7058
+ </fo:block>
7059
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
7060
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7061
+ </fo:block>
7062
+
7063
+ </fo:block-container>
7064
+
7065
+ </fo:block-container>
7066
+
7067
+ </xsl:template><xsl:template name="displayAdmonitionName">
7068
+
7069
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
7070
+ <xsl:if test="not(*[local-name() = 'name'])">
7071
+ <xsl:apply-templates select="@type"/>
7072
+ </xsl:if>
7073
+
7074
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
7075
+ <xsl:apply-templates/>
7076
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
7077
+ <xsl:variable name="admonition_type_">
7078
+ <xsl:call-template name="getLocalizedString">
7079
+ <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
7080
+ </xsl:call-template>
7081
+ </xsl:variable>
7082
+ <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
7083
+ <xsl:value-of select="$admonition_type"/>
7084
+ <xsl:if test="$admonition_type = ''">
7085
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
7086
+ </xsl:if>
7087
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
7088
+
7089
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
7090
+
7091
+
7092
+
7093
+ <xsl:apply-templates/>
7094
+ </fo:block>
7095
+
6967
7096
  </xsl:template><xsl:template name="convertDate">
6968
7097
  <xsl:param name="date"/>
6969
7098
  <xsl:param name="format" select="'short'"/>
@@ -6972,78 +7101,39 @@
6972
7101
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
6973
7102
  <xsl:variable name="monthStr">
6974
7103
  <xsl:choose>
6975
- <xsl:when test="$month = '01'">January</xsl:when>
6976
- <xsl:when test="$month = '02'">February</xsl:when>
6977
- <xsl:when test="$month = '03'">March</xsl:when>
6978
- <xsl:when test="$month = '04'">April</xsl:when>
6979
- <xsl:when test="$month = '05'">May</xsl:when>
6980
- <xsl:when test="$month = '06'">June</xsl:when>
6981
- <xsl:when test="$month = '07'">July</xsl:when>
6982
- <xsl:when test="$month = '08'">August</xsl:when>
6983
- <xsl:when test="$month = '09'">September</xsl:when>
6984
- <xsl:when test="$month = '10'">October</xsl:when>
6985
- <xsl:when test="$month = '11'">November</xsl:when>
6986
- <xsl:when test="$month = '12'">December</xsl:when>
6987
- </xsl:choose>
6988
- </xsl:variable>
6989
- <xsl:variable name="result">
6990
- <xsl:choose>
6991
- <xsl:when test="$format = 'ddMMyyyy'">
6992
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6993
- <xsl:text> </xsl:text>
6994
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
6995
- </xsl:when>
6996
- <xsl:when test="$format = 'ddMM'">
6997
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6998
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
6999
- </xsl:when>
7000
- <xsl:when test="$format = 'short' or $day = ''">
7001
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
7002
- </xsl:when>
7003
- <xsl:otherwise>
7004
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
7005
- </xsl:otherwise>
7104
+ <xsl:when test="$month = '01'">january</xsl:when>
7105
+ <xsl:when test="$month = '02'">february</xsl:when>
7106
+ <xsl:when test="$month = '03'">march</xsl:when>
7107
+ <xsl:when test="$month = '04'">april</xsl:when>
7108
+ <xsl:when test="$month = '05'">may</xsl:when>
7109
+ <xsl:when test="$month = '06'">june</xsl:when>
7110
+ <xsl:when test="$month = '07'">july</xsl:when>
7111
+ <xsl:when test="$month = '08'">august</xsl:when>
7112
+ <xsl:when test="$month = '09'">september</xsl:when>
7113
+ <xsl:when test="$month = '10'">october</xsl:when>
7114
+ <xsl:when test="$month = '11'">november</xsl:when>
7115
+ <xsl:when test="$month = '12'">december</xsl:when>
7006
7116
  </xsl:choose>
7007
7117
  </xsl:variable>
7008
- <xsl:value-of select="$result"/>
7009
- </xsl:template><xsl:template name="convertDateLocalized">
7010
- <xsl:param name="date"/>
7011
- <xsl:param name="format" select="'short'"/>
7012
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
7013
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
7014
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
7015
- <xsl:variable name="monthStr">
7016
- <xsl:choose>
7017
- <xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
7018
- <xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
7019
- <xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
7020
- <xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
7021
- <xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
7022
- <xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
7023
- <xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
7024
- <xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
7025
- <xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
7026
- <xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
7027
- <xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
7028
- <xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
7029
- </xsl:choose>
7118
+ <xsl:variable name="monthStr_localized">
7119
+ <xsl:if test="normalize-space($monthStr) != ''"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param></xsl:call-template></xsl:if>
7030
7120
  </xsl:variable>
7031
7121
  <xsl:variable name="result">
7032
7122
  <xsl:choose>
7033
7123
  <xsl:when test="$format = 'ddMMyyyy'">
7034
7124
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
7035
7125
  <xsl:text> </xsl:text>
7036
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
7126
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
7037
7127
  </xsl:when>
7038
7128
  <xsl:when test="$format = 'ddMM'">
7039
7129
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
7040
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
7130
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr_localized"/>
7041
7131
  </xsl:when>
7042
7132
  <xsl:when test="$format = 'short' or $day = ''">
7043
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
7133
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
7044
7134
  </xsl:when>
7045
7135
  <xsl:otherwise>
7046
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
7136
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
7047
7137
  </xsl:otherwise>
7048
7138
  </xsl:choose>
7049
7139
  </xsl:variable>
@@ -7095,14 +7185,9 @@
7095
7185
  <dc:title>
7096
7186
  <xsl:variable name="title">
7097
7187
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
7098
-
7099
-
7100
-
7101
-
7102
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
7103
-
7104
-
7105
7188
 
7189
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
7190
+
7106
7191
  </xsl:for-each>
7107
7192
  </xsl:variable>
7108
7193
  <xsl:choose>
@@ -7117,21 +7202,18 @@
7117
7202
  <dc:creator>
7118
7203
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
7119
7204
 
7120
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
7121
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
7122
- <xsl:if test="position() != last()">; </xsl:if>
7123
- </xsl:for-each>
7124
-
7125
-
7126
-
7205
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
7206
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
7207
+ <xsl:if test="position() != last()">; </xsl:if>
7208
+ </xsl:for-each>
7209
+
7127
7210
  </xsl:for-each>
7128
7211
  </dc:creator>
7129
7212
  <dc:description>
7130
7213
  <xsl:variable name="abstract">
7131
7214
 
7132
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
7133
-
7134
-
7215
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
7216
+
7135
7217
  </xsl:variable>
7136
7218
  <xsl:value-of select="normalize-space($abstract)"/>
7137
7219
  </dc:description>
@@ -7151,7 +7233,6 @@
7151
7233
  <xsl:value-of select="../@id"/>
7152
7234
  </xsl:when>
7153
7235
  <xsl:otherwise>
7154
- <!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
7155
7236
  <xsl:value-of select="concat(generate-id(..), '_', text())"/>
7156
7237
  </xsl:otherwise>
7157
7238
  </xsl:choose>
@@ -7177,9 +7258,6 @@
7177
7258
  <xsl:when test="ancestor::*[local-name() = 'preface']">
7178
7259
  <xsl:value-of select="$level_total - 2"/>
7179
7260
  </xsl:when>
7180
- <!-- <xsl:when test="parent::*[local-name() = 'sections']">
7181
- <xsl:value-of select="$level_total - 1"/>
7182
- </xsl:when> -->
7183
7261
  <xsl:when test="ancestor::*[local-name() = 'sections']">
7184
7262
  <xsl:value-of select="$level_total - 1"/>
7185
7263
  </xsl:when>
@@ -7369,7 +7447,6 @@
7369
7447
  <xsl:value-of select="$key_"/>
7370
7448
  </xsl:otherwise>
7371
7449
  </xsl:choose>
7372
-
7373
7450
  </xsl:template><xsl:template name="setTrackChangesStyles">
7374
7451
  <xsl:param name="isAdded"/>
7375
7452
  <xsl:param name="isDeleted"/>
@@ -7392,7 +7469,6 @@
7392
7469
  <xsl:if test="local-name() = 'table'">
7393
7470
  <xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
7394
7471
  </xsl:if>
7395
- <!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
7396
7472
  <xsl:attribute name="padding">2mm</xsl:attribute>
7397
7473
  </xsl:if>
7398
7474
  </xsl:otherwise>
@@ -7412,15 +7488,18 @@
7412
7488
  </xsl:choose>
7413
7489
  </xsl:template><xsl:template name="setTextAlignment">
7414
7490
  <xsl:param name="default">left</xsl:param>
7491
+ <xsl:variable name="align" select="normalize-space(@align)"/>
7415
7492
  <xsl:attribute name="text-align">
7416
7493
  <xsl:choose>
7417
- <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
7494
+ <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
7495
+ <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
7496
+ <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
7418
7497
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
7419
7498
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
7420
7499
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
7421
7500
  </xsl:choose>
7422
7501
  </xsl:attribute>
7423
- <xsl:if test="@align = 'indent'">
7502
+ <xsl:if test="$align = 'indent'">
7424
7503
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
7425
7504
  </xsl:if>
7426
7505
  </xsl:template><xsl:template name="number-to-words">