metanorma-ogc 2.2.4 → 2.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -2083,6 +2083,8 @@
2083
2083
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2084
2084
  <xsl:attribute name="display-align">center</xsl:attribute>
2085
2085
 
2086
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2087
+ <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
2086
2088
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2087
2089
 
2088
2090
  </xsl:attribute-set> <!-- table-header-cell-style -->
@@ -3184,9 +3186,9 @@
3184
3186
 
3185
3187
  <fo:block-container xsl:use-attribute-sets="table-container-style">
3186
3188
 
3187
- <xsl:if test="ancestor::*[local-name()='sections']">
3189
+ <!-- <xsl:if test="ancestor::*[local-name()='sections']"> -->
3188
3190
  <xsl:attribute name="font-size">9pt</xsl:attribute>
3189
- </xsl:if>
3191
+ <!-- </xsl:if> -->
3190
3192
 
3191
3193
  <!-- end table block-container attributes -->
3192
3194
 
@@ -3960,9 +3962,12 @@
3960
3962
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3961
3963
 
3962
3964
  <xsl:variable name="number"><xsl:number/></xsl:variable>
3963
- <xsl:if test="$number mod 2 = 0">
3964
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3965
- </xsl:if>
3965
+ <xsl:attribute name="background-color">
3966
+ <xsl:choose>
3967
+ <xsl:when test="$number mod 2 = 0">rgb(252, 246, 222)</xsl:when>
3968
+ <xsl:otherwise>rgb(254, 252, 245)</xsl:otherwise>
3969
+ </xsl:choose>
3970
+ </xsl:attribute>
3966
3971
 
3967
3972
  <xsl:call-template name="setTableRowAttributes"/>
3968
3973
  <xsl:apply-templates/>
@@ -3983,6 +3988,12 @@
3983
3988
  <xsl:with-param name="default">center</xsl:with-param>
3984
3989
  </xsl:call-template>
3985
3990
 
3991
+ <xsl:if test="starts-with(ancestor::*[local-name() = 'table'][1]/@type, 'recommend') and normalize-space(@align) = ''">
3992
+ <xsl:call-template name="setTextAlignment">
3993
+ <xsl:with-param name="default">left</xsl:with-param>
3994
+ </xsl:call-template>
3995
+ </xsl:if>
3996
+
3986
3997
  <xsl:if test="$lang = 'ar'">
3987
3998
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3988
3999
  </xsl:if>
@@ -4994,8 +5005,10 @@
4994
5005
 
4995
5006
  <!-- 10 -->
4996
5007
 
4997
- 9.5
4998
-
5008
+ <xsl:choose>
5009
+ <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
5010
+ <xsl:otherwise>9.5</xsl:otherwise>
5011
+ </xsl:choose>
4999
5012
 
5000
5013
  </xsl:variable>
5001
5014
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -5013,8 +5026,17 @@
5013
5026
  </fo:inline>
5014
5027
  </xsl:template> <!-- tt -->
5015
5028
 
5029
+ <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
5016
5030
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
5017
- <xsl:call-template name="add_spaces_to_sourcecode"/>
5031
+ <xsl:choose>
5032
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
5033
+ <!-- url -->
5034
+ <xsl:call-template name="add-zero-spaces-link-java"/>
5035
+ </xsl:when>
5036
+ <xsl:otherwise>
5037
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
5038
+ </xsl:otherwise>
5039
+ </xsl:choose>
5018
5040
  </xsl:template>
5019
5041
 
5020
5042
  <xsl:template match="*[local-name()='underline']">
@@ -5370,8 +5392,11 @@
5370
5392
 
5371
5393
  <xsl:template name="add-zero-spaces-link-java">
5372
5394
  <xsl:param name="text" select="."/>
5395
+
5396
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
5397
+ <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
5373
5398
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
5374
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
5399
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
5375
5400
  </xsl:template>
5376
5401
 
5377
5402
  <!-- add zero space after dash character (for table's entries) -->
@@ -7483,8 +7508,10 @@
7483
7508
  <xsl:if test="$current_template = 'standard'">8</xsl:if>
7484
7509
  </xsl:if> -->
7485
7510
 
7486
- 9.5
7487
-
7511
+ <xsl:choose>
7512
+ <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
7513
+ <xsl:otherwise>9.5</xsl:otherwise>
7514
+ </xsl:choose>
7488
7515
 
7489
7516
  </xsl:variable>
7490
7517
 
@@ -8031,7 +8058,8 @@
8031
8058
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
8032
8059
  <fo:block font-size="11pt">
8033
8060
 
8034
- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute>
8061
+ <!-- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute> -->
8062
+ <xsl:attribute name="color">white</xsl:attribute>
8035
8063
 
8036
8064
  <xsl:apply-templates/>
8037
8065
  </fo:block>
@@ -9837,7 +9865,7 @@
9837
9865
 
9838
9866
  <xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
9839
9867
 
9840
- <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'])]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
9868
+ <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
9841
9869
 
9842
9870
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
9843
9871
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
@@ -2083,6 +2083,8 @@
2083
2083
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2084
2084
  <xsl:attribute name="display-align">center</xsl:attribute>
2085
2085
 
2086
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2087
+ <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
2086
2088
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2087
2089
 
2088
2090
  </xsl:attribute-set> <!-- table-header-cell-style -->
@@ -3184,9 +3186,9 @@
3184
3186
 
3185
3187
  <fo:block-container xsl:use-attribute-sets="table-container-style">
3186
3188
 
3187
- <xsl:if test="ancestor::*[local-name()='sections']">
3189
+ <!-- <xsl:if test="ancestor::*[local-name()='sections']"> -->
3188
3190
  <xsl:attribute name="font-size">9pt</xsl:attribute>
3189
- </xsl:if>
3191
+ <!-- </xsl:if> -->
3190
3192
 
3191
3193
  <!-- end table block-container attributes -->
3192
3194
 
@@ -3960,9 +3962,12 @@
3960
3962
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3961
3963
 
3962
3964
  <xsl:variable name="number"><xsl:number/></xsl:variable>
3963
- <xsl:if test="$number mod 2 = 0">
3964
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3965
- </xsl:if>
3965
+ <xsl:attribute name="background-color">
3966
+ <xsl:choose>
3967
+ <xsl:when test="$number mod 2 = 0">rgb(252, 246, 222)</xsl:when>
3968
+ <xsl:otherwise>rgb(254, 252, 245)</xsl:otherwise>
3969
+ </xsl:choose>
3970
+ </xsl:attribute>
3966
3971
 
3967
3972
  <xsl:call-template name="setTableRowAttributes"/>
3968
3973
  <xsl:apply-templates/>
@@ -3983,6 +3988,12 @@
3983
3988
  <xsl:with-param name="default">center</xsl:with-param>
3984
3989
  </xsl:call-template>
3985
3990
 
3991
+ <xsl:if test="starts-with(ancestor::*[local-name() = 'table'][1]/@type, 'recommend') and normalize-space(@align) = ''">
3992
+ <xsl:call-template name="setTextAlignment">
3993
+ <xsl:with-param name="default">left</xsl:with-param>
3994
+ </xsl:call-template>
3995
+ </xsl:if>
3996
+
3986
3997
  <xsl:if test="$lang = 'ar'">
3987
3998
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3988
3999
  </xsl:if>
@@ -4994,8 +5005,10 @@
4994
5005
 
4995
5006
  <!-- 10 -->
4996
5007
 
4997
- 9.5
4998
-
5008
+ <xsl:choose>
5009
+ <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
5010
+ <xsl:otherwise>9.5</xsl:otherwise>
5011
+ </xsl:choose>
4999
5012
 
5000
5013
  </xsl:variable>
5001
5014
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -5013,8 +5026,17 @@
5013
5026
  </fo:inline>
5014
5027
  </xsl:template> <!-- tt -->
5015
5028
 
5029
+ <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
5016
5030
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
5017
- <xsl:call-template name="add_spaces_to_sourcecode"/>
5031
+ <xsl:choose>
5032
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
5033
+ <!-- url -->
5034
+ <xsl:call-template name="add-zero-spaces-link-java"/>
5035
+ </xsl:when>
5036
+ <xsl:otherwise>
5037
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
5038
+ </xsl:otherwise>
5039
+ </xsl:choose>
5018
5040
  </xsl:template>
5019
5041
 
5020
5042
  <xsl:template match="*[local-name()='underline']">
@@ -5370,8 +5392,11 @@
5370
5392
 
5371
5393
  <xsl:template name="add-zero-spaces-link-java">
5372
5394
  <xsl:param name="text" select="."/>
5395
+
5396
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
5397
+ <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
5373
5398
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
5374
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
5399
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
5375
5400
  </xsl:template>
5376
5401
 
5377
5402
  <!-- add zero space after dash character (for table's entries) -->
@@ -7483,8 +7508,10 @@
7483
7508
  <xsl:if test="$current_template = 'standard'">8</xsl:if>
7484
7509
  </xsl:if> -->
7485
7510
 
7486
- 9.5
7487
-
7511
+ <xsl:choose>
7512
+ <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
7513
+ <xsl:otherwise>9.5</xsl:otherwise>
7514
+ </xsl:choose>
7488
7515
 
7489
7516
  </xsl:variable>
7490
7517
 
@@ -8031,7 +8058,8 @@
8031
8058
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
8032
8059
  <fo:block font-size="11pt">
8033
8060
 
8034
- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute>
8061
+ <!-- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute> -->
8062
+ <xsl:attribute name="color">white</xsl:attribute>
8035
8063
 
8036
8064
  <xsl:apply-templates/>
8037
8065
  </fo:block>
@@ -9837,7 +9865,7 @@
9837
9865
 
9838
9866
  <xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
9839
9867
 
9840
- <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'])]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
9868
+ <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
9841
9869
 
9842
9870
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
9843
9871
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
@@ -2083,6 +2083,8 @@
2083
2083
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2084
2084
  <xsl:attribute name="display-align">center</xsl:attribute>
2085
2085
 
2086
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2087
+ <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
2086
2088
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2087
2089
 
2088
2090
  </xsl:attribute-set> <!-- table-header-cell-style -->
@@ -3184,9 +3186,9 @@
3184
3186
 
3185
3187
  <fo:block-container xsl:use-attribute-sets="table-container-style">
3186
3188
 
3187
- <xsl:if test="ancestor::*[local-name()='sections']">
3189
+ <!-- <xsl:if test="ancestor::*[local-name()='sections']"> -->
3188
3190
  <xsl:attribute name="font-size">9pt</xsl:attribute>
3189
- </xsl:if>
3191
+ <!-- </xsl:if> -->
3190
3192
 
3191
3193
  <!-- end table block-container attributes -->
3192
3194
 
@@ -3960,9 +3962,12 @@
3960
3962
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3961
3963
 
3962
3964
  <xsl:variable name="number"><xsl:number/></xsl:variable>
3963
- <xsl:if test="$number mod 2 = 0">
3964
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3965
- </xsl:if>
3965
+ <xsl:attribute name="background-color">
3966
+ <xsl:choose>
3967
+ <xsl:when test="$number mod 2 = 0">rgb(252, 246, 222)</xsl:when>
3968
+ <xsl:otherwise>rgb(254, 252, 245)</xsl:otherwise>
3969
+ </xsl:choose>
3970
+ </xsl:attribute>
3966
3971
 
3967
3972
  <xsl:call-template name="setTableRowAttributes"/>
3968
3973
  <xsl:apply-templates/>
@@ -3983,6 +3988,12 @@
3983
3988
  <xsl:with-param name="default">center</xsl:with-param>
3984
3989
  </xsl:call-template>
3985
3990
 
3991
+ <xsl:if test="starts-with(ancestor::*[local-name() = 'table'][1]/@type, 'recommend') and normalize-space(@align) = ''">
3992
+ <xsl:call-template name="setTextAlignment">
3993
+ <xsl:with-param name="default">left</xsl:with-param>
3994
+ </xsl:call-template>
3995
+ </xsl:if>
3996
+
3986
3997
  <xsl:if test="$lang = 'ar'">
3987
3998
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3988
3999
  </xsl:if>
@@ -4994,8 +5005,10 @@
4994
5005
 
4995
5006
  <!-- 10 -->
4996
5007
 
4997
- 9.5
4998
-
5008
+ <xsl:choose>
5009
+ <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
5010
+ <xsl:otherwise>9.5</xsl:otherwise>
5011
+ </xsl:choose>
4999
5012
 
5000
5013
  </xsl:variable>
5001
5014
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -5013,8 +5026,17 @@
5013
5026
  </fo:inline>
5014
5027
  </xsl:template> <!-- tt -->
5015
5028
 
5029
+ <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
5016
5030
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
5017
- <xsl:call-template name="add_spaces_to_sourcecode"/>
5031
+ <xsl:choose>
5032
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
5033
+ <!-- url -->
5034
+ <xsl:call-template name="add-zero-spaces-link-java"/>
5035
+ </xsl:when>
5036
+ <xsl:otherwise>
5037
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
5038
+ </xsl:otherwise>
5039
+ </xsl:choose>
5018
5040
  </xsl:template>
5019
5041
 
5020
5042
  <xsl:template match="*[local-name()='underline']">
@@ -5370,8 +5392,11 @@
5370
5392
 
5371
5393
  <xsl:template name="add-zero-spaces-link-java">
5372
5394
  <xsl:param name="text" select="."/>
5395
+
5396
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
5397
+ <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
5373
5398
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
5374
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
5399
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
5375
5400
  </xsl:template>
5376
5401
 
5377
5402
  <!-- add zero space after dash character (for table's entries) -->
@@ -7483,8 +7508,10 @@
7483
7508
  <xsl:if test="$current_template = 'standard'">8</xsl:if>
7484
7509
  </xsl:if> -->
7485
7510
 
7486
- 9.5
7487
-
7511
+ <xsl:choose>
7512
+ <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
7513
+ <xsl:otherwise>9.5</xsl:otherwise>
7514
+ </xsl:choose>
7488
7515
 
7489
7516
  </xsl:variable>
7490
7517
 
@@ -8031,7 +8058,8 @@
8031
8058
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
8032
8059
  <fo:block font-size="11pt">
8033
8060
 
8034
- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute>
8061
+ <!-- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute> -->
8062
+ <xsl:attribute name="color">white</xsl:attribute>
8035
8063
 
8036
8064
  <xsl:apply-templates/>
8037
8065
  </fo:block>
@@ -9837,7 +9865,7 @@
9837
9865
 
9838
9866
  <xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
9839
9867
 
9840
- <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'])]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
9868
+ <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
9841
9869
 
9842
9870
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
9843
9871
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
@@ -2083,6 +2083,8 @@
2083
2083
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2084
2084
  <xsl:attribute name="display-align">center</xsl:attribute>
2085
2085
 
2086
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2087
+ <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
2086
2088
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2087
2089
 
2088
2090
  </xsl:attribute-set> <!-- table-header-cell-style -->
@@ -3184,9 +3186,9 @@
3184
3186
 
3185
3187
  <fo:block-container xsl:use-attribute-sets="table-container-style">
3186
3188
 
3187
- <xsl:if test="ancestor::*[local-name()='sections']">
3189
+ <!-- <xsl:if test="ancestor::*[local-name()='sections']"> -->
3188
3190
  <xsl:attribute name="font-size">9pt</xsl:attribute>
3189
- </xsl:if>
3191
+ <!-- </xsl:if> -->
3190
3192
 
3191
3193
  <!-- end table block-container attributes -->
3192
3194
 
@@ -3960,9 +3962,12 @@
3960
3962
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3961
3963
 
3962
3964
  <xsl:variable name="number"><xsl:number/></xsl:variable>
3963
- <xsl:if test="$number mod 2 = 0">
3964
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3965
- </xsl:if>
3965
+ <xsl:attribute name="background-color">
3966
+ <xsl:choose>
3967
+ <xsl:when test="$number mod 2 = 0">rgb(252, 246, 222)</xsl:when>
3968
+ <xsl:otherwise>rgb(254, 252, 245)</xsl:otherwise>
3969
+ </xsl:choose>
3970
+ </xsl:attribute>
3966
3971
 
3967
3972
  <xsl:call-template name="setTableRowAttributes"/>
3968
3973
  <xsl:apply-templates/>
@@ -3983,6 +3988,12 @@
3983
3988
  <xsl:with-param name="default">center</xsl:with-param>
3984
3989
  </xsl:call-template>
3985
3990
 
3991
+ <xsl:if test="starts-with(ancestor::*[local-name() = 'table'][1]/@type, 'recommend') and normalize-space(@align) = ''">
3992
+ <xsl:call-template name="setTextAlignment">
3993
+ <xsl:with-param name="default">left</xsl:with-param>
3994
+ </xsl:call-template>
3995
+ </xsl:if>
3996
+
3986
3997
  <xsl:if test="$lang = 'ar'">
3987
3998
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3988
3999
  </xsl:if>
@@ -4994,8 +5005,10 @@
4994
5005
 
4995
5006
  <!-- 10 -->
4996
5007
 
4997
- 9.5
4998
-
5008
+ <xsl:choose>
5009
+ <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
5010
+ <xsl:otherwise>9.5</xsl:otherwise>
5011
+ </xsl:choose>
4999
5012
 
5000
5013
  </xsl:variable>
5001
5014
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -5013,8 +5026,17 @@
5013
5026
  </fo:inline>
5014
5027
  </xsl:template> <!-- tt -->
5015
5028
 
5029
+ <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
5016
5030
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
5017
- <xsl:call-template name="add_spaces_to_sourcecode"/>
5031
+ <xsl:choose>
5032
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
5033
+ <!-- url -->
5034
+ <xsl:call-template name="add-zero-spaces-link-java"/>
5035
+ </xsl:when>
5036
+ <xsl:otherwise>
5037
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
5038
+ </xsl:otherwise>
5039
+ </xsl:choose>
5018
5040
  </xsl:template>
5019
5041
 
5020
5042
  <xsl:template match="*[local-name()='underline']">
@@ -5370,8 +5392,11 @@
5370
5392
 
5371
5393
  <xsl:template name="add-zero-spaces-link-java">
5372
5394
  <xsl:param name="text" select="."/>
5395
+
5396
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
5397
+ <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
5373
5398
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
5374
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
5399
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
5375
5400
  </xsl:template>
5376
5401
 
5377
5402
  <!-- add zero space after dash character (for table's entries) -->
@@ -7483,8 +7508,10 @@
7483
7508
  <xsl:if test="$current_template = 'standard'">8</xsl:if>
7484
7509
  </xsl:if> -->
7485
7510
 
7486
- 9.5
7487
-
7511
+ <xsl:choose>
7512
+ <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
7513
+ <xsl:otherwise>9.5</xsl:otherwise>
7514
+ </xsl:choose>
7488
7515
 
7489
7516
  </xsl:variable>
7490
7517
 
@@ -8031,7 +8058,8 @@
8031
8058
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
8032
8059
  <fo:block font-size="11pt">
8033
8060
 
8034
- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute>
8061
+ <!-- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute> -->
8062
+ <xsl:attribute name="color">white</xsl:attribute>
8035
8063
 
8036
8064
  <xsl:apply-templates/>
8037
8065
  </fo:block>
@@ -9837,7 +9865,7 @@
9837
9865
 
9838
9866
  <xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
9839
9867
 
9840
- <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'])]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
9868
+ <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
9841
9869
 
9842
9870
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
9843
9871
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
@@ -2083,6 +2083,8 @@
2083
2083
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2084
2084
  <xsl:attribute name="display-align">center</xsl:attribute>
2085
2085
 
2086
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2087
+ <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
2086
2088
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2087
2089
 
2088
2090
  </xsl:attribute-set> <!-- table-header-cell-style -->
@@ -3184,9 +3186,9 @@
3184
3186
 
3185
3187
  <fo:block-container xsl:use-attribute-sets="table-container-style">
3186
3188
 
3187
- <xsl:if test="ancestor::*[local-name()='sections']">
3189
+ <!-- <xsl:if test="ancestor::*[local-name()='sections']"> -->
3188
3190
  <xsl:attribute name="font-size">9pt</xsl:attribute>
3189
- </xsl:if>
3191
+ <!-- </xsl:if> -->
3190
3192
 
3191
3193
  <!-- end table block-container attributes -->
3192
3194
 
@@ -3960,9 +3962,12 @@
3960
3962
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3961
3963
 
3962
3964
  <xsl:variable name="number"><xsl:number/></xsl:variable>
3963
- <xsl:if test="$number mod 2 = 0">
3964
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3965
- </xsl:if>
3965
+ <xsl:attribute name="background-color">
3966
+ <xsl:choose>
3967
+ <xsl:when test="$number mod 2 = 0">rgb(252, 246, 222)</xsl:when>
3968
+ <xsl:otherwise>rgb(254, 252, 245)</xsl:otherwise>
3969
+ </xsl:choose>
3970
+ </xsl:attribute>
3966
3971
 
3967
3972
  <xsl:call-template name="setTableRowAttributes"/>
3968
3973
  <xsl:apply-templates/>
@@ -3983,6 +3988,12 @@
3983
3988
  <xsl:with-param name="default">center</xsl:with-param>
3984
3989
  </xsl:call-template>
3985
3990
 
3991
+ <xsl:if test="starts-with(ancestor::*[local-name() = 'table'][1]/@type, 'recommend') and normalize-space(@align) = ''">
3992
+ <xsl:call-template name="setTextAlignment">
3993
+ <xsl:with-param name="default">left</xsl:with-param>
3994
+ </xsl:call-template>
3995
+ </xsl:if>
3996
+
3986
3997
  <xsl:if test="$lang = 'ar'">
3987
3998
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3988
3999
  </xsl:if>
@@ -4994,8 +5005,10 @@
4994
5005
 
4995
5006
  <!-- 10 -->
4996
5007
 
4997
- 9.5
4998
-
5008
+ <xsl:choose>
5009
+ <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
5010
+ <xsl:otherwise>9.5</xsl:otherwise>
5011
+ </xsl:choose>
4999
5012
 
5000
5013
  </xsl:variable>
5001
5014
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -5013,8 +5026,17 @@
5013
5026
  </fo:inline>
5014
5027
  </xsl:template> <!-- tt -->
5015
5028
 
5029
+ <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
5016
5030
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
5017
- <xsl:call-template name="add_spaces_to_sourcecode"/>
5031
+ <xsl:choose>
5032
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
5033
+ <!-- url -->
5034
+ <xsl:call-template name="add-zero-spaces-link-java"/>
5035
+ </xsl:when>
5036
+ <xsl:otherwise>
5037
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
5038
+ </xsl:otherwise>
5039
+ </xsl:choose>
5018
5040
  </xsl:template>
5019
5041
 
5020
5042
  <xsl:template match="*[local-name()='underline']">
@@ -5370,8 +5392,11 @@
5370
5392
 
5371
5393
  <xsl:template name="add-zero-spaces-link-java">
5372
5394
  <xsl:param name="text" select="."/>
5395
+
5396
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
5397
+ <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
5373
5398
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
5374
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
5399
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
5375
5400
  </xsl:template>
5376
5401
 
5377
5402
  <!-- add zero space after dash character (for table's entries) -->
@@ -7483,8 +7508,10 @@
7483
7508
  <xsl:if test="$current_template = 'standard'">8</xsl:if>
7484
7509
  </xsl:if> -->
7485
7510
 
7486
- 9.5
7487
-
7511
+ <xsl:choose>
7512
+ <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
7513
+ <xsl:otherwise>9.5</xsl:otherwise>
7514
+ </xsl:choose>
7488
7515
 
7489
7516
  </xsl:variable>
7490
7517
 
@@ -8031,7 +8058,8 @@
8031
8058
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
8032
8059
  <fo:block font-size="11pt">
8033
8060
 
8034
- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute>
8061
+ <!-- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute> -->
8062
+ <xsl:attribute name="color">white</xsl:attribute>
8035
8063
 
8036
8064
  <xsl:apply-templates/>
8037
8065
  </fo:block>
@@ -9837,7 +9865,7 @@
9837
9865
 
9838
9866
  <xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
9839
9867
 
9840
- <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'])]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
9868
+ <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
9841
9869
 
9842
9870
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
9843
9871
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>