metanorma-csa 2.2.9 → 2.2.10

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: b1648e14c9cda03da9a4b031dbc500e78448349e94e472c9ea36a3ca927b0d7e
4
- data.tar.gz: 47219702f5f29f80856af4b12b31ceb47330cccd405ee9a0b2bb02b731012d4f
3
+ metadata.gz: 5ec8990e49baa6f98f5a7354d3d7b0e488a049540bb1e5fc33085534b8f89745
4
+ data.tar.gz: 59eadeae945582a8c9302ce007307bf5adceb90ffc259f4c945369114a0ced91
5
5
  SHA512:
6
- metadata.gz: 5bc0dbe274de93cb6eeb4ca960581a11c3c271dfe9ce44a395c134793e21ce7b8123f6f87cfd4efad70b5d87691ebf027087c9c41d57b101b3024f87c8c1b06d
7
- data.tar.gz: 8a8da782cc685c5d31eb0745da27ff25fbc81b100387f1e2ee027ca1a73ea408989525782553b19a90151ccb8db682f17327ceee6f2a347af673f1b67e5080b4
6
+ metadata.gz: 3c855e74521c51bd16042c69d239a22b96d57676cbac2c9016db610b5a4f81c8966aae2eb3dd15405872a1c2ccb855efd905f4d52253070b38806359da850a49
7
+ data.tar.gz: fef69e7d6fab55890c6217d096c90b1750792e2d292f86df167aa379145895ee2dad42a993e9ef7ca8ec78f1eb76207e24f45273d329070013c80a52b433051e
@@ -2467,7 +2467,7 @@
2467
2467
  </xsl:attribute>
2468
2468
  </xsl:for-each>
2469
2469
 
2470
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
2470
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
2471
2471
  <xsl:if test="$isNoteOrFnExist = 'true'">
2472
2472
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2473
2473
  </xsl:if>
@@ -2511,7 +2511,7 @@
2511
2511
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2512
2512
  </xsl:when>
2513
2513
  <xsl:otherwise>
2514
- <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
2514
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
2515
2515
  </xsl:otherwise>
2516
2516
  </xsl:choose>
2517
2517
 
@@ -3029,7 +3029,7 @@
3029
3029
  <xsl:param name="colwidths"/>
3030
3030
  <xsl:param name="colgroup"/>
3031
3031
 
3032
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3032
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3033
3033
 
3034
3034
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
3035
3035
 
@@ -3102,6 +3102,7 @@
3102
3102
  <xsl:apply-templates select="../*[local-name()='p']"/>
3103
3103
  <xsl:apply-templates select="../*[local-name()='dl']"/>
3104
3104
  <xsl:apply-templates select="../*[local-name()='note']"/>
3105
+ <xsl:apply-templates select="../*[local-name()='example']"/>
3105
3106
  <xsl:apply-templates select="../*[local-name()='source']"/>
3106
3107
 
3107
3108
  <xsl:variable name="isDisplayRowSeparator">
@@ -3110,7 +3111,7 @@
3110
3111
 
3111
3112
  <!-- horizontal row separator -->
3112
3113
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
3113
- <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
3114
+ <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
3114
3115
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
3115
3116
 
3116
3117
  <xsl:call-template name="setBordersTableArray"/>
@@ -3371,13 +3372,13 @@
3371
3372
  </fo:table-cell>
3372
3373
  </xsl:template> <!-- td -->
3373
3374
 
3374
- <xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
3375
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
3375
3376
 
3376
3377
  <fo:block xsl:use-attribute-sets="table-note-style">
3377
3378
 
3378
3379
  <xsl:call-template name="refine_table-note-style"/>
3379
3380
 
3380
- <!-- Table's note name (NOTE, for example) -->
3381
+ <!-- Table's note/example name (NOTE, for example) -->
3381
3382
  <fo:inline xsl:use-attribute-sets="table-note-name-style">
3382
3383
 
3383
3384
  <xsl:call-template name="refine_table-note-name-style"/>
@@ -3391,7 +3392,7 @@
3391
3392
 
3392
3393
  </xsl:template> <!-- table/note -->
3393
3394
 
3394
- <xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
3395
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
3395
3396
  <xsl:apply-templates/>
3396
3397
  </xsl:template>
3397
3398
 
@@ -4945,7 +4946,10 @@
4945
4946
  </xsl:choose>
4946
4947
  </xsl:variable>
4947
4948
 
4948
- <xsl:value-of select="$text9"/>
4949
+ <!-- replace sequence #x200B and space TO space -->
4950
+ <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
4951
+
4952
+ <xsl:value-of select="$text10"/>
4949
4953
  </xsl:template>
4950
4954
 
4951
4955
  <xsl:template name="add-zero-spaces-link-java">
@@ -6034,7 +6038,7 @@
6034
6038
  <xsl:call-template name="insert_basic_link">
6035
6039
  <xsl:with-param name="element">
6036
6040
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
6037
- <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://'))">
6041
+ <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'])">
6038
6042
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
6039
6043
  </xsl:if>
6040
6044
  <xsl:if test="parent::*[local-name() = 'add']">
@@ -8322,6 +8326,12 @@
8322
8326
 
8323
8327
  </xsl:template>
8324
8328
 
8329
+ <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
8330
+ <fo:inline xsl:use-attribute-sets="example-name-style">
8331
+ <xsl:apply-templates/>
8332
+ </fo:inline>
8333
+ </xsl:template>
8334
+
8325
8335
  <xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
8326
8336
  <xsl:param name="fo_element">block</xsl:param>
8327
8337
 
@@ -8895,6 +8905,9 @@
8895
8905
  <xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
8896
8906
  </xsl:choose>
8897
8907
  </xsl:when>
8908
+ <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
8909
+ <xsl:value-of select="@label"/>
8910
+ </xsl:when>
8898
8911
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
8899
8912
 
8900
8913
  <!-- Example: for BSI <?list-start 2?> -->
@@ -8952,10 +8965,10 @@
8952
8965
  <xsl:when test="$type = 'arabic'">
8953
8966
  1)
8954
8967
  </xsl:when>
8955
- <xsl:when test="$type = 'alphabet'">
8968
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
8956
8969
  a)
8957
8970
  </xsl:when>
8958
- <xsl:when test="$type = 'alphabet_upper'">
8971
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
8959
8972
  A)
8960
8973
  </xsl:when>
8961
8974
  <xsl:when test="$type = 'roman'">
@@ -1012,6 +1012,7 @@
1012
1012
  <ref name="del"/>
1013
1013
  <ref name="span"/>
1014
1014
  <ref name="erefstack"/>
1015
+ <ref name="date_inline"/>
1015
1016
  </choice>
1016
1017
  </define>
1017
1018
  <define name="add">
@@ -1053,6 +1054,23 @@
1053
1054
  </oneOrMore>
1054
1055
  </element>
1055
1056
  </define>
1057
+ <define name="date_inline">
1058
+ <element name="date">
1059
+ <attribute name="value"/>
1060
+ <optional>
1061
+ <attribute name="format"/>
1062
+ </optional>
1063
+ <optional>
1064
+ <attribute name="language"/>
1065
+ </optional>
1066
+ <optional>
1067
+ <attribute name="script"/>
1068
+ </optional>
1069
+ <optional>
1070
+ <attribute name="locale"/>
1071
+ </optional>
1072
+ </element>
1073
+ </define>
1056
1074
  <define name="concept">
1057
1075
  <element name="concept">
1058
1076
  <optional>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csa
3
- VERSION = "2.2.9".freeze
3
+ VERSION = "2.2.10".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csa
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.9
4
+ version: 2.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-22 00:00:00.000000000 Z
11
+ date: 2023-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic