metanorma-cc 2.0.5 → 2.0.6
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 +81 -21
- data/lib/metanorma/cc/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa2c9dce7ea4be7d9d9e0ecb41409259b969b3e8aadac3a4c7ce4c24b3b28c56
|
4
|
+
data.tar.gz: be0b9e664feb6820742fd5a87b78accc36011f196ede0d5cb8f5b3d683d0f837
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ae65d5c95a76259cf80ae730aae3691664c915dc03a7d3245993c806d39f2c01035d8b944901786b16006e3f7211ec85dcf65efc583d1a2be8848d587c3e673
|
7
|
+
data.tar.gz: 2a020aee734ba96c89a07c9c884341316ff4bb8304d4193cabb60c2fb228efeec284456b8b8b1f1712cea3ef2456e0743dee4ac9dd7cf93895d25fef10974f5e
|
@@ -560,7 +560,7 @@
|
|
560
560
|
</xsl:template>
|
561
561
|
|
562
562
|
|
563
|
-
<xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:
|
563
|
+
<xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:variable name="lang">
|
564
564
|
<xsl:call-template name="getLang"/>
|
565
565
|
</xsl:variable><xsl:variable name="pageWidth_">
|
566
566
|
210
|
@@ -5025,7 +5025,51 @@
|
|
5025
5025
|
<xsl:with-param name="text" select="$text_step1"/>
|
5026
5026
|
</xsl:call-template>
|
5027
5027
|
</xsl:variable>
|
5028
|
-
|
5028
|
+
|
5029
|
+
<!-- <xsl:value-of select="$text_step2"/> -->
|
5030
|
+
|
5031
|
+
<!-- add zero-width space after space -->
|
5032
|
+
<xsl:variable name="text_step3" select="java:replaceAll(java:java.lang.String.new($text_step2),' ',' ')"/>
|
5033
|
+
|
5034
|
+
<!-- split text by zero-width space -->
|
5035
|
+
<xsl:variable name="text_step4">
|
5036
|
+
<xsl:call-template name="split">
|
5037
|
+
<xsl:with-param name="pText" select="$text_step3"/>
|
5038
|
+
<xsl:with-param name="sep" select="$zero_width_space"/>
|
5039
|
+
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
5040
|
+
<xsl:with-param name="keep_sep">true</xsl:with-param>
|
5041
|
+
</xsl:call-template>
|
5042
|
+
</xsl:variable>
|
5043
|
+
|
5044
|
+
<xsl:for-each select="xalan:nodeset($text_step4)/item">
|
5045
|
+
<xsl:choose>
|
5046
|
+
<xsl:when test="string-length() > 30"> <!-- word with length more than 30 will be interspersed with zero-width space -->
|
5047
|
+
<xsl:call-template name="interspers">
|
5048
|
+
<xsl:with-param name="str" select="."/>
|
5049
|
+
</xsl:call-template>
|
5050
|
+
</xsl:when>
|
5051
|
+
<xsl:otherwise>
|
5052
|
+
<xsl:value-of select="."/>
|
5053
|
+
</xsl:otherwise>
|
5054
|
+
</xsl:choose>
|
5055
|
+
</xsl:for-each>
|
5056
|
+
|
5057
|
+
</xsl:template><xsl:template name="interspers">
|
5058
|
+
<xsl:param name="str"/>
|
5059
|
+
<xsl:param name="char" select="$zero_width_space"/>
|
5060
|
+
<xsl:if test="$str != ''">
|
5061
|
+
<xsl:value-of select="substring($str, 1, 1)"/>
|
5062
|
+
|
5063
|
+
<xsl:variable name="next_char" select="substring($str, 2, 1)"/>
|
5064
|
+
<xsl:if test="not(contains(concat(' -.:=_— ', $char), $next_char))">
|
5065
|
+
<xsl:value-of select="$char"/>
|
5066
|
+
</xsl:if>
|
5067
|
+
|
5068
|
+
<xsl:call-template name="interspers">
|
5069
|
+
<xsl:with-param name="str" select="substring($str, 2)"/>
|
5070
|
+
<xsl:with-param name="char" select="$char"/>
|
5071
|
+
</xsl:call-template>
|
5072
|
+
</xsl:if>
|
5029
5073
|
</xsl:template><xsl:template match="*" mode="syntax_highlight">
|
5030
5074
|
<xsl:apply-templates mode="syntax_highlight"/>
|
5031
5075
|
</xsl:template><xsl:variable name="syntax_highlight_styles_">
|
@@ -5533,11 +5577,24 @@
|
|
5533
5577
|
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
5534
5578
|
<xsl:text>— </xsl:text>
|
5535
5579
|
<xsl:apply-templates/>
|
5536
|
-
</xsl:template><xsl:
|
5580
|
+
</xsl:template><xsl:variable name="bibitems_">
|
5581
|
+
<xsl:for-each select="//*[local-name() = 'bibitem']">
|
5582
|
+
<xsl:copy-of select="."/>
|
5583
|
+
</xsl:for-each>
|
5584
|
+
</xsl:variable><xsl:variable name="bibitems" select="xalan:nodeset($bibitems_)"/><xsl:variable name="bibitems_hidden_">
|
5585
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden='true']">
|
5586
|
+
<xsl:copy-of select="."/>
|
5587
|
+
</xsl:for-each>
|
5588
|
+
<xsl:for-each select="//*[local-name() = 'references'][@hidden='true']//*[local-name() = 'bibitem']">
|
5589
|
+
<xsl:copy-of select="."/>
|
5590
|
+
</xsl:for-each>
|
5591
|
+
</xsl:variable><xsl:variable name="bibitems_hidden" select="xalan:nodeset($bibitems_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
|
5537
5592
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
5538
|
-
<xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/>
|
5593
|
+
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
|
5594
|
+
<xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
|
5539
5595
|
<xsl:choose>
|
5540
|
-
<xsl:when test="$external-destination != '' or not(key('bibitems_hidden', $current_bibitemid))"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link (internal to the bibitem or external) -->
|
5596
|
+
<!-- <xsl:when test="$external-destination != '' or not(key('bibitems_hidden', $current_bibitemid))"> --> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link (internal to the bibitem or external) -->
|
5597
|
+
<xsl:when test="$external-destination != '' or not($bibitems_hidden/*[local-name() ='bibitem'][@id = $current_bibitemid])"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link (internal to the bibitem or external) -->
|
5541
5598
|
<fo:inline xsl:use-attribute-sets="eref-style">
|
5542
5599
|
<xsl:if test="@type = 'footnote'">
|
5543
5600
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
@@ -6667,7 +6724,7 @@
|
|
6667
6724
|
<xsl:copy>
|
6668
6725
|
<xsl:copy-of select="@*"/>
|
6669
6726
|
<!-- copy all elements from bibliography except 'Normative references' (moved to 'sections') -->
|
6670
|
-
<xsl:for-each select="*[not(@normative='true') and not(*[
|
6727
|
+
<xsl:for-each select="*[not(@normative='true') and not(*[@normative='true'])]">
|
6671
6728
|
<xsl:sort select="@displayorder" data-type="number"/>
|
6672
6729
|
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
6673
6730
|
</xsl:for-each>
|
@@ -6916,22 +6973,25 @@
|
|
6916
6973
|
<xsl:param name="pText" select="."/>
|
6917
6974
|
<xsl:param name="sep" select="','"/>
|
6918
6975
|
<xsl:param name="normalize-space" select="'true'"/>
|
6976
|
+
<xsl:param name="keep_sep" select="'false'"/>
|
6919
6977
|
<xsl:if test="string-length($pText) >0">
|
6920
|
-
|
6921
|
-
|
6922
|
-
|
6923
|
-
|
6924
|
-
|
6925
|
-
|
6926
|
-
|
6927
|
-
|
6928
|
-
|
6929
|
-
|
6930
|
-
|
6931
|
-
<xsl:
|
6932
|
-
|
6933
|
-
|
6934
|
-
|
6978
|
+
<item>
|
6979
|
+
<xsl:choose>
|
6980
|
+
<xsl:when test="$normalize-space = 'true'">
|
6981
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
6982
|
+
</xsl:when>
|
6983
|
+
<xsl:otherwise>
|
6984
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
6985
|
+
</xsl:otherwise>
|
6986
|
+
</xsl:choose>
|
6987
|
+
</item>
|
6988
|
+
<xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><item><xsl:value-of select="$sep"/></item></xsl:if>
|
6989
|
+
<xsl:call-template name="split">
|
6990
|
+
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
6991
|
+
<xsl:with-param name="sep" select="$sep"/>
|
6992
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
6993
|
+
<xsl:with-param name="keep_sep" select="$keep_sep"/>
|
6994
|
+
</xsl:call-template>
|
6935
6995
|
</xsl:if>
|
6936
6996
|
</xsl:template><xsl:template name="getDocumentId">
|
6937
6997
|
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
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.0.
|
4
|
+
version: 2.0.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: 2022-03-
|
11
|
+
date: 2022-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
250
|
- !ruby/object:Gem::Version
|
251
251
|
version: '0'
|
252
252
|
requirements: []
|
253
|
-
rubygems_version: 3.
|
253
|
+
rubygems_version: 3.3.9
|
254
254
|
signing_key:
|
255
255
|
specification_version: 4
|
256
256
|
summary: metanorma-cc lets you write CalConnect standards in AsciiDoc.
|