metanorma-cc 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 +4 -4
- data/lib/isodoc/cc/cc.standard.xsl +59 -10
- data/lib/metanorma/cc/basicdoc.rng +3 -0
- data/lib/metanorma/cc/isodoc.rng +4 -1
- data/lib/metanorma/cc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a74278944515a96765355e89d30bfa38d646f59103f31f99246ee3a41ef94881
|
4
|
+
data.tar.gz: 72d2d58b0a0a96269a64e64b1a98852c63d7e4d11073939a39133e2bcbf89fc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e4b30978683747f20cd9c4461e9d2b0a262f10fb4c6b0d8a4b7e8fcc97bf58c09681b8a362b4c9f97c0147c570fd3d56a6e98f661be0188c539f0b6df0e72d3
|
7
|
+
data.tar.gz: fe54f010d18b64cd5ea8a5189df24b9b7c92140442e2cd543e2a18f22fd69f982b2ae7db8b2290ae1284d063537eb70f8de2414ac6fcb32f56464aafb4e5e054
|
@@ -2295,7 +2295,9 @@
|
|
2295
2295
|
</xsl:template> <!-- license-statement/p -->
|
2296
2296
|
|
2297
2297
|
<xsl:template match="*[local-name()='legal-statement']">
|
2298
|
+
<xsl:param name="isLegacy">false</xsl:param>
|
2298
2299
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
2300
|
+
|
2299
2301
|
<xsl:apply-templates/>
|
2300
2302
|
</fo:block>
|
2301
2303
|
</xsl:template> <!-- legal-statement -->
|
@@ -4560,13 +4562,14 @@
|
|
4560
4562
|
<!-- ================= -->
|
4561
4563
|
<!-- Added,deleted text -->
|
4562
4564
|
<!-- ================= -->
|
4563
|
-
<xsl:template match="*[local-name()='add']" name="tag_add">
|
4565
|
+
<xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
|
4564
4566
|
<xsl:param name="skip">true</xsl:param>
|
4565
4567
|
<xsl:param name="block">false</xsl:param>
|
4566
4568
|
<xsl:param name="type"/>
|
4567
4569
|
<xsl:param name="text-align"/>
|
4568
4570
|
<xsl:choose>
|
4569
|
-
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start
|
4571
|
+
<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
|
4572
|
+
<change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
|
4570
4573
|
<xsl:choose>
|
4571
4574
|
<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>
|
4572
4575
|
<xsl:otherwise>
|
@@ -4574,12 +4577,32 @@
|
|
4574
4577
|
<xsl:call-template name="insertTag">
|
4575
4578
|
<xsl:with-param name="type">
|
4576
4579
|
<xsl:choose>
|
4580
|
+
<xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
|
4581
|
+
<xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
|
4577
4582
|
<xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
|
4578
4583
|
<xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
|
4579
4584
|
</xsl:choose>
|
4580
4585
|
</xsl:with-param>
|
4581
|
-
<xsl:with-param name="kind"
|
4582
|
-
|
4586
|
+
<xsl:with-param name="kind">
|
4587
|
+
<xsl:choose>
|
4588
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
4589
|
+
<xsl:value-of select="text()"/>
|
4590
|
+
</xsl:when>
|
4591
|
+
<xsl:otherwise>
|
4592
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
4593
|
+
</xsl:otherwise>
|
4594
|
+
</xsl:choose>
|
4595
|
+
</xsl:with-param>
|
4596
|
+
<xsl:with-param name="value">
|
4597
|
+
<xsl:choose>
|
4598
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
4599
|
+
<xsl:value-of select="*[local-name() = 'sub']"/>
|
4600
|
+
</xsl:when>
|
4601
|
+
<xsl:otherwise>
|
4602
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
4603
|
+
</xsl:otherwise>
|
4604
|
+
</xsl:choose>
|
4605
|
+
</xsl:with-param>
|
4583
4606
|
</xsl:call-template>
|
4584
4607
|
</xsl:variable>
|
4585
4608
|
<xsl:choose>
|
@@ -6783,11 +6806,17 @@
|
|
6783
6806
|
</xsl:when>
|
6784
6807
|
<xsl:otherwise>
|
6785
6808
|
|
6809
|
+
<xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
|
6810
|
+
<xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
|
6811
|
+
|
6786
6812
|
<xsl:variable name="element">
|
6787
6813
|
<xsl:choose>
|
6788
6814
|
<xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
|
6789
6815
|
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
6790
6816
|
</xsl:when>
|
6817
|
+
<xsl:when test="not(ancestor::*[local-name() = 'figure'])">
|
6818
|
+
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
6819
|
+
</xsl:when>
|
6791
6820
|
<xsl:otherwise>
|
6792
6821
|
<fo:block xsl:use-attribute-sets="image-style">
|
6793
6822
|
<xsl:if test="ancestor::*[local-name() = 'dt']">
|
@@ -6803,10 +6832,24 @@
|
|
6803
6832
|
<xsl:copy-of select="@*"/>
|
6804
6833
|
<!-- <fo:block xsl:use-attribute-sets="image-style"> -->
|
6805
6834
|
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
6806
|
-
|
6807
|
-
|
6808
|
-
|
6809
|
-
|
6835
|
+
|
6836
|
+
<xsl:choose>
|
6837
|
+
<xsl:when test="$image_class = 'corrigenda-tag'">
|
6838
|
+
<xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
|
6839
|
+
<xsl:attribute name="baseline-shift">-10%</xsl:attribute>
|
6840
|
+
<xsl:if test="$ancestor_table_cell = 'true'">
|
6841
|
+
<xsl:attribute name="baseline-shift">-25%</xsl:attribute>
|
6842
|
+
</xsl:if>
|
6843
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
6844
|
+
</xsl:when>
|
6845
|
+
<xsl:otherwise>
|
6846
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
6847
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
6848
|
+
</xsl:if>
|
6849
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
6850
|
+
</xsl:otherwise>
|
6851
|
+
</xsl:choose>
|
6852
|
+
|
6810
6853
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
6811
6854
|
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
6812
6855
|
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
@@ -9018,13 +9061,19 @@
|
|
9018
9061
|
<fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9019
9062
|
</xsl:when>
|
9020
9063
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
9021
|
-
<xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9064
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9065
|
+
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9066
|
+
</xsl:when>
|
9067
|
+
<xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
9022
9068
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9023
9069
|
</xsl:when>
|
9024
9070
|
</xsl:choose>
|
9025
9071
|
|
9026
9072
|
</xsl:template>
|
9027
9073
|
|
9074
|
+
<!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
|
9075
|
+
<xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
|
9076
|
+
|
9028
9077
|
<xsl:template match="*[local-name() = 'name']/text()">
|
9029
9078
|
<!-- 0xA0 to space replacement -->
|
9030
9079
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
@@ -10631,7 +10680,7 @@
|
|
10631
10680
|
|
10632
10681
|
<xsl:template name="printEdition">
|
10633
10682
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
10634
|
-
|
10683
|
+
|
10635
10684
|
<xsl:choose>
|
10636
10685
|
<xsl:when test="$edition_i18n != ''">
|
10637
10686
|
<!-- Example: <edition language="fr">deuxième édition</edition> -->
|
data/lib/metanorma/cc/isodoc.rng
CHANGED
@@ -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.
|
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>
|
data/lib/metanorma/cc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-cc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
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-
|
11
|
+
date: 2024-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|