metanorma-itu 2.5.5 → 2.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3261c835429196306df6cfaa35a3fecf9648b1449e13290290ae9db79d50a29
4
- data.tar.gz: e5244715d2863c296587a45b7189ccce5f26c0efadcb841593c723b3eb376a95
3
+ metadata.gz: 9bcca39daa471be9099854e87a81ecce4c146a479cb380becb63719869d43bc8
4
+ data.tar.gz: 612f4eb3446450c32b54ea1393446183dfacf5fdb9313ca39742e89bbb729840
5
5
  SHA512:
6
- metadata.gz: 8b6b7b3e5f5e8ca6ac9ceb724f3734454d695d9c9810ec41f10afcae9b7be583b35b31a9d6845650fbaec30725a7c0bbfc86bcc43c9c802e5758644303a551ae
7
- data.tar.gz: 36884c6bade781e001e32a614d7d0f6e3d7aaf2fabd625ea398fa631e2f6a963b5ad30d575ef66ec45c86a4638f241c8c12431d25190c8631f4c8e51cca4b388
6
+ metadata.gz: 841a1368e8ca1a9a71b3cb8c6993491251896581b8e11282d0456b9a433153a4467030d4bcb9ea3f370c04ea41967949897bb554c9e2203f5a587b13446951b8
7
+ data.tar.gz: d451dd6a95d4e53f862f9005ee61c05280e4b9f433809beedfb9091cd0ca9291bda146187d33e33c84fdae1d43eb6c201d60117392a88a6df59fd7de135e95a6
@@ -6150,10 +6150,14 @@
6150
6150
  <xsl:variable name="fn_styles">
6151
6151
  <xsl:choose>
6152
6152
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
6153
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
6153
+ <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
6154
+
6155
+ </fn_styles>
6154
6156
  </xsl:when>
6155
6157
  <xsl:otherwise>
6156
- <fn_styles xsl:use-attribute-sets="fn-num-style"/>
6158
+ <fn_styles xsl:use-attribute-sets="fn-num-style">
6159
+
6160
+ </fn_styles>
6157
6161
  </xsl:otherwise>
6158
6162
  </xsl:choose>
6159
6163
  </xsl:variable>
@@ -9066,6 +9070,7 @@
9066
9070
  <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'])">
9067
9071
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9068
9072
  </xsl:if>
9073
+
9069
9074
  <xsl:if test="parent::*[local-name() = 'add']">
9070
9075
  <xsl:call-template name="append_add-style"/>
9071
9076
  </xsl:if>
@@ -9174,44 +9179,44 @@
9174
9179
 
9175
9180
  <xsl:template match="*[local-name() = 'note']" name="note">
9176
9181
 
9177
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9182
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9178
9183
 
9179
- <xsl:call-template name="setBlockSpanAll"/>
9184
+ <xsl:call-template name="setBlockSpanAll"/>
9180
9185
 
9181
- <xsl:call-template name="refine_note-style"/>
9186
+ <xsl:call-template name="refine_note-style"/>
9182
9187
 
9183
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9188
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9184
9189
 
9185
- <fo:block>
9190
+ <fo:block>
9186
9191
 
9187
- <xsl:call-template name="refine_note_block_style"/>
9192
+ <xsl:call-template name="refine_note_block_style"/>
9188
9193
 
9189
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
9194
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
9190
9195
 
9191
- <xsl:call-template name="refine_note-name-style"/>
9196
+ <xsl:call-template name="refine_note-name-style"/>
9192
9197
 
9193
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9194
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9195
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
9196
- <xsl:call-template name="append_add-style"/>
9197
- </xsl:if>
9198
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9199
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9200
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
9201
+ <xsl:call-template name="append_add-style"/>
9202
+ </xsl:if>
9198
9203
 
9199
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
9200
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9201
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9202
- <xsl:with-param name="skip">false</xsl:with-param>
9203
- </xsl:apply-templates>
9204
- </xsl:if>
9204
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
9205
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9206
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9207
+ <xsl:with-param name="skip">false</xsl:with-param>
9208
+ </xsl:apply-templates>
9209
+ </xsl:if>
9205
9210
 
9206
- <xsl:apply-templates select="*[local-name() = 'name']"/>
9211
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
9207
9212
 
9208
- </fo:inline>
9213
+ </fo:inline>
9209
9214
 
9210
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9211
- </fo:block>
9215
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9216
+ </fo:block>
9212
9217
 
9213
- </fo:block-container>
9214
- </fo:block-container>
9218
+ </fo:block-container>
9219
+ </fo:block-container>
9215
9220
 
9216
9221
  </xsl:template>
9217
9222
 
@@ -11621,6 +11626,7 @@
11621
11626
  </xsl:when>
11622
11627
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
11623
11628
  <fo:block xsl:use-attribute-sets="example-name-style">
11629
+
11624
11630
  <xsl:apply-templates/>
11625
11631
  </fo:block>
11626
11632
  </xsl:when>
@@ -11636,6 +11642,7 @@
11636
11642
 
11637
11643
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
11638
11644
  <fo:inline xsl:use-attribute-sets="example-name-style">
11645
+
11639
11646
  <xsl:apply-templates/>
11640
11647
  </fo:inline>
11641
11648
  </xsl:template>
@@ -12007,12 +12014,14 @@
12007
12014
 
12008
12015
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
12009
12016
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
12017
+
12010
12018
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
12011
12019
  </fo:block>
12012
12020
  </xsl:if>
12013
12021
 
12014
12022
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
12015
12023
  <xsl:call-template name="setStyle_preferred"/>
12024
+
12016
12025
  <xsl:apply-templates/>
12017
12026
  </fo:block>
12018
12027
  </fo:block>
@@ -15001,9 +15010,10 @@
15001
15010
  <xsl:template name="insertBackgroundPageImage">
15002
15011
  <xsl:param name="number">1</xsl:param>
15003
15012
  <xsl:param name="name">coverpage-image</xsl:param>
15013
+ <xsl:param name="suffix"/>
15004
15014
  <xsl:variable name="num" select="number($number)"/>
15005
15015
  <!-- background image -->
15006
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage_{$name}_{$number}_{generate-id()}">
15016
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
15007
15017
  <fo:block>
15008
15018
  <xsl:for-each select="/*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
15009
15019
  <xsl:choose>
@@ -15069,16 +15079,29 @@
15069
15079
 
15070
15080
  <!-- END: insert cover page image -->
15071
15081
 
15082
+ <xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
15072
15083
  <xsl:template name="insertVerticalChar">
15073
15084
  <xsl:param name="str"/>
15085
+ <xsl:param name="writing-mode">lr-tb</xsl:param>
15086
+ <xsl:param name="reference-orientation">90</xsl:param>
15074
15087
  <xsl:if test="string-length($str) &gt; 0">
15075
- <fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
15088
+ <fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
15089
+ <xsl:if test="normalize-space($writing-mode) != ''">
15090
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
15091
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
15092
+ </xsl:if>
15093
+ <xsl:variable name="char" select="substring($str,1,1)"/>
15094
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
15095
+ <xsl:attribute name="reference-orientation">0</xsl:attribute>
15096
+ </xsl:if>
15076
15097
  <fo:block-container width="1em">
15077
- <fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
15098
+ <fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
15078
15099
  </fo:block-container>
15079
15100
  </fo:inline-container>
15080
15101
  <xsl:call-template name="insertVerticalChar">
15081
15102
  <xsl:with-param name="str" select="substring($str, 2)"/>
15103
+ <xsl:with-param name="writing-mode" select="$writing-mode"/>
15104
+ <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
15082
15105
  </xsl:call-template>
15083
15106
  </xsl:if>
15084
15107
  </xsl:template>
@@ -6150,10 +6150,14 @@
6150
6150
  <xsl:variable name="fn_styles">
6151
6151
  <xsl:choose>
6152
6152
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
6153
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
6153
+ <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
6154
+
6155
+ </fn_styles>
6154
6156
  </xsl:when>
6155
6157
  <xsl:otherwise>
6156
- <fn_styles xsl:use-attribute-sets="fn-num-style"/>
6158
+ <fn_styles xsl:use-attribute-sets="fn-num-style">
6159
+
6160
+ </fn_styles>
6157
6161
  </xsl:otherwise>
6158
6162
  </xsl:choose>
6159
6163
  </xsl:variable>
@@ -9066,6 +9070,7 @@
9066
9070
  <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'])">
9067
9071
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9068
9072
  </xsl:if>
9073
+
9069
9074
  <xsl:if test="parent::*[local-name() = 'add']">
9070
9075
  <xsl:call-template name="append_add-style"/>
9071
9076
  </xsl:if>
@@ -9174,44 +9179,44 @@
9174
9179
 
9175
9180
  <xsl:template match="*[local-name() = 'note']" name="note">
9176
9181
 
9177
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9182
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9178
9183
 
9179
- <xsl:call-template name="setBlockSpanAll"/>
9184
+ <xsl:call-template name="setBlockSpanAll"/>
9180
9185
 
9181
- <xsl:call-template name="refine_note-style"/>
9186
+ <xsl:call-template name="refine_note-style"/>
9182
9187
 
9183
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9188
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9184
9189
 
9185
- <fo:block>
9190
+ <fo:block>
9186
9191
 
9187
- <xsl:call-template name="refine_note_block_style"/>
9192
+ <xsl:call-template name="refine_note_block_style"/>
9188
9193
 
9189
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
9194
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
9190
9195
 
9191
- <xsl:call-template name="refine_note-name-style"/>
9196
+ <xsl:call-template name="refine_note-name-style"/>
9192
9197
 
9193
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9194
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9195
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
9196
- <xsl:call-template name="append_add-style"/>
9197
- </xsl:if>
9198
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9199
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9200
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
9201
+ <xsl:call-template name="append_add-style"/>
9202
+ </xsl:if>
9198
9203
 
9199
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
9200
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9201
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9202
- <xsl:with-param name="skip">false</xsl:with-param>
9203
- </xsl:apply-templates>
9204
- </xsl:if>
9204
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
9205
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9206
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9207
+ <xsl:with-param name="skip">false</xsl:with-param>
9208
+ </xsl:apply-templates>
9209
+ </xsl:if>
9205
9210
 
9206
- <xsl:apply-templates select="*[local-name() = 'name']"/>
9211
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
9207
9212
 
9208
- </fo:inline>
9213
+ </fo:inline>
9209
9214
 
9210
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9211
- </fo:block>
9215
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9216
+ </fo:block>
9212
9217
 
9213
- </fo:block-container>
9214
- </fo:block-container>
9218
+ </fo:block-container>
9219
+ </fo:block-container>
9215
9220
 
9216
9221
  </xsl:template>
9217
9222
 
@@ -11621,6 +11626,7 @@
11621
11626
  </xsl:when>
11622
11627
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
11623
11628
  <fo:block xsl:use-attribute-sets="example-name-style">
11629
+
11624
11630
  <xsl:apply-templates/>
11625
11631
  </fo:block>
11626
11632
  </xsl:when>
@@ -11636,6 +11642,7 @@
11636
11642
 
11637
11643
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
11638
11644
  <fo:inline xsl:use-attribute-sets="example-name-style">
11645
+
11639
11646
  <xsl:apply-templates/>
11640
11647
  </fo:inline>
11641
11648
  </xsl:template>
@@ -12007,12 +12014,14 @@
12007
12014
 
12008
12015
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
12009
12016
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
12017
+
12010
12018
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
12011
12019
  </fo:block>
12012
12020
  </xsl:if>
12013
12021
 
12014
12022
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
12015
12023
  <xsl:call-template name="setStyle_preferred"/>
12024
+
12016
12025
  <xsl:apply-templates/>
12017
12026
  </fo:block>
12018
12027
  </fo:block>
@@ -15001,9 +15010,10 @@
15001
15010
  <xsl:template name="insertBackgroundPageImage">
15002
15011
  <xsl:param name="number">1</xsl:param>
15003
15012
  <xsl:param name="name">coverpage-image</xsl:param>
15013
+ <xsl:param name="suffix"/>
15004
15014
  <xsl:variable name="num" select="number($number)"/>
15005
15015
  <!-- background image -->
15006
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage_{$name}_{$number}_{generate-id()}">
15016
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
15007
15017
  <fo:block>
15008
15018
  <xsl:for-each select="/*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
15009
15019
  <xsl:choose>
@@ -15069,16 +15079,29 @@
15069
15079
 
15070
15080
  <!-- END: insert cover page image -->
15071
15081
 
15082
+ <xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
15072
15083
  <xsl:template name="insertVerticalChar">
15073
15084
  <xsl:param name="str"/>
15085
+ <xsl:param name="writing-mode">lr-tb</xsl:param>
15086
+ <xsl:param name="reference-orientation">90</xsl:param>
15074
15087
  <xsl:if test="string-length($str) &gt; 0">
15075
- <fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
15088
+ <fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
15089
+ <xsl:if test="normalize-space($writing-mode) != ''">
15090
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
15091
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
15092
+ </xsl:if>
15093
+ <xsl:variable name="char" select="substring($str,1,1)"/>
15094
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
15095
+ <xsl:attribute name="reference-orientation">0</xsl:attribute>
15096
+ </xsl:if>
15076
15097
  <fo:block-container width="1em">
15077
- <fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
15098
+ <fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
15078
15099
  </fo:block-container>
15079
15100
  </fo:inline-container>
15080
15101
  <xsl:call-template name="insertVerticalChar">
15081
15102
  <xsl:with-param name="str" select="substring($str, 2)"/>
15103
+ <xsl:with-param name="writing-mode" select="$writing-mode"/>
15104
+ <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
15082
15105
  </xsl:call-template>
15083
15106
  </xsl:if>
15084
15107
  </xsl:template>
@@ -6150,10 +6150,14 @@
6150
6150
  <xsl:variable name="fn_styles">
6151
6151
  <xsl:choose>
6152
6152
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
6153
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
6153
+ <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
6154
+
6155
+ </fn_styles>
6154
6156
  </xsl:when>
6155
6157
  <xsl:otherwise>
6156
- <fn_styles xsl:use-attribute-sets="fn-num-style"/>
6158
+ <fn_styles xsl:use-attribute-sets="fn-num-style">
6159
+
6160
+ </fn_styles>
6157
6161
  </xsl:otherwise>
6158
6162
  </xsl:choose>
6159
6163
  </xsl:variable>
@@ -9066,6 +9070,7 @@
9066
9070
  <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'])">
9067
9071
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9068
9072
  </xsl:if>
9073
+
9069
9074
  <xsl:if test="parent::*[local-name() = 'add']">
9070
9075
  <xsl:call-template name="append_add-style"/>
9071
9076
  </xsl:if>
@@ -9174,44 +9179,44 @@
9174
9179
 
9175
9180
  <xsl:template match="*[local-name() = 'note']" name="note">
9176
9181
 
9177
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9182
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9178
9183
 
9179
- <xsl:call-template name="setBlockSpanAll"/>
9184
+ <xsl:call-template name="setBlockSpanAll"/>
9180
9185
 
9181
- <xsl:call-template name="refine_note-style"/>
9186
+ <xsl:call-template name="refine_note-style"/>
9182
9187
 
9183
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9188
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9184
9189
 
9185
- <fo:block>
9190
+ <fo:block>
9186
9191
 
9187
- <xsl:call-template name="refine_note_block_style"/>
9192
+ <xsl:call-template name="refine_note_block_style"/>
9188
9193
 
9189
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
9194
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
9190
9195
 
9191
- <xsl:call-template name="refine_note-name-style"/>
9196
+ <xsl:call-template name="refine_note-name-style"/>
9192
9197
 
9193
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9194
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9195
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
9196
- <xsl:call-template name="append_add-style"/>
9197
- </xsl:if>
9198
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9199
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9200
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
9201
+ <xsl:call-template name="append_add-style"/>
9202
+ </xsl:if>
9198
9203
 
9199
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
9200
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9201
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9202
- <xsl:with-param name="skip">false</xsl:with-param>
9203
- </xsl:apply-templates>
9204
- </xsl:if>
9204
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
9205
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9206
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9207
+ <xsl:with-param name="skip">false</xsl:with-param>
9208
+ </xsl:apply-templates>
9209
+ </xsl:if>
9205
9210
 
9206
- <xsl:apply-templates select="*[local-name() = 'name']"/>
9211
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
9207
9212
 
9208
- </fo:inline>
9213
+ </fo:inline>
9209
9214
 
9210
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9211
- </fo:block>
9215
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9216
+ </fo:block>
9212
9217
 
9213
- </fo:block-container>
9214
- </fo:block-container>
9218
+ </fo:block-container>
9219
+ </fo:block-container>
9215
9220
 
9216
9221
  </xsl:template>
9217
9222
 
@@ -11621,6 +11626,7 @@
11621
11626
  </xsl:when>
11622
11627
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
11623
11628
  <fo:block xsl:use-attribute-sets="example-name-style">
11629
+
11624
11630
  <xsl:apply-templates/>
11625
11631
  </fo:block>
11626
11632
  </xsl:when>
@@ -11636,6 +11642,7 @@
11636
11642
 
11637
11643
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
11638
11644
  <fo:inline xsl:use-attribute-sets="example-name-style">
11645
+
11639
11646
  <xsl:apply-templates/>
11640
11647
  </fo:inline>
11641
11648
  </xsl:template>
@@ -12007,12 +12014,14 @@
12007
12014
 
12008
12015
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
12009
12016
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
12017
+
12010
12018
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
12011
12019
  </fo:block>
12012
12020
  </xsl:if>
12013
12021
 
12014
12022
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
12015
12023
  <xsl:call-template name="setStyle_preferred"/>
12024
+
12016
12025
  <xsl:apply-templates/>
12017
12026
  </fo:block>
12018
12027
  </fo:block>
@@ -15001,9 +15010,10 @@
15001
15010
  <xsl:template name="insertBackgroundPageImage">
15002
15011
  <xsl:param name="number">1</xsl:param>
15003
15012
  <xsl:param name="name">coverpage-image</xsl:param>
15013
+ <xsl:param name="suffix"/>
15004
15014
  <xsl:variable name="num" select="number($number)"/>
15005
15015
  <!-- background image -->
15006
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage_{$name}_{$number}_{generate-id()}">
15016
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
15007
15017
  <fo:block>
15008
15018
  <xsl:for-each select="/*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
15009
15019
  <xsl:choose>
@@ -15069,16 +15079,29 @@
15069
15079
 
15070
15080
  <!-- END: insert cover page image -->
15071
15081
 
15082
+ <xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
15072
15083
  <xsl:template name="insertVerticalChar">
15073
15084
  <xsl:param name="str"/>
15085
+ <xsl:param name="writing-mode">lr-tb</xsl:param>
15086
+ <xsl:param name="reference-orientation">90</xsl:param>
15074
15087
  <xsl:if test="string-length($str) &gt; 0">
15075
- <fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
15088
+ <fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
15089
+ <xsl:if test="normalize-space($writing-mode) != ''">
15090
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
15091
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
15092
+ </xsl:if>
15093
+ <xsl:variable name="char" select="substring($str,1,1)"/>
15094
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
15095
+ <xsl:attribute name="reference-orientation">0</xsl:attribute>
15096
+ </xsl:if>
15076
15097
  <fo:block-container width="1em">
15077
- <fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
15098
+ <fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
15078
15099
  </fo:block-container>
15079
15100
  </fo:inline-container>
15080
15101
  <xsl:call-template name="insertVerticalChar">
15081
15102
  <xsl:with-param name="str" select="substring($str, 2)"/>
15103
+ <xsl:with-param name="writing-mode" select="$writing-mode"/>
15104
+ <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
15082
15105
  </xsl:call-template>
15083
15106
  </xsl:if>
15084
15107
  </xsl:template>