metanorma-jis 0.5.7 → 0.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:jis="https://www.metanorma.org/ns/standoc" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:java="http://xml.apache.org/xalan/java" xmlns:jeuclid="http://jeuclid.sf.net/ns/ext" xmlns:barcode="http://barcode4j.krysalis.org/ns" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java" extension-element-prefixes="redirect" version="1.0">
1
+ <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:jis="https://www.metanorma.org/ns/standoc" xmlns:mn="https://www.metanorma.org/ns/xslt" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:java="http://xml.apache.org/xalan/java" xmlns:jeuclid="http://jeuclid.sf.net/ns/ext" xmlns:barcode="http://barcode4j.krysalis.org/ns" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java" extension-element-prefixes="redirect" version="1.0">
2
2
 
3
3
  <xsl:output method="xml" encoding="UTF-8" indent="no"/>
4
4
 
@@ -33,16 +33,16 @@
33
33
  </xsl:variable>
34
34
 
35
35
  <xsl:for-each select="xalan:nodeset($current_document)"> <!-- . -->
36
- <doc num="{$num}" firstpage_id="firstpage_id_{$num}" title-part="{$docnumber}" bundle="{$bundle}"> <!-- 'bundle' means several different documents (not language versions) in one xml -->
37
- <contents>
36
+ <mn:doc num="{$num}" firstpage_id="firstpage_id_{$num}" title-part="{$docnumber}" bundle="{$bundle}"> <!-- 'bundle' means several different documents (not language versions) in one xml -->
37
+ <mn:contents>
38
38
  <!-- <xsl:call-template name="processPrefaceSectionsDefault_Contents"/> -->
39
39
 
40
40
  <xsl:call-template name="processMainSectionsDefault_Contents"/>
41
41
 
42
42
  <xsl:apply-templates select="//jis:indexsect" mode="contents"/>
43
43
 
44
- </contents>
45
- </doc>
44
+ </mn:contents>
45
+ </mn:doc>
46
46
  </xsl:for-each>
47
47
  </xsl:for-each>
48
48
  </xsl:variable>
@@ -1026,8 +1026,8 @@
1026
1026
  <xsl:attribute name="font-size">10.5pt</xsl:attribute>
1027
1027
  </xsl:if>
1028
1028
 
1029
- <xsl:if test="$updated_contents_xml/doc[@num = $num]//item[@display = 'true']">
1030
- <xsl:for-each select="$updated_contents_xml/doc[@num = $num]//item[@display = 'true'][@level &lt;= $toc_level or @type='figure' or @type = 'table']">
1029
+ <xsl:if test="$updated_contents_xml/mn:doc[@num = $num]//mn:item[@display = 'true']">
1030
+ <xsl:for-each select="$updated_contents_xml/mn:doc[@num = $num]//mn:item[@display = 'true'][@level &lt;= $toc_level or @type='figure' or @type = 'table']">
1031
1031
  <fo:block role="TOCI">
1032
1032
  <xsl:choose>
1033
1033
  <xsl:when test="@type = 'annex' or @type = 'bibliography'">
@@ -1134,12 +1134,12 @@
1134
1134
 
1135
1135
  <xsl:template name="insertTocItem">
1136
1136
  <fo:block text-align-last="justify" role="SKIP">
1137
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{normalize-space(title)}">
1137
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{normalize-space(mn:title)}">
1138
1138
  <fo:inline>
1139
1139
  <xsl:if test="$vertical_layout = 'true'">
1140
1140
  <xsl:attribute name="padding-right">7.5mm</xsl:attribute>
1141
1141
  </xsl:if>
1142
- <xsl:apply-templates select="title"/>
1142
+ <xsl:apply-templates select="mn:title"/>
1143
1143
  </fo:inline>
1144
1144
  <fo:inline keep-together.within-line="always">
1145
1145
  <fo:leader leader-pattern="dots">
@@ -1814,19 +1814,19 @@
1814
1814
  <xsl:if test="ancestor-or-self::jis:annex">annex</xsl:if>
1815
1815
  </xsl:variable>
1816
1816
 
1817
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
1817
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
1818
1818
  <xsl:if test="$type = 'index'">
1819
1819
  <xsl:attribute name="level">1</xsl:attribute>
1820
1820
  </xsl:if>
1821
- <title>
1821
+ <mn:title>
1822
1822
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
1823
1823
  <xsl:with-param name="mode">contents</xsl:with-param>
1824
1824
  </xsl:apply-templates>
1825
- </title>
1825
+ </mn:title>
1826
1826
  <xsl:if test="$type != 'index'">
1827
1827
  <xsl:apply-templates mode="contents"/>
1828
1828
  </xsl:if>
1829
- </item>
1829
+ </mn:item>
1830
1830
  </xsl:if>
1831
1831
  </xsl:template>
1832
1832
 
@@ -2107,12 +2107,10 @@
2107
2107
 
2108
2108
  <xsl:template match="*[local-name() = 'term']" priority="2">
2109
2109
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
2110
-
2111
- <xsl:if test="$vertical_layout = 'true'">
2112
- <xsl:attribute name="letter-spacing">1mm</xsl:attribute>
2113
- <xsl:attribute name="margin-left">-6mm</xsl:attribute>
2114
- </xsl:if>
2115
-
2110
+ <xsl:if test="$vertical_layout = 'true'">
2111
+ <xsl:attribute name="letter-spacing">1mm</xsl:attribute>
2112
+ <xsl:attribute name="margin-left">-6mm</xsl:attribute>
2113
+ </xsl:if>
2116
2114
  </fo:block>
2117
2115
  <fo:block>
2118
2116
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
@@ -5573,34 +5571,25 @@
5573
5571
  </xsl:variable>
5574
5572
  <xsl:variable name="JSA-Cover-en" select="normalize-space($JSA-Cover-en_)"/>
5575
5573
 
5576
- <!-- <xsl:strip-space elements="jis:xref"/> -->
5574
+ <!-- https://www.metanorma.org/ns/standoc -->
5575
+ <xsl:variable name="namespace_full" select="namespace-uri(//*[local-name() = 'metanorma'][1])"/>
5577
5576
 
5578
- <xsl:variable name="namespace_full_">
5579
- <xsl:choose>
5580
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
5581
- <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
5582
- </xsl:choose>
5583
- </xsl:variable>
5584
- <xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
5577
+ <!-- https://www.metanorma.org/ns/xsl -->
5578
+ <xsl:variable name="namespace_mn_xsl">https://www.metanorma.org/ns/xslt</xsl:variable>
5585
5579
 
5586
- <xsl:variable name="root_element_">
5587
- <xsl:choose>
5588
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
5589
- <xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
5590
- </xsl:choose>
5591
- </xsl:variable>
5592
- <xsl:variable name="root_element" select="normalize-space($root_element_)"/>
5580
+ <xsl:variable name="root_element">metanorma</xsl:variable>
5593
5581
 
5582
+ <!---examples: 2013, 2024 -->
5594
5583
  <xsl:variable name="document_scheme" select="normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
5595
5584
 
5596
5585
  <!-- external parameters -->
5597
-
5598
5586
  <xsl:param name="svg_images"/> <!-- svg images array -->
5599
5587
  <xsl:variable name="images" select="document($svg_images)"/>
5600
5588
  <xsl:param name="basepath"/> <!-- base path for images -->
5601
5589
  <xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
5602
5590
  <xsl:param name="inputxml_filename"/> <!-- input xml file name -->
5603
5591
  <xsl:param name="output_path"/> <!-- output PDF file name -->
5592
+ <xsl:param name="outputpdf_basepath"/> <!-- output PDF folder -->
5604
5593
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
5605
5594
  <xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
5606
5595
  <xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
@@ -5647,20 +5636,13 @@
5647
5636
 
5648
5637
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
5649
5638
 
5650
- <xsl:variable name="isApplyAutolayoutAlgorithm_">
5651
- true
5639
+ <!-- don't remove and rename this variable, it's using in mn2pdf tool -->
5640
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">true
5652
5641
  </xsl:variable>
5653
5642
  <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
5654
5643
 
5655
- <xsl:variable name="isGenerateTableIF_">
5656
- <xsl:choose>
5657
- <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
5658
- <xsl:value-of select="normalize-space($table_if) = 'true'"/>
5659
- </xsl:when>
5660
- <xsl:otherwise>false</xsl:otherwise>
5661
- </xsl:choose>
5662
- </xsl:variable>
5663
- <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
5644
+ <xsl:variable name="isGenerateTableIF"><xsl:value-of select="$table_if"/></xsl:variable>
5645
+ <!-- <xsl:variable name="isGenerateTableIF" select="normalize-space(normalize-space($table_if) = 'true' and 1 = 1)"/> -->
5664
5646
 
5665
5647
  <xsl:variable name="lang">
5666
5648
  <xsl:call-template name="getLang"/>
@@ -5712,8 +5694,7 @@
5712
5694
  <xsl:variable name="pageWidth_">
5713
5695
  <xsl:choose>
5714
5696
  <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
5715
- <xsl:otherwise>
5716
- 210
5697
+ <xsl:otherwise>210
5717
5698
  </xsl:otherwise>
5718
5699
  </xsl:choose>
5719
5700
  </xsl:variable>
@@ -5723,8 +5704,7 @@
5723
5704
  <xsl:variable name="pageHeight_">
5724
5705
  <xsl:choose>
5725
5706
  <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
5726
- <xsl:otherwise>
5727
- 297
5707
+ <xsl:otherwise>297
5728
5708
  </xsl:otherwise>
5729
5709
  </xsl:choose>
5730
5710
  </xsl:variable>
@@ -5734,41 +5714,37 @@
5734
5714
  <!-- marginLeftRight1 and marginLeftRight2 - is left or right margin depends on odd/even page,
5735
5715
  for example, left margin on odd page and right margin on even page -->
5736
5716
  <xsl:variable name="marginLeftRight1_">
5737
-
5738
- <xsl:choose>
5739
- <xsl:when test="$vertical_layout = 'true'">19</xsl:when>
5740
- <xsl:otherwise>22</xsl:otherwise>
5741
- </xsl:choose>
5717
+ <xsl:choose>
5718
+ <xsl:when test="$vertical_layout = 'true'">19</xsl:when>
5719
+ <xsl:otherwise>22</xsl:otherwise>
5720
+ </xsl:choose>
5742
5721
 
5743
5722
  </xsl:variable>
5744
5723
  <xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/>
5745
5724
 
5746
5725
  <xsl:variable name="marginLeftRight2_">
5747
-
5748
- <xsl:choose>
5749
- <xsl:when test="$vertical_layout = 'true'">17</xsl:when>
5750
- <xsl:otherwise>22</xsl:otherwise>
5751
- </xsl:choose>
5726
+ <xsl:choose>
5727
+ <xsl:when test="$vertical_layout = 'true'">17</xsl:when>
5728
+ <xsl:otherwise>22</xsl:otherwise>
5729
+ </xsl:choose>
5752
5730
 
5753
5731
  </xsl:variable>
5754
5732
  <xsl:variable name="marginLeftRight2" select="normalize-space($marginLeftRight2_)"/>
5755
5733
 
5756
5734
  <xsl:variable name="marginTop_">
5757
-
5758
- <xsl:choose>
5759
- <xsl:when test="$vertical_layout = 'true'">16</xsl:when> <!-- 9.4 -->
5760
- <xsl:otherwise>30</xsl:otherwise>
5761
- </xsl:choose>
5735
+ <xsl:choose>
5736
+ <xsl:when test="$vertical_layout = 'true'">16</xsl:when> <!-- 9.4 -->
5737
+ <xsl:otherwise>30</xsl:otherwise>
5738
+ </xsl:choose>
5762
5739
 
5763
5740
  </xsl:variable>
5764
5741
  <xsl:variable name="marginTop" select="normalize-space($marginTop_)"/>
5765
5742
 
5766
5743
  <xsl:variable name="marginBottom_">
5767
-
5768
- <xsl:choose>
5769
- <xsl:when test="$vertical_layout = 'true'">15.2</xsl:when>
5770
- <xsl:otherwise>24.5</xsl:otherwise>
5771
- </xsl:choose>
5744
+ <xsl:choose>
5745
+ <xsl:when test="$vertical_layout = 'true'">15.2</xsl:when>
5746
+ <xsl:otherwise>24.5</xsl:otherwise>
5747
+ </xsl:choose>
5772
5748
 
5773
5749
  </xsl:variable>
5774
5750
  <xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
@@ -5818,13 +5794,10 @@
5818
5794
  <title-toc lang="zh">目次</title-toc>
5819
5795
 
5820
5796
  <title-part lang="en">
5821
-
5822
5797
  </title-part>
5823
5798
  <title-part lang="fr">
5824
-
5825
5799
  </title-part>
5826
5800
  <title-part lang="ru">
5827
-
5828
5801
  </title-part>
5829
5802
  <title-part lang="zh">第 # 部分:</title-part>
5830
5803
 
@@ -5920,11 +5893,9 @@
5920
5893
  <xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable>
5921
5894
  <xsl:variable name="font_noto_serif">Noto Serif, Noto Serif HK, Noto Serif JP, Noto Serif KR, Noto Serif SC, Noto Serif TC</xsl:variable>
5922
5895
  <xsl:attribute-set name="root-style">
5923
-
5924
- <xsl:attribute name="font-family">IPAexMincho, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
5925
- <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
5926
- <xsl:attribute name="font-size">10pt</xsl:attribute>
5927
-
5896
+ <xsl:attribute name="font-family">IPAexMincho, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
5897
+ <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
5898
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
5928
5899
  </xsl:attribute-set> <!-- root-style -->
5929
5900
 
5930
5901
  <xsl:template name="insertRootStyle">
@@ -6012,28 +5983,22 @@
6012
5983
 
6013
5984
  <!-- Preface sections styles -->
6014
5985
  <xsl:attribute-set name="copyright-statement-style">
6015
-
6016
5986
  </xsl:attribute-set> <!-- copyright-statement-style -->
6017
5987
 
6018
5988
  <xsl:attribute-set name="copyright-statement-title-style">
6019
-
6020
5989
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
6021
5990
 
6022
5991
  <xsl:attribute-set name="copyright-statement-p-style">
6023
-
6024
5992
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
6025
5993
 
6026
5994
  <xsl:attribute-set name="license-statement-style">
6027
-
6028
5995
  </xsl:attribute-set>
6029
5996
 
6030
5997
  <xsl:attribute-set name="license-statement-title-style">
6031
5998
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6032
-
6033
5999
  </xsl:attribute-set> <!-- license-statement-title-style -->
6034
6000
 
6035
6001
  <xsl:attribute-set name="license-statement-p-style">
6036
-
6037
6002
  </xsl:attribute-set> <!-- license-statement-p-style -->
6038
6003
 
6039
6004
  <xsl:attribute-set name="legal-statement-style">
@@ -6042,80 +6007,63 @@
6042
6007
 
6043
6008
  <xsl:attribute-set name="legal-statement-title-style">
6044
6009
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6045
-
6046
6010
  </xsl:attribute-set> <!-- legal-statement-title-style -->
6047
6011
 
6048
6012
  <xsl:attribute-set name="legal-statement-p-style">
6049
-
6050
6013
  </xsl:attribute-set> <!-- legal-statement-p-style -->
6051
6014
 
6052
6015
  <xsl:attribute-set name="feedback-statement-style">
6053
-
6054
6016
  </xsl:attribute-set> <!-- feedback-statement-style -->
6055
6017
 
6056
6018
  <xsl:attribute-set name="feedback-statement-title-style">
6057
6019
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6058
-
6059
6020
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
6060
6021
 
6061
6022
  <xsl:attribute-set name="feedback-statement-p-style">
6062
-
6063
6023
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
6064
6024
 
6065
6025
  <!-- End Preface sections styles -->
6066
6026
 
6067
6027
  <xsl:attribute-set name="link-style">
6068
-
6069
6028
  </xsl:attribute-set>
6070
6029
 
6071
6030
  <xsl:template name="refine_link-style">
6072
-
6073
6031
  </xsl:template> <!-- refine_link-style -->
6074
6032
 
6075
6033
  <xsl:attribute-set name="sourcecode-container-style">
6076
-
6077
6034
  </xsl:attribute-set>
6078
6035
 
6079
6036
  <xsl:attribute-set name="sourcecode-style">
6080
6037
  <xsl:attribute name="white-space">pre</xsl:attribute>
6081
6038
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
6082
6039
  <xsl:attribute name="role">Code</xsl:attribute>
6083
-
6084
6040
  </xsl:attribute-set>
6085
6041
 
6086
6042
  <xsl:template name="refine_sourcecode-style">
6087
-
6088
6043
  </xsl:template> <!-- refine_sourcecode-style -->
6089
6044
 
6090
6045
  <xsl:attribute-set name="pre-style">
6091
6046
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
6092
6047
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
6093
-
6094
6048
  </xsl:attribute-set>
6095
6049
 
6096
6050
  <xsl:attribute-set name="permission-style">
6097
-
6098
6051
  </xsl:attribute-set>
6099
6052
 
6100
6053
  <xsl:attribute-set name="permission-name-style">
6101
-
6102
6054
  </xsl:attribute-set>
6103
6055
 
6104
6056
  <xsl:attribute-set name="permission-label-style">
6105
-
6106
6057
  </xsl:attribute-set>
6107
6058
 
6108
6059
  <xsl:attribute-set name="requirement-style">
6109
-
6110
6060
  </xsl:attribute-set>
6111
6061
 
6112
6062
  <xsl:attribute-set name="requirement-name-style">
6113
6063
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6114
-
6115
6064
  </xsl:attribute-set>
6116
6065
 
6117
6066
  <xsl:attribute-set name="requirement-label-style">
6118
-
6119
6067
  </xsl:attribute-set>
6120
6068
 
6121
6069
  <xsl:attribute-set name="subject-style">
@@ -6143,137 +6091,106 @@
6143
6091
  </xsl:attribute-set>
6144
6092
 
6145
6093
  <xsl:attribute-set name="recommendation-style">
6146
-
6147
6094
  </xsl:attribute-set>
6148
6095
 
6149
6096
  <xsl:attribute-set name="recommendation-name-style">
6150
-
6151
6097
  </xsl:attribute-set>
6152
6098
 
6153
6099
  <xsl:attribute-set name="recommendation-label-style">
6154
-
6155
6100
  </xsl:attribute-set>
6156
6101
 
6157
6102
  <xsl:attribute-set name="termexample-style">
6158
-
6159
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
6160
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
6161
-
6103
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
6104
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
6162
6105
  </xsl:attribute-set>
6163
6106
 
6164
6107
  <xsl:template name="refine_termexample-style">
6165
-
6166
6108
  </xsl:template>
6167
6109
 
6168
6110
  <xsl:attribute-set name="example-style">
6169
-
6170
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
6171
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
6172
-
6111
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
6112
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
6173
6113
  </xsl:attribute-set> <!-- example-style -->
6174
6114
 
6175
6115
  <xsl:template name="refine_example-style">
6176
-
6177
6116
  </xsl:template> <!-- refine_example-style -->
6178
6117
 
6179
6118
  <xsl:attribute-set name="example-body-style">
6180
-
6181
6119
  </xsl:attribute-set> <!-- example-body-style -->
6182
6120
 
6183
6121
  <xsl:attribute-set name="example-name-style">
6184
-
6185
6122
  </xsl:attribute-set> <!-- example-name-style -->
6186
6123
 
6187
6124
  <xsl:template name="refine_example-name-style">
6188
-
6189
- <xsl:if test="not($vertical_layout = 'true')">
6190
- <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
6191
- </xsl:if>
6192
- <xsl:if test="$vertical_layout = 'true'">
6193
- <xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
6194
- <xsl:attribute name="font-weight">500</xsl:attribute>
6195
- </xsl:if>
6196
-
6125
+ <xsl:if test="not($vertical_layout = 'true')">
6126
+ <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
6127
+ </xsl:if>
6128
+ <xsl:if test="$vertical_layout = 'true'">
6129
+ <xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
6130
+ <xsl:attribute name="font-weight">500</xsl:attribute>
6131
+ </xsl:if>
6197
6132
  </xsl:template>
6198
6133
 
6199
6134
  <xsl:attribute-set name="example-p-style">
6200
-
6201
- <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
6135
+ <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
6202
6136
 
6203
6137
  </xsl:attribute-set> <!-- example-p-style -->
6204
6138
 
6205
6139
  <xsl:template name="refine_example-p-style">
6206
-
6207
6140
  </xsl:template> <!-- refine_example-p-style -->
6208
6141
 
6209
6142
  <xsl:attribute-set name="termexample-name-style">
6210
-
6211
6143
  </xsl:attribute-set> <!-- termexample-name-style -->
6212
6144
 
6213
6145
  <xsl:template name="refine_termexample-name-style">
6214
-
6215
- <xsl:if test="not($vertical_layout = 'true')">
6216
- <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
6217
- </xsl:if>
6218
-
6146
+ <xsl:if test="not($vertical_layout = 'true')">
6147
+ <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
6148
+ </xsl:if>
6219
6149
  </xsl:template>
6220
6150
 
6221
6151
  <!-- ========================== -->
6222
6152
  <!-- Table styles -->
6223
6153
  <!-- ========================== -->
6224
- <xsl:variable name="table-border_">
6225
-
6226
- 0.5pt solid black
6227
-
6154
+ <xsl:variable name="table-border_">0.5pt solid black
6228
6155
  </xsl:variable>
6229
6156
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
6230
6157
 
6231
6158
  <xsl:variable name="table-cell-border_">
6232
-
6233
6159
  </xsl:variable>
6234
6160
  <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
6235
6161
 
6236
6162
  <xsl:attribute-set name="table-container-style">
6237
6163
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
6238
6164
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
6239
-
6240
- <xsl:attribute name="font-size">9pt</xsl:attribute>
6241
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
6242
-
6165
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
6166
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
6243
6167
  </xsl:attribute-set> <!-- table-container-style -->
6244
6168
 
6245
6169
  <xsl:template name="refine_table-container-style">
6246
6170
  <xsl:param name="margin-side"/>
6247
-
6248
6171
  <!-- end table block-container attributes -->
6249
6172
  </xsl:template> <!-- refine_table-container-style -->
6250
6173
 
6251
6174
  <xsl:attribute-set name="table-style">
6252
6175
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
6253
6176
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
6254
-
6255
- <xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
6256
-
6177
+ <xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
6257
6178
  </xsl:attribute-set><!-- table-style -->
6258
6179
 
6259
6180
  <xsl:template name="refine_table-style">
6260
6181
  <xsl:param name="margin-side"/>
6261
6182
 
6262
6183
  <xsl:call-template name="setBordersTableArray"/>
6263
-
6264
- <xsl:if test="ancestor::*[local-name()='preface']">
6265
- <xsl:attribute name="border">none</xsl:attribute>
6266
- </xsl:if>
6267
-
6184
+ <xsl:if test="ancestor::*[local-name()='preface']">
6185
+ <xsl:attribute name="border">none</xsl:attribute>
6186
+ </xsl:if>
6268
6187
  </xsl:template> <!-- refine_table-style -->
6269
6188
 
6270
6189
  <xsl:attribute-set name="table-name-style">
6271
6190
  <xsl:attribute name="role">Caption</xsl:attribute>
6272
6191
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6273
-
6274
- <xsl:attribute name="text-align">center</xsl:attribute>
6275
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
6276
-
6192
+ <xsl:attribute name="text-align">center</xsl:attribute>
6193
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
6277
6194
  </xsl:attribute-set> <!-- table-name-style -->
6278
6195
 
6279
6196
  <xsl:template name="refine_table-name-style">
@@ -6281,46 +6198,36 @@
6281
6198
  <xsl:if test="$continued = 'true'">
6282
6199
  <xsl:attribute name="role">SKIP</xsl:attribute>
6283
6200
  </xsl:if>
6284
-
6285
- <xsl:if test="not($vertical_layout = 'true')">
6286
- <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
6287
- </xsl:if>
6288
-
6201
+ <xsl:if test="not($vertical_layout = 'true')">
6202
+ <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
6203
+ </xsl:if>
6289
6204
  </xsl:template> <!-- refine_table-name-style -->
6290
6205
 
6291
6206
  <xsl:attribute-set name="table-row-style">
6292
6207
  <xsl:attribute name="min-height">4mm</xsl:attribute>
6293
-
6294
6208
  </xsl:attribute-set>
6295
6209
 
6296
6210
  <xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
6297
6211
  <xsl:attribute name="font-weight">bold</xsl:attribute>
6298
-
6299
- <xsl:attribute name="border-top"><xsl:value-of select="$table-border"/></xsl:attribute>
6300
- <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
6301
-
6212
+ <xsl:attribute name="border-top"><xsl:value-of select="$table-border"/></xsl:attribute>
6213
+ <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
6302
6214
  </xsl:attribute-set>
6303
6215
 
6304
6216
  <xsl:template name="refine_table-header-row-style">
6305
6217
 
6306
6218
  <xsl:call-template name="setBordersTableArray"/>
6307
-
6308
- <xsl:if test="ancestor::*[local-name() = 'preface']">
6309
- <xsl:attribute name="border-top">none</xsl:attribute>
6310
- <xsl:attribute name="border-bottom">none</xsl:attribute>
6311
- </xsl:if>
6312
-
6219
+ <xsl:if test="ancestor::*[local-name() = 'preface']">
6220
+ <xsl:attribute name="border-top">none</xsl:attribute>
6221
+ <xsl:attribute name="border-bottom">none</xsl:attribute>
6222
+ </xsl:if>
6313
6223
  </xsl:template> <!-- refine_table-header-row-style -->
6314
6224
 
6315
6225
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
6316
-
6317
- <xsl:attribute name="border-left"><xsl:value-of select="$table-border"/></xsl:attribute>
6318
- <xsl:attribute name="border-right"><xsl:value-of select="$table-border"/></xsl:attribute>
6319
-
6226
+ <xsl:attribute name="border-left"><xsl:value-of select="$table-border"/></xsl:attribute>
6227
+ <xsl:attribute name="border-right"><xsl:value-of select="$table-border"/></xsl:attribute>
6320
6228
  </xsl:attribute-set>
6321
6229
 
6322
6230
  <xsl:template name="refine_table-footer-row-style">
6323
-
6324
6231
  </xsl:template> <!-- refine_table-footer-row-style -->
6325
6232
 
6326
6233
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
@@ -6330,7 +6237,6 @@
6330
6237
  <xsl:template name="refine_table-body-row-style">
6331
6238
 
6332
6239
  <xsl:call-template name="setBordersTableArray"/>
6333
-
6334
6240
  </xsl:template> <!-- refine_table-body-row-style -->
6335
6241
 
6336
6242
  <xsl:attribute-set name="table-header-cell-style">
@@ -6338,40 +6244,33 @@
6338
6244
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
6339
6245
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
6340
6246
  <xsl:attribute name="display-align">center</xsl:attribute>
6341
-
6342
- <xsl:attribute name="font-weight">normal</xsl:attribute>
6343
- <xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
6344
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
6345
- <xsl:attribute name="text-align">center</xsl:attribute>
6346
-
6247
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
6248
+ <xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
6249
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
6250
+ <xsl:attribute name="text-align">center</xsl:attribute>
6347
6251
  </xsl:attribute-set> <!-- table-header-cell-style -->
6348
6252
 
6349
6253
  <xsl:template name="refine_table-header-cell-style">
6350
-
6351
- <xsl:attribute name="text-align">center</xsl:attribute>
6254
+ <xsl:attribute name="text-align">center</xsl:attribute>
6352
6255
 
6353
6256
  <xsl:call-template name="setBordersTableArray"/>
6354
-
6355
- <xsl:if test="ancestor::*[local-name()='preface']">
6356
- <xsl:attribute name="border">none</xsl:attribute>
6357
- </xsl:if>
6257
+ <xsl:if test="ancestor::*[local-name()='preface']">
6258
+ <xsl:attribute name="border">none</xsl:attribute>
6259
+ </xsl:if>
6358
6260
 
6359
6261
  <xsl:if test="$lang = 'ar'">
6360
6262
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
6361
6263
  </xsl:if>
6362
6264
 
6363
6265
  <xsl:call-template name="setTableCellAttributes"/>
6364
-
6365
6266
  </xsl:template> <!-- refine_table-header-cell-style -->
6366
6267
 
6367
6268
  <xsl:attribute-set name="table-cell-style">
6368
6269
  <xsl:attribute name="display-align">center</xsl:attribute>
6369
6270
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
6370
6271
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
6371
-
6372
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
6373
- <xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
6374
-
6272
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
6273
+ <xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
6375
6274
  </xsl:attribute-set> <!-- table-cell-style -->
6376
6275
 
6377
6276
  <xsl:template name="refine_table-cell-style">
@@ -6380,13 +6279,10 @@
6380
6279
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
6381
6280
  </xsl:if>
6382
6281
 
6383
- <!-- bsi -->
6384
-
6385
6282
  <xsl:call-template name="setBordersTableArray"/>
6386
-
6387
- <xsl:if test="ancestor::*[local-name() = 'preface']">
6388
- <xsl:attribute name="border">none</xsl:attribute>
6389
- </xsl:if>
6283
+ <xsl:if test="ancestor::*[local-name() = 'preface']">
6284
+ <xsl:attribute name="border">none</xsl:attribute>
6285
+ </xsl:if>
6390
6286
 
6391
6287
  </xsl:template> <!-- refine_table-cell-style -->
6392
6288
 
@@ -6395,74 +6291,57 @@
6395
6291
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
6396
6292
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
6397
6293
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
6398
-
6399
- <xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
6400
- <xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
6401
-
6294
+ <xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
6295
+ <xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
6402
6296
  </xsl:attribute-set> <!-- table-footer-cell-style -->
6403
6297
 
6404
6298
  <xsl:template name="refine_table-footer-cell-style">
6405
-
6406
6299
  </xsl:template> <!-- refine_table-footer-cell-style -->
6407
6300
 
6408
6301
  <xsl:attribute-set name="table-note-style">
6409
6302
  <xsl:attribute name="font-size">10pt</xsl:attribute>
6410
6303
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
6411
-
6412
- <xsl:attribute name="font-size">inherit</xsl:attribute>
6413
- <xsl:attribute name="margin-bottom">1pt</xsl:attribute>
6414
- <xsl:attribute name="margin-left"><xsl:value-of select="$text_indent"/></xsl:attribute>
6415
-
6304
+ <xsl:attribute name="font-size">inherit</xsl:attribute>
6305
+ <xsl:attribute name="margin-bottom">1pt</xsl:attribute>
6306
+ <xsl:attribute name="margin-left"><xsl:value-of select="$text_indent"/></xsl:attribute>
6416
6307
  </xsl:attribute-set><!-- table-note-style -->
6417
6308
 
6418
6309
  <xsl:template name="refine_table-note-style">
6419
-
6420
6310
  </xsl:template> <!-- refine_table-note-style -->
6421
6311
 
6422
6312
  <xsl:attribute-set name="table-fn-style">
6423
6313
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
6424
-
6425
- <xsl:attribute name="font-size">inherit</xsl:attribute>
6426
- <xsl:attribute name="margin-bottom">1pt</xsl:attribute>
6427
-
6314
+ <xsl:attribute name="font-size">inherit</xsl:attribute>
6315
+ <xsl:attribute name="margin-bottom">1pt</xsl:attribute>
6428
6316
  </xsl:attribute-set> <!-- table-fn-style -->
6429
6317
 
6430
6318
  <xsl:template name="refine_table-fn-style">
6431
-
6432
6319
  </xsl:template>
6433
6320
 
6434
6321
  <xsl:attribute-set name="table-fn-number-style">
6435
6322
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
6436
-
6437
- <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
6438
-
6323
+ <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
6439
6324
  </xsl:attribute-set> <!-- table-fn-number-style -->
6440
6325
 
6441
6326
  <xsl:attribute-set name="table-fmt-fn-label-style">
6442
6327
  <xsl:attribute name="font-size">80%</xsl:attribute>
6443
-
6444
- <xsl:attribute name="font-weight">bold</xsl:attribute>
6445
- <xsl:attribute name="font-size">67%</xsl:attribute>
6446
- <xsl:attribute name="vertical-align">super</xsl:attribute>
6447
-
6328
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6329
+ <xsl:attribute name="font-size">67%</xsl:attribute>
6330
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
6448
6331
  </xsl:attribute-set> <!-- table-fmt-fn-label-style -->
6449
6332
 
6450
6333
  <xsl:template name="refine_table-fmt-fn-label-style">
6451
-
6452
- <xsl:if test="not($vertical_layout = 'true')">
6453
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
6454
- </xsl:if>
6455
-
6334
+ <xsl:if test="not($vertical_layout = 'true')">
6335
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
6336
+ </xsl:if>
6456
6337
  </xsl:template>
6457
6338
 
6458
6339
  <xsl:attribute-set name="fn-container-body-style">
6459
6340
  <xsl:attribute name="text-indent">0</xsl:attribute>
6460
6341
  <xsl:attribute name="start-indent">0</xsl:attribute>
6461
-
6462
6342
  </xsl:attribute-set>
6463
6343
 
6464
6344
  <xsl:attribute-set name="table-fn-body-style">
6465
-
6466
6345
  </xsl:attribute-set>
6467
6346
 
6468
6347
  <xsl:attribute-set name="figure-fn-number-style">
@@ -6472,17 +6351,14 @@
6472
6351
  <xsl:attribute-set name="figure-fmt-fn-label-style">
6473
6352
  <xsl:attribute name="font-size">80%</xsl:attribute>
6474
6353
  <xsl:attribute name="vertical-align">super</xsl:attribute>
6475
-
6476
6354
  </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
6477
6355
 
6478
6356
  <xsl:template name="refine_figure-fmt-fn-label-style">
6479
-
6480
6357
  </xsl:template>
6481
6358
 
6482
6359
  <xsl:attribute-set name="figure-fn-body-style">
6483
6360
  <xsl:attribute name="text-align">justify</xsl:attribute>
6484
6361
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
6485
-
6486
6362
  </xsl:attribute-set>
6487
6363
  <!-- ========================== -->
6488
6364
  <!-- END Table styles -->
@@ -6493,45 +6369,35 @@
6493
6369
  <!-- ========================== -->
6494
6370
 
6495
6371
  <xsl:attribute-set name="dl-block-style">
6496
-
6497
6372
  </xsl:attribute-set>
6498
6373
 
6499
6374
  <xsl:attribute-set name="dt-row-style">
6500
-
6501
6375
  </xsl:attribute-set>
6502
6376
 
6503
6377
  <xsl:attribute-set name="dt-cell-style">
6504
-
6505
6378
  </xsl:attribute-set>
6506
6379
 
6507
6380
  <xsl:template name="refine_dt-cell-style">
6508
-
6509
6381
  </xsl:template> <!-- refine_dt-cell-style -->
6510
6382
 
6511
6383
  <xsl:attribute-set name="dt-block-style">
6512
6384
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
6513
-
6514
- <xsl:attribute name="line-height">1.5</xsl:attribute>
6515
-
6385
+ <xsl:attribute name="line-height">1.5</xsl:attribute>
6516
6386
  </xsl:attribute-set>
6517
6387
 
6518
6388
  <xsl:template name="refine_dt-block-style">
6519
-
6520
6389
  </xsl:template> <!-- refine_dt-block-style -->
6521
6390
 
6522
6391
  <xsl:attribute-set name="dl-name-style">
6523
6392
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6524
6393
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
6525
-
6526
6394
  </xsl:attribute-set> <!-- dl-name-style -->
6527
6395
 
6528
6396
  <xsl:attribute-set name="dd-cell-style">
6529
6397
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
6530
-
6531
6398
  </xsl:attribute-set>
6532
6399
 
6533
6400
  <xsl:template name="refine_dd-cell-style">
6534
-
6535
6401
  </xsl:template> <!-- refine_dd-cell-style -->
6536
6402
 
6537
6403
  <!-- ========================== -->
@@ -6539,313 +6405,254 @@
6539
6405
  <!-- ========================== -->
6540
6406
 
6541
6407
  <xsl:attribute-set name="appendix-style">
6542
-
6543
6408
  </xsl:attribute-set>
6544
6409
 
6545
6410
  <xsl:attribute-set name="appendix-example-style">
6546
-
6547
6411
  </xsl:attribute-set>
6548
6412
 
6549
6413
  <xsl:attribute-set name="xref-style">
6550
-
6551
6414
  </xsl:attribute-set>
6552
6415
 
6553
6416
  <xsl:attribute-set name="eref-style">
6554
-
6555
6417
  </xsl:attribute-set>
6556
6418
 
6557
6419
  <xsl:template name="refine_eref-style">
6558
6420
  <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
6559
6421
  <xsl:variable name="text" select="normalize-space()"/>
6560
-
6561
6422
  </xsl:template> <!-- refine_eref-style -->
6562
6423
 
6563
6424
  <xsl:attribute-set name="note-style">
6564
-
6565
- <xsl:attribute name="text-indent">0mm</xsl:attribute>
6566
- <xsl:attribute name="space-before">2pt</xsl:attribute>
6567
-
6425
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
6426
+ <xsl:attribute name="space-before">2pt</xsl:attribute>
6568
6427
  </xsl:attribute-set>
6569
6428
 
6570
6429
  <xsl:template name="refine_note-style">
6571
-
6572
6430
  </xsl:template>
6573
6431
 
6574
6432
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
6575
6433
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
6576
6434
 
6577
6435
  <xsl:attribute-set name="note-name-style">
6578
-
6579
6436
  </xsl:attribute-set>
6580
6437
 
6581
6438
  <xsl:template name="refine_note-name-style">
6582
-
6583
- <xsl:if test="not($vertical_layout = 'true')">
6584
- <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
6585
- </xsl:if>
6586
- <xsl:if test="$vertical_layout = 'true'">
6587
- <xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
6588
- <xsl:attribute name="font-weight">500</xsl:attribute>
6589
- </xsl:if>
6590
-
6439
+ <xsl:if test="not($vertical_layout = 'true')">
6440
+ <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
6441
+ </xsl:if>
6442
+ <xsl:if test="$vertical_layout = 'true'">
6443
+ <xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
6444
+ <xsl:attribute name="font-weight">500</xsl:attribute>
6445
+ </xsl:if>
6591
6446
  </xsl:template> <!-- refine_note-name-style -->
6592
6447
 
6593
6448
  <xsl:attribute-set name="table-note-name-style">
6594
6449
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
6595
-
6596
6450
  </xsl:attribute-set>
6597
6451
 
6598
6452
  <xsl:template name="refine_table-note-name-style">
6599
-
6600
6453
  </xsl:template> <!-- refine_table-note-name-style -->
6601
6454
 
6602
6455
  <xsl:attribute-set name="note-p-style">
6603
-
6604
6456
  </xsl:attribute-set>
6605
6457
 
6606
6458
  <xsl:attribute-set name="termnote-style">
6607
-
6608
- <xsl:attribute name="text-indent">0mm</xsl:attribute>
6609
- <xsl:attribute name="space-before">4pt</xsl:attribute>
6610
- <xsl:attribute name="space-after">4pt</xsl:attribute>
6611
-
6459
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
6460
+ <xsl:attribute name="space-before">4pt</xsl:attribute>
6461
+ <xsl:attribute name="space-after">4pt</xsl:attribute>
6612
6462
  </xsl:attribute-set>
6613
6463
 
6614
6464
  <xsl:template name="refine_termnote-style">
6615
-
6616
6465
  </xsl:template> <!-- refine_termnote-style -->
6617
6466
 
6618
6467
  <xsl:attribute-set name="termnote-name-style">
6619
-
6620
6468
  </xsl:attribute-set>
6621
6469
 
6622
6470
  <xsl:template name="refine_termnote-name-style">
6623
-
6624
- <!-- <xsl:if test="$namespace = 'ieee'">
6625
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
6626
- </xsl:if> -->
6627
-
6628
- <xsl:if test="not($vertical_layout = 'true')">
6629
- <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
6630
- </xsl:if>
6631
-
6471
+ <xsl:if test="not($vertical_layout = 'true')">
6472
+ <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
6473
+ </xsl:if>
6632
6474
  </xsl:template>
6633
6475
 
6634
6476
  <xsl:attribute-set name="termnote-p-style">
6635
-
6636
6477
  </xsl:attribute-set>
6637
6478
 
6638
6479
  <xsl:attribute-set name="quote-style">
6639
6480
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
6640
6481
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
6641
-
6642
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
6643
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
6644
-
6482
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
6483
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
6645
6484
  </xsl:attribute-set>
6646
6485
 
6647
6486
  <xsl:template name="refine_quote-style">
6648
-
6649
- <xsl:if test="ancestor::*[local-name() = 'li']">
6650
- <xsl:attribute name="margin-left">7.5mm</xsl:attribute>
6651
- </xsl:if>
6652
-
6487
+ <xsl:if test="ancestor::*[local-name() = 'li']">
6488
+ <xsl:attribute name="margin-left">7.5mm</xsl:attribute>
6489
+ </xsl:if>
6653
6490
  </xsl:template>
6654
6491
 
6655
6492
  <xsl:attribute-set name="quote-source-style">
6656
6493
  <xsl:attribute name="text-align">right</xsl:attribute>
6657
-
6658
6494
  </xsl:attribute-set>
6659
6495
 
6660
6496
  <xsl:attribute-set name="termsource-style">
6661
-
6662
- <xsl:attribute name="margin-left">6mm</xsl:attribute>
6663
-
6497
+ <xsl:attribute name="margin-left">6mm</xsl:attribute>
6664
6498
  </xsl:attribute-set>
6665
6499
 
6666
6500
  <xsl:template name="refine_termsource-style">
6667
-
6668
6501
  </xsl:template> <!-- refine_termsource-style -->
6669
6502
 
6670
6503
  <xsl:attribute-set name="termsource-text-style">
6671
-
6672
6504
  </xsl:attribute-set>
6673
6505
 
6674
6506
  <xsl:attribute-set name="origin-style">
6675
-
6676
6507
  </xsl:attribute-set>
6677
6508
 
6678
6509
  <xsl:attribute-set name="term-style">
6679
-
6680
- <xsl:attribute name="space-before">12pt</xsl:attribute>
6681
-
6510
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
6682
6511
  </xsl:attribute-set>
6683
6512
 
6684
6513
  <xsl:attribute-set name="term-name-style">
6685
6514
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6686
6515
  <xsl:attribute name="font-weight">bold</xsl:attribute>
6687
-
6688
- <xsl:attribute name="space-after">2pt</xsl:attribute>
6689
-
6516
+ <xsl:attribute name="space-after">2pt</xsl:attribute>
6690
6517
  </xsl:attribute-set>
6691
6518
 
6692
6519
  <xsl:attribute-set name="figure-block-style">
6693
6520
  <xsl:attribute name="role">SKIP</xsl:attribute>
6694
-
6695
6521
  </xsl:attribute-set>
6696
6522
 
6697
6523
  <xsl:template name="refine_figure-block-style">
6524
+ <xsl:if test="ancestor::*[local-name() = 'example'] or ancestor::*[local-name() = 'note']">
6525
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
6526
+ </xsl:if>
6527
+ <xsl:if test="$vertical_layout = 'true' and not(*[local-name() = 'figure'])">
6528
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
6529
+ <xsl:attribute name="display-align">center</xsl:attribute>
6530
+ <!-- <xsl:attribute name="border">1pt solid blue</xsl:attribute> -->
6531
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
6698
6532
 
6699
- <xsl:if test="ancestor::*[local-name() = 'example'] or ancestor::*[local-name() = 'note']">
6700
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
6701
- </xsl:if>
6702
- <xsl:if test="$vertical_layout = 'true' and not(*[local-name() = 'figure'])">
6703
- <xsl:attribute name="reference-orientation">90</xsl:attribute>
6704
- <xsl:attribute name="display-align">center</xsl:attribute>
6705
- <!-- <xsl:attribute name="border">1pt solid blue</xsl:attribute> -->
6706
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
6533
+ <!-- determine block-container width for rotated image -->
6534
+ <xsl:for-each select="*[local-name() = 'image'][1]"> <!-- set context to 'image' element -->
6707
6535
 
6708
- <!-- determine block-container width for rotated image -->
6709
- <xsl:for-each select="*[local-name() = 'image'][1]"> <!-- set context to 'image' element -->
6710
-
6711
- <xsl:variable name="width">
6712
- <xsl:call-template name="setImageWidth"/>
6713
- </xsl:variable>
6536
+ <xsl:variable name="width">
6537
+ <xsl:call-template name="setImageWidth"/>
6538
+ </xsl:variable>
6714
6539
 
6715
- <xsl:choose>
6716
- <xsl:when test="normalize-space($width) != ''">
6717
- <xsl:attribute name="width">
6718
- <xsl:value-of select="$width"/>
6719
- </xsl:attribute>
6720
- </xsl:when>
6721
- <xsl:when test="*[local-name() = 'svg']">
6722
- <xsl:variable name="svg_content">
6723
- <xsl:apply-templates select="*[local-name() = 'svg'][1]" mode="svg_update"/>
6724
- </xsl:variable>
6725
- <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
6726
- <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
6540
+ <xsl:choose>
6541
+ <xsl:when test="normalize-space($width) != ''">
6542
+ <xsl:attribute name="width">
6543
+ <xsl:value-of select="$width"/>
6544
+ </xsl:attribute>
6545
+ </xsl:when>
6546
+ <xsl:when test="*[local-name() = 'svg']">
6547
+ <xsl:variable name="svg_content">
6548
+ <xsl:apply-templates select="*[local-name() = 'svg'][1]" mode="svg_update"/>
6549
+ </xsl:variable>
6550
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
6551
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
6727
6552
 
6728
- <xsl:variable name="scale_width">
6729
- <xsl:choose>
6730
- <xsl:when test="$svg_width &gt; $height_effective_px">
6731
- <xsl:value-of select="$height_effective_px div $svg_width"/>
6732
- </xsl:when>
6733
- <xsl:otherwise>1</xsl:otherwise>
6734
- </xsl:choose>
6735
- </xsl:variable>
6736
- <xsl:attribute name="width"><xsl:value-of select="$svg_width * $scale_width"/>px</xsl:attribute>
6553
+ <xsl:variable name="scale_width">
6554
+ <xsl:choose>
6555
+ <xsl:when test="$svg_width &gt; $height_effective_px">
6556
+ <xsl:value-of select="$height_effective_px div $svg_width"/>
6557
+ </xsl:when>
6558
+ <xsl:otherwise>1</xsl:otherwise>
6559
+ </xsl:choose>
6560
+ </xsl:variable>
6561
+ <xsl:attribute name="width"><xsl:value-of select="$svg_width * $scale_width"/>px</xsl:attribute>
6737
6562
 
6738
- </xsl:when>
6739
- <xsl:otherwise> <!-- determine image width programmatically -->
6740
- <xsl:variable name="img_src">
6741
- <xsl:call-template name="getImageSrc"/>
6742
- </xsl:variable>
6743
- <xsl:variable name="image_width_programmatically" select="java:org.metanorma.fop.utils.ImageUtils.getImageWidth($img_src, $height_effective, $width_effective)"/>
6563
+ </xsl:when>
6564
+ <xsl:otherwise> <!-- determine image width programmatically -->
6565
+ <xsl:variable name="img_src">
6566
+ <xsl:call-template name="getImageSrc"/>
6567
+ </xsl:variable>
6568
+ <xsl:variable name="image_width_programmatically" select="java:org.metanorma.fop.utils.ImageUtils.getImageWidth($img_src, $height_effective, $width_effective)"/>
6744
6569
 
6745
- <xsl:variable name="scale">
6746
- <xsl:call-template name="getImageScale"/>
6747
- </xsl:variable>
6570
+ <xsl:variable name="scale">
6571
+ <xsl:call-template name="getImageScale"/>
6572
+ </xsl:variable>
6748
6573
 
6749
- <xsl:if test="normalize-space($image_width_programmatically) != '0'">
6750
- <xsl:attribute name="width">
6751
- <xsl:value-of select="concat($image_width_programmatically, 'mm')"/> <!-- * ($scale div 100) -->
6752
- </xsl:attribute>
6753
- <xsl:if test="$scale != 100">
6754
- <xsl:attribute name="display-align">before</xsl:attribute>
6755
- </xsl:if>
6574
+ <xsl:if test="normalize-space($image_width_programmatically) != '0'">
6575
+ <xsl:attribute name="width">
6576
+ <xsl:value-of select="concat($image_width_programmatically, 'mm')"/> <!-- * ($scale div 100) -->
6577
+ </xsl:attribute>
6578
+ <xsl:if test="$scale != 100">
6579
+ <xsl:attribute name="display-align">before</xsl:attribute>
6756
6580
  </xsl:if>
6757
- </xsl:otherwise>
6758
- </xsl:choose>
6759
- </xsl:for-each>
6760
- <!-- end: $vertical_layout = 'true -->
6761
- </xsl:if>
6762
- <!-- end: $namespace = 'jis' -->
6763
-
6581
+ </xsl:if>
6582
+ </xsl:otherwise>
6583
+ </xsl:choose>
6584
+ </xsl:for-each>
6585
+ <!-- end: $vertical_layout = 'true -->
6586
+ </xsl:if>
6587
+ <!-- end: $namespace = 'jis' -->
6764
6588
  </xsl:template>
6765
6589
 
6766
6590
  <xsl:attribute-set name="figure-style">
6767
-
6768
6591
  </xsl:attribute-set>
6769
6592
 
6770
6593
  <xsl:attribute-set name="figure-name-style">
6771
6594
  <xsl:attribute name="role">Caption</xsl:attribute>
6772
-
6773
- <xsl:attribute name="text-align">center</xsl:attribute>
6774
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
6775
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
6776
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
6777
-
6595
+ <xsl:attribute name="text-align">center</xsl:attribute>
6596
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
6597
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
6598
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
6778
6599
  </xsl:attribute-set>
6779
6600
 
6780
6601
  <xsl:template name="refine_figure-name-style">
6781
-
6782
- <xsl:if test="ancestor::jis:figure">
6783
- <xsl:attribute name="margin-top">0</xsl:attribute>
6784
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
6785
- </xsl:if>
6786
- <xsl:if test="not($vertical_layout = 'true')">
6787
- <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
6788
- </xsl:if>
6789
-
6602
+ <xsl:if test="ancestor::jis:figure">
6603
+ <xsl:attribute name="margin-top">0</xsl:attribute>
6604
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
6605
+ </xsl:if>
6606
+ <xsl:if test="not($vertical_layout = 'true')">
6607
+ <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
6608
+ </xsl:if>
6790
6609
  </xsl:template> <!-- refine_figure-name-style -->
6791
6610
 
6792
6611
  <xsl:attribute-set name="figure-source-style">
6793
-
6794
6612
  </xsl:attribute-set>
6795
6613
 
6796
6614
  <!-- Formula's styles -->
6797
6615
  <xsl:attribute-set name="formula-style">
6798
6616
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
6799
6617
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
6800
-
6801
6618
  </xsl:attribute-set> <!-- formula-style -->
6802
6619
 
6803
6620
  <xsl:attribute-set name="formula-stem-block-style">
6804
6621
  <xsl:attribute name="text-align">center</xsl:attribute>
6805
-
6806
6622
  </xsl:attribute-set> <!-- formula-stem-block-style -->
6807
6623
 
6808
6624
  <xsl:template name="refine_formula-stem-block-style">
6809
-
6810
6625
  </xsl:template> <!-- refine_formula-stem-block-style -->
6811
6626
 
6812
6627
  <xsl:attribute-set name="formula-stem-number-style">
6813
6628
  <xsl:attribute name="text-align">right</xsl:attribute>
6814
-
6815
6629
  </xsl:attribute-set> <!-- formula-stem-number-style -->
6816
6630
  <!-- End Formula's styles -->
6817
6631
 
6818
6632
  <xsl:template name="refine_formula-stem-number-style">
6819
-
6820
6633
  </xsl:template>
6821
6634
 
6822
6635
  <xsl:attribute-set name="image-style">
6823
6636
  <xsl:attribute name="role">SKIP</xsl:attribute>
6824
6637
  <xsl:attribute name="text-align">center</xsl:attribute>
6825
-
6826
6638
  </xsl:attribute-set>
6827
6639
 
6828
6640
  <xsl:template name="refine_image-style">
6829
-
6830
- <xsl:if test="$vertical_layout = 'true'">
6831
- <xsl:attribute name="text-align">inherit</xsl:attribute>
6832
- </xsl:if>
6833
-
6641
+ <xsl:if test="$vertical_layout = 'true'">
6642
+ <xsl:attribute name="text-align">inherit</xsl:attribute>
6643
+ </xsl:if>
6834
6644
  </xsl:template>
6835
6645
 
6836
6646
  <xsl:attribute-set name="figure-pseudocode-p-style">
6837
-
6838
6647
  </xsl:attribute-set>
6839
6648
 
6840
6649
  <xsl:attribute-set name="image-graphic-style">
6841
6650
  <xsl:attribute name="width">100%</xsl:attribute>
6842
6651
  <xsl:attribute name="content-height">100%</xsl:attribute>
6843
6652
  <xsl:attribute name="scaling">uniform</xsl:attribute>
6844
-
6845
6653
  </xsl:attribute-set>
6846
6654
 
6847
6655
  <xsl:attribute-set name="tt-style">
6848
-
6849
6656
  </xsl:attribute-set>
6850
6657
 
6851
6658
  <xsl:attribute-set name="sourcecode-name-style">
@@ -6854,55 +6661,44 @@
6854
6661
  <xsl:attribute name="text-align">center</xsl:attribute>
6855
6662
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
6856
6663
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
6857
-
6858
6664
  </xsl:attribute-set>
6859
6665
 
6860
6666
  <xsl:attribute-set name="preferred-block-style">
6861
-
6862
6667
  </xsl:attribute-set>
6863
6668
 
6864
6669
  <xsl:attribute-set name="preferred-term-style">
6865
6670
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6866
6671
  <xsl:attribute name="font-weight">bold</xsl:attribute>
6867
-
6868
- <xsl:attribute name="font-weight">normal</xsl:attribute>
6869
-
6672
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
6870
6673
  </xsl:attribute-set>
6871
6674
 
6872
6675
  <xsl:attribute-set name="domain-style">
6873
-
6874
6676
  </xsl:attribute-set>
6875
6677
 
6876
6678
  <xsl:attribute-set name="admitted-style">
6877
-
6878
6679
  </xsl:attribute-set>
6879
6680
 
6880
6681
  <xsl:attribute-set name="deprecates-style">
6881
-
6882
6682
  </xsl:attribute-set>
6883
6683
 
6884
6684
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
6885
6685
  </xsl:attribute-set>
6886
6686
 
6887
6687
  <xsl:attribute-set name="definition-style">
6888
-
6889
- <xsl:attribute name="space-before">2pt</xsl:attribute>
6890
- <xsl:attribute name="space-after">2pt</xsl:attribute>
6891
-
6688
+ <xsl:attribute name="space-before">2pt</xsl:attribute>
6689
+ <xsl:attribute name="space-after">2pt</xsl:attribute>
6892
6690
  </xsl:attribute-set>
6893
6691
 
6894
6692
  <xsl:variable name="color-added-text">
6895
6693
  <xsl:text>rgb(0, 255, 0)</xsl:text>
6896
6694
  </xsl:variable>
6897
6695
  <xsl:attribute-set name="add-style">
6898
-
6899
- <xsl:attribute name="color">red</xsl:attribute>
6900
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
6901
- <!-- <xsl:attribute name="color">black</xsl:attribute>
6696
+ <xsl:attribute name="color">red</xsl:attribute>
6697
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
6698
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
6902
6699
  <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
6903
6700
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
6904
6701
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
6905
-
6906
6702
  </xsl:attribute-set>
6907
6703
 
6908
6704
  <xsl:variable name="add-style">
@@ -6922,58 +6718,44 @@
6922
6718
 
6923
6719
  <xsl:attribute-set name="mathml-style">
6924
6720
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
6925
-
6926
6721
  </xsl:attribute-set>
6927
6722
 
6928
6723
  <xsl:template name="refine_mathml-style">
6929
-
6930
6724
  </xsl:template>
6931
6725
 
6932
6726
  <xsl:attribute-set name="list-style">
6933
-
6934
- <xsl:attribute name="provisional-distance-between-starts">7.5mm</xsl:attribute>
6935
- <xsl:attribute name="space-after">4pt</xsl:attribute>
6936
-
6727
+ <xsl:attribute name="provisional-distance-between-starts">7.5mm</xsl:attribute>
6728
+ <xsl:attribute name="space-after">4pt</xsl:attribute>
6937
6729
  </xsl:attribute-set> <!-- list-style -->
6938
6730
 
6939
6731
  <xsl:template name="refine_list-style">
6940
-
6941
6732
  </xsl:template> <!-- refine_list-style -->
6942
6733
 
6943
6734
  <xsl:attribute-set name="list-name-style">
6944
6735
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6945
-
6946
6736
  </xsl:attribute-set> <!-- list-name-style -->
6947
6737
 
6948
6738
  <xsl:attribute-set name="list-item-style">
6949
-
6950
6739
  </xsl:attribute-set>
6951
6740
 
6952
6741
  <xsl:template name="refine_list-item-style">
6953
-
6954
6742
  </xsl:template> <!-- refine_list-item-style -->
6955
6743
 
6956
6744
  <xsl:attribute-set name="list-item-label-style">
6957
-
6958
- <xsl:attribute name="line-height">1.5</xsl:attribute>
6959
-
6745
+ <xsl:attribute name="line-height">1.5</xsl:attribute>
6960
6746
  </xsl:attribute-set>
6961
6747
 
6962
6748
  <xsl:template name="refine_list-item-label-style">
6963
-
6964
- <xsl:if test="parent::*[local-name() = 'ol'] and not($vertical_layout = 'true')">
6965
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
6966
- <xsl:attribute name="font-weight">bold</xsl:attribute>
6967
- </xsl:if>
6968
-
6749
+ <xsl:if test="parent::*[local-name() = 'ol'] and not($vertical_layout = 'true')">
6750
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
6751
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6752
+ </xsl:if>
6969
6753
  </xsl:template> <!-- refine_list-item-label-style -->
6970
6754
 
6971
6755
  <xsl:attribute-set name="list-item-body-style">
6972
-
6973
6756
  </xsl:attribute-set>
6974
6757
 
6975
6758
  <xsl:template name="refine_list-item-body-style">
6976
-
6977
6759
  </xsl:template> <!-- refine_list-item-body-style -->
6978
6760
 
6979
6761
  <xsl:attribute-set name="toc-style">
@@ -6983,19 +6765,16 @@
6983
6765
  <xsl:attribute-set name="fn-reference-style">
6984
6766
  <xsl:attribute name="font-size">80%</xsl:attribute>
6985
6767
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
6986
-
6987
- <xsl:attribute name="font-size">67%</xsl:attribute>
6988
- <xsl:attribute name="font-weight">bold</xsl:attribute>
6989
- <xsl:attribute name="vertical-align">super</xsl:attribute>
6768
+ <xsl:attribute name="font-size">67%</xsl:attribute>
6769
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6770
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
6990
6771
 
6991
6772
  </xsl:attribute-set>
6992
6773
 
6993
6774
  <xsl:template name="refine_fn-reference-style">
6994
-
6995
- <xsl:if test="not($vertical_layout = 'true')">
6996
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
6997
- </xsl:if>
6998
-
6775
+ <xsl:if test="not($vertical_layout = 'true')">
6776
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
6777
+ </xsl:if>
6999
6778
  </xsl:template> <!-- refine_fn-reference-style -->
7000
6779
 
7001
6780
  <xsl:attribute-set name="fn-style">
@@ -7004,11 +6783,9 @@
7004
6783
 
7005
6784
  <xsl:attribute-set name="fn-num-style">
7006
6785
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
7007
-
7008
- <xsl:attribute name="font-size">67%</xsl:attribute>
7009
- <xsl:attribute name="font-weight">bold</xsl:attribute>
7010
- <xsl:attribute name="vertical-align">super</xsl:attribute>
7011
-
6786
+ <xsl:attribute name="font-size">67%</xsl:attribute>
6787
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6788
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
7012
6789
  </xsl:attribute-set>
7013
6790
 
7014
6791
  <xsl:attribute-set name="fn-body-style">
@@ -7016,120 +6793,93 @@
7016
6793
  <xsl:attribute name="font-style">normal</xsl:attribute>
7017
6794
  <xsl:attribute name="text-indent">0</xsl:attribute>
7018
6795
  <xsl:attribute name="start-indent">0</xsl:attribute>
7019
-
7020
6796
  </xsl:attribute-set>
7021
6797
 
7022
6798
  <xsl:template name="refine_fn-body-style">
7023
-
7024
- <xsl:if test="not($vertical_layout = 'true')">
7025
- <xsl:attribute name="font-family">IPAexMincho</xsl:attribute> <!-- prevent font for footnote in Times New Roman main text -->
7026
- </xsl:if>
7027
-
6799
+ <xsl:if test="not($vertical_layout = 'true')">
6800
+ <xsl:attribute name="font-family">IPAexMincho</xsl:attribute> <!-- prevent font for footnote in Times New Roman main text -->
6801
+ </xsl:if>
7028
6802
  </xsl:template> <!-- refine_fn-body-style -->
7029
6803
 
7030
6804
  <xsl:attribute-set name="fn-body-num-style">
7031
6805
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
7032
-
7033
- <xsl:attribute name="font-size">67%</xsl:attribute>
7034
- <xsl:attribute name="font-weight">bold</xsl:attribute>
7035
- <xsl:attribute name="vertical-align">super</xsl:attribute>
7036
-
6806
+ <xsl:attribute name="font-size">67%</xsl:attribute>
6807
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6808
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
7037
6809
  </xsl:attribute-set> <!-- fn-body-num-style -->
7038
6810
 
7039
6811
  <xsl:template name="refine_fn-body-num-style">
7040
-
7041
- <xsl:if test="not($vertical_layout = 'true')">
7042
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
7043
- </xsl:if>
7044
- <xsl:if test="$vertical_layout = 'true'">
7045
- <xsl:attribute name="vertical-align">baseline</xsl:attribute>
7046
- <xsl:attribute name="font-size">100%</xsl:attribute>
7047
- </xsl:if>
7048
-
6812
+ <xsl:if test="not($vertical_layout = 'true')">
6813
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
6814
+ </xsl:if>
6815
+ <xsl:if test="$vertical_layout = 'true'">
6816
+ <xsl:attribute name="vertical-align">baseline</xsl:attribute>
6817
+ <xsl:attribute name="font-size">100%</xsl:attribute>
6818
+ </xsl:if>
7049
6819
  </xsl:template> <!-- refine_fn-body-num-style -->
7050
6820
 
7051
6821
  <!-- admonition -->
7052
6822
  <xsl:attribute-set name="admonition-style">
7053
-
7054
6823
  </xsl:attribute-set> <!-- admonition-style -->
7055
6824
 
7056
6825
  <xsl:attribute-set name="admonition-container-style">
7057
6826
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
7058
6827
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
7059
-
7060
6828
  </xsl:attribute-set> <!-- admonition-container-style -->
7061
6829
 
7062
6830
  <xsl:attribute-set name="admonition-name-style">
7063
6831
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7064
-
7065
6832
  </xsl:attribute-set> <!-- admonition-name-style -->
7066
6833
 
7067
6834
  <xsl:attribute-set name="admonition-p-style">
7068
-
7069
6835
  </xsl:attribute-set> <!-- admonition-p-style -->
7070
6836
  <!-- end admonition -->
7071
6837
 
7072
6838
  <!-- bibitem in Normative References (references/@normative="true") -->
7073
6839
  <xsl:attribute-set name="bibitem-normative-style">
7074
-
7075
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
7076
- <xsl:attribute name="start-indent">6mm</xsl:attribute>
7077
- <xsl:attribute name="text-indent">-6mm</xsl:attribute>
7078
-
6840
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
6841
+ <xsl:attribute name="start-indent">6mm</xsl:attribute>
6842
+ <xsl:attribute name="text-indent">-6mm</xsl:attribute>
7079
6843
  </xsl:attribute-set> <!-- bibitem-normative-style -->
7080
6844
 
7081
6845
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
7082
6846
  <xsl:attribute-set name="bibitem-normative-list-style">
7083
6847
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
7084
6848
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7085
-
7086
- <!-- <xsl:if test="$namespace = 'ieee'">
7087
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
7088
- <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
7089
- </xsl:if> -->
7090
-
7091
6849
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
7092
6850
 
7093
6851
  <xsl:attribute-set name="bibitem-non-normative-style">
7094
-
7095
6852
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
7096
6853
 
7097
6854
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
7098
6855
  <xsl:attribute-set name="bibitem-non-normative-list-style">
7099
6856
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
7100
6857
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7101
-
7102
6858
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
7103
6859
 
7104
6860
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
7105
6861
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7106
-
7107
6862
  </xsl:attribute-set>
7108
6863
 
7109
6864
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
7110
6865
  <xsl:attribute-set name="bibitem-normative-list-body-style">
7111
-
7112
6866
  </xsl:attribute-set>
7113
6867
 
7114
6868
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
7115
-
7116
6869
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
7117
6870
 
7118
6871
  <!-- footnote reference number for bibitem, in the text -->
7119
6872
  <xsl:attribute-set name="bibitem-note-fn-style">
7120
6873
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
7121
6874
  <xsl:attribute name="font-size">65%</xsl:attribute>
7122
-
7123
- <xsl:attribute name="font-size">67%</xsl:attribute>
7124
- <xsl:attribute name="font-weight">bold</xsl:attribute>
7125
- <xsl:attribute name="vertical-align">super</xsl:attribute>
7126
-
6875
+ <xsl:attribute name="font-size">67%</xsl:attribute>
6876
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6877
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
7127
6878
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
7128
6879
 
7129
6880
  <!-- footnote number on the page bottom -->
7130
6881
  <xsl:attribute-set name="bibitem-note-fn-number-style">
7131
6882
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
7132
-
7133
6883
  </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
7134
6884
 
7135
6885
  <!-- footnote body (text) on the page bottom -->
@@ -7137,11 +6887,9 @@
7137
6887
  <xsl:attribute name="font-size">10pt</xsl:attribute>
7138
6888
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7139
6889
  <xsl:attribute name="start-indent">0pt</xsl:attribute>
7140
-
7141
6890
  </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
7142
6891
 
7143
6892
  <xsl:attribute-set name="references-non-normative-style">
7144
-
7145
6893
  </xsl:attribute-set> <!-- references-non-normative-style -->
7146
6894
 
7147
6895
  <!-- Highlight.js syntax GitHub styles -->
@@ -7301,12 +7049,10 @@
7301
7049
  <!-- Index section styles -->
7302
7050
  <xsl:attribute-set name="indexsect-title-style">
7303
7051
  <xsl:attribute name="role">H1</xsl:attribute>
7304
-
7305
7052
  </xsl:attribute-set>
7306
7053
 
7307
7054
  <xsl:attribute-set name="indexsect-clause-title-style">
7308
7055
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7309
-
7310
7056
  </xsl:attribute-set>
7311
7057
 
7312
7058
  <!-- End Index section styles -->
@@ -7383,47 +7129,47 @@
7383
7129
  </xsl:template>
7384
7130
 
7385
7131
  <xsl:template name="processTables_Contents">
7386
- <tables>
7132
+ <mn:tables>
7387
7133
  <xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
7388
7134
  <xsl:choose>
7389
7135
  <xsl:when test="*[local-name() = 'fmt-name']">
7390
7136
  <xsl:variable name="fmt_name">
7391
7137
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
7392
7138
  </xsl:variable>
7393
- <table id="{@id}" alt-text="{normalize-space($fmt_name)}">
7139
+ <mn:table id="{@id}" alt-text="{normalize-space($fmt_name)}">
7394
7140
  <xsl:copy-of select="$fmt_name"/>
7395
- </table>
7141
+ </mn:table>
7396
7142
  </xsl:when>
7397
7143
  <xsl:otherwise>
7398
- <table id="{@id}" alt-text="{*[local-name() = 'name']}">
7144
+ <mn:table id="{@id}" alt-text="{*[local-name() = 'name']}">
7399
7145
  <xsl:copy-of select="*[local-name() = 'name']"/>
7400
- </table>
7146
+ </mn:table>
7401
7147
  </xsl:otherwise>
7402
7148
  </xsl:choose>
7403
7149
  </xsl:for-each>
7404
- </tables>
7150
+ </mn:tables>
7405
7151
  </xsl:template>
7406
7152
 
7407
7153
  <xsl:template name="processFigures_Contents">
7408
- <figures>
7154
+ <mn:figures>
7409
7155
  <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(*[local-name() = 'name'], 'Figure ') and normalize-space(@id) != '']">
7410
7156
  <xsl:choose>
7411
7157
  <xsl:when test="*[local-name() = 'fmt-name']">
7412
7158
  <xsl:variable name="fmt_name">
7413
7159
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
7414
7160
  </xsl:variable>
7415
- <figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
7161
+ <mn:figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
7416
7162
  <xsl:copy-of select="$fmt_name"/>
7417
- </figure>
7163
+ </mn:figure>
7418
7164
  </xsl:when>
7419
7165
  <xsl:otherwise>
7420
- <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
7166
+ <mn:figure id="{@id}" alt-text="{*[local-name() = 'name']}">
7421
7167
  <xsl:copy-of select="*[local-name() = 'name']"/>
7422
- </figure>
7168
+ </mn:figure>
7423
7169
  </xsl:otherwise>
7424
7170
  </xsl:choose>
7425
7171
  </xsl:for-each>
7426
- </figures>
7172
+ </mn:figures>
7427
7173
  </xsl:template>
7428
7174
 
7429
7175
  <xsl:template name="processPrefaceSectionsDefault">
@@ -7442,7 +7188,6 @@
7442
7188
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
7443
7189
  <xsl:sort select="@displayorder" data-type="number"/>
7444
7190
  <xsl:apply-templates select="."/>
7445
-
7446
7191
  </xsl:for-each>
7447
7192
 
7448
7193
  <xsl:for-each select="/*/*[local-name()='annex']">
@@ -7549,7 +7294,6 @@
7549
7294
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
7550
7295
  <xsl:sort select="@displayorder" data-type="number"/>
7551
7296
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
7552
-
7553
7297
  </xsl:for-each>
7554
7298
  </xsl:element>
7555
7299
  </xsl:element>
@@ -7683,7 +7427,6 @@
7683
7427
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak">
7684
7428
  <xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
7685
7429
  </xsl:apply-templates>
7686
-
7687
7430
  </xsl:for-each>
7688
7431
  </xsl:element>
7689
7432
 
@@ -7723,19 +7466,17 @@
7723
7466
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
7724
7467
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
7725
7468
  <xsl:template match="text()" name="text">
7726
-
7727
- <xsl:choose>
7728
- <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
7729
- <xsl:otherwise>
7730
- <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
7731
- <xsl:call-template name="replace_fo_inline_tags">
7732
- <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
7733
- <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
7734
- <xsl:with-param name="text" select="$text"/>
7735
- </xsl:call-template>
7736
- </xsl:otherwise>
7737
- </xsl:choose>
7738
-
7469
+ <xsl:choose>
7470
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
7471
+ <xsl:otherwise>
7472
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
7473
+ <xsl:call-template name="replace_fo_inline_tags">
7474
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
7475
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
7476
+ <xsl:with-param name="text" select="$text"/>
7477
+ </xsl:call-template>
7478
+ </xsl:otherwise>
7479
+ </xsl:choose>
7739
7480
  </xsl:template>
7740
7481
 
7741
7482
  <xsl:template name="replace_fo_inline_tags">
@@ -7789,7 +7530,7 @@
7789
7530
  <xsl:with-param name="keep_sep">true</xsl:with-param>
7790
7531
  </xsl:call-template>
7791
7532
  </xsl:variable>
7792
- <xsl:for-each select="xalan:nodeset($items)/item">
7533
+ <xsl:for-each select="xalan:nodeset($items)/mn:item">
7793
7534
  <xsl:choose>
7794
7535
  <xsl:when test=". = $sep">
7795
7536
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
@@ -7818,17 +7559,13 @@
7818
7559
  </xsl:template> <!-- copyright-statement -->
7819
7560
 
7820
7561
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
7821
-
7822
- <!-- process in the template 'title' -->
7823
- <xsl:call-template name="title"/>
7824
-
7562
+ <!-- process in the template 'title' -->
7563
+ <xsl:call-template name="title"/>
7825
7564
  </xsl:template> <!-- copyright-statement//title -->
7826
7565
 
7827
7566
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
7828
-
7829
- <!-- process in the template 'paragraph' -->
7830
- <xsl:call-template name="paragraph"/>
7831
-
7567
+ <!-- process in the template 'paragraph' -->
7568
+ <xsl:call-template name="paragraph"/>
7832
7569
  </xsl:template> <!-- copyright-statement//p -->
7833
7570
 
7834
7571
  <xsl:template match="*[local-name()='license-statement']">
@@ -7838,42 +7575,34 @@
7838
7575
  </xsl:template> <!-- license-statement -->
7839
7576
 
7840
7577
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
7841
-
7842
- <!-- process in the template 'title' -->
7843
- <xsl:call-template name="title"/>
7844
-
7578
+ <!-- process in the template 'title' -->
7579
+ <xsl:call-template name="title"/>
7845
7580
  </xsl:template> <!-- license-statement/title -->
7846
7581
 
7847
7582
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
7848
-
7849
- <!-- process in the template 'paragraph' -->
7850
- <xsl:call-template name="paragraph"/>
7851
-
7583
+ <!-- process in the template 'paragraph' -->
7584
+ <xsl:call-template name="paragraph"/>
7852
7585
  </xsl:template> <!-- license-statement/p -->
7853
7586
 
7854
7587
  <xsl:template match="*[local-name()='legal-statement']">
7855
7588
  <xsl:param name="isLegacy">false</xsl:param>
7856
7589
  <fo:block xsl:use-attribute-sets="legal-statement-style">
7857
-
7858
7590
  <xsl:apply-templates/>
7859
7591
  </fo:block>
7860
7592
  </xsl:template> <!-- legal-statement -->
7861
7593
 
7862
7594
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
7863
-
7864
- <!-- process in the template 'title' -->
7865
- <xsl:call-template name="title"/>
7595
+ <!-- process in the template 'title' -->
7596
+ <xsl:call-template name="title"/>
7866
7597
 
7867
7598
  </xsl:template> <!-- legal-statement/title -->
7868
7599
 
7869
7600
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
7870
7601
  <xsl:param name="margin"/>
7871
-
7872
- <!-- process in the template 'paragraph' -->
7873
- <xsl:call-template name="paragraph">
7874
- <xsl:with-param name="margin" select="$margin"/>
7875
- </xsl:call-template>
7876
-
7602
+ <!-- process in the template 'paragraph' -->
7603
+ <xsl:call-template name="paragraph">
7604
+ <xsl:with-param name="margin" select="$margin"/>
7605
+ </xsl:call-template>
7877
7606
  </xsl:template> <!-- legal-statement/p -->
7878
7607
 
7879
7608
  <xsl:template match="*[local-name()='feedback-statement']">
@@ -7883,20 +7612,16 @@
7883
7612
  </xsl:template> <!-- feedback-statement -->
7884
7613
 
7885
7614
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
7886
-
7887
- <!-- process in the template 'title' -->
7888
- <xsl:call-template name="title"/>
7889
-
7615
+ <!-- process in the template 'title' -->
7616
+ <xsl:call-template name="title"/>
7890
7617
  </xsl:template>
7891
7618
 
7892
7619
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
7893
7620
  <xsl:param name="margin"/>
7894
-
7895
- <!-- process in the template 'paragraph' -->
7896
- <xsl:call-template name="paragraph">
7897
- <xsl:with-param name="margin" select="$margin"/>
7898
- </xsl:call-template>
7899
-
7621
+ <!-- process in the template 'paragraph' -->
7622
+ <xsl:call-template name="paragraph">
7623
+ <xsl:with-param name="margin" select="$margin"/>
7624
+ </xsl:call-template>
7900
7625
  </xsl:template>
7901
7626
 
7902
7627
  <!-- ================================= -->
@@ -7949,7 +7674,6 @@
7949
7674
  <xsl:template match="*[local-name()='table']" name="table">
7950
7675
 
7951
7676
  <xsl:variable name="table-preamble">
7952
-
7953
7677
  </xsl:variable>
7954
7678
 
7955
7679
  <xsl:variable name="table">
@@ -7967,10 +7691,8 @@
7967
7691
 
7968
7692
  <!-- Display table's name before table as standalone block -->
7969
7693
  <!-- $namespace = 'iso' or -->
7970
-
7971
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
7972
-
7973
- <xsl:call-template name="table_name_fn_display"/>
7694
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
7695
+ <xsl:call-template name="table_name_fn_display"/>
7974
7696
 
7975
7697
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
7976
7698
 
@@ -8023,8 +7745,7 @@
8023
7745
 
8024
7746
  <xsl:variable name="table_width_default">100%</xsl:variable>
8025
7747
  <xsl:variable name="table_width">
8026
- <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
8027
- <xsl:value-of select="$table_width_default"/>
7748
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) --><xsl:value-of select="$table_width_default"/>
8028
7749
  </xsl:variable>
8029
7750
 
8030
7751
  <xsl:variable name="table_attributes">
@@ -8167,27 +7888,25 @@
8167
7888
  <xsl:when test="@width and @width != 'full-page-width' and @width != 'text-width'">
8168
7889
 
8169
7890
  <!-- centered table when table name is centered (see table-name-style) -->
8170
-
8171
- <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
8172
-
8173
- <fo:table-column column-width="proportional-column-width(1)"/>
8174
- <fo:table-column column-width="{@width}"/>
8175
- <fo:table-column column-width="proportional-column-width(1)"/>
8176
- <fo:table-body role="SKIP">
8177
- <fo:table-row role="SKIP">
8178
- <fo:table-cell column-number="2" role="SKIP">
8179
- <xsl:copy-of select="$table-preamble"/>
8180
- <fo:block role="SKIP">
8181
- <xsl:call-template name="setTrackChangesStyles">
8182
- <xsl:with-param name="isAdded" select="$isAdded"/>
8183
- <xsl:with-param name="isDeleted" select="$isDeleted"/>
8184
- </xsl:call-template>
8185
- <xsl:copy-of select="$table"/>
8186
- </fo:block>
8187
- </fo:table-cell>
8188
- </fo:table-row>
8189
- </fo:table-body>
8190
- </fo:table>
7891
+ <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
7892
+ <fo:table-column column-width="proportional-column-width(1)"/>
7893
+ <fo:table-column column-width="{@width}"/>
7894
+ <fo:table-column column-width="proportional-column-width(1)"/>
7895
+ <fo:table-body role="SKIP">
7896
+ <fo:table-row role="SKIP">
7897
+ <fo:table-cell column-number="2" role="SKIP">
7898
+ <xsl:copy-of select="$table-preamble"/>
7899
+ <fo:block role="SKIP">
7900
+ <xsl:call-template name="setTrackChangesStyles">
7901
+ <xsl:with-param name="isAdded" select="$isAdded"/>
7902
+ <xsl:with-param name="isDeleted" select="$isDeleted"/>
7903
+ </xsl:call-template>
7904
+ <xsl:copy-of select="$table"/>
7905
+ </fo:block>
7906
+ </fo:table-cell>
7907
+ </fo:table-row>
7908
+ </fo:table-body>
7909
+ </fo:table>
8191
7910
 
8192
7911
  </xsl:when>
8193
7912
  <xsl:otherwise>
@@ -8213,7 +7932,6 @@
8213
7932
  </xsl:template>
8214
7933
 
8215
7934
  <xsl:template name="setBordersTableArray">
8216
-
8217
7935
  </xsl:template>
8218
7936
 
8219
7937
  <!-- table/name-->
@@ -8222,51 +7940,50 @@
8222
7940
  <xsl:param name="cols-count"/>
8223
7941
  <xsl:if test="normalize-space() != ''">
8224
7942
 
8225
- <fo:block xsl:use-attribute-sets="table-name-style">
7943
+ <fo:block xsl:use-attribute-sets="table-name-style">
8226
7944
 
8227
- <xsl:call-template name="refine_table-name-style">
8228
- <xsl:with-param name="continued" select="$continued"/>
8229
- </xsl:call-template>
8230
-
8231
- <xsl:choose>
8232
- <xsl:when test="$continued = 'true'">
7945
+ <xsl:call-template name="refine_table-name-style">
7946
+ <xsl:with-param name="continued" select="$continued"/>
7947
+ </xsl:call-template>
8233
7948
 
8234
- </xsl:when>
8235
- <xsl:otherwise>
8236
- <xsl:apply-templates/>
8237
- </xsl:otherwise>
8238
- </xsl:choose>
7949
+ <xsl:choose>
7950
+ <xsl:when test="$continued = 'true'">
7951
+ </xsl:when>
7952
+ <xsl:otherwise>
7953
+ <xsl:apply-templates/>
7954
+ </xsl:otherwise>
7955
+ </xsl:choose>
8239
7956
 
8240
- </fo:block>
7957
+ </fo:block>
8241
7958
 
8242
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
8243
- <xsl:if test="$continued = 'true'">
7959
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
7960
+ <xsl:if test="$continued = 'true'">
8244
7961
 
8245
- <!-- to prevent the error 'THead element may contain only TR elements' -->
7962
+ <!-- to prevent the error 'THead element may contain only TR elements' -->
8246
7963
 
8247
- <xsl:choose>
8248
- <xsl:when test="string(number($cols-count)) != 'NaN'">
8249
- <fo:table width="100%" table-layout="fixed" role="SKIP">
8250
- <fo:table-body role="SKIP">
8251
- <fo:table-row>
8252
- <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
8253
- <fo:block text-align="right" role="SKIP">
8254
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
8255
- </fo:block>
8256
- </fo:table-cell>
8257
- </fo:table-row>
8258
- </fo:table-body>
8259
- </fo:table>
8260
- </xsl:when>
8261
- <xsl:otherwise>
8262
- <fo:block text-align="right">
8263
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
8264
- </fo:block>
8265
- </xsl:otherwise>
8266
- </xsl:choose>
7964
+ <xsl:choose>
7965
+ <xsl:when test="string(number($cols-count)) != 'NaN'">
7966
+ <fo:table width="100%" table-layout="fixed" role="SKIP">
7967
+ <fo:table-body role="SKIP">
7968
+ <fo:table-row>
7969
+ <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
7970
+ <fo:block text-align="right" role="SKIP">
7971
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
7972
+ </fo:block>
7973
+ </fo:table-cell>
7974
+ </fo:table-row>
7975
+ </fo:table-body>
7976
+ </fo:table>
7977
+ </xsl:when>
7978
+ <xsl:otherwise>
7979
+ <fo:block text-align="right">
7980
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
7981
+ </fo:block>
7982
+ </xsl:otherwise>
7983
+ </xsl:choose>
8267
7984
 
8268
- </xsl:if>
8269
- <!-- </xsl:if> -->
7985
+ </xsl:if>
7986
+ <!-- </xsl:if> -->
8270
7987
 
8271
7988
  </xsl:if>
8272
7989
  </xsl:template> <!-- table/name -->
@@ -8641,7 +8358,6 @@
8641
8358
  <xsl:template match="*[local-name()='thead']">
8642
8359
  <xsl:param name="cols-count"/>
8643
8360
  <fo:table-header>
8644
-
8645
8361
  <xsl:apply-templates/>
8646
8362
  </fo:table-header>
8647
8363
  </xsl:template> <!-- thead -->
@@ -8655,21 +8371,20 @@
8655
8371
 
8656
8372
  <xsl:call-template name="refine_table-header-title-style"/>
8657
8373
 
8658
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
8659
- <xsl:with-param name="continued">true</xsl:with-param>
8660
- <xsl:with-param name="cols-count" select="$cols-count"/>
8661
- </xsl:apply-templates>
8374
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
8375
+ <xsl:with-param name="continued">true</xsl:with-param>
8376
+ <xsl:with-param name="cols-count" select="$cols-count"/>
8377
+ </xsl:apply-templates>
8662
8378
 
8663
- <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
8664
- <fo:block role="SKIP"/>
8665
- </xsl:if>
8379
+ <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
8380
+ <fo:block role="SKIP"/>
8381
+ </xsl:if>
8666
8382
 
8667
8383
  </fo:table-cell>
8668
8384
  </fo:table-row>
8669
8385
  </xsl:template> <!-- table-header-title -->
8670
8386
 
8671
8387
  <xsl:template name="refine_table-header-title-style">
8672
-
8673
8388
  </xsl:template> <!-- refine_table-header-title-style -->
8674
8389
 
8675
8390
  <xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -8699,7 +8414,6 @@
8699
8414
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
8700
8415
 
8701
8416
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
8702
-
8703
8417
  </xsl:variable>
8704
8418
 
8705
8419
  <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
@@ -8761,22 +8475,15 @@
8761
8475
  <xsl:call-template name="setBordersTableArray"/>
8762
8476
 
8763
8477
  <!-- fn will be processed inside 'note' processing -->
8764
-
8765
- <!-- for BSI (not PAS) display Notes before footnotes -->
8766
-
8767
- <!-- except gb and bsi -->
8768
-
8769
- <xsl:apply-templates select="../*[local-name()='p' or local-name()='dl' or (local-name()='note' and not(@type = 'units')) or local-name()='example' or local-name()='source']"/>
8478
+ <xsl:apply-templates select="../*[local-name()='p' or local-name()='dl' or (local-name()='note' and not(@type = 'units')) or local-name()='example' or local-name()='source']"/>
8770
8479
 
8771
8480
  <xsl:variable name="isDisplayRowSeparator">
8772
-
8773
8481
  </xsl:variable>
8774
8482
 
8775
8483
  <!-- horizontal row separator -->
8776
8484
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
8777
8485
  <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
8778
8486
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
8779
-
8780
8487
  <xsl:call-template name="setBordersTableArray"/>
8781
8488
  <fo:block font-size="1pt"> </fo:block>
8782
8489
  </fo:block-container>
@@ -8784,11 +8491,8 @@
8784
8491
  </xsl:if>
8785
8492
 
8786
8493
  <!-- fn processing -->
8787
-
8788
- <!-- <xsl:call-template name="table_fn_display" /> -->
8789
- <xsl:copy-of select="$table_fn_block"/>
8790
-
8791
- <!-- for PAS display Notes after footnotes -->
8494
+ <!-- <xsl:call-template name="table_fn_display" /> -->
8495
+ <xsl:copy-of select="$table_fn_block"/>
8792
8496
 
8793
8497
  </fo:table-cell>
8794
8498
  </fo:table-row>
@@ -8915,7 +8619,7 @@
8915
8619
  <xsl:with-param name="pText" select="$border_under_row_"/>
8916
8620
  </xsl:call-template>
8917
8621
  </xsl:variable>
8918
- <xsl:if test="xalan:nodeset($border_under_row)/item[. = normalize-space($row_num)]">
8622
+ <xsl:if test="xalan:nodeset($border_under_row)/mn:item[. = normalize-space($row_num)]">
8919
8623
  <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
8920
8624
  </xsl:if>
8921
8625
  </xsl:when>
@@ -9032,7 +8736,7 @@
9032
8736
  </xsl:variable>
9033
8737
  <xsl:variable name="quot">"</xsl:variable>
9034
8738
  <xsl:variable name="styles_">
9035
- <xsl:for-each select="xalan:nodeset($styles__)/item">
8739
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
9036
8740
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
9037
8741
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
9038
8742
  <xsl:if test="$key = 'color' or $key = 'background-color' or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
@@ -9082,11 +8786,10 @@
9082
8786
  <fo:block role="SKIP">
9083
8787
 
9084
8788
  <xsl:if test="$isGenerateTableIF = 'true'">
9085
-
9086
- <fo:inline>
9087
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
9088
- <xsl:value-of select="$hair_space"/>
9089
- </fo:inline>
8789
+ <fo:inline>
8790
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
8791
+ <xsl:value-of select="$hair_space"/>
8792
+ </fo:inline>
9090
8793
 
9091
8794
  </xsl:if>
9092
8795
 
@@ -9102,23 +8805,22 @@
9102
8805
 
9103
8806
  <!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
9104
8807
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name() = 'example']" priority="2">
9105
-
9106
- <xsl:call-template name="setNamedDestination"/>
9107
- <fo:list-block id="{@id}" xsl:use-attribute-sets="table-note-style" provisional-distance-between-starts="{9 + $text_indent}mm"> <!-- 12 -->
9108
- <fo:list-item>
9109
- <fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()">
9110
- <fo:block>
9111
- <xsl:apply-templates select="*[local-name() = 'name']"/>
9112
- </fo:block>
9113
- </fo:list-item-label>
9114
- <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="table-fn-body-style">
9115
- <fo:block>
9116
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9117
- </fo:block>
9118
- </fo:list-item-body>
9119
- </fo:list-item>
9120
- </fo:list-block>
9121
- <!-- jis -->
8808
+ <xsl:call-template name="setNamedDestination"/>
8809
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="table-note-style" provisional-distance-between-starts="{9 + $text_indent}mm"> <!-- 12 -->
8810
+ <fo:list-item>
8811
+ <fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()">
8812
+ <fo:block>
8813
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8814
+ </fo:block>
8815
+ </fo:list-item-label>
8816
+ <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="table-fn-body-style">
8817
+ <fo:block>
8818
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8819
+ </fo:block>
8820
+ </fo:list-item-body>
8821
+ </fo:list-item>
8822
+ </fo:list-block>
8823
+ <!-- jis -->
9122
8824
 
9123
8825
  </xsl:template> <!-- table/note -->
9124
8826
 
@@ -9164,15 +8866,14 @@
9164
8866
  <xsl:variable name="current_fn_number" select="@reference"/>
9165
8867
 
9166
8868
  <xsl:variable name="current_fn_number_text">
9167
-
9168
- <xsl:choose>
9169
- <xsl:when test="$autonumbering_style = 'japanese'">
9170
- <xsl:text> </xsl:text>
9171
- <xsl:value-of select="$numbers_japanese//jis:localized-string[@key = $current_fn_number]"/>
9172
- <xsl:text> </xsl:text>
9173
- </xsl:when>
9174
- <xsl:otherwise><xsl:value-of select="translate($current_fn_number, ')', '')"/><fo:inline font-weight="normal">)</fo:inline></xsl:otherwise>
9175
- </xsl:choose>
8869
+ <xsl:choose>
8870
+ <xsl:when test="$autonumbering_style = 'japanese'">
8871
+ <xsl:text> </xsl:text>
8872
+ <xsl:value-of select="$numbers_japanese//jis:localized-string[@key = $current_fn_number]"/>
8873
+ <xsl:text> </xsl:text>
8874
+ </xsl:when>
8875
+ <xsl:otherwise><xsl:value-of select="translate($current_fn_number, ')', '')"/><fo:inline font-weight="normal">)</fo:inline></xsl:otherwise>
8876
+ </xsl:choose>
9176
8877
 
9177
8878
  </xsl:variable>
9178
8879
 
@@ -9185,25 +8886,21 @@
9185
8886
  <xsl:choose>
9186
8887
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
9187
8888
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
9188
-
9189
- <xsl:if test="not($vertical_layout = 'true')">
9190
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
9191
- </xsl:if>
9192
-
8889
+ <xsl:if test="not($vertical_layout = 'true')">
8890
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
8891
+ </xsl:if>
9193
8892
  </fn_styles>
9194
8893
  </xsl:when>
9195
8894
  <xsl:otherwise>
9196
8895
  <fn_styles xsl:use-attribute-sets="fn-num-style">
9197
-
9198
- <xsl:if test="not($vertical_layout = 'true')">
9199
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
9200
- </xsl:if>
9201
- <xsl:if test="$vertical_layout = 'true'">
9202
- <xsl:attribute name="vertical-align">baseline</xsl:attribute>
9203
- <xsl:attribute name="font-size">80%</xsl:attribute>
9204
- <xsl:attribute name="baseline-shift">20%</xsl:attribute>
9205
- </xsl:if>
9206
-
8896
+ <xsl:if test="not($vertical_layout = 'true')">
8897
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
8898
+ </xsl:if>
8899
+ <xsl:if test="$vertical_layout = 'true'">
8900
+ <xsl:attribute name="vertical-align">baseline</xsl:attribute>
8901
+ <xsl:attribute name="font-size">80%</xsl:attribute>
8902
+ <xsl:attribute name="baseline-shift">20%</xsl:attribute>
8903
+ </xsl:if>
9207
8904
  </fn_styles>
9208
8905
  </xsl:otherwise>
9209
8906
  </xsl:choose>
@@ -9221,21 +8918,18 @@
9221
8918
  <xsl:with-param name="element">
9222
8919
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
9223
8920
  <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
9224
-
9225
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9226
- <fo:inline font-family="IPAexGothic">
9227
- <xsl:call-template name="insertVerticalChar">
9228
- <xsl:with-param name="str" select="'〔'"/>
9229
- </xsl:call-template>
9230
- </fo:inline>
9231
-
8921
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8922
+ <fo:inline font-family="IPAexGothic">
8923
+ <xsl:call-template name="insertVerticalChar">
8924
+ <xsl:with-param name="str" select="'〔'"/>
8925
+ </xsl:call-template>
8926
+ </fo:inline>
9232
8927
  <xsl:copy-of select="$current_fn_number_text"/>
9233
-
9234
- <fo:inline font-family="IPAexGothic">
9235
- <xsl:call-template name="insertVerticalChar">
9236
- <xsl:with-param name="str" select="'〕'"/>
9237
- </xsl:call-template>
9238
- </fo:inline>
8928
+ <fo:inline font-family="IPAexGothic">
8929
+ <xsl:call-template name="insertVerticalChar">
8930
+ <xsl:with-param name="str" select="'〕'"/>
8931
+ </xsl:call-template>
8932
+ </fo:inline>
9239
8933
 
9240
8934
  </fo:inline>
9241
8935
  </fo:basic-link>
@@ -9272,48 +8966,47 @@
9272
8966
  <here><xsl:copy-of select="$footnotes"/></here> -->
9273
8967
  <xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
9274
8968
  </xsl:variable>
8969
+ <xsl:choose>
8970
+ <xsl:when test="$vertical_layout = 'true'">
8971
+ <fo:list-block xsl:use-attribute-sets="fn-body-style" role="SKIP" provisional-distance-between-starts="25mm">
8972
+ <xsl:call-template name="refine_fn-body-style"/>
8973
+ <fo:list-item role="SKIP">
8974
+ <fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()" role="SKIP">
8975
+ <fo:block role="SKIP">
8976
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
9275
8977
 
9276
- <xsl:choose>
9277
- <xsl:when test="$vertical_layout = 'true'">
9278
- <fo:list-block xsl:use-attribute-sets="fn-body-style" role="SKIP" provisional-distance-between-starts="25mm">
9279
- <xsl:call-template name="refine_fn-body-style"/>
9280
- <fo:list-item role="SKIP">
9281
- <fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()" role="SKIP">
9282
- <fo:block role="SKIP">
9283
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
9284
-
9285
- <xsl:call-template name="refine_fn-body-num-style"/>
9286
-
9287
- <xsl:call-template name="insertVerticalChar">
9288
- <xsl:with-param name="str" select="'〔'"/>
9289
- </xsl:call-template>
9290
-
9291
- <xsl:value-of select="$current_fn_number_text"/>
9292
-
9293
- <xsl:call-template name="insertVerticalChar">
9294
- <xsl:with-param name="str" select="''"/>
9295
- </xsl:call-template>
9296
-
9297
- </fo:inline>
9298
- </fo:block>
9299
- </fo:list-item-label>
9300
- <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="table-fn-body-style" role="SKIP">
9301
- <fo:block role="SKIP">
9302
- <!-- <xsl:apply-templates /> -->
9303
- <xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
9304
- </fo:block>
9305
- </fo:list-item-body>
9306
- </fo:list-item>
9307
- </fo:list-block>
9308
- </xsl:when> <!-- $vertical_layout = 'true' -->
9309
- <xsl:otherwise>
9310
- <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
9311
- <xsl:attribute name="text-align">left</xsl:attribute> <!-- because footer is centered -->
9312
- <xsl:copy-of select="$fn_block"/>
9313
- </fo:block>
9314
- </xsl:otherwise>
9315
- </xsl:choose>
9316
- <!-- jis -->
8978
+ <xsl:call-template name="refine_fn-body-num-style"/>
8979
+
8980
+ <xsl:call-template name="insertVerticalChar">
8981
+ <xsl:with-param name="str" select="'〔'"/>
8982
+ </xsl:call-template>
8983
+
8984
+ <xsl:value-of select="$current_fn_number_text"/>
8985
+
8986
+ <xsl:call-template name="insertVerticalChar">
8987
+ <xsl:with-param name="str" select="'〕'"/>
8988
+ </xsl:call-template>
8989
+
8990
+ </fo:inline>
8991
+ </fo:block>
8992
+ </fo:list-item-label>
8993
+ <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="table-fn-body-style" role="SKIP">
8994
+ <fo:block role="SKIP">
8995
+ <!-- <xsl:apply-templates /> -->
8996
+ <xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
8997
+ </fo:block>
8998
+ </fo:list-item-body>
8999
+ </fo:list-item>
9000
+ </fo:list-block>
9001
+ </xsl:when> <!-- $vertical_layout = 'true' -->
9002
+ <xsl:otherwise>
9003
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
9004
+ <xsl:attribute name="text-align">left</xsl:attribute> <!-- because footer is centered -->
9005
+ <xsl:copy-of select="$fn_block"/>
9006
+ </fo:block>
9007
+ </xsl:otherwise>
9008
+ </xsl:choose>
9009
+ <!-- jis -->
9317
9010
 
9318
9011
  </fo:block-container>
9319
9012
  </fo:footnote-body>
@@ -9390,12 +9083,11 @@
9390
9083
  <xsl:variable name="reference" select="@reference"/>
9391
9084
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
9392
9085
  <xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
9393
-
9394
- <fo:list-block id="{@id}" xsl:use-attribute-sets="table-fn-style" provisional-distance-between-starts="{9 + $text_indent}mm"> <!-- 12 -->
9395
- <fo:list-item>
9396
- <fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()">
9397
- <fo:block>
9398
- <!-- <fo:inline font-size="9pt">
9086
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="table-fn-style" provisional-distance-between-starts="{9 + $text_indent}mm"> <!-- 12 -->
9087
+ <fo:list-item>
9088
+ <fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()">
9089
+ <fo:block>
9090
+ <!-- <fo:inline font-size="9pt">
9399
9091
  <xsl:if test="not($vertical_layout = 'true')">
9400
9092
  <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
9401
9093
  </xsl:if>
@@ -9405,36 +9097,36 @@
9405
9097
  </fo:inline>
9406
9098
  <xsl:text> </xsl:text> -->
9407
9099
 
9408
- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
9409
- <xsl:with-param name="process">true</xsl:with-param>
9410
- </xsl:apply-templates>
9100
+ <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
9101
+ <xsl:with-param name="process">true</xsl:with-param>
9102
+ </xsl:apply-templates>
9411
9103
 
9412
- <!-- <fo:inline xsl:use-attribute-sets="table-fn-number-style table-fmt-fn-label-style"> -->
9413
- <!-- <xsl:if test="not($vertical_layout = 'true')">
9104
+ <!-- <fo:inline xsl:use-attribute-sets="table-fn-number-style table-fmt-fn-label-style"> -->
9105
+ <!-- <xsl:if test="not($vertical_layout = 'true')">
9414
9106
  <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
9415
9107
  </xsl:if> -->
9416
- <!-- <xsl:value-of select="@reference"/> -->
9417
- <!-- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
9108
+ <!-- <xsl:value-of select="@reference"/> -->
9109
+ <!-- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
9418
9110
  <xsl:with-param name="process">true</xsl:with-param>
9419
9111
  </xsl:apply-templates> -->
9420
- <!-- <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/> -->
9421
- <!-- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
9112
+ <!-- <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/> -->
9113
+ <!-- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
9422
9114
  <xsl:with-param name="process">true</xsl:with-param>
9423
9115
  </xsl:apply-templates> -->
9424
9116
 
9425
- <!-- <fo:inline font-weight="normal">)</fo:inline> --> <!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
9426
- <!-- </fo:inline> -->
9427
- </fo:block>
9428
- </fo:list-item-label>
9429
- <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="table-fn-body-style">
9430
- <fo:block>
9431
- <!-- <xsl:copy-of select="./node()"/> -->
9432
- <xsl:apply-templates/>
9433
- </fo:block>
9434
- </fo:list-item-body>
9435
- </fo:list-item>
9436
- </fo:list-block>
9437
- <!-- jis -->
9117
+ <!-- <fo:inline font-weight="normal">)</fo:inline> --> <!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
9118
+ <!-- </fo:inline> -->
9119
+ </fo:block>
9120
+ </fo:list-item-label>
9121
+ <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="table-fn-body-style">
9122
+ <fo:block>
9123
+ <!-- <xsl:copy-of select="./node()"/> -->
9124
+ <xsl:apply-templates/>
9125
+ </fo:block>
9126
+ </fo:list-item-body>
9127
+ </fo:list-item>
9128
+ </fo:list-block>
9129
+ <!-- jis -->
9438
9130
 
9439
9131
  <!-- </xsl:if> -->
9440
9132
  </xsl:for-each>
@@ -9487,9 +9179,7 @@
9487
9179
  <xsl:param name="process">false</xsl:param>
9488
9180
  <xsl:if test="$process = 'true'">
9489
9181
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
9490
-
9491
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
9492
-
9182
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
9493
9183
  </xsl:if>
9494
9184
  </xsl:template>
9495
9185
 
@@ -9573,7 +9263,6 @@
9573
9263
  <xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
9574
9264
 
9575
9265
  <xsl:variable name="key_iso">
9576
-
9577
9266
  </xsl:variable>
9578
9267
 
9579
9268
  <fo:block>
@@ -9619,7 +9308,6 @@
9619
9308
  <fo:table width="95%" table-layout="fixed">
9620
9309
  <xsl:if test="normalize-space($key_iso) = 'true'">
9621
9310
  <xsl:attribute name="font-size">10pt</xsl:attribute>
9622
-
9623
9311
  </xsl:if>
9624
9312
  <xsl:choose>
9625
9313
  <!-- if there 'dl', then set same columns width -->
@@ -9643,23 +9331,19 @@
9643
9331
  <fo:table-row>
9644
9332
  <fo:table-cell>
9645
9333
  <fo:block>
9646
-
9647
- <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
9648
- <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
9649
- <!-- <xsl:value-of select="@reference"/> -->
9650
- <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
9651
- </fo:inline>
9334
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
9335
+ <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
9336
+ <!-- <xsl:value-of select="@reference"/> -->
9337
+ <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
9338
+ </fo:inline>
9652
9339
 
9653
9340
  </fo:block>
9654
9341
  </fo:table-cell>
9655
9342
  <fo:table-cell>
9656
9343
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
9657
9344
  <xsl:if test="normalize-space($key_iso) = 'true'">
9658
-
9659
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
9660
-
9345
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
9661
9346
  </xsl:if>
9662
-
9663
9347
  <!-- <xsl:copy-of select="./node()"/> -->
9664
9348
  <xsl:apply-templates/>
9665
9349
  </fo:block>
@@ -9709,11 +9393,9 @@
9709
9393
  <!-- figure/dl[@key = 'true']/dt/p/sup -->
9710
9394
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
9711
9395
  <xsl:variable name="key_iso">
9712
-
9713
9396
  </xsl:variable>
9714
9397
  <xsl:if test="normalize-space($key_iso) = 'true'">
9715
9398
  <xsl:attribute name="font-size">10pt</xsl:attribute>
9716
-
9717
9399
  </xsl:if>
9718
9400
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
9719
9401
  <!-- <xsl:value-of select="@reference"/> -->
@@ -9759,8 +9441,7 @@
9759
9441
  <xsl:text>※</xsl:text>
9760
9442
  </xsl:if> -->
9761
9443
  <!-- <xsl:value-of select="@reference"/> -->
9762
-
9763
- <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
9444
+ <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
9764
9445
 
9765
9446
  <!-- <xsl:if test="$namespace = 'bsi'">
9766
9447
  <xsl:text>)</xsl:text>
@@ -9832,10 +9513,9 @@
9832
9513
  </xsl:if>
9833
9514
 
9834
9515
  <xsl:call-template name="setBlockSpanAll"/>
9835
-
9836
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
9837
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
9838
- </xsl:if>
9516
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
9517
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
9518
+ </xsl:if>
9839
9519
 
9840
9520
  <xsl:if test="ancestor::*[local-name() = 'sourcecode']">
9841
9521
  <!-- set font-size as sourcecode font-size -->
@@ -9856,7 +9536,6 @@
9856
9536
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
9857
9537
  </xsl:choose>
9858
9538
  </xsl:attribute>
9859
-
9860
9539
  </xsl:if>
9861
9540
 
9862
9541
  <xsl:call-template name="setTrackChangesStyles">
@@ -9865,37 +9544,32 @@
9865
9544
  </xsl:call-template>
9866
9545
 
9867
9546
  <fo:block-container margin-left="0mm" role="SKIP">
9868
-
9869
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
9547
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
9870
9548
 
9871
9549
  <xsl:variable name="parent" select="local-name(..)"/>
9872
9550
 
9873
- <xsl:variable name="key_iso">
9874
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
9551
+ <xsl:variable name="key_iso"> <!-- and (not(../@class) or ../@class !='pseudocode') -->
9875
9552
  </xsl:variable>
9876
9553
 
9877
9554
  <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
9878
9555
 
9879
9556
  <xsl:choose>
9880
9557
  <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
9881
-
9882
- <fo:block margin-bottom="12pt" text-align="left">
9883
-
9884
- <!-- <xsl:variable name="title-where">
9558
+ <fo:block margin-bottom="12pt" text-align="left">
9559
+ <!-- <xsl:variable name="title-where">
9885
9560
  <xsl:call-template name="getLocalizedString">
9886
9561
  <xsl:with-param name="key">where</xsl:with-param>
9887
9562
  </xsl:call-template>
9888
9563
  </xsl:variable>
9889
9564
  <xsl:value-of select="$title-where"/> -->
9890
- <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
9891
- <xsl:text> </xsl:text>
9892
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
9893
- <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
9894
- <xsl:text> </xsl:text>
9895
- </xsl:if>
9896
- <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
9897
- </fo:block>
9898
-
9565
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
9566
+ <xsl:text> </xsl:text>
9567
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
9568
+ <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
9569
+ <xsl:text> </xsl:text>
9570
+ </xsl:if>
9571
+ <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
9572
+ </fo:block>
9899
9573
  </xsl:when> <!-- END: only one component -->
9900
9574
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
9901
9575
  <fo:block margin-bottom="12pt" text-align="left">
@@ -9915,19 +9589,17 @@
9915
9589
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
9916
9590
  <!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
9917
9591
  <xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
9592
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
9918
9593
 
9919
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
9920
-
9921
- <xsl:call-template name="refine_figure_key_style"/>
9922
-
9923
- <xsl:variable name="title-key">
9924
- <xsl:call-template name="getLocalizedString">
9925
- <xsl:with-param name="key">key</xsl:with-param>
9926
- </xsl:call-template>
9927
- </xsl:variable>
9928
- <xsl:value-of select="$title-key"/>
9929
- </fo:block>
9594
+ <xsl:call-template name="refine_figure_key_style"/>
9930
9595
 
9596
+ <xsl:variable name="title-key">
9597
+ <xsl:call-template name="getLocalizedString">
9598
+ <xsl:with-param name="key">key</xsl:with-param>
9599
+ </xsl:call-template>
9600
+ </xsl:variable>
9601
+ <xsl:value-of select="$title-key"/>
9602
+ </fo:block>
9931
9603
  </xsl:if>
9932
9604
  </xsl:when> <!-- END: definition list in a figure -->
9933
9605
  </xsl:choose>
@@ -9960,12 +9632,10 @@
9960
9632
  <xsl:if test="$isGenerateTableIF = 'true'">
9961
9633
  <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
9962
9634
  </xsl:if>
9963
-
9964
9635
  <xsl:choose>
9965
9636
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
9966
9637
  <xsl:when test="normalize-space($key_iso) = 'true'">
9967
9638
  <xsl:attribute name="font-size">10pt</xsl:attribute>
9968
-
9969
9639
  </xsl:when>
9970
9640
  </xsl:choose>
9971
9641
 
@@ -10070,17 +9740,15 @@
10070
9740
  <xsl:call-template name="getMaxLength_dt"/>
10071
9741
  </xsl:variable>
10072
9742
 
10073
- <xsl:variable name="isContainsKeepTogetherTag_">
10074
- false
9743
+ <xsl:variable name="isContainsKeepTogetherTag_">false
10075
9744
  </xsl:variable>
10076
9745
  <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
10077
9746
  <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
10078
-
10079
- <xsl:call-template name="setColumnWidth_dl">
10080
- <xsl:with-param name="colwidths" select="$colwidths"/>
10081
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
10082
- <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
10083
- </xsl:call-template>
9747
+ <xsl:call-template name="setColumnWidth_dl">
9748
+ <xsl:with-param name="colwidths" select="$colwidths"/>
9749
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
9750
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
9751
+ </xsl:call-template>
10084
9752
 
10085
9753
  <fo:table-body>
10086
9754
 
@@ -10111,13 +9779,12 @@
10111
9779
  <xsl:if test="$isGenerateTableIF = 'true'"> <!-- process nested 'dl' -->
10112
9780
  <xsl:apply-templates select="*[local-name() = 'dd']/*[local-name() = 'dl']"/>
10113
9781
  </xsl:if>
10114
-
10115
- <!-- display footnotes after after upper-level `dl` -->
10116
- <xsl:if test="not(ancestor::*[local-name() = 'dl'])">
10117
- <xsl:for-each select=".//jis:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]">
10118
- <xsl:call-template name="fn_jis"/>
10119
- </xsl:for-each>
10120
- </xsl:if>
9782
+ <!-- display footnotes after after upper-level `dl` -->
9783
+ <xsl:if test="not(ancestor::*[local-name() = 'dl'])">
9784
+ <xsl:for-each select=".//jis:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]">
9785
+ <xsl:call-template name="fn_jis"/>
9786
+ </xsl:for-each>
9787
+ </xsl:if>
10121
9788
 
10122
9789
  </xsl:template> <!-- END: dl -->
10123
9790
 
@@ -10138,21 +9805,17 @@
10138
9805
  </xsl:template>
10139
9806
 
10140
9807
  <xsl:template name="refine_dl_formula_where_style">
10141
-
10142
9808
  </xsl:template> <!-- refine_dl_formula_where_style -->
10143
9809
 
10144
9810
  <xsl:template name="refine_figure_key_style">
10145
-
10146
9811
  </xsl:template> <!-- refine_figure_key_style -->
10147
9812
 
10148
9813
  <xsl:template name="refine_multicomponent_style">
10149
9814
  <xsl:variable name="parent" select="local-name(..)"/>
10150
-
10151
9815
  </xsl:template> <!-- refine_multicomponent_style -->
10152
9816
 
10153
9817
  <xsl:template name="refine_multicomponent_block_style">
10154
9818
  <xsl:variable name="parent" select="local-name(..)"/>
10155
-
10156
9819
  </xsl:template> <!-- refine_multicomponent_block_style -->
10157
9820
 
10158
9821
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
@@ -10339,14 +10002,11 @@
10339
10002
  <xsl:attribute name="id">
10340
10003
  <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
10341
10004
  </xsl:attribute>
10342
-
10343
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
10344
- <xsl:with-param name="process">true</xsl:with-param>
10345
- </xsl:apply-templates>
10346
-
10005
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
10006
+ <xsl:with-param name="process">true</xsl:with-param>
10007
+ </xsl:apply-templates>
10347
10008
  </td>
10348
10009
  </tr>
10349
-
10350
10010
  </xsl:template>
10351
10011
 
10352
10012
  <!-- Definition's term -->
@@ -10355,7 +10015,6 @@
10355
10015
  <xsl:param name="split_keep-within-line"/>
10356
10016
 
10357
10017
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
10358
-
10359
10018
  <xsl:call-template name="insert_dt_cell">
10360
10019
  <xsl:with-param name="key_iso" select="$key_iso"/>
10361
10020
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -10377,7 +10036,6 @@
10377
10036
  <!-- border is mandatory, to calculate real width -->
10378
10037
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
10379
10038
  <xsl:attribute name="text-align">left</xsl:attribute>
10380
-
10381
10039
  </xsl:if>
10382
10040
 
10383
10041
  <xsl:call-template name="refine_dt-cell-style"/>
@@ -10387,11 +10045,10 @@
10387
10045
 
10388
10046
  <xsl:choose>
10389
10047
  <xsl:when test="$isGenerateTableIF = 'true'">
10390
-
10391
- <fo:inline>
10392
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
10393
- <xsl:value-of select="$hair_space"/>
10394
- </fo:inline>
10048
+ <fo:inline>
10049
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
10050
+ <xsl:value-of select="$hair_space"/>
10051
+ </fo:inline>
10395
10052
 
10396
10053
  </xsl:when>
10397
10054
  <xsl:otherwise>
@@ -10429,11 +10086,10 @@
10429
10086
  <fo:block role="SKIP">
10430
10087
 
10431
10088
  <xsl:if test="$isGenerateTableIF = 'true'">
10432
-
10433
- <fo:inline>
10434
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
10435
- <xsl:value-of select="$hair_space"/>
10436
- </fo:inline>
10089
+ <fo:inline>
10090
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
10091
+ <xsl:value-of select="$hair_space"/>
10092
+ </fo:inline>
10437
10093
 
10438
10094
  </xsl:if>
10439
10095
 
@@ -10582,7 +10238,6 @@
10582
10238
  </xsl:template>
10583
10239
 
10584
10240
  <xsl:template name="refine_italic_style">
10585
-
10586
10241
  </xsl:template>
10587
10242
 
10588
10243
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
@@ -10598,11 +10253,9 @@
10598
10253
  </xsl:template>
10599
10254
 
10600
10255
  <xsl:template name="refine_strong_style">
10601
-
10602
- <xsl:if test="not($vertical_layout = 'true')">
10603
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
10604
- </xsl:if>
10605
-
10256
+ <xsl:if test="not($vertical_layout = 'true')">
10257
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
10258
+ </xsl:if>
10606
10259
  <xsl:if test="ancestor::*['preferred']">
10607
10260
  <xsl:attribute name="role">SKIP</xsl:attribute>
10608
10261
  </xsl:if>
@@ -10627,10 +10280,7 @@
10627
10280
  <xsl:template match="*[local-name()='tt']">
10628
10281
  <fo:inline xsl:use-attribute-sets="tt-style">
10629
10282
 
10630
- <xsl:variable name="_font-size">
10631
-
10632
- <!-- inherit -->
10633
-
10283
+ <xsl:variable name="_font-size"> <!-- inherit -->
10634
10284
  </xsl:variable>
10635
10285
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
10636
10286
  <xsl:if test="$font-size != ''">
@@ -10846,8 +10496,7 @@
10846
10496
  </xsl:otherwise>
10847
10497
  </xsl:choose>
10848
10498
  </xsl:variable>
10849
- <xsl:variable name="ratio_">
10850
- 0.75
10499
+ <xsl:variable name="ratio_">0.75
10851
10500
  </xsl:variable>
10852
10501
  <xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
10853
10502
  <fo:inline font-size="{$ratio * 100}%" role="SKIP">
@@ -10937,7 +10586,7 @@
10937
10586
 
10938
10587
  <xsl:variable name="quot">"</xsl:variable>
10939
10588
  <xsl:variable name="styles_">
10940
- <xsl:for-each select="xalan:nodeset($styles__)/item">
10589
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
10941
10590
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
10942
10591
  <xsl:variable name="value_" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
10943
10592
  <xsl:variable name="value">
@@ -10949,7 +10598,7 @@
10949
10598
  </xsl:otherwise>
10950
10599
  </xsl:choose>
10951
10600
  </xsl:variable>
10952
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
10601
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
10953
10602
  <style name="{$key}"><xsl:value-of select="$value"/></style>
10954
10603
  </xsl:if>
10955
10604
  <xsl:if test="$key = 'text-indent'">
@@ -10961,18 +10610,16 @@
10961
10610
  <xsl:choose>
10962
10611
  <xsl:when test="$styles/style">
10963
10612
  <fo:inline>
10964
- <xsl:for-each select="$styles/style">
10965
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
10966
-
10967
- <xsl:if test="@name = 'font-family' and . = 'MS Gothic'">
10968
- <xsl:if test="not($vertical_layout = 'true')">
10969
- <xsl:attribute name="{@name}">IPAexGothic</xsl:attribute>
10970
- </xsl:if>
10971
- <xsl:if test="$vertical_layout = 'true'">
10972
- <xsl:attribute name="{@name}">Noto Serif JP</xsl:attribute>
10973
- </xsl:if>
10613
+ <xsl:for-each select="$styles/style">
10614
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
10615
+ <xsl:if test="@name = 'font-family' and . = 'MS Gothic'">
10616
+ <xsl:if test="not($vertical_layout = 'true')">
10617
+ <xsl:attribute name="{@name}">IPAexGothic</xsl:attribute>
10974
10618
  </xsl:if>
10975
-
10619
+ <xsl:if test="$vertical_layout = 'true'">
10620
+ <xsl:attribute name="{@name}">Noto Serif JP</xsl:attribute>
10621
+ </xsl:if>
10622
+ </xsl:if>
10976
10623
  </xsl:for-each>
10977
10624
  <xsl:apply-templates/>
10978
10625
  </fo:inline>
@@ -11959,10 +11606,9 @@
11959
11606
  <xsl:variable name="mathml_content">
11960
11607
  <xsl:apply-templates select="." mode="mathml_actual_text"/>
11961
11608
  </xsl:variable>
11962
-
11963
- <xsl:call-template name="mathml_instream_object">
11964
- <xsl:with-param name="mathml_content" select="$mathml_content"/>
11965
- </xsl:call-template>
11609
+ <xsl:call-template name="mathml_instream_object">
11610
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
11611
+ </xsl:call-template>
11966
11612
 
11967
11613
  </fo:inline>
11968
11614
  </xsl:template>
@@ -11996,7 +11642,6 @@
11996
11642
  <xsl:template name="getMathml_asciimath_text">
11997
11643
  <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
11998
11644
  <xsl:variable name="latexmath">
11999
-
12000
11645
  </xsl:variable>
12001
11646
  <xsl:variable name="asciimath_text_following">
12002
11647
  <xsl:choose>
@@ -12069,7 +11714,6 @@
12069
11714
  </xsl:template>
12070
11715
 
12071
11716
  <xsl:template name="refine_mathml_insteam_object_style">
12072
-
12073
11717
  </xsl:template> <!-- refine_mathml_insteam_object_style -->
12074
11718
 
12075
11719
  <xsl:template match="mathml:*" mode="mathml_actual_text">
@@ -12467,7 +12111,6 @@
12467
12111
  <xsl:variable name="annotation-id" select="@id"/>
12468
12112
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
12469
12113
  <fo:block id="{$annotation-id}" white-space="nowrap">
12470
-
12471
12114
  <fo:inline>
12472
12115
  <xsl:apply-templates>
12473
12116
  <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
@@ -12496,11 +12139,9 @@
12496
12139
  <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
12497
12140
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
12498
12141
  </xsl:if>
12499
-
12500
- <xsl:if test="not($vertical_layout = 'true')">
12501
- <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
12502
- </xsl:if>
12503
-
12142
+ <xsl:if test="not($vertical_layout = 'true')">
12143
+ <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
12144
+ </xsl:if>
12504
12145
  <xsl:if test="parent::*[local-name() = 'add']">
12505
12146
  <xsl:call-template name="append_add-style"/>
12506
12147
  </xsl:if>
@@ -12511,8 +12152,7 @@
12511
12152
  </xsl:template>
12512
12153
 
12513
12154
  <!-- command between two xref points to non-standard bibitem -->
12514
- <xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
12515
- <xsl:value-of select="."/>
12155
+ <xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]"><xsl:value-of select="."/>
12516
12156
  </xsl:template>
12517
12157
 
12518
12158
  <!-- ====== -->
@@ -12527,7 +12167,6 @@
12527
12167
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
12528
12168
  </xsl:choose>
12529
12169
  </xsl:attribute>
12530
-
12531
12170
  </xsl:if>
12532
12171
  <fo:block-container margin-left="0mm" role="SKIP">
12533
12172
  <xsl:call-template name="setNamedDestination"/>
@@ -12616,44 +12255,42 @@
12616
12255
  <!-- ====== -->
12617
12256
 
12618
12257
  <xsl:template match="*[local-name() = 'note']" name="note">
12258
+ <xsl:call-template name="setNamedDestination"/>
12259
+ <fo:block id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
12260
+ <xsl:call-template name="setBlockSpanAll"/>
12619
12261
 
12620
- <xsl:call-template name="setNamedDestination"/>
12621
- <fo:block id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
12622
- <xsl:call-template name="setBlockSpanAll"/>
12623
-
12624
- <xsl:call-template name="refine_note-style"/>
12262
+ <xsl:call-template name="refine_note-style"/>
12625
12263
 
12626
- <fo:list-block>
12627
- <xsl:attribute name="provisional-distance-between-starts">
12628
- <xsl:choose>
12629
- <!-- if last char is digit -->
12630
- <xsl:when test="translate(substring(*[local-name() = 'name'], string-length(*[local-name() = 'name'])),'0123456789','') = ''"><xsl:value-of select="16 + $text_indent"/>mm</xsl:when>
12631
- <xsl:otherwise><xsl:value-of select="10 + $text_indent"/>mm</xsl:otherwise>
12632
- </xsl:choose>
12633
- </xsl:attribute>
12634
- <fo:list-item>
12635
- <fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()">
12636
- <xsl:if test="$vertical_layout = 'true'">
12637
- <xsl:attribute name="start-indent">0mm</xsl:attribute>
12638
- </xsl:if>
12639
- <fo:block xsl:use-attribute-sets="note-name-style">
12640
- <xsl:call-template name="refine_note-name-style"/>
12641
- <xsl:apply-templates select="*[local-name() = 'name']"/>
12642
- </fo:block>
12643
- </fo:list-item-label>
12644
- <fo:list-item-body start-indent="body-start()">
12645
- <fo:block>
12646
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
12647
- </fo:block>
12648
- </fo:list-item-body>
12649
- </fo:list-item>
12650
- </fo:list-block>
12651
- </fo:block>
12264
+ <fo:list-block>
12265
+ <xsl:attribute name="provisional-distance-between-starts">
12266
+ <xsl:choose>
12267
+ <!-- if last char is digit -->
12268
+ <xsl:when test="translate(substring(*[local-name() = 'name'], string-length(*[local-name() = 'name'])),'0123456789','') = ''"><xsl:value-of select="16 + $text_indent"/>mm</xsl:when>
12269
+ <xsl:otherwise><xsl:value-of select="10 + $text_indent"/>mm</xsl:otherwise>
12270
+ </xsl:choose>
12271
+ </xsl:attribute>
12272
+ <fo:list-item>
12273
+ <fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()">
12274
+ <xsl:if test="$vertical_layout = 'true'">
12275
+ <xsl:attribute name="start-indent">0mm</xsl:attribute>
12276
+ </xsl:if>
12277
+ <fo:block xsl:use-attribute-sets="note-name-style">
12278
+ <xsl:call-template name="refine_note-name-style"/>
12279
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
12280
+ </fo:block>
12281
+ </fo:list-item-label>
12282
+ <fo:list-item-body start-indent="body-start()">
12283
+ <fo:block>
12284
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
12285
+ </fo:block>
12286
+ </fo:list-item-body>
12287
+ </fo:list-item>
12288
+ </fo:list-block>
12289
+ </fo:block>
12652
12290
 
12653
12291
  </xsl:template>
12654
12292
 
12655
12293
  <xsl:template name="refine_note_block_style">
12656
-
12657
12294
  </xsl:template> <!-- refine_note_block_style -->
12658
12295
 
12659
12296
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
@@ -12706,7 +12343,6 @@
12706
12343
  <xsl:value-of select="$sfx"/>
12707
12344
  </xsl:when>
12708
12345
  <xsl:otherwise>
12709
-
12710
12346
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
12711
12347
  <!-- <xsl:if test="$namespace = 'ieee'">
12712
12348
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -12714,7 +12350,6 @@
12714
12350
  <!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
12715
12351
  <xsl:text>:</xsl:text>
12716
12352
  </xsl:if> -->
12717
-
12718
12353
  <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
12719
12354
  <xsl:text> – </xsl:text> en dash &#x2013;
12720
12355
  </xsl:if> -->
@@ -12735,7 +12370,6 @@
12735
12370
  <xsl:value-of select="$sfx"/>
12736
12371
  </xsl:when>
12737
12372
  <xsl:otherwise>
12738
-
12739
12373
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
12740
12374
  <!-- <xsl:if test="$namespace = 'ieee'">
12741
12375
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -12791,7 +12425,6 @@
12791
12425
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
12792
12426
 
12793
12427
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
12794
-
12795
12428
  </xsl:if>
12796
12429
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
12797
12430
  </fo:block>
@@ -12832,11 +12465,10 @@
12832
12465
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
12833
12466
 
12834
12467
  <xsl:variable name="show_figure_key_in_block_container">
12835
-
12836
- <xsl:choose>
12837
- <xsl:when test="$vertical_layout = 'true'">false</xsl:when>
12838
- <xsl:otherwise>true</xsl:otherwise>
12839
- </xsl:choose>
12468
+ <xsl:choose>
12469
+ <xsl:when test="$vertical_layout = 'true'">false</xsl:when>
12470
+ <xsl:otherwise>true</xsl:otherwise>
12471
+ </xsl:choose>
12840
12472
 
12841
12473
  </xsl:variable>
12842
12474
 
@@ -12852,23 +12484,20 @@
12852
12484
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
12853
12485
  <xsl:call-template name="showFigureKey"/>
12854
12486
  </xsl:if>
12855
-
12856
- <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
12487
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
12857
12488
 
12858
12489
  </fo:block-container>
12859
-
12860
- <xsl:if test="$vertical_layout = 'true'">
12861
- <fo:block keep-with-previous="always">
12862
- <xsl:apply-templates select="*[local-name() = 'p'][@class = 'dl']">
12863
- <xsl:with-param name="process">true</xsl:with-param>
12864
- </xsl:apply-templates>
12865
- <xsl:call-template name="showFigureKey"/>
12866
- </fo:block>
12867
- <xsl:apply-templates select="*[local-name() = 'name']">
12490
+ <xsl:if test="$vertical_layout = 'true'">
12491
+ <fo:block keep-with-previous="always">
12492
+ <xsl:apply-templates select="*[local-name() = 'p'][@class = 'dl']">
12868
12493
  <xsl:with-param name="process">true</xsl:with-param>
12869
12494
  </xsl:apply-templates>
12870
- </xsl:if>
12871
-
12495
+ <xsl:call-template name="showFigureKey"/>
12496
+ </fo:block>
12497
+ <xsl:apply-templates select="*[local-name() = 'name']">
12498
+ <xsl:with-param name="process">true</xsl:with-param>
12499
+ </xsl:apply-templates>
12500
+ </xsl:if>
12872
12501
  </xsl:template>
12873
12502
 
12874
12503
  <xsl:template name="showFigureKey">
@@ -12906,13 +12535,12 @@
12906
12535
  <!-- SOURCE: ... -->
12907
12536
  <!-- figure/source -->
12908
12537
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
12909
-
12910
- <xsl:call-template name="termsource"/>
12911
-
12538
+ <xsl:call-template name="termsource"/>
12912
12539
  </xsl:template>
12913
12540
 
12914
12541
  <xsl:template match="*[local-name() = 'image']">
12915
12542
  <xsl:param name="indent">0</xsl:param>
12543
+ <xsl:param name="logo_width"/>
12916
12544
  <xsl:variable name="isAdded" select="../@added"/>
12917
12545
  <xsl:variable name="isDeleted" select="../@deleted"/>
12918
12546
  <xsl:choose>
@@ -12934,9 +12562,18 @@
12934
12562
 
12935
12563
  <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
12936
12564
 
12937
- <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
12938
12565
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
12939
12566
 
12567
+ <xsl:if test="parent::*[local-name() = 'logo']"> <!-- publisher's logo -->
12568
+ <xsl:attribute name="width">100%</xsl:attribute>
12569
+ <xsl:if test="normalize-space($logo_width) != ''">
12570
+ <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
12571
+ </xsl:if>
12572
+ <xsl:attribute name="content-height">100%</xsl:attribute>
12573
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
12574
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
12575
+ </xsl:if>
12576
+
12940
12577
  <xsl:variable name="width">
12941
12578
  <xsl:call-template name="setImageWidth"/>
12942
12579
  </xsl:variable>
@@ -13014,8 +12651,7 @@
13014
12651
  </xsl:call-template>
13015
12652
  </xsl:variable>
13016
12653
 
13017
- <xsl:variable name="scaleRatio">
13018
- 1
12654
+ <xsl:variable name="scaleRatio">1
13019
12655
  </xsl:variable>
13020
12656
 
13021
12657
  <xsl:if test="number($scale) &lt; 100">
@@ -13126,24 +12762,21 @@
13126
12762
  </xsl:variable>
13127
12763
 
13128
12764
  <xsl:variable name="image_width_effective">
13129
-
13130
- <xsl:value-of select="$width_effective - number($indent_left)"/>
13131
-
12765
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
13132
12766
  </xsl:variable>
13133
12767
  <xsl:variable name="image_height_effective" select="$height_effective - number($indent_left)"/>
13134
12768
  <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
13135
12769
  <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
13136
12770
  <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
13137
12771
  <xsl:variable name="scale">
13138
-
13139
- <xsl:choose>
13140
- <xsl:when test="$vertical_layout = 'true'">
13141
- <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_height_effective, $width_effective)"/>
13142
- </xsl:when>
13143
- <xsl:otherwise>
13144
- <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
13145
- </xsl:otherwise>
13146
- </xsl:choose>
12772
+ <xsl:choose>
12773
+ <xsl:when test="$vertical_layout = 'true'">
12774
+ <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_height_effective, $width_effective)"/>
12775
+ </xsl:when>
12776
+ <xsl:otherwise>
12777
+ <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
12778
+ </xsl:otherwise>
12779
+ </xsl:choose>
13147
12780
 
13148
12781
  </xsl:variable>
13149
12782
  <xsl:value-of select="$scale"/>
@@ -13165,7 +12798,8 @@
13165
12798
  </xsl:when>
13166
12799
  <xsl:when test="not(starts-with(@src, 'data:'))">
13167
12800
  <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
13168
- <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
12801
+ <xsl:variable name="file_protocol"><xsl:if test="not(starts-with($src_external, 'http:')) and not(starts-with($src_external, 'https:')) and not(starts-with($src_external, 'www.'))">file:///</xsl:if></xsl:variable>
12802
+ <xsl:value-of select="concat('url(', $file_protocol, $src_external, ')')"/>
13169
12803
  </xsl:when>
13170
12804
  <xsl:otherwise>
13171
12805
  <xsl:value-of select="@src"/>
@@ -13461,8 +13095,8 @@
13461
13095
  </xsl:call-template>
13462
13096
  </xsl:variable>
13463
13097
  <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
13464
- <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
13465
- <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
13098
+ <xsl:variable name="width" select="normalize-space($viewbox//mn:item[3])"/>
13099
+ <xsl:variable name="height" select="normalize-space($viewbox//mn:item[4])"/>
13466
13100
 
13467
13101
  <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
13468
13102
  <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
@@ -13534,8 +13168,8 @@
13534
13168
  </xsl:variable>
13535
13169
  <xsl:variable name="components" select="xalan:nodeset($components_)"/>
13536
13170
  <xsl:variable name="att_name" select="local-name()"/>
13537
- <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
13538
- <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
13171
+ <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/mn:item[1], ',', $components/mn:item[2], ',', $components/mn:item[3], ')')"/></xsl:attribute>
13172
+ <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/mn:item[4]"/></xsl:attribute>
13539
13173
  </xsl:template>
13540
13174
 
13541
13175
  <!-- ============== -->
@@ -13608,13 +13242,13 @@
13608
13242
  </xsl:call-template>
13609
13243
  </xsl:variable>
13610
13244
  <xsl:variable name="x_coords">
13611
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
13245
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 1]">
13612
13246
  <xsl:sort select="." data-type="number"/>
13613
13247
  <x><xsl:value-of select="."/></x>
13614
13248
  </xsl:for-each>
13615
13249
  </xsl:variable>
13616
13250
  <xsl:variable name="y_coords">
13617
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
13251
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 0]">
13618
13252
  <xsl:sort select="." data-type="number"/>
13619
13253
  <y><xsl:value-of select="."/></y>
13620
13254
  </xsl:for-each>
@@ -13819,11 +13453,11 @@
13819
13453
  <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
13820
13454
  </xsl:variable>
13821
13455
 
13822
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
13823
- <title>
13456
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
13457
+ <mn:title>
13824
13458
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
13825
- </title>
13826
- </item>
13459
+ </mn:title>
13460
+ </mn:item>
13827
13461
  </xsl:if>
13828
13462
  </xsl:template>
13829
13463
 
@@ -13894,12 +13528,12 @@
13894
13528
  <xsl:param name="contents"/>
13895
13529
  <xsl:param name="contents_addon"/>
13896
13530
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
13897
- <xsl:if test="$contents_nodes//item">
13531
+ <xsl:if test="$contents_nodes//mn:item">
13898
13532
  <fo:bookmark-tree>
13899
13533
  <xsl:choose>
13900
- <xsl:when test="$contents_nodes/doc">
13534
+ <xsl:when test="$contents_nodes/mn:doc">
13901
13535
  <xsl:choose>
13902
- <xsl:when test="count($contents_nodes/doc) &gt; 1">
13536
+ <xsl:when test="count($contents_nodes/mn:doc) &gt; 1">
13903
13537
 
13904
13538
  <xsl:if test="$contents_nodes/collection">
13905
13539
  <fo:bookmark internal-destination="{$contents/collection/@firstpage_id}">
@@ -13907,8 +13541,8 @@
13907
13541
  </fo:bookmark>
13908
13542
  </xsl:if>
13909
13543
 
13910
- <xsl:for-each select="$contents_nodes/doc">
13911
- <fo:bookmark internal-destination="{contents/item[@display = 'true'][1]/@id}" starting-state="hide">
13544
+ <xsl:for-each select="$contents_nodes/mn:doc">
13545
+ <fo:bookmark internal-destination="{contents/mn:item[@display = 'true'][1]/@id}" starting-state="hide">
13912
13546
  <xsl:if test="@bundle = 'true'">
13913
13547
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
13914
13548
  </xsl:if>
@@ -13942,14 +13576,14 @@
13942
13576
  </xsl:choose>
13943
13577
  </fo:bookmark-title>
13944
13578
 
13945
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
13579
+ <xsl:apply-templates select="contents/mn:item" mode="bookmark"/>
13946
13580
 
13947
13581
  <xsl:call-template name="insertFigureBookmarks">
13948
- <xsl:with-param name="contents" select="contents"/>
13582
+ <xsl:with-param name="contents" select="mn:contents"/>
13949
13583
  </xsl:call-template>
13950
13584
 
13951
13585
  <xsl:call-template name="insertTableBookmarks">
13952
- <xsl:with-param name="contents" select="contents"/>
13586
+ <xsl:with-param name="contents" select="mn:contents"/>
13953
13587
  <xsl:with-param name="lang" select="@lang"/>
13954
13588
  </xsl:call-template>
13955
13589
 
@@ -13958,16 +13592,16 @@
13958
13592
  </xsl:for-each>
13959
13593
  </xsl:when>
13960
13594
  <xsl:otherwise>
13961
- <xsl:for-each select="$contents_nodes/doc">
13595
+ <xsl:for-each select="$contents_nodes/mn:doc">
13962
13596
 
13963
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
13597
+ <xsl:apply-templates select="mn:contents/mn:item" mode="bookmark"/>
13964
13598
 
13965
13599
  <xsl:call-template name="insertFigureBookmarks">
13966
- <xsl:with-param name="contents" select="contents"/>
13600
+ <xsl:with-param name="contents" select="mn:contents"/>
13967
13601
  </xsl:call-template>
13968
13602
 
13969
13603
  <xsl:call-template name="insertTableBookmarks">
13970
- <xsl:with-param name="contents" select="contents"/>
13604
+ <xsl:with-param name="contents" select="mn:contents"/>
13971
13605
  <xsl:with-param name="lang" select="@lang"/>
13972
13606
  </xsl:call-template>
13973
13607
 
@@ -13976,14 +13610,14 @@
13976
13610
  </xsl:choose>
13977
13611
  </xsl:when>
13978
13612
  <xsl:otherwise>
13979
- <xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
13613
+ <xsl:apply-templates select="$contents_nodes/mn:contents/mn:item" mode="bookmark"/>
13980
13614
 
13981
13615
  <xsl:call-template name="insertFigureBookmarks">
13982
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
13616
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
13983
13617
  </xsl:call-template>
13984
13618
 
13985
13619
  <xsl:call-template name="insertTableBookmarks">
13986
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
13620
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
13987
13621
  <xsl:with-param name="lang" select="@lang"/>
13988
13622
  </xsl:call-template>
13989
13623
 
@@ -14000,80 +13634,72 @@
14000
13634
  <xsl:template name="insertFigureBookmarks">
14001
13635
  <xsl:param name="contents"/>
14002
13636
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
14003
- <xsl:if test="$contents_nodes/figure">
14004
- <fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
13637
+ <xsl:if test="$contents_nodes/mn:figure">
13638
+ <fo:bookmark internal-destination="{$contents_nodes/mn:figure[1]/@id}" starting-state="hide">
14005
13639
  <fo:bookmark-title>Figures</fo:bookmark-title>
14006
- <xsl:for-each select="$contents_nodes/figure">
13640
+ <xsl:for-each select="$contents_nodes/mn:figure">
14007
13641
  <fo:bookmark internal-destination="{@id}">
14008
13642
  <fo:bookmark-title>
14009
- <xsl:value-of select="normalize-space(title)"/>
13643
+ <xsl:value-of select="normalize-space(mn:title)"/>
14010
13644
  </fo:bookmark-title>
14011
13645
  </fo:bookmark>
14012
13646
  </xsl:for-each>
14013
13647
  </fo:bookmark>
14014
13648
  </xsl:if>
13649
+ <xsl:if test="$contents_nodes//mn:figures/mn:figure">
13650
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
14015
13651
 
14016
- <xsl:if test="$contents_nodes//figures/figure">
14017
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
14018
-
14019
- <xsl:variable name="bookmark-title">
14020
-
14021
- <xsl:value-of select="$title-list-figures"/>
14022
-
14023
- </xsl:variable>
14024
- <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
14025
- <xsl:for-each select="$contents_nodes//figures/figure">
14026
- <fo:bookmark internal-destination="{@id}">
14027
- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
14028
- </fo:bookmark>
14029
- </xsl:for-each>
13652
+ <xsl:variable name="bookmark-title">
13653
+ <xsl:value-of select="$title-list-figures"/>
13654
+ </xsl:variable>
13655
+ <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
13656
+ <xsl:for-each select="$contents_nodes//mn:figures/mn:figure">
13657
+ <fo:bookmark internal-destination="{@id}">
13658
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
14030
13659
  </fo:bookmark>
14031
- </xsl:if>
14032
-
13660
+ </xsl:for-each>
13661
+ </fo:bookmark>
13662
+ </xsl:if>
14033
13663
  </xsl:template> <!-- insertFigureBookmarks -->
14034
13664
 
14035
13665
  <xsl:template name="insertTableBookmarks">
14036
13666
  <xsl:param name="contents"/>
14037
13667
  <xsl:param name="lang"/>
14038
13668
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
14039
- <xsl:if test="$contents_nodes/table">
14040
- <fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
13669
+ <xsl:if test="$contents_nodes/mn:table">
13670
+ <fo:bookmark internal-destination="{$contents_nodes/mn:table[1]/@id}" starting-state="hide">
14041
13671
  <fo:bookmark-title>
14042
13672
  <xsl:choose>
14043
13673
  <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
14044
13674
  <xsl:otherwise>Tables</xsl:otherwise>
14045
13675
  </xsl:choose>
14046
13676
  </fo:bookmark-title>
14047
- <xsl:for-each select="$contents_nodes/table">
13677
+ <xsl:for-each select="$contents_nodes/mn:table">
14048
13678
  <fo:bookmark internal-destination="{@id}">
14049
13679
  <fo:bookmark-title>
14050
- <xsl:value-of select="normalize-space(title)"/>
13680
+ <xsl:value-of select="normalize-space(mn:title)"/>
14051
13681
  </fo:bookmark-title>
14052
13682
  </fo:bookmark>
14053
13683
  </xsl:for-each>
14054
13684
  </fo:bookmark>
14055
13685
  </xsl:if>
13686
+ <xsl:if test="$contents_nodes//mn:tables/mn:table">
13687
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
14056
13688
 
14057
- <xsl:if test="$contents_nodes//tables/table">
14058
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
14059
-
14060
- <xsl:variable name="bookmark-title">
14061
-
14062
- <xsl:value-of select="$title-list-tables"/>
14063
-
14064
- </xsl:variable>
13689
+ <xsl:variable name="bookmark-title">
13690
+ <xsl:value-of select="$title-list-tables"/>
13691
+ </xsl:variable>
14065
13692
 
14066
- <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
13693
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
14067
13694
 
14068
- <xsl:for-each select="$contents_nodes//tables/table">
14069
- <fo:bookmark internal-destination="{@id}">
14070
- <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
14071
- <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
14072
- </fo:bookmark>
14073
- </xsl:for-each>
13695
+ <xsl:for-each select="$contents_nodes//mn:tables/mn:table">
13696
+ <fo:bookmark internal-destination="{@id}">
13697
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
13698
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
14074
13699
  </fo:bookmark>
14075
- </xsl:if>
14076
-
13700
+ </xsl:for-each>
13701
+ </fo:bookmark>
13702
+ </xsl:if>
14077
13703
  </xsl:template> <!-- insertTableBookmarks -->
14078
13704
  <!-- End Bookmarks -->
14079
13705
 
@@ -14103,17 +13729,15 @@
14103
13729
  <xsl:param name="title" select="''"/>
14104
13730
  <xsl:choose>
14105
13731
  <xsl:when test="$lang = 'en'">
14106
-
14107
13732
  </xsl:when>
14108
13733
  <xsl:when test="$lang = 'fr'">
14109
-
14110
13734
  </xsl:when>
14111
13735
  <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
14112
13736
  <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
14113
13737
  </xsl:choose>
14114
13738
  </xsl:template>
14115
13739
 
14116
- <xsl:template match="item" mode="bookmark">
13740
+ <xsl:template match="mn:item" mode="bookmark">
14117
13741
  <xsl:choose>
14118
13742
  <xsl:when test="@id != ''">
14119
13743
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
@@ -14123,7 +13747,7 @@
14123
13747
  <xsl:text> </xsl:text>
14124
13748
  </xsl:if>
14125
13749
  <xsl:variable name="title">
14126
- <xsl:for-each select="title/node()">
13750
+ <xsl:for-each select="mn:title/node()">
14127
13751
  <xsl:choose>
14128
13752
  <xsl:when test="local-name() = 'add' and starts-with(., $ace_tag)"><!-- skip --></xsl:when>
14129
13753
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
@@ -14141,7 +13765,7 @@
14141
13765
  </xsl:choose>
14142
13766
  </xsl:template>
14143
13767
 
14144
- <xsl:template match="title" mode="bookmark"/>
13768
+ <xsl:template match="mn:title" mode="bookmark"/>
14145
13769
  <xsl:template match="text()" mode="bookmark"/>
14146
13770
 
14147
13771
  <!-- figure/name -->
@@ -14370,9 +13994,9 @@
14370
13994
  <xsl:template match="text()" mode="contents_item">
14371
13995
  <xsl:variable name="text">
14372
13996
  <!-- to split by '_' and other chars -->
14373
- <text><xsl:call-template name="add-zero-spaces-java"/></text>
13997
+ <mn:text><xsl:call-template name="add-zero-spaces-java"/></mn:text>
14374
13998
  </xsl:variable>
14375
- <xsl:for-each select="xalan:nodeset($text)/text/text()">
13999
+ <xsl:for-each select="xalan:nodeset($text)/mn:text/text()">
14376
14000
  <xsl:call-template name="keep_together_standard_number"/>
14377
14001
  </xsl:for-each>
14378
14002
  </xsl:template>
@@ -14405,14 +14029,7 @@
14405
14029
 
14406
14030
  <xsl:template name="get_sourcecode_attributes">
14407
14031
  <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
14408
- <xsl:variable name="_font-size">
14409
-
14410
- <!-- inherit -->
14411
-
14412
- <!-- <xsl:if test="$namespace = 'ieee'">
14413
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
14414
- </xsl:if> -->
14415
-
14032
+ <xsl:variable name="_font-size"><!-- inherit -->
14416
14033
  </xsl:variable>
14417
14034
 
14418
14035
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -14468,7 +14085,6 @@
14468
14085
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
14469
14086
  </xsl:choose>
14470
14087
  </xsl:attribute>
14471
-
14472
14088
  </xsl:if>
14473
14089
  <fo:block-container margin-left="0mm" role="SKIP">
14474
14090
 
@@ -14492,8 +14108,7 @@
14492
14108
  </fo:block>
14493
14109
 
14494
14110
  <xsl:apply-templates select="*[local-name() = 'dl']"/> <!-- Key table -->
14495
-
14496
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
14111
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
14497
14112
 
14498
14113
  </fo:block-container>
14499
14114
  </fo:block-container>
@@ -14670,25 +14285,6 @@
14670
14285
  </xsl:choose>
14671
14286
  </xsl:template>
14672
14287
 
14673
- <!-- insert 'char' between each character in the string -->
14674
- <xsl:template name="interspers">
14675
- <xsl:param name="str"/>
14676
- <xsl:param name="char" select="$zero_width_space"/>
14677
- <xsl:if test="$str != ''">
14678
- <xsl:value-of select="substring($str, 1, 1)"/>
14679
-
14680
- <xsl:variable name="next_char" select="substring($str, 2, 1)"/>
14681
- <xsl:if test="not(contains(concat(' -.:=_— ', $char), $next_char))">
14682
- <xsl:value-of select="$char"/>
14683
- </xsl:if>
14684
-
14685
- <xsl:call-template name="interspers">
14686
- <xsl:with-param name="str" select="substring($str, 2)"/>
14687
- <xsl:with-param name="char" select="$char"/>
14688
- </xsl:call-template>
14689
- </xsl:if>
14690
- </xsl:template>
14691
-
14692
14288
  <xsl:template name="interspers-java">
14693
14289
  <xsl:param name="str"/>
14694
14290
  <xsl:param name="char" select="$zero_width_space"/>
@@ -14785,7 +14381,7 @@
14785
14381
  </xsl:variable>
14786
14382
  <xsl:variable name="classes" select="xalan:nodeset($classes_)"/>
14787
14383
 
14788
- <xsl:for-each select="$classes/item">
14384
+ <xsl:for-each select="$classes/*[local-name() = 'item']">
14789
14385
  <xsl:variable name="class_name" select="."/>
14790
14386
  <xsl:for-each select="$syntax_highlight_styles/style[@class = $class_name]/@*[not(local-name() = 'class')]">
14791
14387
  <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
@@ -14868,12 +14464,9 @@
14868
14464
 
14869
14465
  <xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
14870
14466
  <xsl:if test="normalize-space() != ''">
14871
-
14872
- <fo:block xsl:use-attribute-sets="permission-name-style">
14873
- <xsl:apply-templates/>
14874
-
14875
- </fo:block>
14876
-
14467
+ <fo:block xsl:use-attribute-sets="permission-name-style">
14468
+ <xsl:apply-templates/>
14469
+ </fo:block>
14877
14470
  </xsl:if>
14878
14471
  </xsl:template>
14879
14472
 
@@ -14902,12 +14495,9 @@
14902
14495
  <xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
14903
14496
  <xsl:if test="normalize-space() != ''">
14904
14497
 
14905
- <fo:block xsl:use-attribute-sets="requirement-name-style">
14906
-
14907
- <xsl:apply-templates/>
14908
-
14909
- </fo:block>
14910
-
14498
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
14499
+ <xsl:apply-templates/>
14500
+ </fo:block>
14911
14501
  </xsl:if>
14912
14502
  </xsl:template>
14913
14503
 
@@ -14946,11 +14536,9 @@
14946
14536
  <xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
14947
14537
  <xsl:if test="normalize-space() != ''">
14948
14538
 
14949
- <fo:block xsl:use-attribute-sets="recommendation-name-style">
14950
- <xsl:apply-templates/>
14951
-
14952
- </fo:block>
14953
-
14539
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
14540
+ <xsl:apply-templates/>
14541
+ </fo:block>
14954
14542
  </xsl:if>
14955
14543
  </xsl:template>
14956
14544
 
@@ -15076,7 +14664,6 @@
15076
14664
 
15077
14665
  <xsl:if test="parent::*[local-name()='thead'] or starts-with(*[local-name()='td' or local-name()='th'][1], 'Requirement ') or starts-with(*[local-name()='td' or local-name()='th'][1], 'Recommendation ')">
15078
14666
  <xsl:attribute name="font-weight">bold</xsl:attribute>
15079
-
15080
14667
  </xsl:if>
15081
14668
 
15082
14669
  <xsl:apply-templates mode="requirement"/>
@@ -15121,7 +14708,6 @@
15121
14708
 
15122
14709
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
15123
14710
  <fo:block font-size="11pt">
15124
-
15125
14711
  <xsl:apply-templates/>
15126
14712
  </fo:block>
15127
14713
  </xsl:template>
@@ -15161,7 +14747,6 @@
15161
14747
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
15162
14748
  <xsl:variable name="element">inline
15163
14749
 
15164
-
15165
14750
  </xsl:variable>
15166
14751
  <xsl:choose>
15167
14752
  <xsl:when test="contains($element, 'block')">
@@ -15193,56 +14778,55 @@
15193
14778
  text line 2
15194
14779
  -->
15195
14780
  <xsl:template match="*[local-name() = 'example']" name="example">
14781
+ <xsl:call-template name="setNamedDestination"/>
14782
+ <fo:block id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
14783
+ <xsl:call-template name="setBlockSpanAll"/>
15196
14784
 
15197
- <xsl:call-template name="setNamedDestination"/>
15198
- <fo:block id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
15199
- <xsl:call-template name="setBlockSpanAll"/>
15200
-
15201
- <xsl:call-template name="refine_example-style"/>
14785
+ <xsl:call-template name="refine_example-style"/>
15202
14786
 
15203
- <xsl:variable name="ol_adjust">
15204
- <xsl:choose>
15205
- <xsl:when test="$vertical_layout = 'true' and ancestor::*[local-name() = 'ol']/@provisional-distance-between-starts">
15206
- <xsl:value-of select="number(translate(ancestor::*[local-name() = 'ol']/@provisional-distance-between-starts, 'mm', ''))"/>
15207
- </xsl:when>
15208
- <xsl:otherwise>0</xsl:otherwise>
15209
- </xsl:choose>
15210
- </xsl:variable>
15211
- <xsl:variable name="provisional_distance_between_starts_">
15212
- <xsl:value-of select="10 + $text_indent - $ol_adjust"/>
15213
- </xsl:variable>
15214
- <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
15215
- <xsl:variable name="indent_">
15216
- <xsl:value-of select="$text_indent"/>
15217
- </xsl:variable>
15218
- <xsl:variable name="indent" select="normalize-space($indent_)"/>
14787
+ <xsl:variable name="ol_adjust">
14788
+ <xsl:choose>
14789
+ <xsl:when test="$vertical_layout = 'true' and ancestor::*[local-name() = 'ol']/@provisional-distance-between-starts">
14790
+ <xsl:value-of select="number(translate(ancestor::*[local-name() = 'ol']/@provisional-distance-between-starts, 'mm', ''))"/>
14791
+ </xsl:when>
14792
+ <xsl:otherwise>0</xsl:otherwise>
14793
+ </xsl:choose>
14794
+ </xsl:variable>
14795
+ <xsl:variable name="provisional_distance_between_starts_">
14796
+ <xsl:value-of select="10 + $text_indent - $ol_adjust"/>
14797
+ </xsl:variable>
14798
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
14799
+ <xsl:variable name="indent_">
14800
+ <xsl:value-of select="$text_indent"/>
14801
+ </xsl:variable>
14802
+ <xsl:variable name="indent" select="normalize-space($indent_)"/>
15219
14803
 
15220
- <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
14804
+ <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
14805
+ <xsl:if test="$vertical_layout = 'true'">
14806
+ <xsl:attribute name="provisional-distance-between-starts"><xsl:value-of select="$provisional_distance_between_starts + 2"/>mm</xsl:attribute>
14807
+ </xsl:if>
14808
+ <fo:list-item>
14809
+ <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
15221
14810
  <xsl:if test="$vertical_layout = 'true'">
15222
- <xsl:attribute name="provisional-distance-between-starts"><xsl:value-of select="$provisional_distance_between_starts + 2"/>mm</xsl:attribute>
14811
+ <xsl:attribute name="start-indent">0mm</xsl:attribute>
15223
14812
  </xsl:if>
15224
- <fo:list-item>
15225
- <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
15226
- <xsl:if test="$vertical_layout = 'true'">
15227
- <xsl:attribute name="start-indent">0mm</xsl:attribute>
15228
- </xsl:if>
15229
- <fo:block>
15230
- <xsl:apply-templates select="*[local-name()='name']">
15231
- <xsl:with-param name="fo_element">block</xsl:with-param>
15232
- </xsl:apply-templates>
15233
- </fo:block>
15234
- </fo:list-item-label>
15235
- <fo:list-item-body start-indent="body-start()">
15236
- <fo:block>
15237
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
15238
- <xsl:with-param name="fo_element" select="'list'"/>
15239
- </xsl:apply-templates>
15240
- </fo:block>
15241
- </fo:list-item-body>
15242
- </fo:list-item>
15243
- </fo:list-block>
14813
+ <fo:block>
14814
+ <xsl:apply-templates select="*[local-name()='name']">
14815
+ <xsl:with-param name="fo_element">block</xsl:with-param>
14816
+ </xsl:apply-templates>
14817
+ </fo:block>
14818
+ </fo:list-item-label>
14819
+ <fo:list-item-body start-indent="body-start()">
14820
+ <fo:block>
14821
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
14822
+ <xsl:with-param name="fo_element" select="'list'"/>
14823
+ </xsl:apply-templates>
14824
+ </fo:block>
14825
+ </fo:list-item-body>
14826
+ </fo:list-item>
14827
+ </fo:list-block>
15244
14828
 
15245
- </fo:block>
14829
+ </fo:block>
15246
14830
 
15247
14831
  </xsl:template>
15248
14832
 
@@ -15258,9 +14842,7 @@
15258
14842
  </xsl:when>
15259
14843
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
15260
14844
  <fo:block xsl:use-attribute-sets="example-name-style">
15261
-
15262
- <xsl:call-template name="refine_example-name-style"/>
15263
-
14845
+ <xsl:call-template name="refine_example-name-style"/>
15264
14846
  <xsl:apply-templates/>
15265
14847
  </fo:block>
15266
14848
  </xsl:when>
@@ -15277,11 +14859,9 @@
15277
14859
  <!-- table/example/name, table/tfoot//example/name -->
15278
14860
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
15279
14861
  <fo:inline xsl:use-attribute-sets="example-name-style">
15280
-
15281
- <xsl:if test="not($vertical_layout = 'true')">
15282
- <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
15283
- </xsl:if>
15284
-
14862
+ <xsl:if test="not($vertical_layout = 'true')">
14863
+ <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
14864
+ </xsl:if>
15285
14865
  <xsl:apply-templates/>
15286
14866
  </fo:inline>
15287
14867
  </xsl:template>
@@ -15291,7 +14871,6 @@
15291
14871
 
15292
14872
  <xsl:variable name="num"><xsl:number/></xsl:variable>
15293
14873
  <xsl:variable name="element">
15294
-
15295
14874
  <xsl:value-of select="$fo_element"/>
15296
14875
  </xsl:variable>
15297
14876
  <xsl:choose>
@@ -15409,7 +14988,7 @@
15409
14988
  </xsl:call-template>
15410
14989
  </xsl:variable>
15411
14990
 
15412
- <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
14991
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
15413
14992
  <xsl:choose>
15414
14993
  <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
15415
14994
  <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
@@ -15446,7 +15025,6 @@
15446
15025
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
15447
15026
  </xsl:if>
15448
15027
  </xsl:if>
15449
-
15450
15028
  <fo:block-container margin-left="0mm" role="SKIP">
15451
15029
  <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
15452
15030
 
@@ -15467,11 +15045,10 @@
15467
15045
  <xsl:apply-templates select="*[local-name() = 'attribution']/*[local-name() = 'p']/node()"/>
15468
15046
  </fo:block>
15469
15047
  </xsl:if>
15470
-
15471
- <!-- render footnotes after references -->
15472
- <xsl:apply-templates select=".//jis:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
15473
- <xsl:with-param name="ancestor">quote</xsl:with-param>
15474
- </xsl:apply-templates>
15048
+ <!-- render footnotes after references -->
15049
+ <xsl:apply-templates select=".//jis:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
15050
+ <xsl:with-param name="ancestor">quote</xsl:with-param>
15051
+ </xsl:apply-templates>
15475
15052
 
15476
15053
  </fo:block-container>
15477
15054
  </fo:block-container>
@@ -15534,7 +15111,6 @@
15534
15111
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
15535
15112
  <xsl:attribute name="vertical-align">super</xsl:attribute>
15536
15113
  <xsl:attribute name="font-size">80%</xsl:attribute>
15537
-
15538
15114
  </xsl:if>
15539
15115
 
15540
15116
  <xsl:call-template name="refine_eref-style"/>
@@ -15583,7 +15159,6 @@
15583
15159
  </xsl:template>
15584
15160
 
15585
15161
  <xsl:template name="refine_basic_link_style">
15586
-
15587
15162
  </xsl:template> <!-- refine_basic_link_style -->
15588
15163
 
15589
15164
  <!-- ====== -->
@@ -15600,7 +15175,6 @@
15600
15175
  </xsl:variable>
15601
15176
 
15602
15177
  <xsl:variable name="padding">
15603
-
15604
15178
  </xsl:variable>
15605
15179
 
15606
15180
  <xsl:variable name="padding-right">
@@ -15611,7 +15185,6 @@
15611
15185
  </xsl:otherwise>
15612
15186
  </xsl:choose>
15613
15187
  </xsl:variable>
15614
-
15615
15188
  <xsl:choose>
15616
15189
  <xsl:when test="$lang = 'zh'">
15617
15190
  <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -15635,7 +15208,6 @@
15635
15208
  <xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']/*[local-name() = 'tab']" priority="2"/>
15636
15209
 
15637
15210
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab">
15638
-
15639
15211
  </xsl:template>
15640
15212
 
15641
15213
  <xsl:template name="insertNonBreakSpaces">
@@ -15653,26 +15225,23 @@
15653
15225
  <xsl:variable name="level">
15654
15226
  <xsl:call-template name="getLevel"/>
15655
15227
  </xsl:variable>
15656
- <xsl:variable name="font-size">
15657
- inherit
15228
+ <xsl:variable name="font-size">inherit
15658
15229
  </xsl:variable>
15659
15230
  <xsl:variable name="levelTerm">
15660
15231
  <xsl:call-template name="getLevelTermName"/>
15661
15232
  </xsl:variable>
15662
15233
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
15663
-
15664
- <xsl:if test="$vertical_layout = 'true'">
15665
- <xsl:attribute name="letter-spacing">1mm</xsl:attribute>
15666
- <xsl:attribute name="margin-left">-6mm</xsl:attribute>
15667
- </xsl:if>
15234
+ <xsl:if test="$vertical_layout = 'true'">
15235
+ <xsl:attribute name="letter-spacing">1mm</xsl:attribute>
15236
+ <xsl:attribute name="margin-left">-6mm</xsl:attribute>
15237
+ </xsl:if>
15668
15238
 
15669
15239
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
15670
15240
 
15671
15241
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
15672
-
15673
- <xsl:if test="not($vertical_layout = 'true')">
15674
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
15675
- </xsl:if>
15242
+ <xsl:if test="not($vertical_layout = 'true')">
15243
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
15244
+ </xsl:if>
15676
15245
 
15677
15246
  <xsl:for-each select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"><!-- change context -->
15678
15247
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -15684,15 +15253,14 @@
15684
15253
 
15685
15254
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
15686
15255
  <xsl:call-template name="setStyle_preferred"/>
15687
-
15688
- <xsl:if test="$vertical_layout = 'true'">
15689
- <xsl:attribute name="margin-left">6mm</xsl:attribute>
15690
- <xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
15691
- <xsl:attribute name="font-weight">bold</xsl:attribute>
15692
- </xsl:if>
15693
- <xsl:if test="not($vertical_layout = 'true')">
15694
- <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
15695
- </xsl:if>
15256
+ <xsl:if test="$vertical_layout = 'true'">
15257
+ <xsl:attribute name="margin-left">6mm</xsl:attribute>
15258
+ <xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
15259
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
15260
+ </xsl:if>
15261
+ <xsl:if test="not($vertical_layout = 'true')">
15262
+ <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
15263
+ </xsl:if>
15696
15264
 
15697
15265
  <xsl:apply-templates/>
15698
15266
  </fo:block>
@@ -15724,11 +15292,9 @@
15724
15292
  </xsl:template>
15725
15293
 
15726
15294
  <xsl:template name="setStyle_preferred">
15727
-
15728
- <xsl:if test="*[local-name() = 'strong']">
15729
- <xsl:attribute name="font-weight">normal</xsl:attribute>
15730
- </xsl:if>
15731
-
15295
+ <xsl:if test="*[local-name() = 'strong']">
15296
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
15297
+ </xsl:if>
15732
15298
  </xsl:template>
15733
15299
 
15734
15300
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
@@ -15805,7 +15371,6 @@
15805
15371
 
15806
15372
  <!-- main sections -->
15807
15373
  <xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
15808
-
15809
15374
  <xsl:call-template name="setNamedDestination"/>
15810
15375
  <fo:block>
15811
15376
  <xsl:call-template name="setId"/>
@@ -15840,13 +15405,10 @@
15840
15405
  </xsl:template>
15841
15406
 
15842
15407
  <xsl:template name="sections_element_style">
15843
-
15844
15408
  </xsl:template> <!-- sections_element_style -->
15845
15409
 
15846
15410
  <xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
15847
-
15848
- <fo:block break-after="page"/>
15849
-
15411
+ <fo:block break-after="page"/>
15850
15412
  <xsl:call-template name="setNamedDestination"/>
15851
15413
  <fo:block>
15852
15414
  <xsl:call-template name="setId"/>
@@ -15895,7 +15457,6 @@
15895
15457
  </xsl:template>
15896
15458
 
15897
15459
  <xsl:template name="refine_clause_style">
15898
-
15899
15460
  </xsl:template> <!-- refine_clause_style -->
15900
15461
 
15901
15462
  <xsl:template match="*[local-name() = 'definitions']">
@@ -15935,7 +15496,6 @@
15935
15496
  </xsl:template>
15936
15497
 
15937
15498
  <xsl:template name="refine_annex_style">
15938
-
15939
15499
  </xsl:template>
15940
15500
 
15941
15501
  <!-- document text (not figures, or tables) footnotes -->
@@ -16039,16 +15599,14 @@
16039
15599
  <!-- Lists processing -->
16040
15600
  <!-- ===================================== -->
16041
15601
  <xsl:variable name="ul_labels_">
16042
-
16043
- <label level="1">-</label> <!-- full-width hyphen minus -->
16044
- <label level="2" font-size="130%" line-height="1.2">・</label> <!-- Katakana Middle Dot -->
15602
+ <label level="1">-</label> <!-- full-width hyphen minus -->
15603
+ <label level="2" font-size="130%" line-height="1.2">・</label> <!-- Katakana Middle Dot -->
16045
15604
 
16046
15605
  </xsl:variable>
16047
15606
  <xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
16048
15607
 
16049
15608
  <xsl:template name="setULLabel">
16050
- <xsl:variable name="list_level__">
16051
- <xsl:value-of select="count(ancestor::*[local-name() = 'ul'])"/>
15609
+ <xsl:variable name="list_level__"><xsl:value-of select="count(ancestor::*[local-name() = 'ul'])"/>
16052
15610
  </xsl:variable>
16053
15611
  <xsl:variable name="list_level_" select="number($list_level__)"/>
16054
15612
  <xsl:variable name="list_level">
@@ -16105,28 +15663,22 @@
16105
15663
  <xsl:variable name="label">
16106
15664
 
16107
15665
  <xsl:variable name="style_prefix_">
16108
- <xsl:if test="$type = 'roman'">
16109
- <!-- Example: (i) -->
15666
+ <xsl:if test="$type = 'roman'"> <!-- Example: (i) -->
16110
15667
  </xsl:if>
16111
15668
  <xsl:if test="$type = 'alphabet'">
16112
-
16113
15669
  </xsl:if>
16114
15670
  </xsl:variable>
16115
15671
  <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
16116
15672
 
16117
15673
  <xsl:variable name="style_suffix_">
16118
15674
  <xsl:choose>
16119
- <xsl:when test="$type = 'arabic'">
16120
- )
15675
+ <xsl:when test="$type = 'arabic'">)
16121
15676
  </xsl:when>
16122
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
16123
- )
15677
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">)
16124
15678
  </xsl:when>
16125
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
16126
- .
15679
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">.
16127
15680
  </xsl:when>
16128
- <xsl:when test="$type = 'roman'">
16129
- )
15681
+ <xsl:when test="$type = 'roman'">)
16130
15682
  </xsl:when>
16131
15683
  <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
16132
15684
  </xsl:choose>
@@ -16143,8 +15695,7 @@
16143
15695
  <xsl:value-of select="$style_suffix"/>
16144
15696
  </xsl:if>
16145
15697
  </xsl:variable>
16146
-
16147
- <xsl:value-of select="normalize-space($label)"/>
15698
+ <xsl:value-of select="normalize-space($label)"/>
16148
15699
 
16149
15700
  </xsl:when>
16150
15701
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
@@ -16201,17 +15752,13 @@
16201
15752
 
16202
15753
  <xsl:variable name="format">
16203
15754
  <xsl:choose>
16204
- <xsl:when test="$type = 'arabic'">
16205
- 1)
15755
+ <xsl:when test="$type = 'arabic'">1)
16206
15756
  </xsl:when>
16207
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
16208
- a)
15757
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">a)
16209
15758
  </xsl:when>
16210
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
16211
- A.
15759
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">A.
16212
15760
  </xsl:when>
16213
- <xsl:when test="$type = 'roman'">
16214
- i)
15761
+ <xsl:when test="$type = 'roman'">i)
16215
15762
  </xsl:when>
16216
15763
  <xsl:when test="$type = 'roman_upper'">I.</xsl:when>
16217
15764
  <xsl:otherwise>1.</xsl:otherwise> <!-- for any case, if $type has non-determined value, not using -->
@@ -16248,40 +15795,38 @@
16248
15795
  </fo:block-container>
16249
15796
  </xsl:when>
16250
15797
  <xsl:otherwise>
16251
-
16252
- <xsl:choose>
16253
- <xsl:when test="$vertical_layout = 'true'">
16254
- <fo:block role="SKIP">
16255
- <xsl:if test="ancestor::jis:ol or ancestor::jis:ul">
16256
- <xsl:attribute name="margin-left">-3.5mm</xsl:attribute>
16257
- </xsl:if>
15798
+ <xsl:choose>
15799
+ <xsl:when test="$vertical_layout = 'true'">
15800
+ <fo:block role="SKIP">
15801
+ <xsl:if test="ancestor::jis:ol or ancestor::jis:ul">
15802
+ <xsl:attribute name="margin-left">-3.5mm</xsl:attribute>
15803
+ </xsl:if>
15804
+ <xsl:apply-templates select="." mode="list">
15805
+ <xsl:with-param name="indent" select="$indent"/>
15806
+ </xsl:apply-templates>
15807
+ </fo:block>
15808
+ </xsl:when>
15809
+ <xsl:otherwise>
15810
+ <fo:block-container role="SKIP">
15811
+ <xsl:if test="ancestor::jis:ol or ancestor::jis:ul">
15812
+ <xsl:attribute name="margin-left">3.5mm</xsl:attribute>
15813
+ </xsl:if>
15814
+ <fo:block-container margin-left="0mm" role="SKIP">
15815
+ <fo:block>
16258
15816
  <xsl:apply-templates select="." mode="list">
16259
15817
  <xsl:with-param name="indent" select="$indent"/>
16260
15818
  </xsl:apply-templates>
16261
15819
  </fo:block>
16262
- </xsl:when>
16263
- <xsl:otherwise>
16264
- <fo:block-container role="SKIP">
16265
- <xsl:if test="ancestor::jis:ol or ancestor::jis:ul">
16266
- <xsl:attribute name="margin-left">3.5mm</xsl:attribute>
16267
- </xsl:if>
16268
- <fo:block-container margin-left="0mm" role="SKIP">
16269
- <fo:block>
16270
- <xsl:apply-templates select="." mode="list">
16271
- <xsl:with-param name="indent" select="$indent"/>
16272
- </xsl:apply-templates>
16273
- </fo:block>
16274
- </fo:block-container>
16275
- </fo:block-container>
16276
- </xsl:otherwise>
16277
- </xsl:choose>
15820
+ </fo:block-container>
15821
+ </fo:block-container>
15822
+ </xsl:otherwise>
15823
+ </xsl:choose>
16278
15824
 
16279
15825
  </xsl:otherwise>
16280
15826
  </xsl:choose>
16281
15827
  </xsl:template>
16282
15828
 
16283
15829
  <xsl:template name="refine_list_container_style">
16284
-
16285
15830
  </xsl:template> <!-- refine_list_container_style -->
16286
15831
 
16287
15832
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
@@ -16345,11 +15890,9 @@
16345
15890
  </xsl:template>
16346
15891
 
16347
15892
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
16348
-
16349
- <xsl:if test="local-name() = 'ol' and $vertical_layout = 'true' and @type = 'arabic'">
16350
- <xsl:copy-of select="@provisional-distance-between-starts"/> <!-- add in update_xml_step1 -->
16351
- </xsl:if>
16352
-
15893
+ <xsl:if test="local-name() = 'ol' and $vertical_layout = 'true' and @type = 'arabic'">
15894
+ <xsl:copy-of select="@provisional-distance-between-starts"/> <!-- add in update_xml_step1 -->
15895
+ </xsl:if>
16353
15896
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
16354
15897
 
16355
15898
  <xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
@@ -16634,7 +16177,6 @@
16634
16177
  <xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
16635
16178
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
16636
16179
  <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
16637
-
16638
16180
  <xsl:apply-templates/>
16639
16181
  </fo:block>
16640
16182
  </xsl:template>
@@ -16686,7 +16228,6 @@
16686
16228
  <fo:table-column column-width="15mm"/>
16687
16229
  <fo:table-body>
16688
16230
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
16689
-
16690
16231
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
16691
16232
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
16692
16233
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
@@ -16722,7 +16263,6 @@
16722
16263
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
16723
16264
  <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
16724
16265
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
16725
-
16726
16266
  </xsl:template>
16727
16267
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
16728
16268
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
@@ -16733,25 +16273,22 @@
16733
16273
  <xsl:call-template name="setNamedDestination"/>
16734
16274
  <fo:block id="{@id}">
16735
16275
  <xsl:apply-templates/>
16736
-
16737
- <!-- render footnotes after references -->
16738
- <xsl:apply-templates select=".//jis:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
16739
- <xsl:with-param name="ancestor">references</xsl:with-param>
16740
- </xsl:apply-templates>
16741
-
16276
+ <!-- render footnotes after references -->
16277
+ <xsl:apply-templates select=".//jis:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
16278
+ <xsl:with-param name="ancestor">references</xsl:with-param>
16279
+ </xsl:apply-templates>
16742
16280
  </fo:block>
16743
16281
  </xsl:template>
16744
16282
 
16745
16283
  <!-- Bibliography (non-normative references) -->
16746
16284
  <xsl:template match="*[local-name() = 'references']">
16747
16285
  <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
16748
-
16749
- <xsl:choose>
16750
- <xsl:when test="following-sibling::*[local-name() = 'references'] or preceding-sibling::*[local-name() = 'references']"/>
16751
- <xsl:otherwise>
16752
- <fo:block break-after="page"/>
16753
- </xsl:otherwise>
16754
- </xsl:choose>
16286
+ <xsl:choose>
16287
+ <xsl:when test="following-sibling::*[local-name() = 'references'] or preceding-sibling::*[local-name() = 'references']"/>
16288
+ <xsl:otherwise>
16289
+ <fo:block break-after="page"/>
16290
+ </xsl:otherwise>
16291
+ </xsl:choose>
16755
16292
 
16756
16293
  </xsl:if>
16757
16294
 
@@ -16768,14 +16305,11 @@
16768
16305
 
16769
16306
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
16770
16307
  <xsl:apply-templates select="node()[not(local-name() = 'title' and @columns = 1)]"/>
16771
-
16772
- <!-- render footnotes after references -->
16773
- <xsl:apply-templates select=".//jis:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
16774
- <xsl:with-param name="ancestor">references</xsl:with-param>
16775
- </xsl:apply-templates>
16776
-
16308
+ <!-- render footnotes after references -->
16309
+ <xsl:apply-templates select=".//jis:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
16310
+ <xsl:with-param name="ancestor">references</xsl:with-param>
16311
+ </xsl:apply-templates>
16777
16312
  </fo:block>
16778
-
16779
16313
  </xsl:template> <!-- references -->
16780
16314
 
16781
16315
  <xsl:template match="*[local-name() = 'bibitem']">
@@ -16785,47 +16319,43 @@
16785
16319
  <!-- Normative references -->
16786
16320
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
16787
16321
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
16788
-
16789
- <xsl:call-template name="setNamedDestination"/>
16790
- <fo:block-container margin-left="6mm" role="SKIP">
16791
- <fo:block-container margin-left="0mm" role="SKIP">
16792
- <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
16793
- <xsl:call-template name="processBibitem"/>
16794
- </fo:block>
16795
- </fo:block-container>
16796
- </fo:block-container>
16322
+ <xsl:call-template name="setNamedDestination"/>
16323
+ <fo:block-container margin-left="6mm" role="SKIP">
16324
+ <fo:block-container margin-left="0mm" role="SKIP">
16325
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
16326
+ <xsl:call-template name="processBibitem"/>
16327
+ </fo:block>
16328
+ </fo:block-container>
16329
+ </fo:block-container>
16797
16330
 
16798
16331
  </xsl:template> <!-- bibitem -->
16799
16332
 
16800
16333
  <!-- Bibliography (non-normative references) -->
16801
16334
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
16802
- <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
16803
- <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
16335
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
16804
16336
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
16805
- <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
16806
- <xsl:call-template name="setNamedDestination"/>
16807
- <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
16808
-
16809
- <fo:list-item>
16810
- <fo:list-item-label end-indent="label-end()">
16811
- <fo:block role="SKIP">
16812
- <fo:inline role="SKIP">
16813
-
16814
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
16815
- <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
16816
- </xsl:apply-templates>
16817
- </fo:inline>
16818
- </fo:block>
16819
- </fo:list-item-label>
16820
- <fo:list-item-body start-indent="body-start()">
16821
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
16822
- <xsl:call-template name="processBibitem">
16823
- <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
16824
- </xsl:call-template>
16825
- </fo:block>
16826
- </fo:list-item-body>
16827
- </fo:list-item>
16828
- </fo:list-block>
16337
+ <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
16338
+ <xsl:call-template name="setNamedDestination"/>
16339
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
16340
+ <fo:list-item>
16341
+ <fo:list-item-label end-indent="label-end()">
16342
+ <fo:block role="SKIP">
16343
+ <fo:inline role="SKIP">
16344
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
16345
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
16346
+ </xsl:apply-templates>
16347
+ </fo:inline>
16348
+ </fo:block>
16349
+ </fo:list-item-label>
16350
+ <fo:list-item-body start-indent="body-start()">
16351
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
16352
+ <xsl:call-template name="processBibitem">
16353
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
16354
+ </xsl:call-template>
16355
+ </fo:block>
16356
+ </fo:list-item-body>
16357
+ </fo:list-item>
16358
+ </fo:list-block>
16829
16359
 
16830
16360
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
16831
16361
 
@@ -16835,7 +16365,6 @@
16835
16365
  <xsl:otherwise>
16836
16366
  <xsl:call-template name="setNamedDestination"/>
16837
16367
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
16838
-
16839
16368
  <fo:list-item-label end-indent="label-end()">
16840
16369
  <fo:block role="SKIP">
16841
16370
  <fo:inline role="SKIP">
@@ -16862,19 +16391,18 @@
16862
16391
 
16863
16392
  <xsl:template name="processBibitem">
16864
16393
  <xsl:param name="biblio_tag_part">both</xsl:param>
16865
-
16866
- <xsl:if test=".//*[local-name() = 'fn']">
16867
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
16868
- </xsl:if>
16869
- <fo:inline font-weight="bold">
16870
- <xsl:if test="not($vertical_layout = 'true')">
16871
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
16872
- </xsl:if>
16873
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
16874
- <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
16875
- </xsl:apply-templates>
16876
- </fo:inline>
16877
- <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
16394
+ <xsl:if test=".//*[local-name() = 'fn']">
16395
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
16396
+ </xsl:if>
16397
+ <fo:inline font-weight="bold">
16398
+ <xsl:if test="not($vertical_layout = 'true')">
16399
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
16400
+ </xsl:if>
16401
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
16402
+ <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
16403
+ </xsl:apply-templates>
16404
+ </fo:inline>
16405
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
16878
16406
 
16879
16407
  </xsl:template> <!-- processBibitem (bibitem) -->
16880
16408
 
@@ -17018,8 +16546,7 @@
17018
16546
  <xsl:choose>
17019
16547
  <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
17020
16548
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
17021
- <xsl:otherwise><!-- default value -->
17022
- 2
16549
+ <xsl:otherwise><!-- default value -->2
17023
16550
  </xsl:otherwise>
17024
16551
  </xsl:choose>
17025
16552
  </xsl:variable>
@@ -17227,26 +16754,19 @@
17227
16754
  <!-- ================ -->
17228
16755
  <!-- Admonition -->
17229
16756
  <!-- ================ -->
17230
- <xsl:template match="*[local-name() = 'admonition']">
17231
-
17232
- <!-- text in the box -->
17233
- <xsl:call-template name="setNamedDestination"/>
17234
- <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
17235
-
17236
- <xsl:call-template name="setBlockSpanAll"/>
17237
-
17238
- <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
17239
-
17240
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
17241
- <fo:block>
17242
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
17243
- </fo:block>
17244
- </fo:block-container>
17245
-
17246
- </fo:block-container>
17247
-
17248
- </fo:block-container>
16757
+ <xsl:template match="*[local-name() = 'admonition']"> <!-- text in the box -->
16758
+ <xsl:call-template name="setNamedDestination"/>
16759
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
17249
16760
 
16761
+ <xsl:call-template name="setBlockSpanAll"/>
16762
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
16763
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
16764
+ <fo:block>
16765
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
16766
+ </fo:block>
16767
+ </fo:block-container>
16768
+ </fo:block-container>
16769
+ </fo:block-container>
17250
16770
  </xsl:template>
17251
16771
 
17252
16772
  <xsl:template name="displayAdmonitionName">
@@ -17294,12 +16814,10 @@
17294
16814
  </xsl:template> -->
17295
16815
 
17296
16816
  <xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
16817
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
17297
16818
 
17298
- <fo:block xsl:use-attribute-sets="admonition-p-style">
17299
-
17300
- <xsl:apply-templates/>
17301
- </fo:block>
17302
-
16819
+ <xsl:apply-templates/>
16820
+ </fo:block>
17303
16821
  </xsl:template>
17304
16822
 
17305
16823
  <!-- ================ -->
@@ -17335,10 +16853,9 @@
17335
16853
 
17336
16854
  <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
17337
16855
  <xsl:variable name="updated_xml_step2">
17338
-
17339
- <xsl:if test="$table_if = 'false'">
17340
- <xsl:apply-templates select="xalan:nodeset($updated_xml_step1)" mode="update_xml_step2"/>
17341
- </xsl:if>
16856
+ <xsl:if test="$table_if = 'false'">
16857
+ <xsl:apply-templates select="xalan:nodeset($updated_xml_step1)" mode="update_xml_step2"/>
16858
+ </xsl:if>
17342
16859
 
17343
16860
  </xsl:variable>
17344
16861
 
@@ -17814,7 +17331,6 @@
17814
17331
  </xsl:template>
17815
17332
 
17816
17333
  <xsl:template name="addNamedDestinationAttribute">
17817
-
17818
17334
  </xsl:template>
17819
17335
 
17820
17336
  <xsl:template match="*[local-name() = 'fmt-name']"/>
@@ -18269,58 +17785,57 @@
18269
17785
  <!-- =========================================================================== -->
18270
17786
  <!-- END STEP MOVE PAGEBREAK: move <pagebreak/> at top level under 'preface' and 'sections' -->
18271
17787
  <!-- =========================================================================== -->
17788
+ <!-- =========================================================================== -->
17789
+ <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
17790
+ <!-- =========================================================================== -->
17791
+ <xsl:template match="@*|node()" mode="update_xml_step2">
17792
+ <xsl:copy>
17793
+ <xsl:apply-templates select="@*|node()" mode="update_xml_step2"/>
17794
+ </xsl:copy>
17795
+ </xsl:template>
18272
17796
 
18273
- <!-- =========================================================================== -->
18274
- <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
18275
- <!-- =========================================================================== -->
18276
- <xsl:template match="@*|node()" mode="update_xml_step2">
18277
- <xsl:copy>
18278
- <xsl:apply-templates select="@*|node()" mode="update_xml_step2"/>
18279
- </xsl:copy>
18280
- </xsl:template>
18281
-
18282
- <xsl:variable name="localized_string_withdrawn">
17797
+ <xsl:variable name="localized_string_withdrawn">
17798
+ <xsl:call-template name="getLocalizedString">
17799
+ <xsl:with-param name="key">withdrawn</xsl:with-param>
17800
+ </xsl:call-template>
17801
+ </xsl:variable>
17802
+ <xsl:variable name="localized_string_cancelled_and_replaced">
17803
+ <xsl:variable name="str">
18283
17804
  <xsl:call-template name="getLocalizedString">
18284
- <xsl:with-param name="key">withdrawn</xsl:with-param>
17805
+ <xsl:with-param name="key">cancelled_and_replaced</xsl:with-param>
18285
17806
  </xsl:call-template>
18286
17807
  </xsl:variable>
18287
- <xsl:variable name="localized_string_cancelled_and_replaced">
18288
- <xsl:variable name="str">
18289
- <xsl:call-template name="getLocalizedString">
18290
- <xsl:with-param name="key">cancelled_and_replaced</xsl:with-param>
18291
- </xsl:call-template>
18292
- </xsl:variable>
18293
- <xsl:choose>
18294
- <xsl:when test="contains($str, '%')"><xsl:value-of select="substring-before($str, '%')"/></xsl:when>
18295
- <xsl:otherwise><xsl:value-of select="$str"/></xsl:otherwise>
18296
- </xsl:choose>
18297
- </xsl:variable>
17808
+ <xsl:choose>
17809
+ <xsl:when test="contains($str, '%')"><xsl:value-of select="substring-before($str, '%')"/></xsl:when>
17810
+ <xsl:otherwise><xsl:value-of select="$str"/></xsl:otherwise>
17811
+ </xsl:choose>
17812
+ </xsl:variable>
18298
17813
 
18299
- <!-- add 'fn' after eref and origin, to reference bibitem with note = 'Withdrawn.' or 'Cancelled and replaced...' -->
18300
- <xsl:template match="*[local-name() = 'eref'] | *[local-name() = 'origin']" mode="update_xml_step2">
18301
- <xsl:copy-of select="."/>
17814
+ <!-- add 'fn' after eref and origin, to reference bibitem with note = 'Withdrawn.' or 'Cancelled and replaced...' -->
17815
+ <xsl:template match="*[local-name() = 'eref'] | *[local-name() = 'origin']" mode="update_xml_step2">
17816
+ <xsl:copy-of select="."/>
18302
17817
 
18303
- <xsl:variable name="bibitemid" select="@bibitemid"/>
18304
- <xsl:variable name="local_name" select="local-name()"/>
18305
- <xsl:variable name="position"><xsl:number count="*[local-name() = $local_name][@bibitemid = $bibitemid]" level="any"/></xsl:variable>
18306
- <xsl:if test="normalize-space($position) = '1'">
18307
- <xsl:variable name="fn_text">
18308
- <!-- <xsl:copy-of select="key('bibitems', $bibitemid)[1]/*[local-name() = 'note'][not(@type='Unpublished-Status')][normalize-space() = $localized_string_withdrawn or starts-with(normalize-space(), $localized_string_cancelled_and_replaced)]/node()" /> -->
18309
- <xsl:copy-of select="$bibitems/*[local-name() ='bibitem'][@id = $bibitemid][1]/*[local-name() = 'note'][not(@type='Unpublished-Status')][normalize-space() = $localized_string_withdrawn or starts-with(normalize-space(), $localized_string_cancelled_and_replaced)]/node()"/>
18310
- </xsl:variable>
18311
- <xsl:if test="normalize-space($fn_text) != ''">
18312
- <xsl:element name="fn" namespace="{$namespace_full}">
18313
- <xsl:attribute name="reference">bibitem_<xsl:value-of select="$bibitemid"/></xsl:attribute>
18314
- <xsl:element name="p" namespace="{$namespace_full}">
18315
- <xsl:copy-of select="$fn_text"/>
18316
- </xsl:element>
17818
+ <xsl:variable name="bibitemid" select="@bibitemid"/>
17819
+ <xsl:variable name="local_name" select="local-name()"/>
17820
+ <xsl:variable name="position"><xsl:number count="*[local-name() = $local_name][@bibitemid = $bibitemid]" level="any"/></xsl:variable>
17821
+ <xsl:if test="normalize-space($position) = '1'">
17822
+ <xsl:variable name="fn_text">
17823
+ <!-- <xsl:copy-of select="key('bibitems', $bibitemid)[1]/*[local-name() = 'note'][not(@type='Unpublished-Status')][normalize-space() = $localized_string_withdrawn or starts-with(normalize-space(), $localized_string_cancelled_and_replaced)]/node()" /> -->
17824
+ <xsl:copy-of select="$bibitems/*[local-name() ='bibitem'][@id = $bibitemid][1]/*[local-name() = 'note'][not(@type='Unpublished-Status')][normalize-space() = $localized_string_withdrawn or starts-with(normalize-space(), $localized_string_cancelled_and_replaced)]/node()"/>
17825
+ </xsl:variable>
17826
+ <xsl:if test="normalize-space($fn_text) != ''">
17827
+ <xsl:element name="fn" namespace="{$namespace_full}">
17828
+ <xsl:attribute name="reference">bibitem_<xsl:value-of select="$bibitemid"/></xsl:attribute>
17829
+ <xsl:element name="p" namespace="{$namespace_full}">
17830
+ <xsl:copy-of select="$fn_text"/>
18317
17831
  </xsl:element>
18318
- </xsl:if>
17832
+ </xsl:element>
18319
17833
  </xsl:if>
18320
- </xsl:template>
17834
+ </xsl:if>
17835
+ </xsl:template>
18321
17836
 
18322
- <!-- add id for table without id (for autolayout algorithm) -->
18323
- <!-- <xsl:template match="*[local-name() = 'table'][not(@id)]" mode="update_xml_step2">
17837
+ <!-- add id for table without id (for autolayout algorithm) -->
17838
+ <!-- <xsl:template match="*[local-name() = 'table'][not(@id)]" mode="update_xml_step2">
18324
17839
  <xsl:copy>
18325
17840
  <xsl:apply-templates select="@*" mode="update_xml_step2"/>
18326
17841
  <xsl:attribute name="id">_abc<xsl:value-of select="generate-id()"/></xsl:attribute>
@@ -18329,17 +17844,17 @@
18329
17844
  </xsl:copy>
18330
17845
  </xsl:template> -->
18331
17846
 
18332
- <!-- add @reference for fn -->
18333
- <xsl:template match="*[local-name() = 'fn'][not(@reference)]" mode="update_xml_step2">
18334
- <xsl:copy>
18335
- <xsl:apply-templates select="@*" mode="update_xml_step2"/>
18336
- <xsl:attribute name="reference"><xsl:value-of select="generate-id(.)"/></xsl:attribute>
18337
- <xsl:apply-templates select="node()" mode="update_xml_step2"/>
18338
- </xsl:copy>
18339
- </xsl:template>
17847
+ <!-- add @reference for fn -->
17848
+ <xsl:template match="*[local-name() = 'fn'][not(@reference)]" mode="update_xml_step2">
17849
+ <xsl:copy>
17850
+ <xsl:apply-templates select="@*" mode="update_xml_step2"/>
17851
+ <xsl:attribute name="reference"><xsl:value-of select="generate-id(.)"/></xsl:attribute>
17852
+ <xsl:apply-templates select="node()" mode="update_xml_step2"/>
17853
+ </xsl:copy>
17854
+ </xsl:template>
18340
17855
 
18341
- <!-- add @reference for bibitem/note, similar to fn/reference -->
18342
- <!-- <xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" mode="update_xml_step2">
17856
+ <!-- add @reference for bibitem/note, similar to fn/reference -->
17857
+ <!-- <xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" mode="update_xml_step2">
18343
17858
  <xsl:copy>
18344
17859
  <xsl:apply-templates select="@*" mode="update_xml_step2"/>
18345
17860
 
@@ -18351,28 +17866,28 @@
18351
17866
  </xsl:copy>
18352
17867
  </xsl:template> -->
18353
17868
 
18354
- <!-- enclose sequence of 'char x' + 'combining char y' to <lang_none>xy</lang_none> -->
18355
- <xsl:variable name="regex_combining_chars">(.[̀-ͯ])</xsl:variable>
18356
- <xsl:variable name="element_name_lang_none">lang_none</xsl:variable>
18357
- <xsl:variable name="tag_element_name_lang_none_open">###<xsl:value-of select="$element_name_lang_none"/>###</xsl:variable>
18358
- <xsl:variable name="tag_element_name_lang_none_close">###/<xsl:value-of select="$element_name_lang_none"/>###</xsl:variable>
18359
-
18360
- <xsl:template match="text()" mode="update_xml_step2">
18361
- <xsl:variable name="text_" select="java:replaceAll(java:java.lang.String.new(.), $regex_combining_chars, concat($tag_element_name_lang_none_open,'$1',$tag_element_name_lang_none_close))"/>
18362
- <xsl:call-template name="replace_text_tags">
18363
- <xsl:with-param name="tag_open" select="$tag_element_name_lang_none_open"/>
18364
- <xsl:with-param name="tag_close" select="$tag_element_name_lang_none_close"/>
18365
- <xsl:with-param name="text" select="$text_"/>
18366
- </xsl:call-template>
18367
- </xsl:template>
17869
+ <!-- enclose sequence of 'char x' + 'combining char y' to <lang_none>xy</lang_none> -->
17870
+ <xsl:variable name="regex_combining_chars">(.[̀-ͯ])</xsl:variable>
17871
+ <xsl:variable name="element_name_lang_none">lang_none</xsl:variable>
17872
+ <xsl:variable name="tag_element_name_lang_none_open">###<xsl:value-of select="$element_name_lang_none"/>###</xsl:variable>
17873
+ <xsl:variable name="tag_element_name_lang_none_close">###/<xsl:value-of select="$element_name_lang_none"/>###</xsl:variable>
17874
+
17875
+ <xsl:template match="text()" mode="update_xml_step2">
17876
+ <xsl:variable name="text_" select="java:replaceAll(java:java.lang.String.new(.), $regex_combining_chars, concat($tag_element_name_lang_none_open,'$1',$tag_element_name_lang_none_close))"/>
17877
+ <xsl:call-template name="replace_text_tags">
17878
+ <xsl:with-param name="tag_open" select="$tag_element_name_lang_none_open"/>
17879
+ <xsl:with-param name="tag_close" select="$tag_element_name_lang_none_close"/>
17880
+ <xsl:with-param name="text" select="$text_"/>
17881
+ </xsl:call-template>
17882
+ </xsl:template>
18368
17883
 
18369
- <xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image']" mode="update_xml_step2">
18370
- <xsl:copy-of select="."/>
18371
- </xsl:template>
17884
+ <xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image']" mode="update_xml_step2">
17885
+ <xsl:copy-of select="."/>
17886
+ </xsl:template>
18372
17887
 
18373
- <!-- =========================================================================== -->
18374
- <!-- END STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
18375
- <!-- =========================================================================== -->
17888
+ <!-- =========================================================================== -->
17889
+ <!-- END STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
17890
+ <!-- =========================================================================== -->
18376
17891
 
18377
17892
  <!-- =========================================================================== -->
18378
17893
  <!-- XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
@@ -18413,7 +17928,6 @@
18413
17928
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
18414
17929
  <xsl:if test="not(ancestor::*[local-name() = 'table'])"><regex><xsl:value-of select="$regex_standard_reference"/></regex></xsl:if>
18415
17930
  <!-- if EXPRESS reference -->
18416
-
18417
17931
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
18418
17932
  <regex><xsl:value-of select="$regex_solidus_units"/></regex>
18419
17933
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
@@ -18467,8 +17981,7 @@
18467
17981
 
18468
17982
  <xsl:variable name="text2">
18469
17983
  <xsl:element name="text" namespace="{$namespace_full}">
18470
- <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()">
18471
- <xsl:copy-of select="."/>
17984
+ <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()"><xsl:copy-of select="."/>
18472
17985
  </xsl:for-each>
18473
17986
  </xsl:element>
18474
17987
  </xsl:variable>
@@ -18760,11 +18273,10 @@
18760
18273
  </xsl:attribute>
18761
18274
  <xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
18762
18275
  <xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
18763
-
18764
- <xsl:choose>
18765
- <xsl:when test="ancestor::*[local-name() = 'ul' or local-name() ='ol' or local-name() = 'bibitem' or local-name() = 'quote']">true</xsl:when>
18766
- <xsl:otherwise><xsl:value-of select="$skip_footnote_body_"/></xsl:otherwise>
18767
- </xsl:choose>
18276
+ <xsl:choose>
18277
+ <xsl:when test="ancestor::*[local-name() = 'ul' or local-name() ='ol' or local-name() = 'bibitem' or local-name() = 'quote']">true</xsl:when>
18278
+ <xsl:otherwise><xsl:value-of select="$skip_footnote_body_"/></xsl:otherwise>
18279
+ </xsl:choose>
18768
18280
 
18769
18281
  </xsl:attribute>
18770
18282
  <xsl:attribute name="ref_id">
@@ -18854,7 +18366,6 @@
18854
18366
 
18855
18367
  <xsl:template name="printEdition">
18856
18368
  <xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
18857
-
18858
18369
  <xsl:choose>
18859
18370
  <xsl:when test="$edition_i18n != ''">
18860
18371
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -19083,16 +18594,32 @@
19083
18594
  <dc:title>
19084
18595
  <xsl:variable name="title">
19085
18596
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
19086
-
19087
- <xsl:choose>
19088
- <xsl:when test="*[local-name() = 'title'][@language = $lang and @type = 'main']">
19089
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
19090
- </xsl:when>
19091
- <xsl:otherwise>
19092
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'title-main']"/>
19093
- </xsl:otherwise>
19094
- </xsl:choose>
19095
-
18597
+ <xsl:choose>
18598
+ <xsl:when test="*[local-name() = 'title'][@language = $lang and @type = 'main']">
18599
+ <!-- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/> -->
18600
+ <xsl:variable name="bibdata_doctype" select="*[local-name() = 'ext']/*[local-name() = 'doctype']"/>
18601
+ <xsl:if test="$bibdata_doctype = 'amendment'">
18602
+ <xsl:variable name="bibdata_doctype_localized" select="*[local-name() = 'ext']/*[local-name() = 'doctype'][@language = $lang]"/>
18603
+ <xsl:variable name="bibdata_amendment_number" select="*[local-name() = 'ext']/*[local-name() = 'structuredidentifier']/*[local-name() = 'project-number']/@amendment"/>
18604
+ <xsl:value-of select="normalize-space(concat($bibdata_doctype_localized, ' ', $bibdata_amendment_number))"/>
18605
+ <xsl:text> — </xsl:text>
18606
+ </xsl:if>
18607
+ <xsl:variable name="partnumber" select="*[local-name() = 'ext']/*[local-name() = 'structuredidentifier']/*[local-name() = 'project-number']/@part"/>
18608
+ <xsl:for-each select="*[local-name() = 'title'][@language = $lang and @type = 'title-intro'] | *[local-name() = 'title'][@language = $lang and @type = 'title-main'] | *[local-name() = 'title'][@language = $lang and @type = 'title-complementary'] | *[local-name() = 'title'][@language = $lang and @type = 'title-part']">
18609
+ <xsl:if test="@type = 'title-part'">
18610
+ <xsl:call-template name="getLocalizedString"><xsl:with-param name="key">locality.part</xsl:with-param></xsl:call-template>
18611
+ <xsl:text> </xsl:text>
18612
+ <xsl:value-of select="$partnumber"/>
18613
+ <xsl:text>: </xsl:text>
18614
+ </xsl:if>
18615
+ <xsl:value-of select="."/>
18616
+ <xsl:if test="position() != last()"><xsl:text> — </xsl:text></xsl:if>
18617
+ </xsl:for-each>
18618
+ </xsl:when>
18619
+ <xsl:otherwise>
18620
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'title-main']"/>
18621
+ </xsl:otherwise>
18622
+ </xsl:choose>
19096
18623
  </xsl:for-each>
19097
18624
  </xsl:variable>
19098
18625
  <rdf:Alt>
@@ -19110,16 +18637,14 @@
19110
18637
  </dc:title>
19111
18638
  <xsl:variable name="dc_creator">
19112
18639
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
19113
-
19114
- <rdf:Seq>
19115
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
19116
- <rdf:li>
19117
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
19118
- </rdf:li>
19119
- <!-- <xsl:if test="position() != last()">; </xsl:if> -->
19120
- </xsl:for-each>
19121
- </rdf:Seq>
19122
-
18640
+ <rdf:Seq>
18641
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role'][not(*[local-name() = 'description'])]/@type='author']">
18642
+ <rdf:li>
18643
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
18644
+ </rdf:li>
18645
+ <!-- <xsl:if test="position() != last()">; </xsl:if> -->
18646
+ </xsl:for-each>
18647
+ </rdf:Seq>
19123
18648
  </xsl:for-each>
19124
18649
  </xsl:variable>
19125
18650
  <xsl:if test="normalize-space($dc_creator) != ''">
@@ -19130,9 +18655,7 @@
19130
18655
 
19131
18656
  <xsl:variable name="dc_description">
19132
18657
  <xsl:variable name="abstract">
19133
-
19134
- <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
19135
-
18658
+ <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
19136
18659
  </xsl:variable>
19137
18660
  <rdf:Alt>
19138
18661
  <rdf:li xml:lang="x-default">
@@ -19197,7 +18720,9 @@
19197
18720
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
19198
18721
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
19199
18722
  <xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
19200
- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
18723
+ <!-- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/> -->
18724
+ <!-- See https://github.com/metanorma/metanorma-iso/issues/1369 -->
18725
+ <xsl:variable name="url" select="concat('url(file:///',$outputpdf_basepath, $attachment_path, ')')"/>
19201
18726
  <xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
19202
18727
  <!-- Todo: need update -->
19203
18728
  <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
@@ -19362,7 +18887,7 @@
19362
18887
  <xsl:param name="normalize-space" select="'true'"/>
19363
18888
  <xsl:param name="keep_sep" select="'false'"/>
19364
18889
  <xsl:if test="string-length($pText) &gt;0">
19365
- <item>
18890
+ <xsl:element name="item" namespace="{$namespace_mn_xsl}">
19366
18891
  <xsl:choose>
19367
18892
  <xsl:when test="$normalize-space = 'true'">
19368
18893
  <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
@@ -19371,8 +18896,8 @@
19371
18896
  <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
19372
18897
  </xsl:otherwise>
19373
18898
  </xsl:choose>
19374
- </item>
19375
- <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><item><xsl:value-of select="$sep"/></item></xsl:if>
18899
+ </xsl:element>
18900
+ <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><xsl:element name="item" namespace="{$namespace_mn_xsl}"><xsl:value-of select="$sep"/></xsl:element></xsl:if>
19376
18901
  <xsl:call-template name="split">
19377
18902
  <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
19378
18903
  <xsl:with-param name="sep" select="$sep"/>
@@ -19390,28 +18915,6 @@
19390
18915
  <xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
19391
18916
  </xsl:template>
19392
18917
 
19393
- <xsl:template name="namespaceCheck">
19394
- <xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
19395
- <xsl:variable name="XSLNS">
19396
-
19397
- </xsl:variable>
19398
- <!-- <xsl:if test="$documentNS != $XSLNS">
19399
- <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
19400
- </xsl:if> -->
19401
- </xsl:template> <!-- namespaceCheck -->
19402
-
19403
- <xsl:template name="getLanguage">
19404
- <xsl:param name="lang"/>
19405
- <xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
19406
- <xsl:choose>
19407
- <xsl:when test="$language = 'en'">English</xsl:when>
19408
- <xsl:when test="$language = 'fr'">French</xsl:when>
19409
- <xsl:when test="$language = 'de'">Deutsch</xsl:when>
19410
- <xsl:when test="$language = 'cn'">Chinese</xsl:when>
19411
- <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
19412
- </xsl:choose>
19413
- </xsl:template>
19414
-
19415
18918
  <xsl:template name="setId">
19416
18919
  <xsl:param name="prefix"/>
19417
18920
  <xsl:attribute name="id">