metanorma-csa 2.4.0 → 2.4.1

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: 4bc590d65850c7513f158d112241ec0ec5b1e301828280a8b8ee5199a22fc497
4
- data.tar.gz: a9a2a83a72c4f40f8097fe06eaa6891c011c0523c82dce55ee5fb8c0f480860d
3
+ metadata.gz: 33d743a277d5c4b8e79e72e00babc9a6d893b790aa6d05b20c255fdad5497440
4
+ data.tar.gz: 11f31706e87c44207935ff00b4b04fba1521a946b5a5025d28c20c8a78c95bb2
5
5
  SHA512:
6
- metadata.gz: c42d7ae483db7e718253e7356f3b689cb83c89dbebd6cb8d494292868fb318121194c9a6a54a46b6b08c87f5ee61956545129f40538d3c9710daa9851cd3111f
7
- data.tar.gz: 40a3e0f3820f2f381543bb95ce4b470650f6ee9721ee2f10535b7acc8dae0ebf3e964e3e8a94a497725731efe82815e419cce42f37ef0c546a7314effbd19716
6
+ metadata.gz: aed6f2d3098350158f721f3caf59dcc1347a5677746e7200c686d2440df3af93e2d13efc730fbd89e5cd1d4667562d352a8835b34c0585bf26ef6ed12ba5a060
7
+ data.tar.gz: f1f3a765842c7c35a7d6e04c7bcdb5509da00e81a2ff7430fc87ee3c4755a1b00fbd60b5ea593fac0076072522bc0ca1f4176466d0a772208c53d907161ba87f
@@ -2311,7 +2311,9 @@
2311
2311
  </xsl:template> <!-- license-statement/p -->
2312
2312
 
2313
2313
  <xsl:template match="*[local-name()='legal-statement']">
2314
+ <xsl:param name="isLegacy">false</xsl:param>
2314
2315
  <fo:block xsl:use-attribute-sets="legal-statement-style">
2316
+
2315
2317
  <xsl:apply-templates/>
2316
2318
  </fo:block>
2317
2319
  </xsl:template> <!-- legal-statement -->
@@ -4573,13 +4575,14 @@
4573
4575
  <!-- ================= -->
4574
4576
  <!-- Added,deleted text -->
4575
4577
  <!-- ================= -->
4576
- <xsl:template match="*[local-name()='add']" name="tag_add">
4578
+ <xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
4577
4579
  <xsl:param name="skip">true</xsl:param>
4578
4580
  <xsl:param name="block">false</xsl:param>
4579
4581
  <xsl:param name="type"/>
4580
4582
  <xsl:param name="text-align"/>
4581
4583
  <xsl:choose>
4582
- <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
4584
+ <xsl:when test="starts-with(., $ace_tag) or local-name() = 'change-open-tag' or local-name() = 'change-close-tag'"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
4585
+ <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
4583
4586
  <xsl:choose>
4584
4587
  <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab']) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
4585
4588
  <xsl:otherwise>
@@ -4587,12 +4590,32 @@
4587
4590
  <xsl:call-template name="insertTag">
4588
4591
  <xsl:with-param name="type">
4589
4592
  <xsl:choose>
4593
+ <xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
4594
+ <xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
4590
4595
  <xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
4591
4596
  <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
4592
4597
  </xsl:choose>
4593
4598
  </xsl:with-param>
4594
- <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
4595
- <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
4599
+ <xsl:with-param name="kind">
4600
+ <xsl:choose>
4601
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
4602
+ <xsl:value-of select="text()"/>
4603
+ </xsl:when>
4604
+ <xsl:otherwise>
4605
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
4606
+ </xsl:otherwise>
4607
+ </xsl:choose>
4608
+ </xsl:with-param>
4609
+ <xsl:with-param name="value">
4610
+ <xsl:choose>
4611
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
4612
+ <xsl:value-of select="*[local-name() = 'sub']"/>
4613
+ </xsl:when>
4614
+ <xsl:otherwise>
4615
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
4616
+ </xsl:otherwise>
4617
+ </xsl:choose>
4618
+ </xsl:with-param>
4596
4619
  </xsl:call-template>
4597
4620
  </xsl:variable>
4598
4621
  <xsl:choose>
@@ -6800,11 +6823,17 @@
6800
6823
  </xsl:when>
6801
6824
  <xsl:otherwise>
6802
6825
 
6826
+ <xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
6827
+ <xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
6828
+
6803
6829
  <xsl:variable name="element">
6804
6830
  <xsl:choose>
6805
6831
  <xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
6806
6832
  <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
6807
6833
  </xsl:when>
6834
+ <xsl:when test="not(ancestor::*[local-name() = 'figure'])">
6835
+ <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
6836
+ </xsl:when>
6808
6837
  <xsl:otherwise>
6809
6838
  <fo:block xsl:use-attribute-sets="image-style">
6810
6839
  <xsl:if test="ancestor::*[local-name() = 'dt']">
@@ -6820,10 +6849,24 @@
6820
6849
  <xsl:copy-of select="@*"/>
6821
6850
  <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
6822
6851
  <fo:instream-foreign-object fox:alt-text="{$alt-text}">
6823
- <xsl:if test="$isGenerateTableIF = 'false'">
6824
- <xsl:attribute name="width">100%</xsl:attribute>
6825
- </xsl:if>
6826
- <xsl:attribute name="content-height">100%</xsl:attribute>
6852
+
6853
+ <xsl:choose>
6854
+ <xsl:when test="$image_class = 'corrigenda-tag'">
6855
+ <xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
6856
+ <xsl:attribute name="baseline-shift">-10%</xsl:attribute>
6857
+ <xsl:if test="$ancestor_table_cell = 'true'">
6858
+ <xsl:attribute name="baseline-shift">-25%</xsl:attribute>
6859
+ </xsl:if>
6860
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
6861
+ </xsl:when>
6862
+ <xsl:otherwise>
6863
+ <xsl:if test="$isGenerateTableIF = 'false'">
6864
+ <xsl:attribute name="width">100%</xsl:attribute>
6865
+ </xsl:if>
6866
+ <xsl:attribute name="content-height">100%</xsl:attribute>
6867
+ </xsl:otherwise>
6868
+ </xsl:choose>
6869
+
6827
6870
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
6828
6871
  <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
6829
6872
  <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
@@ -9027,13 +9070,19 @@
9027
9070
  <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9028
9071
  </xsl:when>
9029
9072
  <!-- if there isn't element with id 'from', then create 'bookmark' here -->
9030
- <xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
9073
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
9074
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9075
+ </xsl:when>
9076
+ <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
9031
9077
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9032
9078
  </xsl:when>
9033
9079
  </xsl:choose>
9034
9080
 
9035
9081
  </xsl:template>
9036
9082
 
9083
+ <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
9084
+ <xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
9085
+
9037
9086
  <xsl:template match="*[local-name() = 'name']/text()">
9038
9087
  <!-- 0xA0 to space replacement -->
9039
9088
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -10616,7 +10665,7 @@
10616
10665
 
10617
10666
  <xsl:template name="printEdition">
10618
10667
  <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
10619
- <xsl:text> </xsl:text>
10668
+
10620
10669
  <xsl:choose>
10621
10670
  <xsl:when test="$edition_i18n != ''">
10622
10671
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -244,6 +244,9 @@
244
244
  <data type="ID"/>
245
245
  </attribute>
246
246
  <attribute name="reviewer"/>
247
+ <optional>
248
+ <attribute name="type"/>
249
+ </optional>
247
250
  <optional>
248
251
  <attribute name="date">
249
252
  <data type="dateTime"/>
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.12 -->
20
+ <!-- VERSION v1.3.0 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -146,6 +146,9 @@
146
146
  <data type="boolean"/>
147
147
  </attribute>
148
148
  </optional>
149
+ <optional>
150
+ <attribute name="style"/>
151
+ </optional>
149
152
  <oneOrMore>
150
153
  <ref name="PureTextElement"/>
151
154
  </oneOrMore>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csa
3
- VERSION = "2.4.0".freeze
3
+ VERSION = "2.4.1".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.4.0
4
+ version: 2.4.1
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-01-09 00:00:00.000000000 Z
11
+ date: 2024-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic