metanorma-ogc 2.3.10 → 2.3.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9183a03e97f8b3696c2c331bae148dd68da657377b21498d46ec9979d01a90b3
4
- data.tar.gz: 60b41c7e75930794348ff33de9d375b1c297cd93dcb36e670a80aa61424bf34c
3
+ metadata.gz: f1fce1f6d212b06d45f5f35a63ffc6d2183bf35e888e017e855ce14c169aad4f
4
+ data.tar.gz: dad50c63f0d04c49d364b1773b0db8f37de0200789e590b6e667b8ade0697669
5
5
  SHA512:
6
- metadata.gz: 4c4fddf1abf4133f3ad0350c65524da184d313264fd4ba3dd88c7b47ca677aa0e3b1b15fe3a03391b4dd0a9d23af072f3353b7761b1ce014d2f66d1d3fada73c
7
- data.tar.gz: cadaba89b08e33ba50912814bea94b2f1b1373f5698c371ce941b87065412a6ce071e95bc2c695095c63380e862dacaab9051945df4530548cb9449c8594597c
6
+ metadata.gz: c206df06b23919be1b1de2c4056cbb7f8c98d49031ba011701fdceca23860a26bf536d70d4acd2f2b138bcd2074ced80a3f2ce16505c4df51a60bedf092a25bc
7
+ data.tar.gz: cc992bdbc3679c55cb1c046d32deb4f0dbbe8970c317649bd9d5dbf7724c96a3d32e7b323628dccfb1eb1afcf2c731f2780ecec7dc27164f705a307e8e126b90
@@ -681,11 +681,15 @@
681
681
 
682
682
  <xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text()" priority="2">
683
683
  <xsl:variable name="content">
684
- <xsl:call-template name="add-zero-spaces"/>
684
+ <xsl:call-template name="add-zero-spaces-java"/>
685
685
  </xsl:variable>
686
686
  <!-- add zero-width space in the words like 'adeOfAbstractTransportaonSpace' to split it in the table's cell -->
687
687
  <xsl:variable name="content2" select="java:replaceAll(java:java.lang.String.new($content),'([a-z]{2,})([A-Z])(.?)','$1​$2$3')"/>
688
- <xsl:value-of select="translate($content2, $thin_space, ' ')"/>
688
+
689
+ <!-- add zero-width space (#x200B) before character '(' if preceding and following are word chars -->
690
+ <xsl:variable name="content3" select="java:replaceAll(java:java.lang.String.new($content2), '(\w)(\()(\w)', '$1​$2$3')"/>
691
+
692
+ <xsl:value-of select="translate($content3, $thin_space, ' ')"/>
689
693
  </xsl:template>
690
694
 
691
695
  <xsl:template match="node()" mode="sections">
@@ -3530,7 +3534,7 @@
3530
3534
  </xsl:attribute>
3531
3535
  </xsl:for-each>
3532
3536
 
3533
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3537
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3534
3538
  <xsl:if test="$isNoteOrFnExist = 'true'">
3535
3539
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
3536
3540
  </xsl:if>
@@ -3574,7 +3578,7 @@
3574
3578
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
3575
3579
  </xsl:when>
3576
3580
  <xsl:otherwise>
3577
- <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
3581
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
3578
3582
  </xsl:otherwise>
3579
3583
  </xsl:choose>
3580
3584
 
@@ -4089,7 +4093,7 @@
4089
4093
  <xsl:param name="colwidths"/>
4090
4094
  <xsl:param name="colgroup"/>
4091
4095
 
4092
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
4096
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
4093
4097
 
4094
4098
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
4095
4099
 
@@ -4162,6 +4166,7 @@
4162
4166
  <xsl:apply-templates select="../*[local-name()='p']"/>
4163
4167
  <xsl:apply-templates select="../*[local-name()='dl']"/>
4164
4168
  <xsl:apply-templates select="../*[local-name()='note']"/>
4169
+ <xsl:apply-templates select="../*[local-name()='example']"/>
4165
4170
  <xsl:apply-templates select="../*[local-name()='source']"/>
4166
4171
 
4167
4172
  <xsl:variable name="isDisplayRowSeparator">
@@ -4170,7 +4175,7 @@
4170
4175
 
4171
4176
  <!-- horizontal row separator -->
4172
4177
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
4173
- <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
4178
+ <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
4174
4179
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
4175
4180
 
4176
4181
  <xsl:call-template name="setBordersTableArray"/>
@@ -4431,13 +4436,13 @@
4431
4436
  </fo:table-cell>
4432
4437
  </xsl:template> <!-- td -->
4433
4438
 
4434
- <xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
4439
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
4435
4440
 
4436
4441
  <fo:block xsl:use-attribute-sets="table-note-style">
4437
4442
 
4438
4443
  <xsl:call-template name="refine_table-note-style"/>
4439
4444
 
4440
- <!-- Table's note name (NOTE, for example) -->
4445
+ <!-- Table's note/example name (NOTE, for example) -->
4441
4446
  <fo:inline xsl:use-attribute-sets="table-note-name-style">
4442
4447
 
4443
4448
  <xsl:call-template name="refine_table-note-name-style"/>
@@ -4451,7 +4456,7 @@
4451
4456
 
4452
4457
  </xsl:template> <!-- table/note -->
4453
4458
 
4454
- <xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
4459
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
4455
4460
  <xsl:apply-templates/>
4456
4461
  </xsl:template>
4457
4462
 
@@ -6026,7 +6031,10 @@
6026
6031
  </xsl:choose>
6027
6032
  </xsl:variable>
6028
6033
 
6029
- <xsl:value-of select="$text9"/>
6034
+ <!-- replace sequence #x200B and space TO space -->
6035
+ <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
6036
+
6037
+ <xsl:value-of select="$text10"/>
6030
6038
  </xsl:template>
6031
6039
 
6032
6040
  <xsl:template name="add-zero-spaces-link-java">
@@ -7119,7 +7127,7 @@
7119
7127
  <xsl:call-template name="insert_basic_link">
7120
7128
  <xsl:with-param name="element">
7121
7129
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
7122
- <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://'))">
7130
+ <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
7123
7131
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7124
7132
  </xsl:if>
7125
7133
  <xsl:if test="parent::*[local-name() = 'add']">
@@ -9458,6 +9466,12 @@
9458
9466
 
9459
9467
  </xsl:template>
9460
9468
 
9469
+ <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
9470
+ <fo:inline xsl:use-attribute-sets="example-name-style">
9471
+ <xsl:apply-templates/>
9472
+ </fo:inline>
9473
+ </xsl:template>
9474
+
9461
9475
  <xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
9462
9476
  <xsl:param name="fo_element">block</xsl:param>
9463
9477
 
@@ -10028,6 +10042,9 @@
10028
10042
  <xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
10029
10043
  </xsl:choose>
10030
10044
  </xsl:when>
10045
+ <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
10046
+ <xsl:value-of select="@label"/>
10047
+ </xsl:when>
10031
10048
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
10032
10049
 
10033
10050
  <!-- Example: for BSI <?list-start 2?> -->
@@ -10085,10 +10102,10 @@
10085
10102
  <xsl:when test="$type = 'arabic'">
10086
10103
  1.
10087
10104
  </xsl:when>
10088
- <xsl:when test="$type = 'alphabet'">
10105
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
10089
10106
  a)
10090
10107
  </xsl:when>
10091
- <xsl:when test="$type = 'alphabet_upper'">
10108
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
10092
10109
  A)
10093
10110
  </xsl:when>
10094
10111
  <xsl:when test="$type = 'roman'">
@@ -10228,7 +10245,7 @@
10228
10245
  <xsl:call-template name="append_add-style"/>
10229
10246
  </xsl:if>
10230
10247
 
10231
- <xsl:call-template name="getListItemFormat"/>
10248
+ <xsl:call-template name="getListItemFormat"/>
10232
10249
 
10233
10250
  </fo:block>
10234
10251
  </fo:list-item-label>
@@ -681,11 +681,15 @@
681
681
 
682
682
  <xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text()" priority="2">
683
683
  <xsl:variable name="content">
684
- <xsl:call-template name="add-zero-spaces"/>
684
+ <xsl:call-template name="add-zero-spaces-java"/>
685
685
  </xsl:variable>
686
686
  <!-- add zero-width space in the words like 'adeOfAbstractTransportaonSpace' to split it in the table's cell -->
687
687
  <xsl:variable name="content2" select="java:replaceAll(java:java.lang.String.new($content),'([a-z]{2,})([A-Z])(.?)','$1​$2$3')"/>
688
- <xsl:value-of select="translate($content2, $thin_space, ' ')"/>
688
+
689
+ <!-- add zero-width space (#x200B) before character '(' if preceding and following are word chars -->
690
+ <xsl:variable name="content3" select="java:replaceAll(java:java.lang.String.new($content2), '(\w)(\()(\w)', '$1​$2$3')"/>
691
+
692
+ <xsl:value-of select="translate($content3, $thin_space, ' ')"/>
689
693
  </xsl:template>
690
694
 
691
695
  <xsl:template match="node()" mode="sections">
@@ -3530,7 +3534,7 @@
3530
3534
  </xsl:attribute>
3531
3535
  </xsl:for-each>
3532
3536
 
3533
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3537
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3534
3538
  <xsl:if test="$isNoteOrFnExist = 'true'">
3535
3539
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
3536
3540
  </xsl:if>
@@ -3574,7 +3578,7 @@
3574
3578
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
3575
3579
  </xsl:when>
3576
3580
  <xsl:otherwise>
3577
- <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
3581
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
3578
3582
  </xsl:otherwise>
3579
3583
  </xsl:choose>
3580
3584
 
@@ -4089,7 +4093,7 @@
4089
4093
  <xsl:param name="colwidths"/>
4090
4094
  <xsl:param name="colgroup"/>
4091
4095
 
4092
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
4096
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
4093
4097
 
4094
4098
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
4095
4099
 
@@ -4162,6 +4166,7 @@
4162
4166
  <xsl:apply-templates select="../*[local-name()='p']"/>
4163
4167
  <xsl:apply-templates select="../*[local-name()='dl']"/>
4164
4168
  <xsl:apply-templates select="../*[local-name()='note']"/>
4169
+ <xsl:apply-templates select="../*[local-name()='example']"/>
4165
4170
  <xsl:apply-templates select="../*[local-name()='source']"/>
4166
4171
 
4167
4172
  <xsl:variable name="isDisplayRowSeparator">
@@ -4170,7 +4175,7 @@
4170
4175
 
4171
4176
  <!-- horizontal row separator -->
4172
4177
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
4173
- <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
4178
+ <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
4174
4179
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
4175
4180
 
4176
4181
  <xsl:call-template name="setBordersTableArray"/>
@@ -4431,13 +4436,13 @@
4431
4436
  </fo:table-cell>
4432
4437
  </xsl:template> <!-- td -->
4433
4438
 
4434
- <xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
4439
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
4435
4440
 
4436
4441
  <fo:block xsl:use-attribute-sets="table-note-style">
4437
4442
 
4438
4443
  <xsl:call-template name="refine_table-note-style"/>
4439
4444
 
4440
- <!-- Table's note name (NOTE, for example) -->
4445
+ <!-- Table's note/example name (NOTE, for example) -->
4441
4446
  <fo:inline xsl:use-attribute-sets="table-note-name-style">
4442
4447
 
4443
4448
  <xsl:call-template name="refine_table-note-name-style"/>
@@ -4451,7 +4456,7 @@
4451
4456
 
4452
4457
  </xsl:template> <!-- table/note -->
4453
4458
 
4454
- <xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
4459
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
4455
4460
  <xsl:apply-templates/>
4456
4461
  </xsl:template>
4457
4462
 
@@ -6026,7 +6031,10 @@
6026
6031
  </xsl:choose>
6027
6032
  </xsl:variable>
6028
6033
 
6029
- <xsl:value-of select="$text9"/>
6034
+ <!-- replace sequence #x200B and space TO space -->
6035
+ <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
6036
+
6037
+ <xsl:value-of select="$text10"/>
6030
6038
  </xsl:template>
6031
6039
 
6032
6040
  <xsl:template name="add-zero-spaces-link-java">
@@ -7119,7 +7127,7 @@
7119
7127
  <xsl:call-template name="insert_basic_link">
7120
7128
  <xsl:with-param name="element">
7121
7129
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
7122
- <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://'))">
7130
+ <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
7123
7131
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7124
7132
  </xsl:if>
7125
7133
  <xsl:if test="parent::*[local-name() = 'add']">
@@ -9458,6 +9466,12 @@
9458
9466
 
9459
9467
  </xsl:template>
9460
9468
 
9469
+ <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
9470
+ <fo:inline xsl:use-attribute-sets="example-name-style">
9471
+ <xsl:apply-templates/>
9472
+ </fo:inline>
9473
+ </xsl:template>
9474
+
9461
9475
  <xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
9462
9476
  <xsl:param name="fo_element">block</xsl:param>
9463
9477
 
@@ -10028,6 +10042,9 @@
10028
10042
  <xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
10029
10043
  </xsl:choose>
10030
10044
  </xsl:when>
10045
+ <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
10046
+ <xsl:value-of select="@label"/>
10047
+ </xsl:when>
10031
10048
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
10032
10049
 
10033
10050
  <!-- Example: for BSI <?list-start 2?> -->
@@ -10085,10 +10102,10 @@
10085
10102
  <xsl:when test="$type = 'arabic'">
10086
10103
  1.
10087
10104
  </xsl:when>
10088
- <xsl:when test="$type = 'alphabet'">
10105
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
10089
10106
  a)
10090
10107
  </xsl:when>
10091
- <xsl:when test="$type = 'alphabet_upper'">
10108
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
10092
10109
  A)
10093
10110
  </xsl:when>
10094
10111
  <xsl:when test="$type = 'roman'">
@@ -10228,7 +10245,7 @@
10228
10245
  <xsl:call-template name="append_add-style"/>
10229
10246
  </xsl:if>
10230
10247
 
10231
- <xsl:call-template name="getListItemFormat"/>
10248
+ <xsl:call-template name="getListItemFormat"/>
10232
10249
 
10233
10250
  </fo:block>
10234
10251
  </fo:list-item-label>
@@ -681,11 +681,15 @@
681
681
 
682
682
  <xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text()" priority="2">
683
683
  <xsl:variable name="content">
684
- <xsl:call-template name="add-zero-spaces"/>
684
+ <xsl:call-template name="add-zero-spaces-java"/>
685
685
  </xsl:variable>
686
686
  <!-- add zero-width space in the words like 'adeOfAbstractTransportaonSpace' to split it in the table's cell -->
687
687
  <xsl:variable name="content2" select="java:replaceAll(java:java.lang.String.new($content),'([a-z]{2,})([A-Z])(.?)','$1​$2$3')"/>
688
- <xsl:value-of select="translate($content2, $thin_space, ' ')"/>
688
+
689
+ <!-- add zero-width space (#x200B) before character '(' if preceding and following are word chars -->
690
+ <xsl:variable name="content3" select="java:replaceAll(java:java.lang.String.new($content2), '(\w)(\()(\w)', '$1​$2$3')"/>
691
+
692
+ <xsl:value-of select="translate($content3, $thin_space, ' ')"/>
689
693
  </xsl:template>
690
694
 
691
695
  <xsl:template match="node()" mode="sections">
@@ -3530,7 +3534,7 @@
3530
3534
  </xsl:attribute>
3531
3535
  </xsl:for-each>
3532
3536
 
3533
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3537
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3534
3538
  <xsl:if test="$isNoteOrFnExist = 'true'">
3535
3539
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
3536
3540
  </xsl:if>
@@ -3574,7 +3578,7 @@
3574
3578
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
3575
3579
  </xsl:when>
3576
3580
  <xsl:otherwise>
3577
- <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
3581
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
3578
3582
  </xsl:otherwise>
3579
3583
  </xsl:choose>
3580
3584
 
@@ -4089,7 +4093,7 @@
4089
4093
  <xsl:param name="colwidths"/>
4090
4094
  <xsl:param name="colgroup"/>
4091
4095
 
4092
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
4096
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
4093
4097
 
4094
4098
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
4095
4099
 
@@ -4162,6 +4166,7 @@
4162
4166
  <xsl:apply-templates select="../*[local-name()='p']"/>
4163
4167
  <xsl:apply-templates select="../*[local-name()='dl']"/>
4164
4168
  <xsl:apply-templates select="../*[local-name()='note']"/>
4169
+ <xsl:apply-templates select="../*[local-name()='example']"/>
4165
4170
  <xsl:apply-templates select="../*[local-name()='source']"/>
4166
4171
 
4167
4172
  <xsl:variable name="isDisplayRowSeparator">
@@ -4170,7 +4175,7 @@
4170
4175
 
4171
4176
  <!-- horizontal row separator -->
4172
4177
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
4173
- <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
4178
+ <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
4174
4179
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
4175
4180
 
4176
4181
  <xsl:call-template name="setBordersTableArray"/>
@@ -4431,13 +4436,13 @@
4431
4436
  </fo:table-cell>
4432
4437
  </xsl:template> <!-- td -->
4433
4438
 
4434
- <xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
4439
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
4435
4440
 
4436
4441
  <fo:block xsl:use-attribute-sets="table-note-style">
4437
4442
 
4438
4443
  <xsl:call-template name="refine_table-note-style"/>
4439
4444
 
4440
- <!-- Table's note name (NOTE, for example) -->
4445
+ <!-- Table's note/example name (NOTE, for example) -->
4441
4446
  <fo:inline xsl:use-attribute-sets="table-note-name-style">
4442
4447
 
4443
4448
  <xsl:call-template name="refine_table-note-name-style"/>
@@ -4451,7 +4456,7 @@
4451
4456
 
4452
4457
  </xsl:template> <!-- table/note -->
4453
4458
 
4454
- <xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
4459
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
4455
4460
  <xsl:apply-templates/>
4456
4461
  </xsl:template>
4457
4462
 
@@ -6026,7 +6031,10 @@
6026
6031
  </xsl:choose>
6027
6032
  </xsl:variable>
6028
6033
 
6029
- <xsl:value-of select="$text9"/>
6034
+ <!-- replace sequence #x200B and space TO space -->
6035
+ <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
6036
+
6037
+ <xsl:value-of select="$text10"/>
6030
6038
  </xsl:template>
6031
6039
 
6032
6040
  <xsl:template name="add-zero-spaces-link-java">
@@ -7119,7 +7127,7 @@
7119
7127
  <xsl:call-template name="insert_basic_link">
7120
7128
  <xsl:with-param name="element">
7121
7129
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
7122
- <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://'))">
7130
+ <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
7123
7131
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7124
7132
  </xsl:if>
7125
7133
  <xsl:if test="parent::*[local-name() = 'add']">
@@ -9458,6 +9466,12 @@
9458
9466
 
9459
9467
  </xsl:template>
9460
9468
 
9469
+ <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
9470
+ <fo:inline xsl:use-attribute-sets="example-name-style">
9471
+ <xsl:apply-templates/>
9472
+ </fo:inline>
9473
+ </xsl:template>
9474
+
9461
9475
  <xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
9462
9476
  <xsl:param name="fo_element">block</xsl:param>
9463
9477
 
@@ -10028,6 +10042,9 @@
10028
10042
  <xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
10029
10043
  </xsl:choose>
10030
10044
  </xsl:when>
10045
+ <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
10046
+ <xsl:value-of select="@label"/>
10047
+ </xsl:when>
10031
10048
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
10032
10049
 
10033
10050
  <!-- Example: for BSI <?list-start 2?> -->
@@ -10085,10 +10102,10 @@
10085
10102
  <xsl:when test="$type = 'arabic'">
10086
10103
  1.
10087
10104
  </xsl:when>
10088
- <xsl:when test="$type = 'alphabet'">
10105
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
10089
10106
  a)
10090
10107
  </xsl:when>
10091
- <xsl:when test="$type = 'alphabet_upper'">
10108
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
10092
10109
  A)
10093
10110
  </xsl:when>
10094
10111
  <xsl:when test="$type = 'roman'">
@@ -10228,7 +10245,7 @@
10228
10245
  <xsl:call-template name="append_add-style"/>
10229
10246
  </xsl:if>
10230
10247
 
10231
- <xsl:call-template name="getListItemFormat"/>
10248
+ <xsl:call-template name="getListItemFormat"/>
10232
10249
 
10233
10250
  </fo:block>
10234
10251
  </fo:list-item-label>
@@ -681,11 +681,15 @@
681
681
 
682
682
  <xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text()" priority="2">
683
683
  <xsl:variable name="content">
684
- <xsl:call-template name="add-zero-spaces"/>
684
+ <xsl:call-template name="add-zero-spaces-java"/>
685
685
  </xsl:variable>
686
686
  <!-- add zero-width space in the words like 'adeOfAbstractTransportaonSpace' to split it in the table's cell -->
687
687
  <xsl:variable name="content2" select="java:replaceAll(java:java.lang.String.new($content),'([a-z]{2,})([A-Z])(.?)','$1​$2$3')"/>
688
- <xsl:value-of select="translate($content2, $thin_space, ' ')"/>
688
+
689
+ <!-- add zero-width space (#x200B) before character '(' if preceding and following are word chars -->
690
+ <xsl:variable name="content3" select="java:replaceAll(java:java.lang.String.new($content2), '(\w)(\()(\w)', '$1​$2$3')"/>
691
+
692
+ <xsl:value-of select="translate($content3, $thin_space, ' ')"/>
689
693
  </xsl:template>
690
694
 
691
695
  <xsl:template match="node()" mode="sections">
@@ -3530,7 +3534,7 @@
3530
3534
  </xsl:attribute>
3531
3535
  </xsl:for-each>
3532
3536
 
3533
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3537
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3534
3538
  <xsl:if test="$isNoteOrFnExist = 'true'">
3535
3539
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
3536
3540
  </xsl:if>
@@ -3574,7 +3578,7 @@
3574
3578
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
3575
3579
  </xsl:when>
3576
3580
  <xsl:otherwise>
3577
- <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
3581
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
3578
3582
  </xsl:otherwise>
3579
3583
  </xsl:choose>
3580
3584
 
@@ -4089,7 +4093,7 @@
4089
4093
  <xsl:param name="colwidths"/>
4090
4094
  <xsl:param name="colgroup"/>
4091
4095
 
4092
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
4096
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
4093
4097
 
4094
4098
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
4095
4099
 
@@ -4162,6 +4166,7 @@
4162
4166
  <xsl:apply-templates select="../*[local-name()='p']"/>
4163
4167
  <xsl:apply-templates select="../*[local-name()='dl']"/>
4164
4168
  <xsl:apply-templates select="../*[local-name()='note']"/>
4169
+ <xsl:apply-templates select="../*[local-name()='example']"/>
4165
4170
  <xsl:apply-templates select="../*[local-name()='source']"/>
4166
4171
 
4167
4172
  <xsl:variable name="isDisplayRowSeparator">
@@ -4170,7 +4175,7 @@
4170
4175
 
4171
4176
  <!-- horizontal row separator -->
4172
4177
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
4173
- <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
4178
+ <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
4174
4179
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
4175
4180
 
4176
4181
  <xsl:call-template name="setBordersTableArray"/>
@@ -4431,13 +4436,13 @@
4431
4436
  </fo:table-cell>
4432
4437
  </xsl:template> <!-- td -->
4433
4438
 
4434
- <xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
4439
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
4435
4440
 
4436
4441
  <fo:block xsl:use-attribute-sets="table-note-style">
4437
4442
 
4438
4443
  <xsl:call-template name="refine_table-note-style"/>
4439
4444
 
4440
- <!-- Table's note name (NOTE, for example) -->
4445
+ <!-- Table's note/example name (NOTE, for example) -->
4441
4446
  <fo:inline xsl:use-attribute-sets="table-note-name-style">
4442
4447
 
4443
4448
  <xsl:call-template name="refine_table-note-name-style"/>
@@ -4451,7 +4456,7 @@
4451
4456
 
4452
4457
  </xsl:template> <!-- table/note -->
4453
4458
 
4454
- <xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
4459
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
4455
4460
  <xsl:apply-templates/>
4456
4461
  </xsl:template>
4457
4462
 
@@ -6026,7 +6031,10 @@
6026
6031
  </xsl:choose>
6027
6032
  </xsl:variable>
6028
6033
 
6029
- <xsl:value-of select="$text9"/>
6034
+ <!-- replace sequence #x200B and space TO space -->
6035
+ <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
6036
+
6037
+ <xsl:value-of select="$text10"/>
6030
6038
  </xsl:template>
6031
6039
 
6032
6040
  <xsl:template name="add-zero-spaces-link-java">
@@ -7119,7 +7127,7 @@
7119
7127
  <xsl:call-template name="insert_basic_link">
7120
7128
  <xsl:with-param name="element">
7121
7129
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
7122
- <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://'))">
7130
+ <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
7123
7131
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7124
7132
  </xsl:if>
7125
7133
  <xsl:if test="parent::*[local-name() = 'add']">
@@ -9458,6 +9466,12 @@
9458
9466
 
9459
9467
  </xsl:template>
9460
9468
 
9469
+ <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
9470
+ <fo:inline xsl:use-attribute-sets="example-name-style">
9471
+ <xsl:apply-templates/>
9472
+ </fo:inline>
9473
+ </xsl:template>
9474
+
9461
9475
  <xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
9462
9476
  <xsl:param name="fo_element">block</xsl:param>
9463
9477
 
@@ -10028,6 +10042,9 @@
10028
10042
  <xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
10029
10043
  </xsl:choose>
10030
10044
  </xsl:when>
10045
+ <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
10046
+ <xsl:value-of select="@label"/>
10047
+ </xsl:when>
10031
10048
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
10032
10049
 
10033
10050
  <!-- Example: for BSI <?list-start 2?> -->
@@ -10085,10 +10102,10 @@
10085
10102
  <xsl:when test="$type = 'arabic'">
10086
10103
  1.
10087
10104
  </xsl:when>
10088
- <xsl:when test="$type = 'alphabet'">
10105
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
10089
10106
  a)
10090
10107
  </xsl:when>
10091
- <xsl:when test="$type = 'alphabet_upper'">
10108
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
10092
10109
  A)
10093
10110
  </xsl:when>
10094
10111
  <xsl:when test="$type = 'roman'">
@@ -10228,7 +10245,7 @@
10228
10245
  <xsl:call-template name="append_add-style"/>
10229
10246
  </xsl:if>
10230
10247
 
10231
- <xsl:call-template name="getListItemFormat"/>
10248
+ <xsl:call-template name="getListItemFormat"/>
10232
10249
 
10233
10250
  </fo:block>
10234
10251
  </fo:list-item-label>