Skip to content

Commit

Permalink
Merge pull request #455 from metanorma/feature/xslt-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jul 24, 2023
2 parents c6ee7b3 + 5e83831 commit b55581a
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 36 deletions.
15 changes: 11 additions & 4 deletions lib/isodoc/itu/itu.implementers-guide.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6193,7 +6193,7 @@
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
<xsl:template match="*[local-name()='tt']/text()" priority="2">
<xsl:choose>
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
<!-- url -->
<xsl:call-template name="add-zero-spaces-link-java"/>
</xsl:when>
Expand Down Expand Up @@ -6655,10 +6655,13 @@
</xsl:choose>
</xsl:variable>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '​')"/>

<!-- replace sequence #x200B and space TO space -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>

<xsl:value-of select="$text10"/>
<xsl:value-of select="$text11"/>
</xsl:template>

<xsl:template name="add-zero-spaces-link-java">
Expand All @@ -6668,8 +6671,12 @@
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '​')"/>

<!-- remove zero-width space at the end -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '​$', '')"/>
</xsl:template>

<!-- add zero space after dash character (for table's entries) -->
Expand Down
15 changes: 11 additions & 4 deletions lib/isodoc/itu/itu.in-force.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6193,7 +6193,7 @@
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
<xsl:template match="*[local-name()='tt']/text()" priority="2">
<xsl:choose>
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
<!-- url -->
<xsl:call-template name="add-zero-spaces-link-java"/>
</xsl:when>
Expand Down Expand Up @@ -6655,10 +6655,13 @@
</xsl:choose>
</xsl:variable>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '​')"/>

<!-- replace sequence #x200B and space TO space -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>

<xsl:value-of select="$text10"/>
<xsl:value-of select="$text11"/>
</xsl:template>

<xsl:template name="add-zero-spaces-link-java">
Expand All @@ -6668,8 +6671,12 @@
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '​')"/>

<!-- remove zero-width space at the end -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '​$', '')"/>
</xsl:template>

<!-- add zero space after dash character (for table's entries) -->
Expand Down
15 changes: 11 additions & 4 deletions lib/isodoc/itu/itu.recommendation-annex.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6193,7 +6193,7 @@
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
<xsl:template match="*[local-name()='tt']/text()" priority="2">
<xsl:choose>
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
<!-- url -->
<xsl:call-template name="add-zero-spaces-link-java"/>
</xsl:when>
Expand Down Expand Up @@ -6655,10 +6655,13 @@
</xsl:choose>
</xsl:variable>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '​')"/>

<!-- replace sequence #x200B and space TO space -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>

<xsl:value-of select="$text10"/>
<xsl:value-of select="$text11"/>
</xsl:template>

<xsl:template name="add-zero-spaces-link-java">
Expand All @@ -6668,8 +6671,12 @@
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '​')"/>

<!-- remove zero-width space at the end -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '​$', '')"/>
</xsl:template>

<!-- add zero space after dash character (for table's entries) -->
Expand Down
15 changes: 11 additions & 4 deletions lib/isodoc/itu/itu.recommendation-supplement.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6193,7 +6193,7 @@
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
<xsl:template match="*[local-name()='tt']/text()" priority="2">
<xsl:choose>
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
<!-- url -->
<xsl:call-template name="add-zero-spaces-link-java"/>
</xsl:when>
Expand Down Expand Up @@ -6655,10 +6655,13 @@
</xsl:choose>
</xsl:variable>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '​')"/>

<!-- replace sequence #x200B and space TO space -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>

<xsl:value-of select="$text10"/>
<xsl:value-of select="$text11"/>
</xsl:template>

<xsl:template name="add-zero-spaces-link-java">
Expand All @@ -6668,8 +6671,12 @@
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '​')"/>

<!-- remove zero-width space at the end -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '​$', '')"/>
</xsl:template>

<!-- add zero space after dash character (for table's entries) -->
Expand Down
15 changes: 11 additions & 4 deletions lib/isodoc/itu/itu.recommendation.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6193,7 +6193,7 @@
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
<xsl:template match="*[local-name()='tt']/text()" priority="2">
<xsl:choose>
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
<!-- url -->
<xsl:call-template name="add-zero-spaces-link-java"/>
</xsl:when>
Expand Down Expand Up @@ -6655,10 +6655,13 @@
</xsl:choose>
</xsl:variable>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '​')"/>

<!-- replace sequence #x200B and space TO space -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>

<xsl:value-of select="$text10"/>
<xsl:value-of select="$text11"/>
</xsl:template>

<xsl:template name="add-zero-spaces-link-java">
Expand All @@ -6668,8 +6671,12 @@
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '​')"/>

<!-- remove zero-width space at the end -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '​$', '')"/>
</xsl:template>

<!-- add zero space after dash character (for table's entries) -->
Expand Down
15 changes: 11 additions & 4 deletions lib/isodoc/itu/itu.resolution.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6193,7 +6193,7 @@
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
<xsl:template match="*[local-name()='tt']/text()" priority="2">
<xsl:choose>
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
<!-- url -->
<xsl:call-template name="add-zero-spaces-link-java"/>
</xsl:when>
Expand Down Expand Up @@ -6655,10 +6655,13 @@
</xsl:choose>
</xsl:variable>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '​')"/>

<!-- replace sequence #x200B and space TO space -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>

<xsl:value-of select="$text10"/>
<xsl:value-of select="$text11"/>
</xsl:template>

<xsl:template name="add-zero-spaces-link-java">
Expand All @@ -6668,8 +6671,12 @@
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '​')"/>

<!-- remove zero-width space at the end -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '​$', '')"/>
</xsl:template>

<!-- add zero space after dash character (for table's entries) -->
Expand Down
15 changes: 11 additions & 4 deletions lib/isodoc/itu/itu.service-publication.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6193,7 +6193,7 @@
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
<xsl:template match="*[local-name()='tt']/text()" priority="2">
<xsl:choose>
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
<!-- url -->
<xsl:call-template name="add-zero-spaces-link-java"/>
</xsl:when>
Expand Down Expand Up @@ -6655,10 +6655,13 @@
</xsl:choose>
</xsl:variable>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '​')"/>

<!-- replace sequence #x200B and space TO space -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>

<xsl:value-of select="$text10"/>
<xsl:value-of select="$text11"/>
</xsl:template>

<xsl:template name="add-zero-spaces-link-java">
Expand All @@ -6668,8 +6671,12 @@
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '​')"/>

<!-- remove zero-width space at the end -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '​$', '')"/>
</xsl:template>

<!-- add zero space after dash character (for table's entries) -->
Expand Down
15 changes: 11 additions & 4 deletions lib/isodoc/itu/itu.technical-paper.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6193,7 +6193,7 @@
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
<xsl:template match="*[local-name()='tt']/text()" priority="2">
<xsl:choose>
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
<!-- url -->
<xsl:call-template name="add-zero-spaces-link-java"/>
</xsl:when>
Expand Down Expand Up @@ -6655,10 +6655,13 @@
</xsl:choose>
</xsl:variable>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '​')"/>

<!-- replace sequence #x200B and space TO space -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>

<xsl:value-of select="$text10"/>
<xsl:value-of select="$text11"/>
</xsl:template>

<xsl:template name="add-zero-spaces-link-java">
Expand All @@ -6668,8 +6671,12 @@
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '​')"/>

<!-- remove zero-width space at the end -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '​$', '')"/>
</xsl:template>

<!-- add zero space after dash character (for table's entries) -->
Expand Down
15 changes: 11 additions & 4 deletions lib/isodoc/itu/itu.technical-report.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6193,7 +6193,7 @@
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
<xsl:template match="*[local-name()='tt']/text()" priority="2">
<xsl:choose>
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
<!-- url -->
<xsl:call-template name="add-zero-spaces-link-java"/>
</xsl:when>
Expand Down Expand Up @@ -6655,10 +6655,13 @@
</xsl:choose>
</xsl:variable>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '​')"/>

<!-- replace sequence #x200B and space TO space -->
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>

<xsl:value-of select="$text10"/>
<xsl:value-of select="$text11"/>
</xsl:template>

<xsl:template name="add-zero-spaces-link-java">
Expand All @@ -6668,8 +6671,12 @@
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>

<!-- replace sequence #x200B to one &#x200B -->
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '​')"/>

<!-- remove zero-width space at the end -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '​$', '')"/>
</xsl:template>

<!-- add zero space after dash character (for table's entries) -->
Expand Down

0 comments on commit b55581a

Please sign in to comment.