metanorma-csd 1.3.22 → 1.3.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9731422cabaf4d2679598ac2116e59132e05ead295ead2f028319e0ca0364516
4
- data.tar.gz: 2bd813ddfdfa80abde150352a06b3db26e27845574683dcccb14cd9ed9d61ae4
3
+ metadata.gz: 924081990582e936da18b6acda86776f2923e710eea083d5d6bb73e0b40030e7
4
+ data.tar.gz: 5e817fb39293f074fc9718c9c0e4b6bcb3e91082633db7240c2a405d8248b815
5
5
  SHA512:
6
- metadata.gz: 0350cba2c643aac7919e9921684c7e19af2db037bdc986c46e68d0decd17b033ccecaf169655de82374bc148827bff29624f22cbf9cabd32b1461895ae54ab70
7
- data.tar.gz: fad0c14fe07eccab543e307bfe651e500c27f5ef9910a928b755ef0cb37b4a3a1dbd94c357f83ee3cc92bb744b2c93320b4abea015a5283c50c171c4c091c223
6
+ metadata.gz: b9b05300d75a5f35c1537541a7e40962d75dcf8c64ebdef8c5f6b976a493fcd7ab65f14318c219a3391e245eba72c081351ce31eb3bdfcf2d9470c82862706d3
7
+ data.tar.gz: 86d4a7465ef8cd2ea9efb95c71d8fa3b727d4b95090aa5553241f3a11dbe3c46fee26d50faa847bc51f0bd7d320bc619fc45ff84024513a9aa2747c383bf6eec
@@ -661,9 +661,9 @@
661
661
  <optional>
662
662
  <ref name="status"/>
663
663
  </optional>
664
- <optional>
664
+ <zeroOrMore>
665
665
  <ref name="copyright"/>
666
- </optional>
666
+ </zeroOrMore>
667
667
  <zeroOrMore>
668
668
  <ref name="docrelation"/>
669
669
  </zeroOrMore>
@@ -1021,7 +1021,17 @@
1021
1021
  <optional>
1022
1022
  <ref name="to"/>
1023
1023
  </optional>
1024
- <ref name="owner"/>
1024
+ <oneOrMore>
1025
+ <ref name="owner"/>
1026
+ </oneOrMore>
1027
+ <optional>
1028
+ <ref name="copyright_scope"/>
1029
+ </optional>
1030
+ </element>
1031
+ </define>
1032
+ <define name="copyright_scope">
1033
+ <element name="scope">
1034
+ <text/>
1025
1035
  </element>
1026
1036
  </define>
1027
1037
  <define name="from">
@@ -53,6 +53,14 @@
53
53
  <optional>
54
54
  <attribute name="alt"/>
55
55
  </optional>
56
+ <optional>
57
+ <attribute name="case">
58
+ <choice>
59
+ <value>capital</value>
60
+ <value>lowercase</value>
61
+ </choice>
62
+ </attribute>
63
+ </optional>
56
64
  <text/>
57
65
  </element>
58
66
  </define>
@@ -902,7 +910,15 @@
902
910
  <attribute name="id">
903
911
  <data type="ID"/>
904
912
  </attribute>
905
- <ref name="paragraph"/>
913
+ <oneOrMore>
914
+ <choice>
915
+ <ref name="paragraph"/>
916
+ <ref name="ul"/>
917
+ <ref name="ol"/>
918
+ <ref name="dl"/>
919
+ <ref name="formula"/>
920
+ </choice>
921
+ </oneOrMore>
906
922
  </element>
907
923
  </define>
908
924
  <define name="termexample">
@@ -145,7 +145,9 @@
145
145
  </xsl:variable>
146
146
  <xsl:value-of select="normalize-space($abstract)"/>
147
147
  </dc:description>
148
- <pdf:Keywords/>
148
+ <pdf:Keywords>
149
+ <xsl:call-template name="insertKeywords"/>
150
+ </pdf:Keywords>
149
151
  </rdf:Description>
150
152
  <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
151
153
  <!-- XMP properties go here -->
@@ -1126,60 +1128,6 @@
1126
1128
  </fo:basic-link>
1127
1129
  </xsl:template>
1128
1130
 
1129
- <xsl:template match="csd:appendix">
1130
- <fo:block font-size="12pt" font-weight="bold" margin-top="12pt" margin-bottom="12pt">
1131
- <fo:inline padding-right="5mm">Appendix <xsl:number/></fo:inline>
1132
- <xsl:apply-templates select="csd:title" mode="process"/>
1133
- </fo:block>
1134
- <xsl:apply-templates/>
1135
- </xsl:template>
1136
-
1137
- <xsl:template match="csd:appendix//csd:example">
1138
- <fo:block font-size="10pt" margin-bottom="12pt">
1139
- <xsl:text>EXAMPLE</xsl:text>
1140
- <xsl:if test="csd:name">
1141
- <xsl:text> — </xsl:text><xsl:apply-templates select="csd:name" mode="process"/>
1142
- </xsl:if>
1143
- </fo:block>
1144
- <xsl:apply-templates/>
1145
- </xsl:template>
1146
-
1147
- <xsl:template match="csd:appendix//csd:example/csd:name"/>
1148
- <xsl:template match="csd:appendix//csd:example/csd:name" mode="process">
1149
- <fo:inline><xsl:apply-templates/></fo:inline>
1150
- </xsl:template>
1151
-
1152
- <!-- <xsl:template match="csd:callout/text()">
1153
- <fo:basic-link internal-destination="{@target}"><fo:inline>&lt;<xsl:apply-templates />&gt;</fo:inline></fo:basic-link>
1154
- </xsl:template> -->
1155
- <xsl:template match="csd:callout">
1156
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
1157
- </xsl:template>
1158
-
1159
- <xsl:template match="csd:annotation">
1160
- <fo:block>
1161
-
1162
- </fo:block>
1163
- <xsl:apply-templates/>
1164
- </xsl:template>
1165
-
1166
- <xsl:template match="csd:annotation/text()"/>
1167
-
1168
- <xsl:template match="csd:annotation/csd:p">
1169
- <xsl:variable name="annotation-id" select="../@id"/>
1170
- <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
1171
- <fo:block id="{$annotation-id}">
1172
- <xsl:value-of select="concat('&lt;', $callout, '&gt; ')"/>
1173
- <xsl:apply-templates/>
1174
- </fo:block>
1175
- </xsl:template>
1176
-
1177
-
1178
- <xsl:template match="csd:appendix/csd:title"/>
1179
- <xsl:template match="csd:appendix/csd:title" mode="process">
1180
- <fo:inline><xsl:apply-templates/></fo:inline>
1181
- </xsl:template>
1182
-
1183
1131
 
1184
1132
  <xsl:template match="csd:xref">
1185
1133
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">
@@ -1199,16 +1147,8 @@
1199
1147
  </fo:basic-link>
1200
1148
  </xsl:template>
1201
1149
 
1202
- <xsl:template match="csd:sourcecode">
1203
- <fo:block font-family="SourceCodePro" font-size="10pt" margin-bottom="6pt" keep-with-next="always">
1204
- <xsl:choose>
1205
- <xsl:when test="@lang = 'en'"/>
1206
- <xsl:otherwise>
1207
- <xsl:attribute name="white-space">pre</xsl:attribute>
1208
- </xsl:otherwise>
1209
- </xsl:choose>
1210
- <xsl:apply-templates/>
1211
- </fo:block>
1150
+ <xsl:template match="csd:sourcecode" priority="2">
1151
+ <xsl:call-template name="sourcecode"/>
1212
1152
  <fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="12pt">
1213
1153
  <xsl:text>Figure </xsl:text>
1214
1154
  <xsl:number format="1" level="any"/>
@@ -1507,19 +1447,88 @@
1507
1447
  <xsl:value-of select="$section"/>
1508
1448
  </xsl:template>
1509
1449
 
1510
- <xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="linebreak" select="'&#8232;'"/><xsl:attribute-set xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="link-style">
1450
+ <xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-table">
1451
+
1452
+ <xsl:text>Table </xsl:text>
1453
+
1454
+
1455
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-note">
1456
+
1457
+ <xsl:text>NOTE </xsl:text>
1458
+
1459
+
1460
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-figure">
1461
+
1462
+ <xsl:text>Figure </xsl:text>
1463
+
1464
+
1465
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-example">
1466
+
1467
+ <xsl:text>EXAMPLE </xsl:text>
1468
+
1469
+
1470
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-inequality">Inequality </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-equation">Equation </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-annex">
1471
+
1472
+ <xsl:text>Annex </xsl:text>
1473
+
1474
+
1475
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-appendix">
1476
+ <xsl:text>Appendix </xsl:text>
1477
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-clause">
1478
+
1479
+ <xsl:text>Clause </xsl:text>
1480
+
1481
+
1482
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-edition">
1483
+ <xsl:text>Edition </xsl:text>
1484
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-toc">
1485
+
1486
+
1487
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-page">Page</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-key">Key</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-where">where</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-descriptors">Descriptors</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-part-en">Part </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-part-fr">Partie </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-note-to-entry">Note # to entry: </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-modified">modified</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-source">SOURCE</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-keywords">Keywords</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="linebreak" select="'&#8232;'"/><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="link-style">
1511
1488
 
1512
1489
  <xsl:attribute name="color">blue</xsl:attribute>
1513
1490
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1514
1491
 
1515
1492
 
1516
- </xsl:attribute-set><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="text()">
1493
+ </xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="sourcecode-style">
1494
+
1495
+
1496
+
1497
+ <xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
1498
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1499
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1500
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1501
+
1502
+
1503
+
1504
+
1505
+
1506
+
1507
+ </xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="appendix-style">
1508
+
1509
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
1510
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1511
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1512
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1513
+
1514
+
1515
+
1516
+ </xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="appendix-example-style">
1517
+
1518
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1519
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1520
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1521
+
1522
+
1523
+
1524
+ </xsl:attribute-set><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()">
1517
1525
  <xsl:value-of select="."/>
1518
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='br']">
1526
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='br']">
1519
1527
  <xsl:value-of select="$linebreak"/>
1520
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1521
- <xsl:call-template name="add-zero-spaces"/>
1522
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']">
1528
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1529
+ <!-- <xsl:call-template name="add-zero-spaces"/> -->
1530
+ <xsl:call-template name="add-zero-spaces-java"/>
1531
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']">
1523
1532
 
1524
1533
  <xsl:variable name="simple-table">
1525
1534
  <!-- <xsl:copy> -->
@@ -1551,31 +1560,13 @@
1551
1560
 
1552
1561
 
1553
1562
 
1554
- <xsl:text>Table </xsl:text>
1555
- <xsl:choose>
1556
- <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
1557
- <xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
1558
- </xsl:when>
1559
- <xsl:when test="ancestor::*[local-name()='annex']">
1560
-
1561
-
1562
-
1563
-
1564
-
1565
-
1566
-
1567
-
1568
- <xsl:number format="A-1" level="multiple" count="*[local-name()='annex'] | *[local-name()='table'][not(@unnumbered) or @unnumbered != 'true'] "/>
1569
-
1570
- </xsl:when>
1571
- <xsl:otherwise>
1572
-
1573
-
1574
- <xsl:number format="A." count="*[local-name()='annex']"/>
1575
- <xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata'])] [not(@unnumbered) or @unnumbered != 'true']"/>
1576
-
1577
- </xsl:otherwise>
1578
- </xsl:choose>
1563
+
1564
+
1565
+ <xsl:value-of select="$title-table"/>
1566
+
1567
+ <xsl:call-template name="getTableNumber"/>
1568
+
1569
+
1579
1570
  <xsl:if test="*[local-name()='name']">
1580
1571
 
1581
1572
 
@@ -1645,6 +1636,7 @@
1645
1636
 
1646
1637
 
1647
1638
 
1639
+
1648
1640
  <fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
1649
1641
 
1650
1642
 
@@ -1658,9 +1650,10 @@
1658
1650
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1659
1651
 
1660
1652
 
1653
+
1661
1654
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1662
1655
  <xsl:choose>
1663
- <xsl:when test=". = 1">
1656
+ <xsl:when test=". = 1 or . = 0">
1664
1657
  <fo:table-column column-width="proportional-column-width(2)"/>
1665
1658
  </xsl:when>
1666
1659
  <xsl:otherwise>
@@ -1674,15 +1667,40 @@
1674
1667
 
1675
1668
 
1676
1669
  </fo:block-container>
1677
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']/*[local-name()='name']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']/*[local-name()='name']" mode="process">
1670
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getTableNumber">
1671
+ <xsl:choose>
1672
+ <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
1673
+ <xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
1674
+ </xsl:when>
1675
+ <xsl:when test="ancestor::*[local-name()='annex']">
1676
+
1677
+
1678
+
1679
+
1680
+
1681
+
1682
+
1683
+
1684
+ <xsl:number format="A-1" level="multiple" count="*[local-name()='annex'] | *[local-name()='table'][not(@unnumbered) or @unnumbered != 'true'] "/>
1685
+
1686
+ </xsl:when>
1687
+ <xsl:otherwise>
1688
+
1689
+
1690
+ <xsl:number format="A." count="*[local-name()='annex']"/>
1691
+ <xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata'])] [not(@unnumbered) or @unnumbered != 'true']"/>
1692
+
1693
+ </xsl:otherwise>
1694
+ </xsl:choose>
1695
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='name']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='name']" mode="process">
1678
1696
  <xsl:apply-templates/>
1679
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="calculate-columns-numbers">
1697
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="calculate-columns-numbers">
1680
1698
  <xsl:param name="table-row"/>
1681
1699
  <xsl:variable name="columns-count" select="count($table-row/*)"/>
1682
1700
  <xsl:variable name="sum-colspans" select="sum($table-row/*/@colspan)"/>
1683
1701
  <xsl:variable name="columns-with-colspan" select="count($table-row/*[@colspan])"/>
1684
1702
  <xsl:value-of select="$columns-count + $sum-colspans - $columns-with-colspan"/>
1685
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="calculate-column-widths">
1703
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="calculate-column-widths">
1686
1704
  <xsl:param name="table"/>
1687
1705
  <xsl:param name="cols-count"/>
1688
1706
  <xsl:param name="curr-col" select="1"/>
@@ -1691,7 +1709,7 @@
1691
1709
  <xsl:if test="$curr-col &lt;= $cols-count">
1692
1710
  <xsl:variable name="widths">
1693
1711
  <xsl:choose>
1694
- <xsl:when test="not($table)">
1712
+ <xsl:when test="not($table)"><!-- this branch is not using in production, for debug only -->
1695
1713
  <xsl:for-each select="*[local-name()='thead']//*[local-name()='tr']">
1696
1714
  <xsl:variable name="words">
1697
1715
  <xsl:call-template name="tokenize">
@@ -1730,9 +1748,16 @@
1730
1748
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
1731
1749
  </xsl:variable>
1732
1750
  <xsl:variable name="words">
1751
+ <xsl:variable name="string_with_added_zerospaces">
1752
+ <xsl:call-template name="add-zero-spaces-java">
1753
+ <xsl:with-param name="text" select="$td_text"/>
1754
+ </xsl:call-template>
1755
+ </xsl:variable>
1733
1756
  <xsl:call-template name="tokenize">
1734
1757
  <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
1735
- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/>
1758
+ <!-- 2009 thinspace -->
1759
+ <!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
1760
+ <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​', ' '))"/>
1736
1761
  </xsl:call-template>
1737
1762
  </xsl:variable>
1738
1763
  <xsl:variable name="max_length">
@@ -1773,17 +1798,24 @@
1773
1798
  <xsl:with-param name="table" select="$table"/>
1774
1799
  </xsl:call-template>
1775
1800
  </xsl:if>
1776
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="text()" mode="td_text">
1801
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()" mode="td_text">
1777
1802
  <xsl:variable name="zero-space">​</xsl:variable>
1778
1803
  <xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
1779
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table2']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='thead']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='thead']" mode="process">
1804
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='termsource']" mode="td_text">
1805
+ <xsl:value-of select="*[local-name()='origin']/@citeas"/>
1806
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='link']" mode="td_text">
1807
+ <xsl:value-of select="@target"/>
1808
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table2']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='thead']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='thead']" mode="process">
1809
+ <xsl:param name="cols-count"/>
1780
1810
  <!-- font-weight="bold" -->
1781
- <fo:table-header>
1811
+ <fo:table-header>
1812
+
1782
1813
  <xsl:apply-templates/>
1783
1814
  </fo:table-header>
1784
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tfoot']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tfoot']" mode="process">
1815
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tfoot']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tfoot']" mode="process">
1785
1816
  <xsl:apply-templates/>
1786
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="insertTableFooter">
1817
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertTableFooter">
1818
+ <xsl:param name="cols-count"/>
1787
1819
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1788
1820
  <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
1789
1821
 
@@ -1794,22 +1826,7 @@
1794
1826
  <!-- if there are note(s) or fn(s) then create footer row -->
1795
1827
  <xsl:if test="$isNoteOrFnExist = 'true'">
1796
1828
 
1797
- <xsl:variable name="cols-count">
1798
- <xsl:choose>
1799
- <xsl:when test="../*[local-name()='thead']">
1800
- <!-- <xsl:value-of select="count(../*[local-name()='thead']/*[local-name()='tr']/*[local-name()='th'])"/> -->
1801
- <xsl:call-template name="calculate-columns-numbers">
1802
- <xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
1803
- </xsl:call-template>
1804
- </xsl:when>
1805
- <xsl:otherwise>
1806
- <!-- <xsl:value-of select="count(./*[local-name()='tr'][1]/*[local-name()='td'])"/> -->
1807
- <xsl:call-template name="calculate-columns-numbers">
1808
- <xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
1809
- </xsl:call-template>
1810
- </xsl:otherwise>
1811
- </xsl:choose>
1812
- </xsl:variable>
1829
+
1813
1830
 
1814
1831
  <fo:table-row>
1815
1832
  <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
@@ -1837,11 +1854,30 @@
1837
1854
  </fo:table-footer>
1838
1855
 
1839
1856
  </xsl:if>
1840
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tbody']">
1857
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tbody']">
1858
+
1859
+ <xsl:variable name="cols-count">
1860
+ <xsl:choose>
1861
+ <xsl:when test="../*[local-name()='thead']">
1862
+ <xsl:call-template name="calculate-columns-numbers">
1863
+ <xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
1864
+ </xsl:call-template>
1865
+ </xsl:when>
1866
+ <xsl:otherwise>
1867
+ <xsl:call-template name="calculate-columns-numbers">
1868
+ <xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
1869
+ </xsl:call-template>
1870
+ </xsl:otherwise>
1871
+ </xsl:choose>
1872
+ </xsl:variable>
1841
1873
 
1842
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process"/>
1874
+ <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
1875
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1876
+ </xsl:apply-templates>
1843
1877
 
1844
- <xsl:call-template name="insertTableFooter"/>
1878
+ <xsl:call-template name="insertTableFooter">
1879
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1880
+ </xsl:call-template>
1845
1881
 
1846
1882
  <fo:table-body>
1847
1883
  <xsl:apply-templates/>
@@ -1849,7 +1885,7 @@
1849
1885
 
1850
1886
  </fo:table-body>
1851
1887
 
1852
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tr']">
1888
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tr']">
1853
1889
  <xsl:variable name="parent-name" select="local-name(..)"/>
1854
1890
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
1855
1891
  <fo:table-row min-height="4mm">
@@ -1869,7 +1905,7 @@
1869
1905
 
1870
1906
  <xsl:apply-templates/>
1871
1907
  </fo:table-row>
1872
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='th']">
1908
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='th']">
1873
1909
  <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
1874
1910
 
1875
1911
 
@@ -1892,7 +1928,7 @@
1892
1928
  <xsl:apply-templates/>
1893
1929
  </fo:block>
1894
1930
  </fo:table-cell>
1895
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='td']">
1931
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='td']">
1896
1932
  <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
1897
1933
 
1898
1934
 
@@ -1914,6 +1950,7 @@
1914
1950
  </xsl:attribute>
1915
1951
  </xsl:if>
1916
1952
  <fo:block>
1953
+
1917
1954
  <xsl:apply-templates/>
1918
1955
  </fo:block>
1919
1956
  <!-- <xsl:choose>
@@ -1929,16 +1966,18 @@
1929
1966
 
1930
1967
 
1931
1968
  </fo:table-cell>
1932
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']/*[local-name()='note']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']/*[local-name()='note']" mode="process">
1969
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='note']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='note']" mode="process">
1933
1970
 
1934
1971
 
1935
1972
  <fo:block font-size="10pt" margin-bottom="12pt">
1936
1973
 
1937
1974
 
1938
1975
 
1976
+
1939
1977
  <fo:inline padding-right="2mm">
1940
1978
 
1941
- <xsl:text>NOTE </xsl:text>
1979
+
1980
+ <xsl:value-of select="$title-note"/>
1942
1981
 
1943
1982
 
1944
1983
 
@@ -1948,9 +1987,9 @@
1948
1987
  <xsl:apply-templates mode="process"/>
1949
1988
  </fo:block>
1950
1989
 
1951
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
1990
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
1952
1991
  <xsl:apply-templates/>
1953
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="fn_display">
1992
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_display">
1954
1993
  <xsl:variable name="references">
1955
1994
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
1956
1995
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -1967,6 +2006,7 @@
1967
2006
 
1968
2007
 
1969
2008
 
2009
+
1970
2010
  <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
1971
2011
 
1972
2012
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -1986,7 +2026,7 @@
1986
2026
  </fo:block>
1987
2027
  </xsl:if>
1988
2028
  </xsl:for-each>
1989
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="fn_name_display">
2029
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_name_display">
1990
2030
  <!-- <xsl:variable name="references">
1991
2031
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
1992
2032
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -2002,7 +2042,7 @@
2002
2042
  <xsl:apply-templates/>
2003
2043
  </fo:block>
2004
2044
  </xsl:for-each>
2005
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="fn_display_figure">
2045
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_display_figure">
2006
2046
  <xsl:variable name="key_iso">
2007
2047
  <!-- and (not(@class) or @class !='pseudocode') -->
2008
2048
  </xsl:variable>
@@ -2053,7 +2093,7 @@
2053
2093
  </fo:block>
2054
2094
  </xsl:if>
2055
2095
 
2056
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='fn']">
2096
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']">
2057
2097
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2058
2098
  <fo:inline font-size="80%" keep-with-previous.within-line="always">
2059
2099
 
@@ -2065,11 +2105,11 @@
2065
2105
  <xsl:value-of select="@reference"/>
2066
2106
  </fo:basic-link>
2067
2107
  </fo:inline>
2068
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='fn']/*[local-name()='p']">
2108
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']/*[local-name()='p']">
2069
2109
  <fo:inline>
2070
2110
  <xsl:apply-templates/>
2071
2111
  </fo:inline>
2072
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dl']">
2112
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dl']">
2073
2113
  <xsl:variable name="parent" select="local-name(..)"/>
2074
2114
 
2075
2115
  <xsl:variable name="key_iso">
@@ -2081,8 +2121,8 @@
2081
2121
 
2082
2122
 
2083
2123
  <fo:block margin-bottom="12pt" text-align="left">
2084
-
2085
- <xsl:text>where </xsl:text>
2124
+
2125
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2086
2126
  <xsl:apply-templates select="*[local-name()='dt']/*"/>
2087
2127
  <xsl:text/>
2088
2128
  <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
@@ -2095,7 +2135,7 @@
2095
2135
 
2096
2136
 
2097
2137
 
2098
- <xsl:text>where</xsl:text>
2138
+ <xsl:value-of select="$title-where"/>
2099
2139
  </fo:block>
2100
2140
  </xsl:when>
2101
2141
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
@@ -2103,7 +2143,7 @@
2103
2143
 
2104
2144
 
2105
2145
 
2106
- <xsl:text>Key</xsl:text>
2146
+ <xsl:value-of select="$title-key"/>
2107
2147
  </fo:block>
2108
2148
  </xsl:when>
2109
2149
  </xsl:choose>
@@ -2114,9 +2154,11 @@
2114
2154
 
2115
2155
 
2116
2156
 
2157
+
2117
2158
  <fo:block>
2118
2159
 
2119
2160
 
2161
+
2120
2162
  <!-- create virtual html table for dl/[dt and dd] -->
2121
2163
  <xsl:variable name="html-table">
2122
2164
  <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
@@ -2168,7 +2210,7 @@
2168
2210
  <xsl:otherwise>
2169
2211
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
2170
2212
  <xsl:choose>
2171
- <xsl:when test=". = 1">
2213
+ <xsl:when test=". = 1 or . = 0">
2172
2214
  <fo:table-column column-width="proportional-column-width(2)"/>
2173
2215
  </xsl:when>
2174
2216
  <xsl:otherwise>
@@ -2191,7 +2233,7 @@
2191
2233
  </fo:block>
2192
2234
  </fo:block>
2193
2235
  </xsl:if>
2194
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dl']/*[local-name()='note']">
2236
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dl']/*[local-name()='note']">
2195
2237
  <xsl:param name="key_iso"/>
2196
2238
 
2197
2239
  <!-- <tr>
@@ -2207,7 +2249,7 @@
2207
2249
  <xsl:if test="normalize-space($key_iso) = 'true'">
2208
2250
  <xsl:attribute name="margin-top">0</xsl:attribute>
2209
2251
  </xsl:if>
2210
- NOTE
2252
+ <xsl:value-of select="$title-note"/>
2211
2253
  </fo:block>
2212
2254
  </fo:table-cell>
2213
2255
  <fo:table-cell>
@@ -2216,7 +2258,7 @@
2216
2258
  </fo:block>
2217
2259
  </fo:table-cell>
2218
2260
  </fo:table-row>
2219
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dt']" mode="dl">
2261
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dt']" mode="dl">
2220
2262
  <tr>
2221
2263
  <td>
2222
2264
  <xsl:apply-templates/>
@@ -2229,11 +2271,12 @@
2229
2271
  </td>
2230
2272
  </tr>
2231
2273
 
2232
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dt']">
2274
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dt']">
2233
2275
  <xsl:param name="key_iso"/>
2234
2276
 
2235
2277
  <fo:table-row>
2236
2278
  <fo:table-cell>
2279
+
2237
2280
  <fo:block margin-top="6pt">
2238
2281
 
2239
2282
 
@@ -2245,6 +2288,9 @@
2245
2288
 
2246
2289
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
2247
2290
 
2291
+
2292
+
2293
+
2248
2294
  <xsl:apply-templates/>
2249
2295
 
2250
2296
  </fo:block>
@@ -2260,37 +2306,37 @@
2260
2306
  </fo:table-cell>
2261
2307
  </fo:table-row>
2262
2308
 
2263
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']" mode="dl"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']" mode="dl_process">
2309
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']" mode="dl"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']" mode="dl_process">
2264
2310
  <xsl:apply-templates/>
2265
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']" mode="process">
2311
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']" mode="process">
2266
2312
  <xsl:apply-templates/>
2267
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
2313
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
2268
2314
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
2269
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='em']">
2315
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='em']">
2270
2316
  <fo:inline font-style="italic">
2271
2317
  <xsl:apply-templates/>
2272
2318
  </fo:inline>
2273
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='strong']">
2319
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='strong']">
2274
2320
  <fo:inline font-weight="bold">
2275
2321
  <xsl:apply-templates/>
2276
2322
  </fo:inline>
2277
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='sup']">
2323
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sup']">
2278
2324
  <fo:inline font-size="80%" vertical-align="super">
2279
2325
  <xsl:apply-templates/>
2280
2326
  </fo:inline>
2281
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='sub']">
2327
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sub']">
2282
2328
  <fo:inline font-size="80%" vertical-align="sub">
2283
2329
  <xsl:apply-templates/>
2284
2330
  </fo:inline>
2285
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tt']">
2286
- <fo:inline font-family="Courier" font-size="10pt">
2331
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tt']">
2332
+ <fo:inline font-family="Courier" font-size="10pt">
2287
2333
  <xsl:apply-templates/>
2288
2334
  </fo:inline>
2289
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='del']">
2335
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='del']">
2290
2336
  <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2291
2337
  <xsl:apply-templates/>
2292
2338
  </fo:inline>
2293
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="text()[ancestor::*[local-name()='smallcap']]">
2339
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()[ancestor::*[local-name()='smallcap']]">
2294
2340
  <xsl:variable name="text" select="normalize-space(.)"/>
2295
2341
  <fo:inline font-size="75%">
2296
2342
  <xsl:if test="string-length($text) &gt; 0">
@@ -2299,7 +2345,7 @@
2299
2345
  </xsl:call-template>
2300
2346
  </xsl:if>
2301
2347
  </fo:inline>
2302
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="recursiveSmallCaps">
2348
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="recursiveSmallCaps">
2303
2349
  <xsl:param name="text"/>
2304
2350
  <xsl:variable name="char" select="substring($text,1,1)"/>
2305
2351
  <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/>
@@ -2318,7 +2364,7 @@
2318
2364
  <xsl:with-param name="text" select="substring($text,2)"/>
2319
2365
  </xsl:call-template>
2320
2366
  </xsl:if>
2321
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="tokenize">
2367
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="tokenize">
2322
2368
  <xsl:param name="text"/>
2323
2369
  <xsl:param name="separator" select="' '"/>
2324
2370
  <xsl:choose>
@@ -2366,7 +2412,7 @@
2366
2412
  </xsl:call-template>
2367
2413
  </xsl:otherwise>
2368
2414
  </xsl:choose>
2369
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="max_length">
2415
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="max_length">
2370
2416
  <xsl:param name="words"/>
2371
2417
  <xsl:for-each select="$words//word">
2372
2418
  <xsl:sort select="." data-type="number" order="descending"/>
@@ -2374,7 +2420,11 @@
2374
2420
  <xsl:value-of select="."/>
2375
2421
  </xsl:if>
2376
2422
  </xsl:for-each>
2377
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="add-zero-spaces">
2423
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces-java">
2424
+ <xsl:param name="text" select="."/>
2425
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
2426
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
2427
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces">
2378
2428
  <xsl:param name="text" select="."/>
2379
2429
  <xsl:variable name="zero-space-after-chars">-</xsl:variable>
2380
2430
  <xsl:variable name="zero-space-after-dot">.</xsl:variable>
@@ -2427,7 +2477,7 @@
2427
2477
  <xsl:value-of select="$text"/>
2428
2478
  </xsl:otherwise>
2429
2479
  </xsl:choose>
2430
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="add-zero-spaces-equal">
2480
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces-equal">
2431
2481
  <xsl:param name="text" select="."/>
2432
2482
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
2433
2483
  <xsl:variable name="zero-space-after-equal">=</xsl:variable>
@@ -2453,7 +2503,7 @@
2453
2503
  <xsl:value-of select="$text"/>
2454
2504
  </xsl:otherwise>
2455
2505
  </xsl:choose>
2456
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="getSimpleTable">
2506
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getSimpleTable">
2457
2507
  <xsl:variable name="simple-table">
2458
2508
 
2459
2509
  <!-- Step 1. colspan processing -->
@@ -2480,9 +2530,9 @@
2480
2530
  </xsl:choose> -->
2481
2531
  </xsl:variable>
2482
2532
  <xsl:copy-of select="$simple-table"/>
2483
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
2533
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
2484
2534
  <xsl:apply-templates mode="simple-table-colspan"/>
2485
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='fn']" mode="simple-table-colspan"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='th'] | *[local-name()='td']" mode="simple-table-colspan">
2535
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']" mode="simple-table-colspan"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='th'] | *[local-name()='td']" mode="simple-table-colspan">
2486
2536
  <xsl:choose>
2487
2537
  <xsl:when test="@colspan">
2488
2538
  <xsl:variable name="td">
@@ -2504,16 +2554,16 @@
2504
2554
  </xsl:element>
2505
2555
  </xsl:otherwise>
2506
2556
  </xsl:choose>
2507
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="@colspan" mode="simple-table-colspan"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tr']" mode="simple-table-colspan">
2557
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@colspan" mode="simple-table-colspan"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tr']" mode="simple-table-colspan">
2508
2558
  <xsl:element name="tr">
2509
2559
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
2510
2560
  <xsl:apply-templates mode="simple-table-colspan"/>
2511
2561
  </xsl:element>
2512
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="@*|node()" mode="simple-table-colspan">
2562
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@*|node()" mode="simple-table-colspan">
2513
2563
  <xsl:copy>
2514
2564
  <xsl:apply-templates select="@*|node()" mode="simple-table-colspan"/>
2515
2565
  </xsl:copy>
2516
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="repeatNode">
2566
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="repeatNode">
2517
2567
  <xsl:param name="count"/>
2518
2568
  <xsl:param name="node"/>
2519
2569
 
@@ -2524,18 +2574,18 @@
2524
2574
  </xsl:call-template>
2525
2575
  <xsl:copy-of select="$node"/>
2526
2576
  </xsl:if>
2527
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="@*|node()" mode="simple-table-rowspan">
2577
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@*|node()" mode="simple-table-rowspan">
2528
2578
  <xsl:copy>
2529
2579
  <xsl:apply-templates select="@*|node()" mode="simple-table-rowspan"/>
2530
2580
  </xsl:copy>
2531
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="tbody" mode="simple-table-rowspan">
2581
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="tbody" mode="simple-table-rowspan">
2532
2582
  <xsl:copy>
2533
2583
  <xsl:copy-of select="tr[1]"/>
2534
2584
  <xsl:apply-templates select="tr[2]" mode="simple-table-rowspan">
2535
2585
  <xsl:with-param name="previousRow" select="tr[1]"/>
2536
2586
  </xsl:apply-templates>
2537
2587
  </xsl:copy>
2538
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="tr" mode="simple-table-rowspan">
2588
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="tr" mode="simple-table-rowspan">
2539
2589
  <xsl:param name="previousRow"/>
2540
2590
  <xsl:variable name="currentRow" select="."/>
2541
2591
 
@@ -2569,13 +2619,13 @@
2569
2619
  <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
2570
2620
  <xsl:with-param name="previousRow" select="$newRow"/>
2571
2621
  </xsl:apply-templates>
2572
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="getLang">
2622
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getLang">
2573
2623
  <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
2574
2624
  <xsl:choose>
2575
2625
  <xsl:when test="$language = 'English'">en</xsl:when>
2576
2626
  <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
2577
2627
  </xsl:choose>
2578
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="capitalizeWords">
2628
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="capitalizeWords">
2579
2629
  <xsl:param name="str"/>
2580
2630
  <xsl:variable name="str2" select="translate($str, '-', ' ')"/>
2581
2631
  <xsl:choose>
@@ -2593,19 +2643,19 @@
2593
2643
  <xsl:value-of select="substring($str2, 2)"/>
2594
2644
  </xsl:otherwise>
2595
2645
  </xsl:choose>
2596
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="mathml:math">
2646
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="mathml:math">
2597
2647
  <fo:inline font-family="STIX2Math">
2598
2648
  <fo:instream-foreign-object fox:alt-text="Math">
2599
2649
  <xsl:copy-of select="."/>
2600
2650
  </fo:instream-foreign-object>
2601
2651
  </fo:inline>
2602
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='localityStack']">
2652
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='localityStack']">
2603
2653
  <xsl:for-each select="*[local-name()='locality']">
2604
2654
  <xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
2605
2655
  <xsl:apply-templates select="."/>
2606
2656
  <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
2607
2657
  </xsl:for-each>
2608
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='link']" name="link">
2658
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='link']" name="link">
2609
2659
  <xsl:variable name="target">
2610
2660
  <xsl:choose>
2611
2661
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
@@ -2635,4 +2685,122 @@
2635
2685
  </xsl:otherwise>
2636
2686
  </xsl:choose>
2637
2687
  </fo:inline>
2688
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sourcecode']" name="sourcecode">
2689
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
2690
+ <!-- <xsl:choose>
2691
+ <xsl:when test="@lang = 'en'"></xsl:when>
2692
+ <xsl:otherwise> -->
2693
+ <xsl:attribute name="white-space">pre</xsl:attribute>
2694
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
2695
+ <!-- </xsl:otherwise>
2696
+ </xsl:choose> -->
2697
+ <xsl:apply-templates/>
2698
+ </fo:block>
2699
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='bookmark']">
2700
+ <fo:inline id="{@id}"/>
2701
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']">
2702
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
2703
+ <fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
2704
+ <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
2705
+ </fo:block>
2706
+ <xsl:apply-templates/>
2707
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
2708
+ <fo:inline><xsl:apply-templates/></fo:inline>
2709
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']//*[local-name()='example']">
2710
+ <fo:block xsl:use-attribute-sets="appendix-example-style">
2711
+ <xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
2712
+ <xsl:value-of select="$title-example"/>
2713
+ <xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) &gt; 1">
2714
+ <xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
2715
+ </xsl:if>
2716
+ <xsl:if test="*[local-name()='name']">
2717
+ <xsl:text>— </xsl:text><xsl:apply-templates select="*[local-name()='name']" mode="process"/>
2718
+ </xsl:if>
2719
+ </fo:block>
2720
+ <xsl:apply-templates/>
2721
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']" mode="process">
2722
+ <fo:inline><xsl:apply-templates/></fo:inline>
2723
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'callout']">
2724
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
2725
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'annotation']">
2726
+ <xsl:variable name="annotation-id" select="@id"/>
2727
+ <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
2728
+ <fo:block id="{$annotation-id}" white-space="nowrap">
2729
+ <fo:inline>
2730
+ <xsl:apply-templates>
2731
+ <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
2732
+ </xsl:apply-templates>
2733
+ </fo:inline>
2734
+ </fo:block>
2735
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'annotation']/*[local-name() = 'p']">
2736
+ <xsl:param name="callout"/>
2737
+ <fo:inline id="{@id}">
2738
+ <!-- for first p in annotation, put <x> -->
2739
+ <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
2740
+ <xsl:apply-templates/>
2741
+ </fo:inline>
2742
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="convertDate">
2743
+ <xsl:param name="date"/>
2744
+ <xsl:param name="format" select="'short'"/>
2745
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
2746
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
2747
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
2748
+ <xsl:variable name="monthStr">
2749
+ <xsl:choose>
2750
+ <xsl:when test="$month = '01'">January</xsl:when>
2751
+ <xsl:when test="$month = '02'">February</xsl:when>
2752
+ <xsl:when test="$month = '03'">March</xsl:when>
2753
+ <xsl:when test="$month = '04'">April</xsl:when>
2754
+ <xsl:when test="$month = '05'">May</xsl:when>
2755
+ <xsl:when test="$month = '06'">June</xsl:when>
2756
+ <xsl:when test="$month = '07'">July</xsl:when>
2757
+ <xsl:when test="$month = '08'">August</xsl:when>
2758
+ <xsl:when test="$month = '09'">September</xsl:when>
2759
+ <xsl:when test="$month = '10'">October</xsl:when>
2760
+ <xsl:when test="$month = '11'">November</xsl:when>
2761
+ <xsl:when test="$month = '12'">December</xsl:when>
2762
+ </xsl:choose>
2763
+ </xsl:variable>
2764
+ <xsl:variable name="result">
2765
+ <xsl:choose>
2766
+ <xsl:when test="$format = 'short' or $day = ''">
2767
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
2768
+ </xsl:when>
2769
+ <xsl:otherwise>
2770
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
2771
+ </xsl:otherwise>
2772
+ </xsl:choose>
2773
+ </xsl:variable>
2774
+ <xsl:value-of select="$result"/>
2775
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertKeywords">
2776
+ <xsl:param name="sorting" select="'true'"/>
2777
+ <xsl:param name="charAtEnd" select="'.'"/>
2778
+ <xsl:param name="charDelim" select="', '"/>
2779
+ <xsl:choose>
2780
+ <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
2781
+ <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
2782
+ <xsl:sort data-type="text" order="ascending"/>
2783
+ <xsl:call-template name="insertKeyword">
2784
+ <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
2785
+ <xsl:with-param name="charDelim" select="$charDelim"/>
2786
+ </xsl:call-template>
2787
+ </xsl:for-each>
2788
+ </xsl:when>
2789
+ <xsl:otherwise>
2790
+ <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
2791
+ <xsl:call-template name="insertKeyword">
2792
+ <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
2793
+ <xsl:with-param name="charDelim" select="$charDelim"/>
2794
+ </xsl:call-template>
2795
+ </xsl:for-each>
2796
+ </xsl:otherwise>
2797
+ </xsl:choose>
2798
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertKeyword">
2799
+ <xsl:param name="charAtEnd"/>
2800
+ <xsl:param name="charDelim"/>
2801
+ <xsl:apply-templates/>
2802
+ <xsl:choose>
2803
+ <xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
2804
+ <xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
2805
+ </xsl:choose>
2638
2806
  </xsl:template></xsl:stylesheet>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csd
3
- VERSION = "1.3.22"
3
+ VERSION = "1.3.23"
4
4
  end
5
5
  end
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ["lib"]
29
29
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
30
30
 
31
- spec.add_dependency "metanorma-standoc", "~> 1.3.0"
31
+ spec.add_dependency "metanorma-standoc", "~> 1.4.0"
32
32
  spec.add_dependency "isodoc", "~> 1.0.0"
33
33
 
34
34
  spec.add_development_dependency "byebug", "~> 9.1"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.22
4
+ version: 1.3.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-26 00:00:00.000000000 Z
11
+ date: 2020-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3.0
19
+ version: 1.4.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.3.0
26
+ version: 1.4.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: isodoc
29
29
  requirement: !ruby/object:Gem::Requirement