metanorma-ogc 1.0.7 → 1.0.8

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: 9953013528529acb9de2503a11568d71524b45a5f6c0597cd402d1df3c6d31b5
4
- data.tar.gz: cbaaba51c2115fa4e1c0aac37dbd52cdd317b8122930a6776f708983d465f0df
3
+ metadata.gz: eafd3553437df38fff9cdf22fb31463c5f71ad6f3091853069415e1918b6cb9a
4
+ data.tar.gz: 2cb981453650a2500aeeb40c488ece52116c539d5ac1912c4c2b93c005028049
5
5
  SHA512:
6
- metadata.gz: fbba1e0b0ba3502ec0f134da7b34a95e8c46f6cbae500b481d831fd6842cf45e53274e26d024e03ec3d5623d971d54ccd43c1dc67b397bb6f4c824423a272c90
7
- data.tar.gz: 40557374ec3fe844f5b20539975b1ff00661a82969e5577d2c02587c23d5963bab025444314d9c36d8b9142cd469132e7cf3f9c6ae4ef8c9a87707d4cef45f69
6
+ metadata.gz: 64520d8c4174c1bcd0a328cdf808b0d15eba9a7681ad9bb916e945c12cf7e747e1a2309c1688c8a4e615dd9ad326a1b474a55f2cd74c3ae702b47b21b16a9fa5
7
+ data.tar.gz: 76505b7149a3804a38ab8746f068eca80ff9c5db60e3046cad2a07efbadeb43e9de0f283312b035273e64c9ab493585afae732cb334ea446aa25c746cdfeeb0a
@@ -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">
@@ -36,9 +36,8 @@
36
36
  modifications that have not been approved or adopted by LICENSOR.</p>
37
37
 
38
38
  <p>THIS LICENSE IS A COPYRIGHT LICENSE ONLY, AND DOES NOT
39
- CONVEY ANY RIGHTS UNDER ANY PATENTS THAT MAY BE IN FORCE ANYWHERE IN THE WORLD.</p>
40
-
41
- <p>THE INTELLECTUAL PROPERTY IS PROVIDED "AS
39
+ CONVEY ANY RIGHTS UNDER ANY PATENTS THAT MAY BE IN FORCE ANYWHERE IN THE WORLD.
40
+ THE INTELLECTUAL PROPERTY IS PROVIDED "AS
42
41
  IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
43
42
  LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
44
43
  AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE COPYRIGHT HOLDER OR HOLDERS
@@ -77,9 +76,8 @@
77
76
  authorization of LICENSOR or such copyright holder. LICENSOR is and shall at
78
77
  all times be the sole entity that may authorize you or any third party to use
79
78
  certification marks, trademarks or other special designations to indicate
80
- compliance with any LICENSOR standards or specifications.</p>
81
-
82
- <p> This Agreement is
79
+ compliance with any LICENSOR standards or specifications.
80
+ This Agreement is
83
81
  governed by the laws of the Commonwealth of Massachusetts. The application to
84
82
  this Agreement of the United Nations Convention on Contracts for the
85
83
  International Sale of Goods is hereby expressly excluded. In the event any
@@ -150,24 +148,11 @@
150
148
 
151
149
 
152
150
 
153
- {% if doctype == "Standard" or doctype == "Community Standard" %}
154
151
  <feedback-statement>
155
- <clause>
152
+ {% if doctype == "Standard" %}
153
+ <clause id="boilerplate-standard-feedback">
156
154
  <p>Suggested additions, changes and comments on this standard are welcome and encouraged. Such suggestions may be submitted using the online change request form on OGC web site: <link target="http://portal.opengeospatial.org/public_ogc/change_request.php">http://portal.opengeospatial.org/public_ogc/change_request.php</link></p>
157
155
  </clause>
158
- <clause id="boilerplate-contact">
159
- <p id="boilerplate-name">Open Geospatial Consortium</p>
160
- <p id="boilerplate-address" align="left">
161
- 35 Main Street<br />
162
- Suite 5<br />
163
- Wayland<br />
164
- MA, 01778<br />
165
- United States of America<br />
166
- <br />
167
- <link target="mailto:copyright@opengeospatial.org">copyright@opengeospatial.org</link><br />
168
- <link target="www.opengeospatial.org">www.opengeospatial.org</link>
169
- </p>
170
- </clause>
156
+ {% endif %}
171
157
  </feedback-statement>
172
- {% endif %}
173
158
  </boilerplate>
@@ -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">
@@ -47,11 +47,6 @@ module IsoDoc
47
47
  docxml
48
48
  end
49
49
 
50
- def info(isoxml, out)
51
- @meta.keywords isoxml, out
52
- super
53
- end
54
-
55
50
  def load_yaml(lang, script)
56
51
  y = if @i18nyaml then YAML.load_file(@i18nyaml)
57
52
  else
@@ -137,6 +132,7 @@ module IsoDoc
137
132
 
138
133
  def middle(isoxml, out)
139
134
  middle_title(out)
135
+ middle_admonitions(isoxml, out)
140
136
  i = scope isoxml, out, 0
141
137
  i = conformance isoxml, out, i
142
138
  i = norm_ref isoxml, out, i
@@ -106,11 +106,6 @@
106
106
  <div class="info-section">
107
107
  <div class="copyright">
108
108
  <div id="boilerplate-copyright-destination"/>
109
- {% if doctype == "Standard" or doctype == "Community Standard" %}
110
- <div class="contact-info">
111
- <div id="boilerplate-contact-destination"/>
112
- </div>
113
- {% endif %}
114
109
  </div>
115
110
 
116
111
  <div class="rule"></div>
@@ -12,6 +12,7 @@ module IsoDoc
12
12
  class HtmlConvert < IsoDoc::HtmlConvert
13
13
  def initialize(options)
14
14
  @libdir = File.dirname(__FILE__)
15
+ @reqtlabels = {}
15
16
  super
16
17
  end
17
18
 
@@ -62,14 +62,6 @@ module IsoDoc
62
62
  set(:externalid, isoxml&.at(ns("//bibdata/docidentifier[@type = 'ogc-external']"))&.text)
63
63
  end
64
64
 
65
- def keywords(isoxml, _out)
66
- keywords = []
67
- isoxml.xpath(ns("//bibdata/keyword | //bibdata/ext/keyword")).each do |kw|
68
- keywords << kw.text
69
- end
70
- set(:keywords, keywords)
71
- end
72
-
73
65
  def unpublished(status)
74
66
  !%w(published deprecated retired).include?(status.downcase)
75
67
  end
@@ -189,14 +189,7 @@
189
189
  <xsl:value-of select="normalize-space($abstract)"/>
190
190
  </dc:description>
191
191
  <pdf:Keywords>
192
- <xsl:for-each select="/ogc:ogc-standard/ogc:bibdata//ogc:keyword">
193
- <xsl:sort data-type="text" order="ascending"/>
194
- <xsl:apply-templates/>
195
- <xsl:choose>
196
- <xsl:when test="position() != last()">, </xsl:when>
197
- <xsl:otherwise>.</xsl:otherwise>
198
- </xsl:choose>
199
- </xsl:for-each>
192
+ <xsl:call-template name="insertKeywords"/>
200
193
  </pdf:Keywords>
201
194
  </rdf:Description>
202
195
  <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
@@ -913,10 +906,14 @@
913
906
  </fo:block>
914
907
  <fo:block margin-bottom="12pt">The following are keywords to be used by search engines and document catalogues.</fo:block>
915
908
  <fo:block margin-bottom="12pt">
916
- <xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:keyword">
909
+ <xsl:call-template name="insertKeywords">
910
+ <xsl:with-param name="sorting">no</xsl:with-param>
911
+ <xsl:with-param name="charAtEnd"/>
912
+ </xsl:call-template>
913
+ <!-- <xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:keyword">
917
914
  <xsl:value-of select="."/>
918
915
  <xsl:if test="position() != last()">, </xsl:if>
919
- </xsl:for-each>
916
+ </xsl:for-each> -->
920
917
  </fo:block>
921
918
  </xsl:template>
922
919
  <!-- Submitting Organizations -->
@@ -1602,58 +1599,7 @@
1602
1599
  <xsl:apply-templates select="ogc:localityStack"/>
1603
1600
  </fo:basic-link>
1604
1601
  </xsl:template>
1605
-
1606
- <xsl:template match="ogc:appendix">
1607
- <fo:block font-size="12pt" font-weight="bold" margin-top="12pt" margin-bottom="12pt">
1608
- <fo:inline padding-right="5mm">Appendix <xsl:number/></fo:inline>
1609
- <xsl:apply-templates select="ogc:title" mode="process"/>
1610
- </fo:block>
1611
- <xsl:apply-templates/>
1612
- </xsl:template>
1613
-
1614
- <xsl:template match="ogc:appendix//ogc:example">
1615
- <fo:block font-size="10pt" margin-bottom="12pt">
1616
- <xsl:text>EXAMPLE</xsl:text>
1617
- <xsl:if test="ogc:name">
1618
- <xsl:text> — </xsl:text><xsl:apply-templates select="ogc:name" mode="process"/>
1619
- </xsl:if>
1620
- </fo:block>
1621
- <xsl:apply-templates/>
1622
- </xsl:template>
1623
-
1624
- <xsl:template match="ogc:appendix//ogc:example/ogc:name"/>
1625
- <xsl:template match="ogc:appendix//ogc:example/ogc:name" mode="process">
1626
- <fo:inline><xsl:apply-templates/></fo:inline>
1627
- </xsl:template>
1628
-
1629
- <xsl:template match="ogc:callout">
1630
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
1631
- </xsl:template>
1632
-
1633
- <xsl:template match="ogc:annotation">
1634
- <fo:block>
1635
-
1636
- </fo:block>
1637
- <xsl:apply-templates/>
1638
- </xsl:template>
1639
-
1640
- <xsl:template match="ogc:annotation/text()"/>
1641
-
1642
- <xsl:template match="ogc:annotation/ogc:p">
1643
- <xsl:variable name="annotation-id" select="../@id"/>
1644
- <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
1645
- <fo:block id="{$annotation-id}">
1646
- <xsl:value-of select="concat('&lt;', $callout, '&gt; ')"/>
1647
- <xsl:apply-templates/>
1648
- </fo:block>
1649
- </xsl:template>
1650
-
1651
-
1652
- <xsl:template match="ogc:appendix/ogc:title"/>
1653
- <xsl:template match="ogc:appendix/ogc:title" mode="process">
1654
- <fo:inline><xsl:apply-templates/></fo:inline>
1655
- </xsl:template>
1656
-
1602
+
1657
1603
 
1658
1604
  <xsl:template match="ogc:xref">
1659
1605
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">
@@ -1682,17 +1628,8 @@
1682
1628
  </fo:basic-link>
1683
1629
  </xsl:template>
1684
1630
 
1685
- <xsl:template match="ogc:sourcecode">
1686
- <fo:block font-family="Courier" font-size="10pt" margin-bottom="6pt" keep-with-next="always" line-height="113%">
1687
- <xsl:choose>
1688
- <xsl:when test="@lang = 'en'"/>
1689
- <xsl:otherwise>
1690
- <xsl:attribute name="white-space">pre</xsl:attribute>
1691
- <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1692
- </xsl:otherwise>
1693
- </xsl:choose>
1694
- <xsl:apply-templates/>
1695
- </fo:block>
1631
+ <xsl:template match="ogc:sourcecode" priority="2">
1632
+ <xsl:call-template name="sourcecode"/>
1696
1633
  <xsl:choose>
1697
1634
  <xsl:when test="@unnumbered='true'"/>
1698
1635
  <xsl:when test="ancestor::ogc:example"/>
@@ -1886,11 +1823,7 @@
1886
1823
  <fo:block> </fo:block>
1887
1824
  <fo:block break-after="page"/>
1888
1825
  </xsl:template>
1889
-
1890
- <xsl:template match="ogc:bookmark">
1891
- <fo:inline id="{@id}"/>
1892
- </xsl:template>
1893
-
1826
+
1894
1827
  <xsl:template name="insertHeaderFooter">
1895
1828
  <xsl:param name="pagenum-font-weight" select="'normal'"/>
1896
1829
  <fo:static-content flow-name="header-even">
@@ -2066,19 +1999,89 @@
2066
1999
  <xsl:value-of select="$section"/>
2067
2000
  </xsl:template>
2068
2001
 
2069
- <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:csd="https://www.metanorma.org/ns/csd" 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:csd="https://www.metanorma.org/ns/csd" 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:csd="https://www.metanorma.org/ns/csd" 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:csd="https://www.metanorma.org/ns/csd" 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:csd="https://www.metanorma.org/ns/csd" name="link-style">
2002
+ <xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-table">
2003
+
2004
+ <xsl:text>Table </xsl:text>
2005
+
2006
+
2007
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-note">
2008
+
2009
+ <xsl:text>NOTE </xsl:text>
2010
+
2011
+
2012
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-figure">
2013
+
2014
+ <xsl:text>Figure </xsl:text>
2015
+
2016
+
2017
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-example">
2018
+
2019
+ <xsl:text>EXAMPLE </xsl:text>
2020
+
2021
+
2022
+ </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">
2023
+
2024
+ <xsl:text>Annex </xsl:text>
2025
+
2026
+
2027
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-appendix">
2028
+ <xsl:text>Appendix </xsl:text>
2029
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-clause">
2030
+
2031
+ <xsl:text>Clause </xsl:text>
2032
+
2033
+
2034
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-edition">
2035
+ <xsl:text>Edition </xsl:text>
2036
+ </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-toc">
2037
+
2038
+
2039
+ </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">
2070
2040
 
2071
2041
  <xsl:attribute name="color">blue</xsl:attribute>
2072
2042
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
2073
2043
 
2074
2044
 
2075
- </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:csd="https://www.metanorma.org/ns/csd" match="text()">
2045
+ </xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="sourcecode-style">
2046
+
2047
+
2048
+
2049
+
2050
+
2051
+
2052
+
2053
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
2054
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2055
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2056
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2057
+ <xsl:attribute name="line-height">113%</xsl:attribute>
2058
+
2059
+
2060
+ </xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="appendix-style">
2061
+
2062
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
2063
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2064
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2065
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2066
+
2067
+
2068
+
2069
+ </xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="appendix-example-style">
2070
+
2071
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2072
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
2073
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2074
+
2075
+
2076
+
2077
+ </xsl:attribute-set><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()">
2076
2078
  <xsl:value-of select="."/>
2077
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='br']">
2079
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='br']">
2078
2080
  <xsl:value-of select="$linebreak"/>
2079
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
2080
- <xsl:call-template name="add-zero-spaces"/>
2081
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='table']">
2081
+ </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">
2082
+ <!-- <xsl:call-template name="add-zero-spaces"/> -->
2083
+ <xsl:call-template name="add-zero-spaces-java"/>
2084
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']">
2082
2085
 
2083
2086
  <xsl:variable name="simple-table">
2084
2087
  <!-- <xsl:copy> -->
@@ -2113,31 +2116,13 @@
2113
2116
  <xsl:attribute name="font-size">11pt</xsl:attribute>
2114
2117
 
2115
2118
 
2116
- <xsl:text>Table </xsl:text>
2117
- <xsl:choose>
2118
- <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
2119
- <xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
2120
- </xsl:when>
2121
- <xsl:when test="ancestor::*[local-name()='annex']">
2122
-
2123
-
2124
-
2125
- <xsl:number format="A." count="*[local-name()='annex']"/><xsl:number format="1"/>
2126
-
2127
-
2128
-
2129
-
2130
-
2131
-
2132
- </xsl:when>
2133
- <xsl:otherwise>
2134
-
2135
-
2136
- <xsl:number format="A." count="*[local-name()='annex']"/>
2137
- <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']"/>
2138
-
2139
- </xsl:otherwise>
2140
- </xsl:choose>
2119
+
2120
+
2121
+ <xsl:value-of select="$title-table"/>
2122
+
2123
+ <xsl:call-template name="getTableNumber"/>
2124
+
2125
+
2141
2126
  <xsl:if test="*[local-name()='name']">
2142
2127
 
2143
2128
 
@@ -2211,6 +2196,7 @@
2211
2196
  <xsl:attribute name="space-after">12pt</xsl:attribute>
2212
2197
 
2213
2198
 
2199
+
2214
2200
  <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">
2215
2201
 
2216
2202
 
@@ -2227,9 +2213,10 @@
2227
2213
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2228
2214
 
2229
2215
 
2216
+
2230
2217
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
2231
2218
  <xsl:choose>
2232
- <xsl:when test=". = 1">
2219
+ <xsl:when test=". = 1 or . = 0">
2233
2220
  <fo:table-column column-width="proportional-column-width(2)"/>
2234
2221
  </xsl:when>
2235
2222
  <xsl:otherwise>
@@ -2243,15 +2230,40 @@
2243
2230
 
2244
2231
 
2245
2232
  </fo:block-container>
2246
- </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:csd="https://www.metanorma.org/ns/csd" 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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='table']/*[local-name()='name']" mode="process">
2233
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getTableNumber">
2234
+ <xsl:choose>
2235
+ <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
2236
+ <xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
2237
+ </xsl:when>
2238
+ <xsl:when test="ancestor::*[local-name()='annex']">
2239
+
2240
+
2241
+
2242
+ <xsl:number format="A." count="*[local-name()='annex']"/><xsl:number format="1"/>
2243
+
2244
+
2245
+
2246
+
2247
+
2248
+
2249
+ </xsl:when>
2250
+ <xsl:otherwise>
2251
+
2252
+
2253
+ <xsl:number format="A." count="*[local-name()='annex']"/>
2254
+ <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']"/>
2255
+
2256
+ </xsl:otherwise>
2257
+ </xsl:choose>
2258
+ </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">
2247
2259
  <xsl:apply-templates/>
2248
- </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:csd="https://www.metanorma.org/ns/csd" name="calculate-columns-numbers">
2260
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="calculate-columns-numbers">
2249
2261
  <xsl:param name="table-row"/>
2250
2262
  <xsl:variable name="columns-count" select="count($table-row/*)"/>
2251
2263
  <xsl:variable name="sum-colspans" select="sum($table-row/*/@colspan)"/>
2252
2264
  <xsl:variable name="columns-with-colspan" select="count($table-row/*[@colspan])"/>
2253
2265
  <xsl:value-of select="$columns-count + $sum-colspans - $columns-with-colspan"/>
2254
- </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:csd="https://www.metanorma.org/ns/csd" name="calculate-column-widths">
2266
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="calculate-column-widths">
2255
2267
  <xsl:param name="table"/>
2256
2268
  <xsl:param name="cols-count"/>
2257
2269
  <xsl:param name="curr-col" select="1"/>
@@ -2260,7 +2272,7 @@
2260
2272
  <xsl:if test="$curr-col &lt;= $cols-count">
2261
2273
  <xsl:variable name="widths">
2262
2274
  <xsl:choose>
2263
- <xsl:when test="not($table)">
2275
+ <xsl:when test="not($table)"><!-- this branch is not using in production, for debug only -->
2264
2276
  <xsl:for-each select="*[local-name()='thead']//*[local-name()='tr']">
2265
2277
  <xsl:variable name="words">
2266
2278
  <xsl:call-template name="tokenize">
@@ -2299,9 +2311,16 @@
2299
2311
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
2300
2312
  </xsl:variable>
2301
2313
  <xsl:variable name="words">
2314
+ <xsl:variable name="string_with_added_zerospaces">
2315
+ <xsl:call-template name="add-zero-spaces-java">
2316
+ <xsl:with-param name="text" select="$td_text"/>
2317
+ </xsl:call-template>
2318
+ </xsl:variable>
2302
2319
  <xsl:call-template name="tokenize">
2303
2320
  <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
2304
- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/>
2321
+ <!-- 2009 thinspace -->
2322
+ <!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
2323
+ <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​', ' '))"/>
2305
2324
  </xsl:call-template>
2306
2325
  </xsl:variable>
2307
2326
  <xsl:variable name="max_length">
@@ -2342,17 +2361,24 @@
2342
2361
  <xsl:with-param name="table" select="$table"/>
2343
2362
  </xsl:call-template>
2344
2363
  </xsl:if>
2345
- </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:csd="https://www.metanorma.org/ns/csd" match="text()" mode="td_text">
2364
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()" mode="td_text">
2346
2365
  <xsl:variable name="zero-space">​</xsl:variable>
2347
2366
  <xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
2348
- </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:csd="https://www.metanorma.org/ns/csd" 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:csd="https://www.metanorma.org/ns/csd" 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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='thead']" mode="process">
2367
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='termsource']" mode="td_text">
2368
+ <xsl:value-of select="*[local-name()='origin']/@citeas"/>
2369
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='link']" mode="td_text">
2370
+ <xsl:value-of select="@target"/>
2371
+ </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">
2372
+ <xsl:param name="cols-count"/>
2349
2373
  <!-- font-weight="bold" -->
2350
- <fo:table-header>
2374
+ <fo:table-header>
2375
+
2351
2376
  <xsl:apply-templates/>
2352
2377
  </fo:table-header>
2353
- </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:csd="https://www.metanorma.org/ns/csd" 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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='tfoot']" mode="process">
2378
+ </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">
2354
2379
  <xsl:apply-templates/>
2355
- </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:csd="https://www.metanorma.org/ns/csd" name="insertTableFooter">
2380
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertTableFooter">
2381
+ <xsl:param name="cols-count"/>
2356
2382
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2357
2383
  <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
2358
2384
 
@@ -2363,22 +2389,7 @@
2363
2389
  <!-- if there are note(s) or fn(s) then create footer row -->
2364
2390
  <xsl:if test="$isNoteOrFnExist = 'true'">
2365
2391
 
2366
- <xsl:variable name="cols-count">
2367
- <xsl:choose>
2368
- <xsl:when test="../*[local-name()='thead']">
2369
- <!-- <xsl:value-of select="count(../*[local-name()='thead']/*[local-name()='tr']/*[local-name()='th'])"/> -->
2370
- <xsl:call-template name="calculate-columns-numbers">
2371
- <xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
2372
- </xsl:call-template>
2373
- </xsl:when>
2374
- <xsl:otherwise>
2375
- <!-- <xsl:value-of select="count(./*[local-name()='tr'][1]/*[local-name()='td'])"/> -->
2376
- <xsl:call-template name="calculate-columns-numbers">
2377
- <xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
2378
- </xsl:call-template>
2379
- </xsl:otherwise>
2380
- </xsl:choose>
2381
- </xsl:variable>
2392
+
2382
2393
 
2383
2394
  <fo:table-row>
2384
2395
  <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
@@ -2406,11 +2417,30 @@
2406
2417
  </fo:table-footer>
2407
2418
 
2408
2419
  </xsl:if>
2409
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='tbody']">
2420
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tbody']">
2410
2421
 
2411
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process"/>
2422
+ <xsl:variable name="cols-count">
2423
+ <xsl:choose>
2424
+ <xsl:when test="../*[local-name()='thead']">
2425
+ <xsl:call-template name="calculate-columns-numbers">
2426
+ <xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
2427
+ </xsl:call-template>
2428
+ </xsl:when>
2429
+ <xsl:otherwise>
2430
+ <xsl:call-template name="calculate-columns-numbers">
2431
+ <xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
2432
+ </xsl:call-template>
2433
+ </xsl:otherwise>
2434
+ </xsl:choose>
2435
+ </xsl:variable>
2412
2436
 
2413
- <xsl:call-template name="insertTableFooter"/>
2437
+ <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
2438
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2439
+ </xsl:apply-templates>
2440
+
2441
+ <xsl:call-template name="insertTableFooter">
2442
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2443
+ </xsl:call-template>
2414
2444
 
2415
2445
  <fo:table-body>
2416
2446
  <xsl:apply-templates/>
@@ -2418,7 +2448,7 @@
2418
2448
 
2419
2449
  </fo:table-body>
2420
2450
 
2421
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='tr']">
2451
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tr']">
2422
2452
  <xsl:variable name="parent-name" select="local-name(..)"/>
2423
2453
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2424
2454
  <fo:table-row min-height="4mm">
@@ -2438,7 +2468,7 @@
2438
2468
 
2439
2469
  <xsl:apply-templates/>
2440
2470
  </fo:table-row>
2441
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='th']">
2471
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='th']">
2442
2472
  <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
2443
2473
 
2444
2474
 
@@ -2461,7 +2491,7 @@
2461
2491
  <xsl:apply-templates/>
2462
2492
  </fo:block>
2463
2493
  </fo:table-cell>
2464
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='td']">
2494
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='td']">
2465
2495
  <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
2466
2496
 
2467
2497
 
@@ -2483,6 +2513,7 @@
2483
2513
  </xsl:attribute>
2484
2514
  </xsl:if>
2485
2515
  <fo:block>
2516
+
2486
2517
  <xsl:apply-templates/>
2487
2518
  </fo:block>
2488
2519
  <!-- <xsl:choose>
@@ -2498,16 +2529,18 @@
2498
2529
 
2499
2530
 
2500
2531
  </fo:table-cell>
2501
- </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:csd="https://www.metanorma.org/ns/csd" 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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='table']/*[local-name()='note']" mode="process">
2532
+ </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">
2502
2533
 
2503
2534
 
2504
2535
  <fo:block font-size="10pt" margin-bottom="12pt">
2505
2536
 
2506
2537
 
2507
2538
 
2539
+
2508
2540
  <fo:inline padding-right="2mm">
2509
2541
 
2510
- <xsl:text>NOTE </xsl:text>
2542
+
2543
+ <xsl:value-of select="$title-note"/>
2511
2544
 
2512
2545
  <xsl:variable name="id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
2513
2546
  <xsl:if test="count(//*[local-name()='note'][ancestor::*[@id = $id]]) &gt; 1">
@@ -2521,9 +2554,9 @@
2521
2554
  <xsl:apply-templates mode="process"/>
2522
2555
  </fo:block>
2523
2556
 
2524
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
2557
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
2525
2558
  <xsl:apply-templates/>
2526
- </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:csd="https://www.metanorma.org/ns/csd" name="fn_display">
2559
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_display">
2527
2560
  <xsl:variable name="references">
2528
2561
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
2529
2562
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -2546,6 +2579,7 @@
2546
2579
 
2547
2580
 
2548
2581
 
2582
+
2549
2583
  <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
2550
2584
 
2551
2585
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -2565,7 +2599,7 @@
2565
2599
  </fo:block>
2566
2600
  </xsl:if>
2567
2601
  </xsl:for-each>
2568
- </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:csd="https://www.metanorma.org/ns/csd" name="fn_name_display">
2602
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_name_display">
2569
2603
  <!-- <xsl:variable name="references">
2570
2604
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2571
2605
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -2581,7 +2615,7 @@
2581
2615
  <xsl:apply-templates/>
2582
2616
  </fo:block>
2583
2617
  </xsl:for-each>
2584
- </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:csd="https://www.metanorma.org/ns/csd" name="fn_display_figure">
2618
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_display_figure">
2585
2619
  <xsl:variable name="key_iso">
2586
2620
  <!-- and (not(@class) or @class !='pseudocode') -->
2587
2621
  </xsl:variable>
@@ -2632,7 +2666,7 @@
2632
2666
  </fo:block>
2633
2667
  </xsl:if>
2634
2668
 
2635
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='fn']">
2669
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']">
2636
2670
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2637
2671
  <fo:inline font-size="80%" keep-with-previous.within-line="always">
2638
2672
 
@@ -2654,11 +2688,11 @@
2654
2688
  <xsl:value-of select="@reference"/>
2655
2689
  </fo:basic-link>
2656
2690
  </fo:inline>
2657
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='fn']/*[local-name()='p']">
2691
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']/*[local-name()='p']">
2658
2692
  <fo:inline>
2659
2693
  <xsl:apply-templates/>
2660
2694
  </fo:inline>
2661
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='dl']">
2695
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dl']">
2662
2696
  <xsl:variable name="parent" select="local-name(..)"/>
2663
2697
 
2664
2698
  <xsl:variable name="key_iso">
@@ -2670,8 +2704,8 @@
2670
2704
 
2671
2705
 
2672
2706
  <fo:block margin-bottom="12pt" text-align="left">
2673
-
2674
- <xsl:text>where </xsl:text>
2707
+
2708
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2675
2709
  <xsl:apply-templates select="*[local-name()='dt']/*"/>
2676
2710
  <xsl:text/>
2677
2711
  <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
@@ -2684,7 +2718,7 @@
2684
2718
 
2685
2719
 
2686
2720
 
2687
- <xsl:text>where</xsl:text>
2721
+ <xsl:value-of select="$title-where"/>
2688
2722
  </fo:block>
2689
2723
  </xsl:when>
2690
2724
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
@@ -2692,7 +2726,7 @@
2692
2726
 
2693
2727
 
2694
2728
 
2695
- <xsl:text>Key</xsl:text>
2729
+ <xsl:value-of select="$title-key"/>
2696
2730
  </fo:block>
2697
2731
  </xsl:when>
2698
2732
  </xsl:choose>
@@ -2703,9 +2737,11 @@
2703
2737
 
2704
2738
 
2705
2739
 
2740
+
2706
2741
  <fo:block>
2707
2742
 
2708
2743
 
2744
+
2709
2745
  <!-- create virtual html table for dl/[dt and dd] -->
2710
2746
  <xsl:variable name="html-table">
2711
2747
  <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
@@ -2757,7 +2793,7 @@
2757
2793
  <xsl:otherwise>
2758
2794
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
2759
2795
  <xsl:choose>
2760
- <xsl:when test=". = 1">
2796
+ <xsl:when test=". = 1 or . = 0">
2761
2797
  <fo:table-column column-width="proportional-column-width(2)"/>
2762
2798
  </xsl:when>
2763
2799
  <xsl:otherwise>
@@ -2780,7 +2816,7 @@
2780
2816
  </fo:block>
2781
2817
  </fo:block>
2782
2818
  </xsl:if>
2783
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='dl']/*[local-name()='note']">
2819
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dl']/*[local-name()='note']">
2784
2820
  <xsl:param name="key_iso"/>
2785
2821
 
2786
2822
  <!-- <tr>
@@ -2796,7 +2832,7 @@
2796
2832
  <xsl:if test="normalize-space($key_iso) = 'true'">
2797
2833
  <xsl:attribute name="margin-top">0</xsl:attribute>
2798
2834
  </xsl:if>
2799
- NOTE
2835
+ <xsl:value-of select="$title-note"/>
2800
2836
  </fo:block>
2801
2837
  </fo:table-cell>
2802
2838
  <fo:table-cell>
@@ -2805,7 +2841,7 @@
2805
2841
  </fo:block>
2806
2842
  </fo:table-cell>
2807
2843
  </fo:table-row>
2808
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='dt']" mode="dl">
2844
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dt']" mode="dl">
2809
2845
  <tr>
2810
2846
  <td>
2811
2847
  <xsl:apply-templates/>
@@ -2818,11 +2854,12 @@
2818
2854
  </td>
2819
2855
  </tr>
2820
2856
 
2821
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='dt']">
2857
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dt']">
2822
2858
  <xsl:param name="key_iso"/>
2823
2859
 
2824
2860
  <fo:table-row>
2825
2861
  <fo:table-cell>
2862
+
2826
2863
  <fo:block margin-top="6pt">
2827
2864
 
2828
2865
 
@@ -2832,6 +2869,9 @@
2832
2869
  </xsl:if>
2833
2870
 
2834
2871
 
2872
+
2873
+
2874
+
2835
2875
  <xsl:apply-templates/>
2836
2876
 
2837
2877
  </fo:block>
@@ -2847,37 +2887,37 @@
2847
2887
  </fo:table-cell>
2848
2888
  </fo:table-row>
2849
2889
 
2850
- </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:csd="https://www.metanorma.org/ns/csd" 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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='dd']" mode="dl_process">
2890
+ </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">
2851
2891
  <xsl:apply-templates/>
2852
- </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:csd="https://www.metanorma.org/ns/csd" 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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='dd']" mode="process">
2892
+ </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">
2853
2893
  <xsl:apply-templates/>
2854
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
2894
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
2855
2895
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
2856
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='em']">
2896
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='em']">
2857
2897
  <fo:inline font-style="italic">
2858
2898
  <xsl:apply-templates/>
2859
2899
  </fo:inline>
2860
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='strong']">
2900
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='strong']">
2861
2901
  <fo:inline font-weight="bold">
2862
2902
  <xsl:apply-templates/>
2863
2903
  </fo:inline>
2864
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='sup']">
2904
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sup']">
2865
2905
  <fo:inline font-size="80%" vertical-align="super">
2866
2906
  <xsl:apply-templates/>
2867
2907
  </fo:inline>
2868
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='sub']">
2908
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sub']">
2869
2909
  <fo:inline font-size="80%" vertical-align="sub">
2870
2910
  <xsl:apply-templates/>
2871
2911
  </fo:inline>
2872
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='tt']">
2873
- <fo:inline font-family="Courier" font-size="10pt">
2912
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tt']">
2913
+ <fo:inline font-family="Courier" font-size="10pt">
2874
2914
  <xsl:apply-templates/>
2875
2915
  </fo:inline>
2876
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='del']">
2916
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='del']">
2877
2917
  <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2878
2918
  <xsl:apply-templates/>
2879
2919
  </fo:inline>
2880
- </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:csd="https://www.metanorma.org/ns/csd" match="text()[ancestor::*[local-name()='smallcap']]">
2920
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()[ancestor::*[local-name()='smallcap']]">
2881
2921
  <xsl:variable name="text" select="normalize-space(.)"/>
2882
2922
  <fo:inline font-size="75%">
2883
2923
  <xsl:if test="string-length($text) &gt; 0">
@@ -2886,7 +2926,7 @@
2886
2926
  </xsl:call-template>
2887
2927
  </xsl:if>
2888
2928
  </fo:inline>
2889
- </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:csd="https://www.metanorma.org/ns/csd" name="recursiveSmallCaps">
2929
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="recursiveSmallCaps">
2890
2930
  <xsl:param name="text"/>
2891
2931
  <xsl:variable name="char" select="substring($text,1,1)"/>
2892
2932
  <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/>
@@ -2905,7 +2945,7 @@
2905
2945
  <xsl:with-param name="text" select="substring($text,2)"/>
2906
2946
  </xsl:call-template>
2907
2947
  </xsl:if>
2908
- </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:csd="https://www.metanorma.org/ns/csd" name="tokenize">
2948
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="tokenize">
2909
2949
  <xsl:param name="text"/>
2910
2950
  <xsl:param name="separator" select="' '"/>
2911
2951
  <xsl:choose>
@@ -2953,7 +2993,7 @@
2953
2993
  </xsl:call-template>
2954
2994
  </xsl:otherwise>
2955
2995
  </xsl:choose>
2956
- </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:csd="https://www.metanorma.org/ns/csd" name="max_length">
2996
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="max_length">
2957
2997
  <xsl:param name="words"/>
2958
2998
  <xsl:for-each select="$words//word">
2959
2999
  <xsl:sort select="." data-type="number" order="descending"/>
@@ -2961,7 +3001,11 @@
2961
3001
  <xsl:value-of select="."/>
2962
3002
  </xsl:if>
2963
3003
  </xsl:for-each>
2964
- </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:csd="https://www.metanorma.org/ns/csd" name="add-zero-spaces">
3004
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces-java">
3005
+ <xsl:param name="text" select="."/>
3006
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
3007
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
3008
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces">
2965
3009
  <xsl:param name="text" select="."/>
2966
3010
  <xsl:variable name="zero-space-after-chars">-</xsl:variable>
2967
3011
  <xsl:variable name="zero-space-after-dot">.</xsl:variable>
@@ -3014,7 +3058,7 @@
3014
3058
  <xsl:value-of select="$text"/>
3015
3059
  </xsl:otherwise>
3016
3060
  </xsl:choose>
3017
- </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:csd="https://www.metanorma.org/ns/csd" name="add-zero-spaces-equal">
3061
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces-equal">
3018
3062
  <xsl:param name="text" select="."/>
3019
3063
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
3020
3064
  <xsl:variable name="zero-space-after-equal">=</xsl:variable>
@@ -3040,7 +3084,7 @@
3040
3084
  <xsl:value-of select="$text"/>
3041
3085
  </xsl:otherwise>
3042
3086
  </xsl:choose>
3043
- </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:csd="https://www.metanorma.org/ns/csd" name="getSimpleTable">
3087
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getSimpleTable">
3044
3088
  <xsl:variable name="simple-table">
3045
3089
 
3046
3090
  <!-- Step 1. colspan processing -->
@@ -3067,9 +3111,9 @@
3067
3111
  </xsl:choose> -->
3068
3112
  </xsl:variable>
3069
3113
  <xsl:copy-of select="$simple-table"/>
3070
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
3114
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
3071
3115
  <xsl:apply-templates mode="simple-table-colspan"/>
3072
- </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:csd="https://www.metanorma.org/ns/csd" 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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='th'] | *[local-name()='td']" mode="simple-table-colspan">
3116
+ </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">
3073
3117
  <xsl:choose>
3074
3118
  <xsl:when test="@colspan">
3075
3119
  <xsl:variable name="td">
@@ -3091,16 +3135,16 @@
3091
3135
  </xsl:element>
3092
3136
  </xsl:otherwise>
3093
3137
  </xsl:choose>
3094
- </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:csd="https://www.metanorma.org/ns/csd" 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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='tr']" mode="simple-table-colspan">
3138
+ </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">
3095
3139
  <xsl:element name="tr">
3096
3140
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
3097
3141
  <xsl:apply-templates mode="simple-table-colspan"/>
3098
3142
  </xsl:element>
3099
- </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:csd="https://www.metanorma.org/ns/csd" match="@*|node()" mode="simple-table-colspan">
3143
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@*|node()" mode="simple-table-colspan">
3100
3144
  <xsl:copy>
3101
3145
  <xsl:apply-templates select="@*|node()" mode="simple-table-colspan"/>
3102
3146
  </xsl:copy>
3103
- </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:csd="https://www.metanorma.org/ns/csd" name="repeatNode">
3147
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="repeatNode">
3104
3148
  <xsl:param name="count"/>
3105
3149
  <xsl:param name="node"/>
3106
3150
 
@@ -3111,18 +3155,18 @@
3111
3155
  </xsl:call-template>
3112
3156
  <xsl:copy-of select="$node"/>
3113
3157
  </xsl:if>
3114
- </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:csd="https://www.metanorma.org/ns/csd" match="@*|node()" mode="simple-table-rowspan">
3158
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@*|node()" mode="simple-table-rowspan">
3115
3159
  <xsl:copy>
3116
3160
  <xsl:apply-templates select="@*|node()" mode="simple-table-rowspan"/>
3117
3161
  </xsl:copy>
3118
- </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:csd="https://www.metanorma.org/ns/csd" match="tbody" mode="simple-table-rowspan">
3162
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="tbody" mode="simple-table-rowspan">
3119
3163
  <xsl:copy>
3120
3164
  <xsl:copy-of select="tr[1]"/>
3121
3165
  <xsl:apply-templates select="tr[2]" mode="simple-table-rowspan">
3122
3166
  <xsl:with-param name="previousRow" select="tr[1]"/>
3123
3167
  </xsl:apply-templates>
3124
3168
  </xsl:copy>
3125
- </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:csd="https://www.metanorma.org/ns/csd" match="tr" mode="simple-table-rowspan">
3169
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="tr" mode="simple-table-rowspan">
3126
3170
  <xsl:param name="previousRow"/>
3127
3171
  <xsl:variable name="currentRow" select="."/>
3128
3172
 
@@ -3156,13 +3200,13 @@
3156
3200
  <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
3157
3201
  <xsl:with-param name="previousRow" select="$newRow"/>
3158
3202
  </xsl:apply-templates>
3159
- </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:csd="https://www.metanorma.org/ns/csd" name="getLang">
3203
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getLang">
3160
3204
  <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
3161
3205
  <xsl:choose>
3162
3206
  <xsl:when test="$language = 'English'">en</xsl:when>
3163
3207
  <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
3164
3208
  </xsl:choose>
3165
- </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:csd="https://www.metanorma.org/ns/csd" name="capitalizeWords">
3209
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="capitalizeWords">
3166
3210
  <xsl:param name="str"/>
3167
3211
  <xsl:variable name="str2" select="translate($str, '-', ' ')"/>
3168
3212
  <xsl:choose>
@@ -3180,19 +3224,19 @@
3180
3224
  <xsl:value-of select="substring($str2, 2)"/>
3181
3225
  </xsl:otherwise>
3182
3226
  </xsl:choose>
3183
- </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:csd="https://www.metanorma.org/ns/csd" match="mathml:math">
3227
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="mathml:math">
3184
3228
  <fo:inline font-family="STIX2Math">
3185
3229
  <fo:instream-foreign-object fox:alt-text="Math">
3186
3230
  <xsl:copy-of select="."/>
3187
3231
  </fo:instream-foreign-object>
3188
3232
  </fo:inline>
3189
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='localityStack']">
3233
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='localityStack']">
3190
3234
  <xsl:for-each select="*[local-name()='locality']">
3191
3235
  <xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
3192
3236
  <xsl:apply-templates select="."/>
3193
3237
  <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
3194
3238
  </xsl:for-each>
3195
- </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:csd="https://www.metanorma.org/ns/csd" match="*[local-name()='link']" name="link">
3239
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='link']" name="link">
3196
3240
  <xsl:variable name="target">
3197
3241
  <xsl:choose>
3198
3242
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
@@ -3222,4 +3266,122 @@
3222
3266
  </xsl:otherwise>
3223
3267
  </xsl:choose>
3224
3268
  </fo:inline>
3269
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sourcecode']" name="sourcecode">
3270
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
3271
+ <!-- <xsl:choose>
3272
+ <xsl:when test="@lang = 'en'"></xsl:when>
3273
+ <xsl:otherwise> -->
3274
+ <xsl:attribute name="white-space">pre</xsl:attribute>
3275
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
3276
+ <!-- </xsl:otherwise>
3277
+ </xsl:choose> -->
3278
+ <xsl:apply-templates/>
3279
+ </fo:block>
3280
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='bookmark']">
3281
+ <fo:inline id="{@id}"/>
3282
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']">
3283
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
3284
+ <fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
3285
+ <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
3286
+ </fo:block>
3287
+ <xsl:apply-templates/>
3288
+ </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">
3289
+ <fo:inline><xsl:apply-templates/></fo:inline>
3290
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']//*[local-name()='example']">
3291
+ <fo:block xsl:use-attribute-sets="appendix-example-style">
3292
+ <xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
3293
+ <xsl:value-of select="$title-example"/>
3294
+ <xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) &gt; 1">
3295
+ <xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
3296
+ </xsl:if>
3297
+ <xsl:if test="*[local-name()='name']">
3298
+ <xsl:text>— </xsl:text><xsl:apply-templates select="*[local-name()='name']" mode="process"/>
3299
+ </xsl:if>
3300
+ </fo:block>
3301
+ <xsl:apply-templates/>
3302
+ </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">
3303
+ <fo:inline><xsl:apply-templates/></fo:inline>
3304
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'callout']">
3305
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
3306
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'annotation']">
3307
+ <xsl:variable name="annotation-id" select="@id"/>
3308
+ <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
3309
+ <fo:block id="{$annotation-id}" white-space="nowrap">
3310
+ <fo:inline>
3311
+ <xsl:apply-templates>
3312
+ <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
3313
+ </xsl:apply-templates>
3314
+ </fo:inline>
3315
+ </fo:block>
3316
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'annotation']/*[local-name() = 'p']">
3317
+ <xsl:param name="callout"/>
3318
+ <fo:inline id="{@id}">
3319
+ <!-- for first p in annotation, put <x> -->
3320
+ <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
3321
+ <xsl:apply-templates/>
3322
+ </fo:inline>
3323
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="convertDate">
3324
+ <xsl:param name="date"/>
3325
+ <xsl:param name="format" select="'short'"/>
3326
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
3327
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
3328
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
3329
+ <xsl:variable name="monthStr">
3330
+ <xsl:choose>
3331
+ <xsl:when test="$month = '01'">January</xsl:when>
3332
+ <xsl:when test="$month = '02'">February</xsl:when>
3333
+ <xsl:when test="$month = '03'">March</xsl:when>
3334
+ <xsl:when test="$month = '04'">April</xsl:when>
3335
+ <xsl:when test="$month = '05'">May</xsl:when>
3336
+ <xsl:when test="$month = '06'">June</xsl:when>
3337
+ <xsl:when test="$month = '07'">July</xsl:when>
3338
+ <xsl:when test="$month = '08'">August</xsl:when>
3339
+ <xsl:when test="$month = '09'">September</xsl:when>
3340
+ <xsl:when test="$month = '10'">October</xsl:when>
3341
+ <xsl:when test="$month = '11'">November</xsl:when>
3342
+ <xsl:when test="$month = '12'">December</xsl:when>
3343
+ </xsl:choose>
3344
+ </xsl:variable>
3345
+ <xsl:variable name="result">
3346
+ <xsl:choose>
3347
+ <xsl:when test="$format = 'short' or $day = ''">
3348
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
3349
+ </xsl:when>
3350
+ <xsl:otherwise>
3351
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
3352
+ </xsl:otherwise>
3353
+ </xsl:choose>
3354
+ </xsl:variable>
3355
+ <xsl:value-of select="$result"/>
3356
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertKeywords">
3357
+ <xsl:param name="sorting" select="'true'"/>
3358
+ <xsl:param name="charAtEnd" select="'.'"/>
3359
+ <xsl:param name="charDelim" select="', '"/>
3360
+ <xsl:choose>
3361
+ <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
3362
+ <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
3363
+ <xsl:sort data-type="text" order="ascending"/>
3364
+ <xsl:call-template name="insertKeyword">
3365
+ <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
3366
+ <xsl:with-param name="charDelim" select="$charDelim"/>
3367
+ </xsl:call-template>
3368
+ </xsl:for-each>
3369
+ </xsl:when>
3370
+ <xsl:otherwise>
3371
+ <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
3372
+ <xsl:call-template name="insertKeyword">
3373
+ <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
3374
+ <xsl:with-param name="charDelim" select="$charDelim"/>
3375
+ </xsl:call-template>
3376
+ </xsl:for-each>
3377
+ </xsl:otherwise>
3378
+ </xsl:choose>
3379
+ </xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertKeyword">
3380
+ <xsl:param name="charAtEnd"/>
3381
+ <xsl:param name="charDelim"/>
3382
+ <xsl:apply-templates/>
3383
+ <xsl:choose>
3384
+ <xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
3385
+ <xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
3386
+ </xsl:choose>
3225
3387
  </xsl:template></xsl:stylesheet>