metanorma-ogc 2.6.4 → 2.6.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5dad973d54c8c43e6324a55d4c61433fc7d97d261c63dfa4a465507b173c7eba
4
- data.tar.gz: d53e4e00b7aac26b7d22463e10b098f95bfb25c04eecf7a2121fe09a7b18ebfc
3
+ metadata.gz: 17f8abe4584052c8638ff63af0cf4f601329a1833105aa4847d70c8746c285ca
4
+ data.tar.gz: e9287cf4b36ddf56eb74b927e677ec483f96a934bd891014d1bdada95eb07823
5
5
  SHA512:
6
- metadata.gz: b47783f85fedcb9aa7667958c9f06b51c743c3842c6b4ec548ca17b9e6d0b47ac238dd17d72543900e3498e86fc90c95f1e1125957faebe417aee5ab391870d1
7
- data.tar.gz: 1f00fa77d29a37118ea19e419d0e3865fcca1a7f3ecf3de937bd545d921e0e05fc76764598e5b1ffb6a7316de3de8b75b419130942b070f35cf1d30698362ef3
6
+ metadata.gz: a8e30d2b9bdc650ae6c3c953221ea480761bbc06eb8bc3a09ff8b5b65799896893ca8a4d5d928f240b877990a32f61c4d3cea183bbad3928244eea05d682bc0e
7
+ data.tar.gz: 3966ff5a7adbb26710a33606cf97cc622db0d2154a50e07453c5d5b05c2228022408435a63660dd51c54157ba4a8a6e3fee43267c2489217a781f3e2a042f053
@@ -5402,10 +5402,14 @@
5402
5402
  <xsl:variable name="fn_styles">
5403
5403
  <xsl:choose>
5404
5404
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
5405
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
5405
+ <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
5406
+
5407
+ </fn_styles>
5406
5408
  </xsl:when>
5407
5409
  <xsl:otherwise>
5408
- <fn_styles xsl:use-attribute-sets="fn-num-style"/>
5410
+ <fn_styles xsl:use-attribute-sets="fn-num-style">
5411
+
5412
+ </fn_styles>
5409
5413
  </xsl:otherwise>
5410
5414
  </xsl:choose>
5411
5415
  </xsl:variable>
@@ -8293,6 +8297,7 @@
8293
8297
  <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'])">
8294
8298
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8295
8299
  </xsl:if>
8300
+
8296
8301
  <xsl:if test="parent::*[local-name() = 'add']">
8297
8302
  <xsl:call-template name="append_add-style"/>
8298
8303
  </xsl:if>
@@ -8401,44 +8406,44 @@
8401
8406
 
8402
8407
  <xsl:template match="*[local-name() = 'note']" name="note">
8403
8408
 
8404
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8409
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8405
8410
 
8406
- <xsl:call-template name="setBlockSpanAll"/>
8411
+ <xsl:call-template name="setBlockSpanAll"/>
8407
8412
 
8408
- <xsl:call-template name="refine_note-style"/>
8413
+ <xsl:call-template name="refine_note-style"/>
8409
8414
 
8410
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8415
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8411
8416
 
8412
- <fo:block>
8417
+ <fo:block>
8413
8418
 
8414
- <xsl:call-template name="refine_note_block_style"/>
8419
+ <xsl:call-template name="refine_note_block_style"/>
8415
8420
 
8416
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8421
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8417
8422
 
8418
- <xsl:call-template name="refine_note-name-style"/>
8423
+ <xsl:call-template name="refine_note-name-style"/>
8419
8424
 
8420
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8421
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8422
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8423
- <xsl:call-template name="append_add-style"/>
8424
- </xsl:if>
8425
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8426
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8427
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8428
+ <xsl:call-template name="append_add-style"/>
8429
+ </xsl:if>
8425
8430
 
8426
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8427
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8428
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8429
- <xsl:with-param name="skip">false</xsl:with-param>
8430
- </xsl:apply-templates>
8431
- </xsl:if>
8431
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8432
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8433
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8434
+ <xsl:with-param name="skip">false</xsl:with-param>
8435
+ </xsl:apply-templates>
8436
+ </xsl:if>
8432
8437
 
8433
- <xsl:apply-templates select="*[local-name() = 'name']"/>
8438
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8434
8439
 
8435
- </fo:inline>
8440
+ </fo:inline>
8436
8441
 
8437
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8438
- </fo:block>
8442
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8443
+ </fo:block>
8439
8444
 
8440
- </fo:block-container>
8441
- </fo:block-container>
8445
+ </fo:block-container>
8446
+ </fo:block-container>
8442
8447
 
8443
8448
  </xsl:template>
8444
8449
 
@@ -10895,6 +10900,7 @@
10895
10900
  </xsl:when>
10896
10901
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
10897
10902
  <fo:block xsl:use-attribute-sets="example-name-style">
10903
+
10898
10904
  <xsl:apply-templates/>
10899
10905
  </fo:block>
10900
10906
  </xsl:when>
@@ -10910,6 +10916,7 @@
10910
10916
 
10911
10917
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
10912
10918
  <fo:inline xsl:use-attribute-sets="example-name-style">
10919
+
10913
10920
  <xsl:apply-templates/>
10914
10921
  </fo:inline>
10915
10922
  </xsl:template>
@@ -11279,12 +11286,14 @@
11279
11286
 
11280
11287
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
11281
11288
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
11289
+
11282
11290
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
11283
11291
  </fo:block>
11284
11292
  </xsl:if>
11285
11293
 
11286
11294
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
11287
11295
  <xsl:call-template name="setStyle_preferred"/>
11296
+
11288
11297
  <xsl:apply-templates/>
11289
11298
  </fo:block>
11290
11299
  </fo:block>
@@ -14243,9 +14252,10 @@
14243
14252
  <xsl:template name="insertBackgroundPageImage">
14244
14253
  <xsl:param name="number">1</xsl:param>
14245
14254
  <xsl:param name="name">coverpage-image</xsl:param>
14255
+ <xsl:param name="suffix"/>
14246
14256
  <xsl:variable name="num" select="number($number)"/>
14247
14257
  <!-- background image -->
14248
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage_{$name}_{$number}_{generate-id()}">
14258
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
14249
14259
  <fo:block>
14250
14260
  <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]">
14251
14261
  <xsl:choose>
@@ -14311,16 +14321,29 @@
14311
14321
 
14312
14322
  <!-- END: insert cover page image -->
14313
14323
 
14324
+ <xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
14314
14325
  <xsl:template name="insertVerticalChar">
14315
14326
  <xsl:param name="str"/>
14327
+ <xsl:param name="writing-mode">lr-tb</xsl:param>
14328
+ <xsl:param name="reference-orientation">90</xsl:param>
14316
14329
  <xsl:if test="string-length($str) &gt; 0">
14317
- <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">
14330
+ <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">
14331
+ <xsl:if test="normalize-space($writing-mode) != ''">
14332
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
14333
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
14334
+ </xsl:if>
14335
+ <xsl:variable name="char" select="substring($str,1,1)"/>
14336
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
14337
+ <xsl:attribute name="reference-orientation">0</xsl:attribute>
14338
+ </xsl:if>
14318
14339
  <fo:block-container width="1em">
14319
- <fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
14340
+ <fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
14320
14341
  </fo:block-container>
14321
14342
  </fo:inline-container>
14322
14343
  <xsl:call-template name="insertVerticalChar">
14323
14344
  <xsl:with-param name="str" select="substring($str, 2)"/>
14345
+ <xsl:with-param name="writing-mode" select="$writing-mode"/>
14346
+ <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
14324
14347
  </xsl:call-template>
14325
14348
  </xsl:if>
14326
14349
  </xsl:template>
@@ -5402,10 +5402,14 @@
5402
5402
  <xsl:variable name="fn_styles">
5403
5403
  <xsl:choose>
5404
5404
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
5405
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
5405
+ <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
5406
+
5407
+ </fn_styles>
5406
5408
  </xsl:when>
5407
5409
  <xsl:otherwise>
5408
- <fn_styles xsl:use-attribute-sets="fn-num-style"/>
5410
+ <fn_styles xsl:use-attribute-sets="fn-num-style">
5411
+
5412
+ </fn_styles>
5409
5413
  </xsl:otherwise>
5410
5414
  </xsl:choose>
5411
5415
  </xsl:variable>
@@ -8293,6 +8297,7 @@
8293
8297
  <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'])">
8294
8298
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8295
8299
  </xsl:if>
8300
+
8296
8301
  <xsl:if test="parent::*[local-name() = 'add']">
8297
8302
  <xsl:call-template name="append_add-style"/>
8298
8303
  </xsl:if>
@@ -8401,44 +8406,44 @@
8401
8406
 
8402
8407
  <xsl:template match="*[local-name() = 'note']" name="note">
8403
8408
 
8404
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8409
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8405
8410
 
8406
- <xsl:call-template name="setBlockSpanAll"/>
8411
+ <xsl:call-template name="setBlockSpanAll"/>
8407
8412
 
8408
- <xsl:call-template name="refine_note-style"/>
8413
+ <xsl:call-template name="refine_note-style"/>
8409
8414
 
8410
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8415
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8411
8416
 
8412
- <fo:block>
8417
+ <fo:block>
8413
8418
 
8414
- <xsl:call-template name="refine_note_block_style"/>
8419
+ <xsl:call-template name="refine_note_block_style"/>
8415
8420
 
8416
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8421
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8417
8422
 
8418
- <xsl:call-template name="refine_note-name-style"/>
8423
+ <xsl:call-template name="refine_note-name-style"/>
8419
8424
 
8420
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8421
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8422
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8423
- <xsl:call-template name="append_add-style"/>
8424
- </xsl:if>
8425
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8426
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8427
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8428
+ <xsl:call-template name="append_add-style"/>
8429
+ </xsl:if>
8425
8430
 
8426
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8427
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8428
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8429
- <xsl:with-param name="skip">false</xsl:with-param>
8430
- </xsl:apply-templates>
8431
- </xsl:if>
8431
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8432
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8433
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8434
+ <xsl:with-param name="skip">false</xsl:with-param>
8435
+ </xsl:apply-templates>
8436
+ </xsl:if>
8432
8437
 
8433
- <xsl:apply-templates select="*[local-name() = 'name']"/>
8438
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8434
8439
 
8435
- </fo:inline>
8440
+ </fo:inline>
8436
8441
 
8437
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8438
- </fo:block>
8442
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8443
+ </fo:block>
8439
8444
 
8440
- </fo:block-container>
8441
- </fo:block-container>
8445
+ </fo:block-container>
8446
+ </fo:block-container>
8442
8447
 
8443
8448
  </xsl:template>
8444
8449
 
@@ -10895,6 +10900,7 @@
10895
10900
  </xsl:when>
10896
10901
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
10897
10902
  <fo:block xsl:use-attribute-sets="example-name-style">
10903
+
10898
10904
  <xsl:apply-templates/>
10899
10905
  </fo:block>
10900
10906
  </xsl:when>
@@ -10910,6 +10916,7 @@
10910
10916
 
10911
10917
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
10912
10918
  <fo:inline xsl:use-attribute-sets="example-name-style">
10919
+
10913
10920
  <xsl:apply-templates/>
10914
10921
  </fo:inline>
10915
10922
  </xsl:template>
@@ -11279,12 +11286,14 @@
11279
11286
 
11280
11287
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
11281
11288
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
11289
+
11282
11290
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
11283
11291
  </fo:block>
11284
11292
  </xsl:if>
11285
11293
 
11286
11294
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
11287
11295
  <xsl:call-template name="setStyle_preferred"/>
11296
+
11288
11297
  <xsl:apply-templates/>
11289
11298
  </fo:block>
11290
11299
  </fo:block>
@@ -14243,9 +14252,10 @@
14243
14252
  <xsl:template name="insertBackgroundPageImage">
14244
14253
  <xsl:param name="number">1</xsl:param>
14245
14254
  <xsl:param name="name">coverpage-image</xsl:param>
14255
+ <xsl:param name="suffix"/>
14246
14256
  <xsl:variable name="num" select="number($number)"/>
14247
14257
  <!-- background image -->
14248
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage_{$name}_{$number}_{generate-id()}">
14258
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
14249
14259
  <fo:block>
14250
14260
  <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]">
14251
14261
  <xsl:choose>
@@ -14311,16 +14321,29 @@
14311
14321
 
14312
14322
  <!-- END: insert cover page image -->
14313
14323
 
14324
+ <xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
14314
14325
  <xsl:template name="insertVerticalChar">
14315
14326
  <xsl:param name="str"/>
14327
+ <xsl:param name="writing-mode">lr-tb</xsl:param>
14328
+ <xsl:param name="reference-orientation">90</xsl:param>
14316
14329
  <xsl:if test="string-length($str) &gt; 0">
14317
- <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">
14330
+ <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">
14331
+ <xsl:if test="normalize-space($writing-mode) != ''">
14332
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
14333
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
14334
+ </xsl:if>
14335
+ <xsl:variable name="char" select="substring($str,1,1)"/>
14336
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
14337
+ <xsl:attribute name="reference-orientation">0</xsl:attribute>
14338
+ </xsl:if>
14318
14339
  <fo:block-container width="1em">
14319
- <fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
14340
+ <fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
14320
14341
  </fo:block-container>
14321
14342
  </fo:inline-container>
14322
14343
  <xsl:call-template name="insertVerticalChar">
14323
14344
  <xsl:with-param name="str" select="substring($str, 2)"/>
14345
+ <xsl:with-param name="writing-mode" select="$writing-mode"/>
14346
+ <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
14324
14347
  </xsl:call-template>
14325
14348
  </xsl:if>
14326
14349
  </xsl:template>
@@ -5402,10 +5402,14 @@
5402
5402
  <xsl:variable name="fn_styles">
5403
5403
  <xsl:choose>
5404
5404
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
5405
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
5405
+ <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
5406
+
5407
+ </fn_styles>
5406
5408
  </xsl:when>
5407
5409
  <xsl:otherwise>
5408
- <fn_styles xsl:use-attribute-sets="fn-num-style"/>
5410
+ <fn_styles xsl:use-attribute-sets="fn-num-style">
5411
+
5412
+ </fn_styles>
5409
5413
  </xsl:otherwise>
5410
5414
  </xsl:choose>
5411
5415
  </xsl:variable>
@@ -8293,6 +8297,7 @@
8293
8297
  <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'])">
8294
8298
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8295
8299
  </xsl:if>
8300
+
8296
8301
  <xsl:if test="parent::*[local-name() = 'add']">
8297
8302
  <xsl:call-template name="append_add-style"/>
8298
8303
  </xsl:if>
@@ -8401,44 +8406,44 @@
8401
8406
 
8402
8407
  <xsl:template match="*[local-name() = 'note']" name="note">
8403
8408
 
8404
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8409
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8405
8410
 
8406
- <xsl:call-template name="setBlockSpanAll"/>
8411
+ <xsl:call-template name="setBlockSpanAll"/>
8407
8412
 
8408
- <xsl:call-template name="refine_note-style"/>
8413
+ <xsl:call-template name="refine_note-style"/>
8409
8414
 
8410
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8415
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8411
8416
 
8412
- <fo:block>
8417
+ <fo:block>
8413
8418
 
8414
- <xsl:call-template name="refine_note_block_style"/>
8419
+ <xsl:call-template name="refine_note_block_style"/>
8415
8420
 
8416
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8421
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8417
8422
 
8418
- <xsl:call-template name="refine_note-name-style"/>
8423
+ <xsl:call-template name="refine_note-name-style"/>
8419
8424
 
8420
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8421
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8422
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8423
- <xsl:call-template name="append_add-style"/>
8424
- </xsl:if>
8425
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8426
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8427
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8428
+ <xsl:call-template name="append_add-style"/>
8429
+ </xsl:if>
8425
8430
 
8426
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8427
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8428
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8429
- <xsl:with-param name="skip">false</xsl:with-param>
8430
- </xsl:apply-templates>
8431
- </xsl:if>
8431
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8432
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8433
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8434
+ <xsl:with-param name="skip">false</xsl:with-param>
8435
+ </xsl:apply-templates>
8436
+ </xsl:if>
8432
8437
 
8433
- <xsl:apply-templates select="*[local-name() = 'name']"/>
8438
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8434
8439
 
8435
- </fo:inline>
8440
+ </fo:inline>
8436
8441
 
8437
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8438
- </fo:block>
8442
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8443
+ </fo:block>
8439
8444
 
8440
- </fo:block-container>
8441
- </fo:block-container>
8445
+ </fo:block-container>
8446
+ </fo:block-container>
8442
8447
 
8443
8448
  </xsl:template>
8444
8449
 
@@ -10895,6 +10900,7 @@
10895
10900
  </xsl:when>
10896
10901
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
10897
10902
  <fo:block xsl:use-attribute-sets="example-name-style">
10903
+
10898
10904
  <xsl:apply-templates/>
10899
10905
  </fo:block>
10900
10906
  </xsl:when>
@@ -10910,6 +10916,7 @@
10910
10916
 
10911
10917
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
10912
10918
  <fo:inline xsl:use-attribute-sets="example-name-style">
10919
+
10913
10920
  <xsl:apply-templates/>
10914
10921
  </fo:inline>
10915
10922
  </xsl:template>
@@ -11279,12 +11286,14 @@
11279
11286
 
11280
11287
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
11281
11288
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
11289
+
11282
11290
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
11283
11291
  </fo:block>
11284
11292
  </xsl:if>
11285
11293
 
11286
11294
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
11287
11295
  <xsl:call-template name="setStyle_preferred"/>
11296
+
11288
11297
  <xsl:apply-templates/>
11289
11298
  </fo:block>
11290
11299
  </fo:block>
@@ -14243,9 +14252,10 @@
14243
14252
  <xsl:template name="insertBackgroundPageImage">
14244
14253
  <xsl:param name="number">1</xsl:param>
14245
14254
  <xsl:param name="name">coverpage-image</xsl:param>
14255
+ <xsl:param name="suffix"/>
14246
14256
  <xsl:variable name="num" select="number($number)"/>
14247
14257
  <!-- background image -->
14248
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage_{$name}_{$number}_{generate-id()}">
14258
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
14249
14259
  <fo:block>
14250
14260
  <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]">
14251
14261
  <xsl:choose>
@@ -14311,16 +14321,29 @@
14311
14321
 
14312
14322
  <!-- END: insert cover page image -->
14313
14323
 
14324
+ <xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
14314
14325
  <xsl:template name="insertVerticalChar">
14315
14326
  <xsl:param name="str"/>
14327
+ <xsl:param name="writing-mode">lr-tb</xsl:param>
14328
+ <xsl:param name="reference-orientation">90</xsl:param>
14316
14329
  <xsl:if test="string-length($str) &gt; 0">
14317
- <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">
14330
+ <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">
14331
+ <xsl:if test="normalize-space($writing-mode) != ''">
14332
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
14333
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
14334
+ </xsl:if>
14335
+ <xsl:variable name="char" select="substring($str,1,1)"/>
14336
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
14337
+ <xsl:attribute name="reference-orientation">0</xsl:attribute>
14338
+ </xsl:if>
14318
14339
  <fo:block-container width="1em">
14319
- <fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
14340
+ <fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
14320
14341
  </fo:block-container>
14321
14342
  </fo:inline-container>
14322
14343
  <xsl:call-template name="insertVerticalChar">
14323
14344
  <xsl:with-param name="str" select="substring($str, 2)"/>
14345
+ <xsl:with-param name="writing-mode" select="$writing-mode"/>
14346
+ <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
14324
14347
  </xsl:call-template>
14325
14348
  </xsl:if>
14326
14349
  </xsl:template>