metanorma-mpfa 0.8.6 → 0.8.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: 4fd2e0c4c3c149f4ceeda19af6ac04bd71710826944af542641c16f3416024bb
4
- data.tar.gz: c146a1602630948d6c1ae188ed0d065d68b975ecf1426c3f8c3c801728125c42
3
+ metadata.gz: 202067696e0d6b20293ca309743593c0f8b3eec1e8f3c06b903e54dcb141f447
4
+ data.tar.gz: 9b6258ea772e6de5769c4bd60a766dfd10836ff93cac7b1335c990715f1fb41f
5
5
  SHA512:
6
- metadata.gz: 8e2b91c471805de9585f8c05aa2820e662a907fa87cdb6c4e516c773f7e98eb70bf8f6f4a3f43c1deefea39993cb81c9f155093755c9b4b5ac29c806cba59dd4
7
- data.tar.gz: a93d8919db0a668d1a5a1d286cb0fc89912bb5ca830a1b25a04d02584dddc75240485ab7a7dfb3a7cd812acfb0c6cea093b1b3c557d452ad0c8e941f64622c01
6
+ metadata.gz: b5aca5e286b07b55aaba0f1ee9093602f807d3c22c887f1487146252d04b0a130061b65a89924c8e3676725f8189c0c7e18846d8af796b880877495a86d47bca
7
+ data.tar.gz: 4d154851ff7f268dcf7ab2cff29368067bd073d51726fec8bd3ad1c64472c61e06d826328f6bf692a533e387f97e23607461b5585d5a212f5e90b6dc5709b5b4
@@ -1898,8 +1898,27 @@
1898
1898
  <xsl:sort select="@displayorder" data-type="number"/>
1899
1899
  <xsl:apply-templates select="."/>
1900
1900
  </xsl:for-each>
1901
- </xsl:template><xsl:template match="text()">
1902
- <xsl:value-of select="."/>
1901
+ </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">
1902
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
1903
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
1904
+ <xsl:call-template name="replace_fo_inline">
1905
+ <xsl:with-param name="text" select="$text"/>
1906
+ </xsl:call-template>
1907
+ </xsl:template><xsl:template name="replace_fo_inline">
1908
+ <xsl:param name="text"/>
1909
+ <xsl:choose>
1910
+ <xsl:when test="contains($text, $tag_open)">
1911
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
1912
+ <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text>
1913
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
1914
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
1915
+ <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text>
1916
+ <xsl:call-template name="replace_fo_inline">
1917
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
1918
+ </xsl:call-template>
1919
+ </xsl:when>
1920
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
1921
+ </xsl:choose>
1903
1922
  </xsl:template><xsl:template match="*[local-name()='br']">
1904
1923
  <xsl:value-of select="$linebreak"/>
1905
1924
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
@@ -5514,7 +5533,8 @@
5514
5533
  <fo:inline><xsl:apply-templates/></fo:inline>
5515
5534
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
5516
5535
  <xsl:if test="normalize-space() != ''">
5517
- <xsl:value-of select="."/>
5536
+ <!-- <xsl:value-of select="."/> -->
5537
+ <xsl:call-template name="text"/>
5518
5538
  </xsl:if>
5519
5539
  </xsl:template><xsl:template match="*[local-name() = 'quote']">
5520
5540
  <fo:block-container margin-left="0mm">
@@ -1898,8 +1898,27 @@
1898
1898
  <xsl:sort select="@displayorder" data-type="number"/>
1899
1899
  <xsl:apply-templates select="."/>
1900
1900
  </xsl:for-each>
1901
- </xsl:template><xsl:template match="text()">
1902
- <xsl:value-of select="."/>
1901
+ </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">
1902
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
1903
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
1904
+ <xsl:call-template name="replace_fo_inline">
1905
+ <xsl:with-param name="text" select="$text"/>
1906
+ </xsl:call-template>
1907
+ </xsl:template><xsl:template name="replace_fo_inline">
1908
+ <xsl:param name="text"/>
1909
+ <xsl:choose>
1910
+ <xsl:when test="contains($text, $tag_open)">
1911
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
1912
+ <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text>
1913
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
1914
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
1915
+ <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text>
1916
+ <xsl:call-template name="replace_fo_inline">
1917
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
1918
+ </xsl:call-template>
1919
+ </xsl:when>
1920
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
1921
+ </xsl:choose>
1903
1922
  </xsl:template><xsl:template match="*[local-name()='br']">
1904
1923
  <xsl:value-of select="$linebreak"/>
1905
1924
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
@@ -5514,7 +5533,8 @@
5514
5533
  <fo:inline><xsl:apply-templates/></fo:inline>
5515
5534
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
5516
5535
  <xsl:if test="normalize-space() != ''">
5517
- <xsl:value-of select="."/>
5536
+ <!-- <xsl:value-of select="."/> -->
5537
+ <xsl:call-template name="text"/>
5518
5538
  </xsl:if>
5519
5539
  </xsl:template><xsl:template match="*[local-name() = 'quote']">
5520
5540
  <fo:block-container margin-left="0mm">
@@ -1898,8 +1898,27 @@
1898
1898
  <xsl:sort select="@displayorder" data-type="number"/>
1899
1899
  <xsl:apply-templates select="."/>
1900
1900
  </xsl:for-each>
1901
- </xsl:template><xsl:template match="text()">
1902
- <xsl:value-of select="."/>
1901
+ </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">
1902
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
1903
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
1904
+ <xsl:call-template name="replace_fo_inline">
1905
+ <xsl:with-param name="text" select="$text"/>
1906
+ </xsl:call-template>
1907
+ </xsl:template><xsl:template name="replace_fo_inline">
1908
+ <xsl:param name="text"/>
1909
+ <xsl:choose>
1910
+ <xsl:when test="contains($text, $tag_open)">
1911
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
1912
+ <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text>
1913
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
1914
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
1915
+ <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text>
1916
+ <xsl:call-template name="replace_fo_inline">
1917
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
1918
+ </xsl:call-template>
1919
+ </xsl:when>
1920
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
1921
+ </xsl:choose>
1903
1922
  </xsl:template><xsl:template match="*[local-name()='br']">
1904
1923
  <xsl:value-of select="$linebreak"/>
1905
1924
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
@@ -5514,7 +5533,8 @@
5514
5533
  <fo:inline><xsl:apply-templates/></fo:inline>
5515
5534
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
5516
5535
  <xsl:if test="normalize-space() != ''">
5517
- <xsl:value-of select="."/>
5536
+ <!-- <xsl:value-of select="."/> -->
5537
+ <xsl:call-template name="text"/>
5518
5538
  </xsl:if>
5519
5539
  </xsl:template><xsl:template match="*[local-name() = 'quote']">
5520
5540
  <fo:block-container margin-left="0mm">
@@ -1898,8 +1898,27 @@
1898
1898
  <xsl:sort select="@displayorder" data-type="number"/>
1899
1899
  <xsl:apply-templates select="."/>
1900
1900
  </xsl:for-each>
1901
- </xsl:template><xsl:template match="text()">
1902
- <xsl:value-of select="."/>
1901
+ </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">
1902
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
1903
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
1904
+ <xsl:call-template name="replace_fo_inline">
1905
+ <xsl:with-param name="text" select="$text"/>
1906
+ </xsl:call-template>
1907
+ </xsl:template><xsl:template name="replace_fo_inline">
1908
+ <xsl:param name="text"/>
1909
+ <xsl:choose>
1910
+ <xsl:when test="contains($text, $tag_open)">
1911
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
1912
+ <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text>
1913
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
1914
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
1915
+ <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text>
1916
+ <xsl:call-template name="replace_fo_inline">
1917
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
1918
+ </xsl:call-template>
1919
+ </xsl:when>
1920
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
1921
+ </xsl:choose>
1903
1922
  </xsl:template><xsl:template match="*[local-name()='br']">
1904
1923
  <xsl:value-of select="$linebreak"/>
1905
1924
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
@@ -5514,7 +5533,8 @@
5514
5533
  <fo:inline><xsl:apply-templates/></fo:inline>
5515
5534
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
5516
5535
  <xsl:if test="normalize-space() != ''">
5517
- <xsl:value-of select="."/>
5536
+ <!-- <xsl:value-of select="."/> -->
5537
+ <xsl:call-template name="text"/>
5518
5538
  </xsl:if>
5519
5539
  </xsl:template><xsl:template match="*[local-name() = 'quote']">
5520
5540
  <fo:block-container margin-left="0mm">
@@ -1898,8 +1898,27 @@
1898
1898
  <xsl:sort select="@displayorder" data-type="number"/>
1899
1899
  <xsl:apply-templates select="."/>
1900
1900
  </xsl:for-each>
1901
- </xsl:template><xsl:template match="text()">
1902
- <xsl:value-of select="."/>
1901
+ </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">
1902
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
1903
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
1904
+ <xsl:call-template name="replace_fo_inline">
1905
+ <xsl:with-param name="text" select="$text"/>
1906
+ </xsl:call-template>
1907
+ </xsl:template><xsl:template name="replace_fo_inline">
1908
+ <xsl:param name="text"/>
1909
+ <xsl:choose>
1910
+ <xsl:when test="contains($text, $tag_open)">
1911
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
1912
+ <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text>
1913
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
1914
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
1915
+ <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text>
1916
+ <xsl:call-template name="replace_fo_inline">
1917
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
1918
+ </xsl:call-template>
1919
+ </xsl:when>
1920
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
1921
+ </xsl:choose>
1903
1922
  </xsl:template><xsl:template match="*[local-name()='br']">
1904
1923
  <xsl:value-of select="$linebreak"/>
1905
1924
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
@@ -5514,7 +5533,8 @@
5514
5533
  <fo:inline><xsl:apply-templates/></fo:inline>
5515
5534
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
5516
5535
  <xsl:if test="normalize-space() != ''">
5517
- <xsl:value-of select="."/>
5536
+ <!-- <xsl:value-of select="."/> -->
5537
+ <xsl:call-template name="text"/>
5518
5538
  </xsl:if>
5519
5539
  </xsl:template><xsl:template match="*[local-name() = 'quote']">
5520
5540
  <fo:block-container margin-left="0mm">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module MPFA
3
- VERSION = "0.8.6".freeze
3
+ VERSION = "0.8.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-mpfa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.8.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