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