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.
@@ -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>
@@ -64,7 +64,7 @@ module IsoDoc
64
64
  { label: num, elem: @labels["annex_subclause"],
65
65
  xref: @doctype == "resolution" ? num : l10n("#{@labels['annex_subclause']} #{num}"),
66
66
  level: level, type: "clause" }
67
- i = Counter.new(0, prefix: "#{num}.")
67
+ i = Counter.new(0, prefix: num)
68
68
  clause.xpath(ns("./clause | ./references | ./terms | ./definitions"))
69
69
  .each do |c|
70
70
  annex_names1(c, i.increment(c).print, level + 1)
@@ -92,7 +92,7 @@ module IsoDoc
92
92
  @anchors[clause["id"]] =
93
93
  { label: num.print, xref: l10n("#{lbl} #{num.print}"),
94
94
  level: lvl, type: "clause", elem: lbl }
95
- i = Counter.new(0, prefix: "#{num.print}.")
95
+ i = Counter.new(0, prefix: num.print)
96
96
  clause.xpath(ns(SUBCLAUSES)).each do |c|
97
97
  section_names1(c, i.increment(c).print, lvl + 1)
98
98
  end
@@ -105,7 +105,7 @@ module IsoDoc
105
105
  { label: num, level: level,
106
106
  elem: @doctype == "resolution" ? "" : @labels["clause"],
107
107
  xref: x }
108
- i = Counter.new(0, prefix: "#{num}.")
108
+ i = Counter.new(0, prefix: num)
109
109
  clause.xpath(ns(SUBCLAUSES)).each do |c|
110
110
  section_names1(c, i.increment(c).print, level + 1)
111
111
  end
@@ -82,22 +82,6 @@ module Metanorma
82
82
  biblio_reorder1(r)
83
83
  end
84
84
  end
85
-
86
- def bibdata_cleanup(xmldoc)
87
- super
88
- coverpage_images(xmldoc)
89
- end
90
-
91
- def coverpage_images(xmldoc)
92
- %w(coverpage-image).each do |n|
93
- xmldoc.xpath("//bibdata/ext/#{n}").each do |x|
94
- ins = add_misc_container(xmldoc)
95
- ins << "<presentation-metadata><name>#{n}</name>" \
96
- "<value>#{x.remove.children.to_xml}</value>" \
97
- "</presentation-metadata>"
98
- end
99
- end
100
- end
101
85
  end
102
86
  end
103
87
  end
@@ -213,30 +213,13 @@ module Metanorma
213
213
  end
214
214
  end
215
215
 
216
- def metadata_coverpage_images(node, xml)
217
- %w(coverpage-image).each do |n|
218
- if a = node.attr(n)
219
- xml.send n do |c|
220
- a.split(",").each do |x|
221
- c.image src: x
222
- end
223
- end
224
- end
225
- end
226
- end
227
-
228
216
  def metadata_ext(node, xml)
229
- metadata_doctype(node, xml)
230
- metadata_subdoctype(node, xml)
231
- metadata_flavor(node, xml)
232
- metadata_committee(node, xml)
233
- metadata_ics(node, xml)
217
+ super
234
218
  metadata_recommendationstatus(node, xml)
235
219
  metadata_ip_notice(node, xml)
236
220
  metadata_techreport(node, xml)
237
221
  metadata_contribution(node, xml)
238
222
  structured_id(node, xml)
239
- metadata_coverpage_images(node, xml)
240
223
  end
241
224
  end
242
225
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Itu
3
- VERSION = "2.5.5".freeze
3
+ VERSION = "2.5.6".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-itu
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.5
4
+ version: 2.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-14 00:00:00.000000000 Z
11
+ date: 2024-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc