metanorma-m3aawg 2.0.6 → 2.0.7

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: 2850f294e2f6aeb4ffd070c6c37f914ee69d535b427b59141c3ab53044766eb1
4
- data.tar.gz: d91733cd2ecc9c60e7756d66dcf644ef69d441bc8cb03f6cc4fce63555f61363
3
+ metadata.gz: a7d05796a28d0ab9c3b338e4fc231532ea41441f9432aa70226e325867d6ab80
4
+ data.tar.gz: 88389dfc70f85f9b8afd65f6f49b31d51cb69c8f55b0643e42afd257433fdb41
5
5
  SHA512:
6
- metadata.gz: 93b3b0adf42cf43ff5f1a190cbc7147ef4ce04d74bd172805db989f19203c79e7358fdc5fedf2d12155a0206e7fcef39bc9c2e5f1469a85db354c24c8c351cc2
7
- data.tar.gz: ea706f155218d5a6de0856945b52302fbc694c48d0cae9f2b73a09b5ecb08599171089989baf27e24f3ada444dd12e54eaf38bbaf8b59d06190ec351067ad36f
6
+ metadata.gz: 3de1fd4a41075b304ea26ebf46528e252ee6bfd1f399e52e2560b441960dec1bcb79565e0ff1fff97f6fb5a99c78839e358499e20b01d4c96ca993bc1a475da6
7
+ data.tar.gz: ad695db3e5fc6ca79f3f71be01b7aa3920a2220cc7588c31c9e8b4a09517d0729b32a32a3691003df799fa2ad37d3567011d0536cd02a9ae35f2882e3fe0871c
@@ -2021,8 +2021,27 @@
2021
2021
  <xsl:sort select="@displayorder" data-type="number"/>
2022
2022
  <xsl:apply-templates select="."/>
2023
2023
  </xsl:for-each>
2024
- </xsl:template><xsl:template match="text()">
2025
- <xsl:value-of select="."/>
2024
+ </xsl:template><xsl:variable name="tag_open">###fo:inline###</xsl:variable><xsl:variable name="tag_close">###/fo:inline###</xsl:variable><xsl:template match="text()" name="text">
2025
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2026
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
2027
+ <xsl:call-template name="replace_fo_inline">
2028
+ <xsl:with-param name="text" select="$text"/>
2029
+ </xsl:call-template>
2030
+ </xsl:template><xsl:template name="replace_fo_inline">
2031
+ <xsl:param name="text"/>
2032
+ <xsl:choose>
2033
+ <xsl:when test="contains($text, $tag_open)">
2034
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
2035
+ <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text>
2036
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
2037
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
2038
+ <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text>
2039
+ <xsl:call-template name="replace_fo_inline">
2040
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
2041
+ </xsl:call-template>
2042
+ </xsl:when>
2043
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
2044
+ </xsl:choose>
2026
2045
  </xsl:template><xsl:template match="*[local-name()='br']">
2027
2046
  <xsl:value-of select="$linebreak"/>
2028
2047
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
@@ -5654,7 +5673,8 @@
5654
5673
  <fo:inline><xsl:apply-templates/></fo:inline>
5655
5674
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
5656
5675
  <xsl:if test="normalize-space() != ''">
5657
- <xsl:value-of select="."/>
5676
+ <!-- <xsl:value-of select="."/> -->
5677
+ <xsl:call-template name="text"/>
5658
5678
  </xsl:if>
5659
5679
  </xsl:template><xsl:template match="*[local-name() = 'quote']">
5660
5680
  <fo:block-container margin-left="0mm">
@@ -2021,8 +2021,27 @@
2021
2021
  <xsl:sort select="@displayorder" data-type="number"/>
2022
2022
  <xsl:apply-templates select="."/>
2023
2023
  </xsl:for-each>
2024
- </xsl:template><xsl:template match="text()">
2025
- <xsl:value-of select="."/>
2024
+ </xsl:template><xsl:variable name="tag_open">###fo:inline###</xsl:variable><xsl:variable name="tag_close">###/fo:inline###</xsl:variable><xsl:template match="text()" name="text">
2025
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2026
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
2027
+ <xsl:call-template name="replace_fo_inline">
2028
+ <xsl:with-param name="text" select="$text"/>
2029
+ </xsl:call-template>
2030
+ </xsl:template><xsl:template name="replace_fo_inline">
2031
+ <xsl:param name="text"/>
2032
+ <xsl:choose>
2033
+ <xsl:when test="contains($text, $tag_open)">
2034
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
2035
+ <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text>
2036
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
2037
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
2038
+ <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text>
2039
+ <xsl:call-template name="replace_fo_inline">
2040
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
2041
+ </xsl:call-template>
2042
+ </xsl:when>
2043
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
2044
+ </xsl:choose>
2026
2045
  </xsl:template><xsl:template match="*[local-name()='br']">
2027
2046
  <xsl:value-of select="$linebreak"/>
2028
2047
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
@@ -5654,7 +5673,8 @@
5654
5673
  <fo:inline><xsl:apply-templates/></fo:inline>
5655
5674
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
5656
5675
  <xsl:if test="normalize-space() != ''">
5657
- <xsl:value-of select="."/>
5676
+ <!-- <xsl:value-of select="."/> -->
5677
+ <xsl:call-template name="text"/>
5658
5678
  </xsl:if>
5659
5679
  </xsl:template><xsl:template match="*[local-name() = 'quote']">
5660
5680
  <fo:block-container margin-left="0mm">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3AAWG
3
- VERSION = "2.0.6".freeze
3
+ VERSION = "2.0.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-m3aawg
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
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-21 00:00:00.000000000 Z
11
+ date: 2022-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities