metanorma-ogc 2.3.10 → 2.3.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -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">
@@ -2587,6 +2591,10 @@
2587
2591
  </xsl:attribute-set> <!-- formula-stem-number-style -->
2588
2592
  <!-- End Formula's styles -->
2589
2593
 
2594
+ <xsl:template name="refine_formula-stem-number-style">
2595
+
2596
+ </xsl:template>
2597
+
2590
2598
  <xsl:attribute-set name="image-style">
2591
2599
  <xsl:attribute name="text-align">center</xsl:attribute>
2592
2600
 
@@ -3100,13 +3108,13 @@
3100
3108
 
3101
3109
  <xsl:template name="processPrefaceSectionsDefault_Contents">
3102
3110
  <xsl:variable name="nodes_preface_">
3103
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
3111
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
3104
3112
  <node id="{@id}"/>
3105
3113
  </xsl:for-each>
3106
3114
  </xsl:variable>
3107
3115
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
3108
3116
 
3109
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
3117
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
3110
3118
  <xsl:sort select="@displayorder" data-type="number"/>
3111
3119
 
3112
3120
  <!-- process Section's title -->
@@ -3140,12 +3148,12 @@
3140
3148
  <xsl:apply-templates select="." mode="contents"/>
3141
3149
  </xsl:for-each>
3142
3150
 
3143
- <xsl:for-each select="/*/*[local-name()='annex']">
3151
+ <!-- <xsl:for-each select="/*/*[local-name()='annex']">
3144
3152
  <xsl:sort select="@displayorder" data-type="number"/>
3145
3153
  <xsl:apply-templates select="." mode="contents"/>
3146
- </xsl:for-each>
3154
+ </xsl:for-each> -->
3147
3155
 
3148
- <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) &gt; 0] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) &gt; 0]">
3156
+ <xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) &gt; 0] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) &gt; 0]">
3149
3157
  <xsl:sort select="@displayorder" data-type="number"/>
3150
3158
  <xsl:apply-templates select="." mode="contents"/>
3151
3159
  </xsl:for-each>
@@ -3530,7 +3538,7 @@
3530
3538
  </xsl:attribute>
3531
3539
  </xsl:for-each>
3532
3540
 
3533
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3541
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3534
3542
  <xsl:if test="$isNoteOrFnExist = 'true'">
3535
3543
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
3536
3544
  </xsl:if>
@@ -3574,7 +3582,7 @@
3574
3582
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
3575
3583
  </xsl:when>
3576
3584
  <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 -->
3585
+ <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
3586
  </xsl:otherwise>
3579
3587
  </xsl:choose>
3580
3588
 
@@ -3659,7 +3667,7 @@
3659
3667
  <xsl:param name="continued"/>
3660
3668
  <xsl:if test="normalize-space() != ''">
3661
3669
 
3662
- <fo:block xsl:use-attribute-sets="table-name-style">
3670
+ <fo:block xsl:use-attribute-sets="table-name-style" role="SKIP">
3663
3671
 
3664
3672
  <xsl:call-template name="refine_table-name-style">
3665
3673
  <xsl:with-param name="continued" select="$continued"/>
@@ -4044,8 +4052,8 @@
4044
4052
  <xsl:template name="table-header-title">
4045
4053
  <xsl:param name="cols-count"/>
4046
4054
  <!-- row for title -->
4047
- <fo:table-row>
4048
- <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
4055
+ <fo:table-row role="SKIP">
4056
+ <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black" role="SKIP">
4049
4057
 
4050
4058
  <xsl:call-template name="refine_table-header-title-style"/>
4051
4059
 
@@ -4054,7 +4062,7 @@
4054
4062
  </xsl:apply-templates>
4055
4063
 
4056
4064
  <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
4057
- <fo:block/>
4065
+ <fo:block role="SKIP"/>
4058
4066
  </xsl:if>
4059
4067
 
4060
4068
  </fo:table-cell>
@@ -4089,7 +4097,7 @@
4089
4097
  <xsl:param name="colwidths"/>
4090
4098
  <xsl:param name="colgroup"/>
4091
4099
 
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']"/>
4100
+ <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
4101
 
4094
4102
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
4095
4103
 
@@ -4162,6 +4170,7 @@
4162
4170
  <xsl:apply-templates select="../*[local-name()='p']"/>
4163
4171
  <xsl:apply-templates select="../*[local-name()='dl']"/>
4164
4172
  <xsl:apply-templates select="../*[local-name()='note']"/>
4173
+ <xsl:apply-templates select="../*[local-name()='example']"/>
4165
4174
  <xsl:apply-templates select="../*[local-name()='source']"/>
4166
4175
 
4167
4176
  <xsl:variable name="isDisplayRowSeparator">
@@ -4170,7 +4179,7 @@
4170
4179
 
4171
4180
  <!-- horizontal row separator -->
4172
4181
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
4173
- <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
4182
+ <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
4174
4183
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
4175
4184
 
4176
4185
  <xsl:call-template name="setBordersTableArray"/>
@@ -4364,7 +4373,7 @@
4364
4373
 
4365
4374
  <xsl:call-template name="refine_table-header-cell-style"/>
4366
4375
 
4367
- <fo:block>
4376
+ <fo:block role="SKIP">
4368
4377
  <xsl:apply-templates/>
4369
4378
  </fo:block>
4370
4379
  </fo:table-cell>
@@ -4417,7 +4426,7 @@
4417
4426
  <xsl:attribute name="text-align">left</xsl:attribute>
4418
4427
  </xsl:if>
4419
4428
 
4420
- <fo:block>
4429
+ <fo:block role="SKIP">
4421
4430
 
4422
4431
  <xsl:if test="$isGenerateTableIF = 'true'">
4423
4432
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -4431,13 +4440,13 @@
4431
4440
  </fo:table-cell>
4432
4441
  </xsl:template> <!-- td -->
4433
4442
 
4434
- <xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
4443
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
4435
4444
 
4436
4445
  <fo:block xsl:use-attribute-sets="table-note-style">
4437
4446
 
4438
4447
  <xsl:call-template name="refine_table-note-style"/>
4439
4448
 
4440
- <!-- Table's note name (NOTE, for example) -->
4449
+ <!-- Table's note/example name (NOTE, for example) -->
4441
4450
  <fo:inline xsl:use-attribute-sets="table-note-name-style">
4442
4451
 
4443
4452
  <xsl:call-template name="refine_table-note-name-style"/>
@@ -4451,7 +4460,7 @@
4451
4460
 
4452
4461
  </xsl:template> <!-- table/note -->
4453
4462
 
4454
- <xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
4463
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
4455
4464
  <xsl:apply-templates/>
4456
4465
  </xsl:template>
4457
4466
 
@@ -5291,7 +5300,7 @@
5291
5300
  -->
5292
5301
  <fo:table-row>
5293
5302
  <fo:table-cell number-columns-spanned="2">
5294
- <fo:block>
5303
+ <fo:block role="SKIP">
5295
5304
  <xsl:call-template name="note"/>
5296
5305
  </fo:block>
5297
5306
  </fo:table-cell>
@@ -5363,7 +5372,7 @@
5363
5372
 
5364
5373
  <xsl:call-template name="refine_dt-cell-style"/>
5365
5374
 
5366
- <fo:block xsl:use-attribute-sets="dt-block-style">
5375
+ <fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
5367
5376
  <xsl:copy-of select="@id"/>
5368
5377
 
5369
5378
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -5393,7 +5402,7 @@
5393
5402
 
5394
5403
  <xsl:call-template name="refine_dd-cell-style"/>
5395
5404
 
5396
- <fo:block>
5405
+ <fo:block role="SKIP">
5397
5406
 
5398
5407
  <xsl:if test="$isGenerateTableIF = 'true'">
5399
5408
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -5535,10 +5544,15 @@
5535
5544
  <!-- ========================= -->
5536
5545
  <xsl:template match="*[local-name()='em']">
5537
5546
  <fo:inline font-style="italic">
5547
+ <xsl:call-template name="refine_italic_style"/>
5538
5548
  <xsl:apply-templates/>
5539
5549
  </fo:inline>
5540
5550
  </xsl:template>
5541
5551
 
5552
+ <xsl:template name="refine_italic_style">
5553
+
5554
+ </xsl:template>
5555
+
5542
5556
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
5543
5557
  <xsl:param name="split_keep-within-line"/>
5544
5558
  <fo:inline font-weight="bold">
@@ -5766,11 +5780,41 @@
5766
5780
 
5767
5781
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
5768
5782
  <xsl:variable name="text" select="normalize-space(.)"/>
5769
- <fo:inline font-size="75%">
5783
+ <fo:inline font-size="75%" role="SKIP">
5770
5784
  <xsl:if test="string-length($text) &gt; 0">
5771
- <xsl:call-template name="recursiveSmallCaps">
5772
- <xsl:with-param name="text" select="$text"/>
5773
- </xsl:call-template>
5785
+ <xsl:variable name="smallCapsText">
5786
+ <xsl:call-template name="recursiveSmallCaps">
5787
+ <xsl:with-param name="text" select="$text"/>
5788
+ </xsl:call-template>
5789
+ </xsl:variable>
5790
+ <!-- merge neighboring fo:inline -->
5791
+ <xsl:for-each select="xalan:nodeset($smallCapsText)/node()">
5792
+ <xsl:choose>
5793
+ <xsl:when test="self::fo:inline and preceding-sibling::node()[1][self::fo:inline]"><!-- <xsl:copy-of select="."/> --></xsl:when>
5794
+ <xsl:when test="self::fo:inline and @font-size">
5795
+ <xsl:variable name="curr_pos" select="count(preceding-sibling::node()) + 1"/>
5796
+ <!-- <curr_pos><xsl:value-of select="$curr_pos"/></curr_pos> -->
5797
+ <xsl:variable name="next_text_" select="count(following-sibling::node()[not(local-name() = 'inline')][1]/preceding-sibling::node())"/>
5798
+ <xsl:variable name="next_text">
5799
+ <xsl:choose>
5800
+ <xsl:when test="$next_text_ = 0">99999999</xsl:when>
5801
+ <xsl:otherwise><xsl:value-of select="$next_text_ + 1"/></xsl:otherwise>
5802
+ </xsl:choose>
5803
+ </xsl:variable>
5804
+ <!-- <next_text><xsl:value-of select="$next_text"/></next_text> -->
5805
+ <fo:inline>
5806
+ <xsl:copy-of select="@*"/>
5807
+ <xsl:copy-of select="./node()"/>
5808
+ <xsl:for-each select="following-sibling::node()[position() &lt; $next_text - $curr_pos]"> <!-- [self::fo:inline] -->
5809
+ <xsl:copy-of select="./node()"/>
5810
+ </xsl:for-each>
5811
+ </fo:inline>
5812
+ </xsl:when>
5813
+ <xsl:otherwise>
5814
+ <xsl:copy-of select="."/>
5815
+ </xsl:otherwise>
5816
+ </xsl:choose>
5817
+ </xsl:for-each>
5774
5818
  </xsl:if>
5775
5819
  </fo:inline>
5776
5820
  </xsl:template>
@@ -5782,7 +5826,7 @@
5782
5826
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
5783
5827
  <xsl:choose>
5784
5828
  <xsl:when test="$char=$upperCase">
5785
- <fo:inline font-size="{100 div 0.75}%">
5829
+ <fo:inline font-size="{100 div 0.75}%" role="SKIP">
5786
5830
  <xsl:value-of select="$upperCase"/>
5787
5831
  </fo:inline>
5788
5832
  </xsl:when>
@@ -5944,6 +5988,10 @@
5944
5988
 
5945
5989
  <xsl:when test="not(contains($text, $separator))">
5946
5990
  <word>
5991
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
5992
+ <xsl:text>
5993
+  </xsl:text> <!-- to add distance between dt and dd -->
5994
+ </xsl:if>
5947
5995
  <xsl:call-template name="enclose_text_in_tags">
5948
5996
  <xsl:with-param name="text" select="normalize-space($text)"/>
5949
5997
  <xsl:with-param name="tags" select="$tags"/>
@@ -5952,6 +6000,10 @@
5952
6000
  </xsl:when>
5953
6001
  <xsl:otherwise>
5954
6002
  <word>
6003
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
6004
+ <xsl:text>
6005
+  </xsl:text> <!-- to add distance between dt and dd -->
6006
+ </xsl:if>
5955
6007
  <xsl:call-template name="enclose_text_in_tags">
5956
6008
  <xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
5957
6009
  <xsl:with-param name="tags" select="$tags"/>
@@ -6026,7 +6078,10 @@
6026
6078
  </xsl:choose>
6027
6079
  </xsl:variable>
6028
6080
 
6029
- <xsl:value-of select="$text9"/>
6081
+ <!-- replace sequence #x200B and space TO space -->
6082
+ <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
6083
+
6084
+ <xsl:value-of select="$text10"/>
6030
6085
  </xsl:template>
6031
6086
 
6032
6087
  <xsl:template name="add-zero-spaces-link-java">
@@ -6132,6 +6187,10 @@
6132
6187
  <xsl:template name="getSimpleTable">
6133
6188
  <xsl:param name="id"/>
6134
6189
 
6190
+ <!-- <test0>
6191
+ <xsl:copy-of select="."/>
6192
+ </test0> -->
6193
+
6135
6194
  <xsl:variable name="simple-table">
6136
6195
 
6137
6196
  <!-- Step 0. replace <br/> to <p>...</p> -->
@@ -7119,7 +7178,7 @@
7119
7178
  <xsl:call-template name="insert_basic_link">
7120
7179
  <xsl:with-param name="element">
7121
7180
  <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://'))">
7181
+ <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
7182
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7124
7183
  </xsl:if>
7125
7184
  <xsl:if test="parent::*[local-name() = 'add']">
@@ -7181,7 +7240,7 @@
7181
7240
  <fo:table-body>
7182
7241
  <fo:table-row>
7183
7242
  <fo:table-cell display-align="center">
7184
- <fo:block xsl:use-attribute-sets="formula-stem-block-style">
7243
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
7185
7244
 
7186
7245
  <xsl:call-template name="refine_formula-stem-block-style"/>
7187
7246
 
@@ -7189,7 +7248,10 @@
7189
7248
  </fo:block>
7190
7249
  </fo:table-cell>
7191
7250
  <fo:table-cell display-align="center">
7192
- <fo:block xsl:use-attribute-sets="formula-stem-number-style">
7251
+ <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
7252
+
7253
+ <xsl:call-template name="refine_formula-stem-number-style"/>
7254
+
7193
7255
  <xsl:apply-templates select="../*[local-name() = 'name']"/>
7194
7256
  </fo:block>
7195
7257
  </fo:table-cell>
@@ -8732,7 +8794,7 @@
8732
8794
  <!-- second td with sourcecode -->
8733
8795
  <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
8734
8796
  <fo:table-cell>
8735
- <fo:block>
8797
+ <fo:block role="SKIP">
8736
8798
  <xsl:apply-templates/>
8737
8799
  </fo:block>
8738
8800
  </fo:table-cell>
@@ -9238,7 +9300,7 @@
9238
9300
 
9239
9301
  <xsl:call-template name="setTableCellAttributes"/>
9240
9302
 
9241
- <fo:block>
9303
+ <fo:block role="SKIP">
9242
9304
  <xsl:apply-templates/>
9243
9305
  </fo:block>
9244
9306
  </fo:table-cell>
@@ -9260,7 +9322,7 @@
9260
9322
 
9261
9323
  <xsl:call-template name="setTableCellAttributes"/>
9262
9324
 
9263
- <fo:block>
9325
+ <fo:block role="SKIP">
9264
9326
  <xsl:apply-templates/>
9265
9327
  </fo:block>
9266
9328
  </fo:table-cell>
@@ -9458,6 +9520,12 @@
9458
9520
 
9459
9521
  </xsl:template>
9460
9522
 
9523
+ <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
9524
+ <fo:inline xsl:use-attribute-sets="example-name-style">
9525
+ <xsl:apply-templates/>
9526
+ </fo:inline>
9527
+ </xsl:template>
9528
+
9461
9529
  <xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
9462
9530
  <xsl:param name="fo_element">block</xsl:param>
9463
9531
 
@@ -10028,6 +10096,50 @@
10028
10096
  <xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
10029
10097
  </xsl:choose>
10030
10098
  </xsl:when>
10099
+ <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
10100
+
10101
+ <xsl:variable name="label">
10102
+
10103
+ <xsl:variable name="type" select="../@type"/>
10104
+
10105
+ <xsl:variable name="style_prefix_">
10106
+ <xsl:if test="$type = 'roman'">
10107
+ <!-- Example: (i) -->
10108
+ </xsl:if>
10109
+ </xsl:variable>
10110
+ <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
10111
+
10112
+ <xsl:variable name="style_suffix_">
10113
+ <xsl:choose>
10114
+ <xsl:when test="$type = 'arabic'">
10115
+ .
10116
+ </xsl:when>
10117
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
10118
+ )
10119
+ </xsl:when>
10120
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
10121
+ )
10122
+ </xsl:when>
10123
+ <xsl:when test="$type = 'roman'">
10124
+ )
10125
+ </xsl:when>
10126
+ <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
10127
+ </xsl:choose>
10128
+ </xsl:variable>
10129
+ <xsl:variable name="style_suffix" select="normalize-space($style_suffix_)"/>
10130
+
10131
+ <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
10132
+ <xsl:value-of select="$style_prefix"/>
10133
+ </xsl:if>
10134
+ <xsl:value-of select="@label"/>
10135
+ <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
10136
+ <xsl:value-of select="$style_suffix"/>
10137
+ </xsl:if>
10138
+ </xsl:variable>
10139
+
10140
+ <xsl:value-of select="normalize-space($label)"/>
10141
+
10142
+ </xsl:when>
10031
10143
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
10032
10144
 
10033
10145
  <!-- Example: for BSI <?list-start 2?> -->
@@ -10085,10 +10197,10 @@
10085
10197
  <xsl:when test="$type = 'arabic'">
10086
10198
  1.
10087
10199
  </xsl:when>
10088
- <xsl:when test="$type = 'alphabet'">
10200
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
10089
10201
  a)
10090
10202
  </xsl:when>
10091
- <xsl:when test="$type = 'alphabet_upper'">
10203
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
10092
10204
  A)
10093
10205
  </xsl:when>
10094
10206
  <xsl:when test="$type = 'roman'">
@@ -10219,7 +10331,7 @@
10219
10331
  <xsl:call-template name="refine_list-item-style"/>
10220
10332
 
10221
10333
  <fo:list-item-label end-indent="label-end()">
10222
- <fo:block xsl:use-attribute-sets="list-item-label-style">
10334
+ <fo:block xsl:use-attribute-sets="list-item-label-style" role="SKIP">
10223
10335
 
10224
10336
  <xsl:call-template name="refine_list-item-label-style"/>
10225
10337
 
@@ -10228,12 +10340,12 @@
10228
10340
  <xsl:call-template name="append_add-style"/>
10229
10341
  </xsl:if>
10230
10342
 
10231
- <xsl:call-template name="getListItemFormat"/>
10343
+ <xsl:call-template name="getListItemFormat"/>
10232
10344
 
10233
10345
  </fo:block>
10234
10346
  </fo:list-item-label>
10235
10347
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
10236
- <fo:block>
10348
+ <fo:block role="SKIP">
10237
10349
 
10238
10350
  <xsl:call-template name="refine_list-item-body-style"/>
10239
10351
 
@@ -10512,10 +10624,10 @@
10512
10624
  <fo:table-body>
10513
10625
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
10514
10626
 
10515
- <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
10516
- <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
10517
- <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
10518
- <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
10627
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
10628
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
10629
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
10630
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Pages</fo:block></fo:table-cell>
10519
10631
  </fo:table-row>
10520
10632
  <xsl:apply-templates/>
10521
10633
  </fo:table-body>
@@ -10530,7 +10642,7 @@
10530
10642
 
10531
10643
  <xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
10532
10644
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
10533
- <fo:block><xsl:apply-templates/></fo:block>
10645
+ <fo:block role="SKIP"><xsl:apply-templates/></fo:block>
10534
10646
  </fo:table-cell>
10535
10647
  </xsl:template>
10536
10648
  <!-- ============ -->
@@ -10601,8 +10713,8 @@
10601
10713
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
10602
10714
  <fo:list-item>
10603
10715
  <fo:list-item-label end-indent="label-end()">
10604
- <fo:block>
10605
- <fo:inline>
10716
+ <fo:block role="SKIP">
10717
+ <fo:inline role="SKIP">
10606
10718
 
10607
10719
  <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
10608
10720
  <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
@@ -10611,7 +10723,7 @@
10611
10723
  </fo:block>
10612
10724
  </fo:list-item-label>
10613
10725
  <fo:list-item-body start-indent="body-start()">
10614
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style">
10726
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
10615
10727
  <xsl:call-template name="processBibitem">
10616
10728
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
10617
10729
  </xsl:call-template>
@@ -10833,7 +10945,7 @@
10833
10945
  <xsl:for-each select="*[local-name() = 'tab']">
10834
10946
  <xsl:variable name="current_id" select="generate-id()"/>
10835
10947
  <fo:table-cell>
10836
- <fo:block line-height-shift-adjustment="disregard-shifts">
10948
+ <fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
10837
10949
  <xsl:call-template name="insert_basic_link">
10838
10950
  <xsl:with-param name="element">
10839
10951
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -10851,7 +10963,7 @@
10851
10963
  </xsl:for-each>
10852
10964
  <!-- last column - for page numbers -->
10853
10965
  <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
10854
- <fo:block>
10966
+ <fo:block role="SKIP">
10855
10967
  <xsl:call-template name="insert_basic_link">
10856
10968
  <xsl:with-param name="element">
10857
10969
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">