metanorma-ieee 1.0.12 → 1.0.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -4748,6 +4748,7 @@
4748
4748
  </xsl:attribute-set>
4749
4749
 
4750
4750
  <xsl:attribute-set name="figure-block-style">
4751
+ <xsl:attribute name="role">SKIP</xsl:attribute>
4751
4752
 
4752
4753
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4753
4754
 
@@ -4758,6 +4759,7 @@
4758
4759
  </xsl:attribute-set>
4759
4760
 
4760
4761
  <xsl:attribute-set name="figure-name-style">
4762
+ <xsl:attribute name="role">Caption</xsl:attribute>
4761
4763
 
4762
4764
  <xsl:attribute name="font-family">Arial</xsl:attribute>
4763
4765
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -4806,7 +4808,12 @@
4806
4808
  </xsl:attribute-set> <!-- formula-stem-number-style -->
4807
4809
  <!-- End Formula's styles -->
4808
4810
 
4811
+ <xsl:template name="refine_formula-stem-number-style">
4812
+
4813
+ </xsl:template>
4814
+
4809
4815
  <xsl:attribute-set name="image-style">
4816
+ <xsl:attribute name="role">SKIP</xsl:attribute>
4810
4817
  <xsl:attribute name="text-align">center</xsl:attribute>
4811
4818
 
4812
4819
  </xsl:attribute-set>
@@ -5084,6 +5091,13 @@
5084
5091
 
5085
5092
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
5086
5093
 
5094
+ <xsl:attribute-set name="bibitem-non-normative-list-item-style">
5095
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5096
+
5097
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5098
+
5099
+ </xsl:attribute-set>
5100
+
5087
5101
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
5088
5102
  <xsl:attribute-set name="bibitem-normative-list-body-style">
5089
5103
 
@@ -5308,13 +5322,13 @@
5308
5322
 
5309
5323
  <xsl:template name="processPrefaceSectionsDefault_Contents">
5310
5324
  <xsl:variable name="nodes_preface_">
5311
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
5325
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
5312
5326
  <node id="{@id}"/>
5313
5327
  </xsl:for-each>
5314
5328
  </xsl:variable>
5315
5329
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
5316
5330
 
5317
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
5331
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
5318
5332
  <xsl:sort select="@displayorder" data-type="number"/>
5319
5333
 
5320
5334
  <!-- process Section's title -->
@@ -5348,12 +5362,12 @@
5348
5362
  <xsl:apply-templates select="." mode="contents"/>
5349
5363
  </xsl:for-each>
5350
5364
 
5351
- <xsl:for-each select="/*/*[local-name()='annex']">
5365
+ <!-- <xsl:for-each select="/*/*[local-name()='annex']">
5352
5366
  <xsl:sort select="@displayorder" data-type="number"/>
5353
5367
  <xsl:apply-templates select="." mode="contents"/>
5354
- </xsl:for-each>
5368
+ </xsl:for-each> -->
5355
5369
 
5356
- <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]">
5370
+ <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]">
5357
5371
  <xsl:sort select="@displayorder" data-type="number"/>
5358
5372
  <xsl:apply-templates select="." mode="contents"/>
5359
5373
  </xsl:for-each>
@@ -5483,14 +5497,14 @@
5483
5497
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
5484
5498
  </xsl:when>
5485
5499
  <xsl:otherwise>
5486
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
5500
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
5487
5501
  </xsl:otherwise>
5488
5502
  </xsl:choose>
5489
5503
  </xsl:for-each>
5490
5504
  </xsl:when>
5491
5505
 
5492
5506
  <xsl:otherwise>
5493
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
5507
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
5494
5508
  </xsl:otherwise>
5495
5509
 
5496
5510
  </xsl:choose>
@@ -5500,7 +5514,7 @@
5500
5514
  <!-- Preface boilerplate sections processing -->
5501
5515
  <!-- ================================= -->
5502
5516
  <xsl:template match="*[local-name()='copyright-statement']">
5503
- <fo:block xsl:use-attribute-sets="copyright-statement-style">
5517
+ <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
5504
5518
  <xsl:apply-templates/>
5505
5519
  </fo:block>
5506
5520
  </xsl:template> <!-- copyright-statement -->
@@ -5668,7 +5682,7 @@
5668
5682
  </xsl:choose>
5669
5683
  </xsl:variable>
5670
5684
 
5671
- <fo:block-container xsl:use-attribute-sets="table-container-style">
5685
+ <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
5672
5686
 
5673
5687
  <xsl:call-template name="refine_table-container-style">
5674
5688
  <xsl:with-param name="margin-side" select="$margin-side"/>
@@ -6218,8 +6232,8 @@
6218
6232
  <xsl:template name="table-header-title">
6219
6233
  <xsl:param name="cols-count"/>
6220
6234
  <!-- row for title -->
6221
- <fo:table-row>
6222
- <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">
6235
+ <fo:table-row role="SKIP">
6236
+ <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">
6223
6237
 
6224
6238
  <xsl:call-template name="refine_table-header-title-style"/>
6225
6239
 
@@ -6227,12 +6241,12 @@
6227
6241
  <xsl:attribute name="border-bottom">0.5 solid black</xsl:attribute>
6228
6242
  </xsl:if>
6229
6243
 
6230
- <fo:block xsl:use-attribute-sets="table-name-style">
6244
+ <fo:block xsl:use-attribute-sets="table-name-style" role="SKIP">
6231
6245
  <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
6232
6246
  <xsl:with-param name="continued">true</xsl:with-param>
6233
6247
  </xsl:apply-templates>
6234
6248
 
6235
- <fo:inline font-weight="normal" font-style="italic">
6249
+ <fo:inline font-weight="normal" font-style="italic" role="SKIP">
6236
6250
  <xsl:text> </xsl:text>
6237
6251
  <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
6238
6252
  </fo:inline>
@@ -6433,21 +6447,21 @@
6433
6447
  <xsl:variable name="title_start" select="ancestor::*[local-name()='table'][1]/*[local-name()='name']/node()[1][self::text()]"/>
6434
6448
  <xsl:variable name="table_number" select="substring-before($title_start, '—')"/>
6435
6449
 
6436
- <fo:table-row height="0" keep-with-next.within-page="always">
6437
- <fo:table-cell>
6450
+ <fo:table-row height="0" keep-with-next.within-page="always" role="SKIP">
6451
+ <fo:table-cell role="SKIP">
6438
6452
 
6439
6453
  <fo:marker marker-class-name="table_continued"/>
6440
6454
 
6441
- <fo:block/>
6455
+ <fo:block role="SKIP"/>
6442
6456
  </fo:table-cell>
6443
6457
  </fo:table-row>
6444
- <fo:table-row height="0" keep-with-next.within-page="always">
6445
- <fo:table-cell>
6458
+ <fo:table-row height="0" keep-with-next.within-page="always" role="SKIP">
6459
+ <fo:table-cell role="SKIP">
6446
6460
 
6447
6461
  <fo:marker marker-class-name="table_continued">
6448
6462
  <xsl:value-of select="$title_continued"/>
6449
6463
  </fo:marker>
6450
- <fo:block/>
6464
+ <fo:block role="SKIP"/>
6451
6465
  </fo:table-cell>
6452
6466
  </fo:table-row>
6453
6467
 
@@ -6588,7 +6602,7 @@
6588
6602
 
6589
6603
  <xsl:call-template name="refine_table-header-cell-style"/>
6590
6604
 
6591
- <fo:block>
6605
+ <fo:block role="SKIP">
6592
6606
  <xsl:apply-templates/>
6593
6607
  </fo:block>
6594
6608
  </fo:table-cell>
@@ -6641,7 +6655,7 @@
6641
6655
  <xsl:attribute name="text-align">left</xsl:attribute>
6642
6656
  </xsl:if>
6643
6657
 
6644
- <fo:block>
6658
+ <fo:block role="SKIP">
6645
6659
 
6646
6660
  <xsl:if test="$isGenerateTableIF = 'true'">
6647
6661
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -6734,7 +6748,7 @@
6734
6748
  </xsl:choose>
6735
6749
  </xsl:variable>
6736
6750
  <xsl:variable name="footnote_inline">
6737
- <fo:inline>
6751
+ <fo:inline role="Reference">
6738
6752
 
6739
6753
  <xsl:variable name="fn_styles">
6740
6754
  <xsl:choose>
@@ -6757,7 +6771,7 @@
6757
6771
 
6758
6772
  <xsl:call-template name="insert_basic_link">
6759
6773
  <xsl:with-param name="element">
6760
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
6774
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
6761
6775
  <xsl:copy-of select="$current_fn_number_text"/>
6762
6776
  </fo:basic-link>
6763
6777
  </xsl:with-param>
@@ -6770,17 +6784,17 @@
6770
6784
  <xsl:copy-of select="$footnote_inline"/>
6771
6785
  </xsl:when>
6772
6786
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
6773
- <fo:footnote xsl:use-attribute-sets="fn-style">
6787
+ <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
6774
6788
  <xsl:copy-of select="$footnote_inline"/>
6775
- <fo:footnote-body>
6789
+ <fo:footnote-body role="Note">
6776
6790
 
6777
- <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
6791
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
6778
6792
 
6779
- <fo:block xsl:use-attribute-sets="fn-body-style">
6793
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
6780
6794
 
6781
6795
  <xsl:call-template name="refine_fn-body-style"/>
6782
6796
 
6783
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
6797
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
6784
6798
 
6785
6799
  <xsl:call-template name="refine_fn-body-num-style"/>
6786
6800
 
@@ -7042,11 +7056,11 @@
7042
7056
  </xsl:template>
7043
7057
 
7044
7058
  <xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
7045
- <fo:inline><xsl:value-of select="."/></fo:inline>
7059
+ <fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
7046
7060
  </xsl:template>
7047
7061
 
7048
7062
  <xsl:template match="*[local-name()='fn']//*[local-name()='p']">
7049
- <fo:inline>
7063
+ <fo:inline role="P">
7050
7064
  <xsl:apply-templates/>
7051
7065
  </fo:inline>
7052
7066
  </xsl:template>
@@ -7061,7 +7075,7 @@
7061
7075
  <xsl:variable name="isAdded" select="@added"/>
7062
7076
  <xsl:variable name="isDeleted" select="@deleted"/>
7063
7077
  <!-- <dl><xsl:copy-of select="."/></dl> -->
7064
- <fo:block-container xsl:use-attribute-sets="dl-block-style">
7078
+ <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
7065
7079
 
7066
7080
  <xsl:call-template name="setBlockSpanAll"/>
7067
7081
 
@@ -7096,7 +7110,7 @@
7096
7110
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
7097
7111
  </xsl:call-template>
7098
7112
 
7099
- <fo:block-container margin-left="0mm">
7113
+ <fo:block-container margin-left="0mm" role="SKIP">
7100
7114
 
7101
7115
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
7102
7116
 
@@ -7161,7 +7175,7 @@
7161
7175
 
7162
7176
  <!-- a few components -->
7163
7177
  <xsl:if test="$onlyOneComponent = 'false'">
7164
- <fo:block>
7178
+ <fo:block role="SKIP">
7165
7179
 
7166
7180
  <xsl:call-template name="refine_multicomponent_style"/>
7167
7181
 
@@ -7169,7 +7183,7 @@
7169
7183
  <xsl:attribute name="margin-top">0</xsl:attribute>
7170
7184
  </xsl:if>
7171
7185
 
7172
- <fo:block>
7186
+ <fo:block role="SKIP">
7173
7187
 
7174
7188
  <xsl:call-template name="refine_multicomponent_block_style"/>
7175
7189
 
@@ -7504,7 +7518,7 @@
7504
7518
  -->
7505
7519
  <fo:table-row>
7506
7520
  <fo:table-cell number-columns-spanned="2">
7507
- <fo:block>
7521
+ <fo:block role="SKIP">
7508
7522
  <xsl:call-template name="note"/>
7509
7523
  </fo:block>
7510
7524
  </fo:table-cell>
@@ -7569,7 +7583,7 @@
7569
7583
 
7570
7584
  <xsl:call-template name="refine_dt-cell-style"/>
7571
7585
 
7572
- <fo:block xsl:use-attribute-sets="dt-block-style">
7586
+ <fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
7573
7587
  <xsl:copy-of select="@id"/>
7574
7588
 
7575
7589
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -7599,7 +7613,7 @@
7599
7613
 
7600
7614
  <xsl:call-template name="refine_dd-cell-style"/>
7601
7615
 
7602
- <fo:block>
7616
+ <fo:block role="SKIP">
7603
7617
 
7604
7618
  <xsl:if test="$isGenerateTableIF = 'true'">
7605
7619
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -7764,6 +7778,9 @@
7764
7778
 
7765
7779
  <xsl:template name="refine_strong_style">
7766
7780
 
7781
+ <xsl:if test="ancestor::*['preferred']">
7782
+ <xsl:attribute name="role">SKIP</xsl:attribute>
7783
+ </xsl:if>
7767
7784
  </xsl:template>
7768
7785
 
7769
7786
  <xsl:template match="*[local-name()='padding']">
@@ -7972,11 +7989,41 @@
7972
7989
 
7973
7990
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
7974
7991
  <xsl:variable name="text" select="normalize-space(.)"/>
7975
- <fo:inline font-size="75%">
7992
+ <fo:inline font-size="75%" role="SKIP">
7976
7993
  <xsl:if test="string-length($text) &gt; 0">
7977
- <xsl:call-template name="recursiveSmallCaps">
7978
- <xsl:with-param name="text" select="$text"/>
7979
- </xsl:call-template>
7994
+ <xsl:variable name="smallCapsText">
7995
+ <xsl:call-template name="recursiveSmallCaps">
7996
+ <xsl:with-param name="text" select="$text"/>
7997
+ </xsl:call-template>
7998
+ </xsl:variable>
7999
+ <!-- merge neighboring fo:inline -->
8000
+ <xsl:for-each select="xalan:nodeset($smallCapsText)/node()">
8001
+ <xsl:choose>
8002
+ <xsl:when test="self::fo:inline and preceding-sibling::node()[1][self::fo:inline]"><!-- <xsl:copy-of select="."/> --></xsl:when>
8003
+ <xsl:when test="self::fo:inline and @font-size">
8004
+ <xsl:variable name="curr_pos" select="count(preceding-sibling::node()) + 1"/>
8005
+ <!-- <curr_pos><xsl:value-of select="$curr_pos"/></curr_pos> -->
8006
+ <xsl:variable name="next_text_" select="count(following-sibling::node()[not(local-name() = 'inline')][1]/preceding-sibling::node())"/>
8007
+ <xsl:variable name="next_text">
8008
+ <xsl:choose>
8009
+ <xsl:when test="$next_text_ = 0">99999999</xsl:when>
8010
+ <xsl:otherwise><xsl:value-of select="$next_text_ + 1"/></xsl:otherwise>
8011
+ </xsl:choose>
8012
+ </xsl:variable>
8013
+ <!-- <next_text><xsl:value-of select="$next_text"/></next_text> -->
8014
+ <fo:inline>
8015
+ <xsl:copy-of select="@*"/>
8016
+ <xsl:copy-of select="./node()"/>
8017
+ <xsl:for-each select="following-sibling::node()[position() &lt; $next_text - $curr_pos]"> <!-- [self::fo:inline] -->
8018
+ <xsl:copy-of select="./node()"/>
8019
+ </xsl:for-each>
8020
+ </fo:inline>
8021
+ </xsl:when>
8022
+ <xsl:otherwise>
8023
+ <xsl:copy-of select="."/>
8024
+ </xsl:otherwise>
8025
+ </xsl:choose>
8026
+ </xsl:for-each>
7980
8027
  </xsl:if>
7981
8028
  </fo:inline>
7982
8029
  </xsl:template>
@@ -7988,7 +8035,7 @@
7988
8035
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
7989
8036
  <xsl:choose>
7990
8037
  <xsl:when test="$char=$upperCase">
7991
- <fo:inline font-size="{100 div 0.75}%">
8038
+ <fo:inline font-size="{100 div 0.75}%" role="SKIP">
7992
8039
  <xsl:value-of select="$upperCase"/>
7993
8040
  </fo:inline>
7994
8041
  </xsl:when>
@@ -8150,6 +8197,10 @@
8150
8197
 
8151
8198
  <xsl:when test="not(contains($text, $separator))">
8152
8199
  <word>
8200
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
8201
+ <xsl:text>
8202
+  </xsl:text> <!-- to add distance between dt and dd -->
8203
+ </xsl:if>
8153
8204
  <xsl:call-template name="enclose_text_in_tags">
8154
8205
  <xsl:with-param name="text" select="normalize-space($text)"/>
8155
8206
  <xsl:with-param name="tags" select="$tags"/>
@@ -8158,6 +8209,10 @@
8158
8209
  </xsl:when>
8159
8210
  <xsl:otherwise>
8160
8211
  <word>
8212
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
8213
+ <xsl:text>
8214
+  </xsl:text> <!-- to add distance between dt and dd -->
8215
+ </xsl:if>
8161
8216
  <xsl:call-template name="enclose_text_in_tags">
8162
8217
  <xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
8163
8218
  <xsl:with-param name="tags" select="$tags"/>
@@ -8341,6 +8396,10 @@
8341
8396
  <xsl:template name="getSimpleTable">
8342
8397
  <xsl:param name="id"/>
8343
8398
 
8399
+ <!-- <test0>
8400
+ <xsl:copy-of select="."/>
8401
+ </test0> -->
8402
+
8344
8403
  <xsl:variable name="simple-table">
8345
8404
 
8346
8405
  <!-- Step 0. replace <br/> to <p>...</p> -->
@@ -8653,6 +8712,18 @@
8653
8712
  </xsl:copy>
8654
8713
  </xsl:template>
8655
8714
 
8715
+ <xsl:variable name="font_main_root_style">
8716
+ <root-style xsl:use-attribute-sets="root-style">
8717
+ </root-style>
8718
+ </xsl:variable>
8719
+ <xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
8720
+ <xsl:variable name="font_main">
8721
+ <xsl:choose>
8722
+ <xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
8723
+ <xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
8724
+ </xsl:choose>
8725
+ </xsl:variable>
8726
+
8656
8727
  <xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
8657
8728
  <xsl:param name="id"/>
8658
8729
  <xsl:copy>
@@ -8691,6 +8762,33 @@
8691
8762
 
8692
8763
  <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
8693
8764
 
8765
+ <xsl:variable name="words_with_width">
8766
+ <!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
8767
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
8768
+ <xsl:copy>
8769
+ <xsl:copy-of select="@*"/>
8770
+ <xsl:attribute name="width">
8771
+ <xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
8772
+ </xsl:attribute>
8773
+ <xsl:copy-of select="node()"/>
8774
+ </xsl:copy>
8775
+ </xsl:for-each>
8776
+ </xsl:variable>
8777
+
8778
+ <xsl:variable name="words_with_width_sorted">
8779
+ <xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
8780
+ <xsl:sort select="@width" data-type="number" order="descending"/>
8781
+ <!-- select word maximal width only -->
8782
+ <xsl:if test="position() = 1">
8783
+ <xsl:copy-of select="."/>
8784
+ </xsl:if>
8785
+ </xsl:for-each>
8786
+ <!-- add 'word' with formatting tags inside -->
8787
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
8788
+ <xsl:copy-of select="."/>
8789
+ </xsl:for-each>
8790
+ </xsl:variable>
8791
+
8694
8792
  <xsl:variable name="words">
8695
8793
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
8696
8794
  <word>
@@ -8698,9 +8796,12 @@
8698
8796
  </word>
8699
8797
  </xsl:for-each>
8700
8798
 
8701
- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
8799
+ <xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
8702
8800
  <xsl:copy-of select="."/>
8703
8801
  </xsl:for-each>
8802
+ <!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
8803
+ <xsl:copy-of select="."/>
8804
+ </xsl:for-each> -->
8704
8805
 
8705
8806
  </xsl:variable>
8706
8807
 
@@ -9163,10 +9264,10 @@
9163
9264
  <xsl:copy>
9164
9265
  <xsl:apply-templates select="@*" mode="mathml"/>
9165
9266
  <xsl:if test="not(@lspace)">
9166
- <xsl:attribute name="lspace">0.4em</xsl:attribute>
9267
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
9167
9268
  </xsl:if>
9168
- <xsl:if test="not(@rspace)">
9169
- <xsl:attribute name="rspace">0.4em</xsl:attribute>
9269
+ <xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
9270
+ <xsl:attribute name="rspace">0.2em</xsl:attribute>
9170
9271
  </xsl:if>
9171
9272
  <xsl:apply-templates mode="mathml"/>
9172
9273
  </xsl:copy>
@@ -9183,6 +9284,27 @@
9183
9284
  </xsl:copy>
9184
9285
  </xsl:template>
9185
9286
 
9287
+ <!-- increase space before '(' -->
9288
+ <xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
9289
+ <xsl:copy>
9290
+ <xsl:apply-templates select="@*" mode="mathml"/>
9291
+ <xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
9292
+ <xsl:if test="not(@lspace)">
9293
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
9294
+ <xsl:choose>
9295
+ <xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
9296
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
9297
+ </xsl:when>
9298
+ <xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
9299
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
9300
+ </xsl:when>
9301
+ </xsl:choose>
9302
+ </xsl:if>
9303
+ </xsl:if>
9304
+ <xsl:apply-templates mode="mathml"/>
9305
+ </xsl:copy>
9306
+ </xsl:template>
9307
+
9186
9308
  <!-- Examples:
9187
9309
  <stem type="AsciiMath">x = 1</stem>
9188
9310
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -9342,7 +9464,7 @@
9342
9464
  <!-- formula -->
9343
9465
  <!-- ====== -->
9344
9466
  <xsl:template match="*[local-name() = 'formula']" name="formula">
9345
- <fo:block-container margin-left="0mm">
9467
+ <fo:block-container margin-left="0mm" role="SKIP">
9346
9468
  <xsl:if test="parent::*[local-name() = 'note']">
9347
9469
  <xsl:attribute name="margin-left">
9348
9470
  <xsl:choose>
@@ -9352,7 +9474,7 @@
9352
9474
  </xsl:attribute>
9353
9475
 
9354
9476
  </xsl:if>
9355
- <fo:block-container margin-left="0mm">
9477
+ <fo:block-container margin-left="0mm" role="SKIP">
9356
9478
  <fo:block id="{@id}">
9357
9479
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
9358
9480
  </fo:block>
@@ -9388,7 +9510,7 @@
9388
9510
  <fo:table-body>
9389
9511
  <fo:table-row>
9390
9512
  <fo:table-cell display-align="center">
9391
- <fo:block xsl:use-attribute-sets="formula-stem-block-style">
9513
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
9392
9514
 
9393
9515
  <xsl:call-template name="refine_formula-stem-block-style"/>
9394
9516
 
@@ -9396,7 +9518,10 @@
9396
9518
  </fo:block>
9397
9519
  </fo:table-cell>
9398
9520
  <fo:table-cell display-align="center">
9399
- <fo:block xsl:use-attribute-sets="formula-stem-number-style">
9521
+ <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
9522
+
9523
+ <xsl:call-template name="refine_formula-stem-number-style"/>
9524
+
9400
9525
  <xsl:apply-templates select="../*[local-name() = 'name']"/>
9401
9526
  </fo:block>
9402
9527
  </fo:table-cell>
@@ -9429,13 +9554,13 @@
9429
9554
 
9430
9555
  <xsl:template match="*[local-name() = 'note']" name="note">
9431
9556
 
9432
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
9557
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9433
9558
 
9434
9559
  <xsl:call-template name="setBlockSpanAll"/>
9435
9560
 
9436
9561
  <xsl:call-template name="refine_note-style"/>
9437
9562
 
9438
- <fo:block-container margin-left="0mm" margin-right="0mm">
9563
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9439
9564
 
9440
9565
  <fo:block>
9441
9566
 
@@ -9601,12 +9726,13 @@
9601
9726
 
9602
9727
  <xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
9603
9728
  <xsl:if test="normalize-space() != ''">
9604
- <xsl:variable name="level">
9729
+ <!-- <xsl:variable name="level">
9605
9730
  <xsl:call-template name="getLevelTermName"/>
9606
9731
  </xsl:variable>
9607
9732
  <fo:inline role="H{$level}">
9608
- <xsl:apply-templates/>
9609
- </fo:inline>
9733
+ <xsl:apply-templates />
9734
+ </fo:inline> -->
9735
+ <xsl:apply-templates/>
9610
9736
  </xsl:if>
9611
9737
  </xsl:template>
9612
9738
  <!-- ====== -->
@@ -9630,7 +9756,7 @@
9630
9756
  <!-- Example: Dimensions in millimeters -->
9631
9757
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
9632
9758
 
9633
- <fo:block xsl:use-attribute-sets="figure-style">
9759
+ <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
9634
9760
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
9635
9761
  </fo:block>
9636
9762
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
@@ -10763,7 +10889,7 @@
10763
10889
  </xsl:when>
10764
10890
 
10765
10891
  <xsl:otherwise>
10766
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
10892
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
10767
10893
 
10768
10894
  <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
10769
10895
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -10784,7 +10910,7 @@
10784
10910
  </xsl:attribute>
10785
10911
 
10786
10912
  </xsl:if>
10787
- <fo:block-container margin-left="0mm">
10913
+ <fo:block-container margin-left="0mm" role="SKIP">
10788
10914
 
10789
10915
  <fo:block xsl:use-attribute-sets="sourcecode-style">
10790
10916
 
@@ -10908,7 +11034,7 @@
10908
11034
  <!-- second td with sourcecode -->
10909
11035
  <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'] -->
10910
11036
  <fo:table-cell>
10911
- <fo:block>
11037
+ <fo:block role="SKIP">
10912
11038
  <xsl:apply-templates/>
10913
11039
  </fo:block>
10914
11040
  </fo:table-cell>
@@ -11330,11 +11456,11 @@
11330
11456
  <!-- requirement, recommendation, permission table -->
11331
11457
  <!-- ========== -->
11332
11458
  <xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
11333
- <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
11459
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
11334
11460
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
11335
11461
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
11336
11462
  </xsl:if>
11337
- <fo:block-container margin-left="0mm" margin-right="0mm">
11463
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11338
11464
  <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
11339
11465
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
11340
11466
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
@@ -11395,7 +11521,7 @@
11395
11521
 
11396
11522
  <xsl:call-template name="setTableCellAttributes"/>
11397
11523
 
11398
- <fo:block>
11524
+ <fo:block role="SKIP">
11399
11525
  <xsl:apply-templates/>
11400
11526
  </fo:block>
11401
11527
  </fo:table-cell>
@@ -11417,7 +11543,7 @@
11417
11543
 
11418
11544
  <xsl:call-template name="setTableCellAttributes"/>
11419
11545
 
11420
- <fo:block>
11546
+ <fo:block role="SKIP">
11421
11547
  <xsl:apply-templates/>
11422
11548
  </fo:block>
11423
11549
  </fo:table-cell>
@@ -11500,7 +11626,7 @@
11500
11626
  -->
11501
11627
  <xsl:template match="*[local-name() = 'example']">
11502
11628
 
11503
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
11629
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
11504
11630
 
11505
11631
  <xsl:call-template name="setBlockSpanAll"/>
11506
11632
 
@@ -11511,7 +11637,7 @@
11511
11637
  block
11512
11638
  </xsl:variable>
11513
11639
 
11514
- <fo:block-container margin-left="0mm">
11640
+ <fo:block-container margin-left="0mm" role="SKIP">
11515
11641
 
11516
11642
  <xsl:choose>
11517
11643
 
@@ -11524,8 +11650,8 @@
11524
11650
  </xsl:apply-templates>
11525
11651
  </fo:block>
11526
11652
 
11527
- <fo:block-container xsl:use-attribute-sets="example-body-style">
11528
- <fo:block-container margin-left="0mm" margin-right="0mm">
11653
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
11654
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11529
11655
  <xsl:apply-templates select="node()[not(local-name() = 'name')]">
11530
11656
  <xsl:with-param name="fo_element" select="$fo_element"/>
11531
11657
  </xsl:apply-templates>
@@ -11578,8 +11704,8 @@
11578
11704
 
11579
11705
  <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
11580
11706
  <!-- display further elements in blocks -->
11581
- <fo:block-container xsl:use-attribute-sets="example-body-style">
11582
- <fo:block-container margin-left="0mm" margin-right="0mm">
11707
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
11708
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11583
11709
  <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
11584
11710
  <xsl:with-param name="fo_element" select="'block'"/>
11585
11711
  </xsl:apply-templates>
@@ -11632,7 +11758,7 @@
11632
11758
  </xsl:variable>
11633
11759
  <xsl:choose>
11634
11760
  <xsl:when test="starts-with(normalize-space($element), 'block')">
11635
- <fo:block-container>
11761
+ <fo:block-container role="SKIP">
11636
11762
  <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
11637
11763
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
11638
11764
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -11773,7 +11899,7 @@
11773
11899
  <!-- author -->
11774
11900
  <!-- ====== -->
11775
11901
  <xsl:template match="*[local-name() = 'quote']">
11776
- <fo:block-container margin-left="0mm">
11902
+ <fo:block-container margin-left="0mm" role="SKIP">
11777
11903
 
11778
11904
  <xsl:call-template name="setBlockSpanAll"/>
11779
11905
 
@@ -11783,12 +11909,12 @@
11783
11909
  </xsl:if>
11784
11910
  </xsl:if>
11785
11911
 
11786
- <fo:block-container margin-left="0mm">
11787
- <fo:block-container xsl:use-attribute-sets="quote-style">
11912
+ <fo:block-container margin-left="0mm" role="SKIP">
11913
+ <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
11788
11914
 
11789
11915
  <xsl:call-template name="refine_quote-style"/>
11790
11916
 
11791
- <fo:block-container margin-left="0mm" margin-right="0mm">
11917
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11792
11918
  <fo:block role="BlockQuote">
11793
11919
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
11794
11920
  </fo:block>
@@ -11942,10 +12068,10 @@
11942
12068
 
11943
12069
  <xsl:choose>
11944
12070
  <xsl:when test="$lang = 'zh'">
11945
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
12071
+ <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
11946
12072
  </xsl:when>
11947
12073
  <xsl:when test="../../@inline-header = 'true'">
11948
- <fo:inline font-size="90%">
12074
+ <fo:inline font-size="90%" role="SKIP">
11949
12075
  <xsl:call-template name="insertNonBreakSpaces">
11950
12076
  <xsl:with-param name="count" select="$padding-right"/>
11951
12077
  </xsl:call-template>
@@ -11953,7 +12079,7 @@
11953
12079
  </xsl:when>
11954
12080
  <xsl:otherwise>
11955
12081
  <xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
11956
- <fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/>​</fo:inline>
12082
+ <fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/>​</fo:inline>
11957
12083
  </xsl:otherwise>
11958
12084
  </xsl:choose>
11959
12085
 
@@ -11983,12 +12109,12 @@
11983
12109
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
11984
12110
 
11985
12111
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
11986
- <fo:block xsl:use-attribute-sets="term-name-style">
12112
+ <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
11987
12113
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
11988
12114
  </fo:block>
11989
12115
  </xsl:if>
11990
12116
 
11991
- <fo:block xsl:use-attribute-sets="preferred-term-style">
12117
+ <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
11992
12118
  <xsl:call-template name="setStyle_preferred"/>
11993
12119
  <xsl:apply-templates/>
11994
12120
  </fo:block>
@@ -12029,7 +12155,7 @@
12029
12155
  <!-- definition -->
12030
12156
  <!-- ========== -->
12031
12157
  <xsl:template match="*[local-name() = 'definition']">
12032
- <fo:block xsl:use-attribute-sets="definition-style">
12158
+ <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
12033
12159
  <xsl:apply-templates/>
12034
12160
  </fo:block>
12035
12161
  </xsl:template>
@@ -12072,6 +12198,10 @@
12072
12198
 
12073
12199
  <xsl:template match="*[local-name() = 'clause']">
12074
12200
  <fo:block>
12201
+ <xsl:if test="parent::*[local-name() = 'copyright-statement']">
12202
+ <xsl:attribute name="role">SKIP</xsl:attribute>
12203
+ </xsl:if>
12204
+
12075
12205
  <xsl:call-template name="setId"/>
12076
12206
 
12077
12207
  <xsl:call-template name="setBlockSpanAll"/>
@@ -12196,7 +12326,48 @@
12196
12326
  </xsl:choose>
12197
12327
  </xsl:when>
12198
12328
  <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
12199
- <xsl:value-of select="@label"/>
12329
+
12330
+ <xsl:variable name="label">
12331
+
12332
+ <xsl:variable name="type" select="../@type"/>
12333
+
12334
+ <xsl:variable name="style_prefix_">
12335
+ <xsl:if test="$type = 'roman'">
12336
+ <!-- Example: (i) -->
12337
+ </xsl:if>
12338
+ </xsl:variable>
12339
+ <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
12340
+
12341
+ <xsl:variable name="style_suffix_">
12342
+ <xsl:choose>
12343
+ <xsl:when test="$type = 'arabic'">
12344
+ )
12345
+ </xsl:when>
12346
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
12347
+ )
12348
+ </xsl:when>
12349
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
12350
+ .
12351
+ </xsl:when>
12352
+ <xsl:when test="$type = 'roman'">
12353
+ )
12354
+ </xsl:when>
12355
+ <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
12356
+ </xsl:choose>
12357
+ </xsl:variable>
12358
+ <xsl:variable name="style_suffix" select="normalize-space($style_suffix_)"/>
12359
+
12360
+ <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
12361
+ <xsl:value-of select="$style_prefix"/>
12362
+ </xsl:if>
12363
+ <xsl:value-of select="@label"/>
12364
+ <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
12365
+ <xsl:value-of select="$style_suffix"/>
12366
+ </xsl:if>
12367
+ </xsl:variable>
12368
+
12369
+ <xsl:value-of select="normalize-space($label)"/>
12370
+
12200
12371
  </xsl:when>
12201
12372
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
12202
12373
 
@@ -12278,7 +12449,7 @@
12278
12449
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
12279
12450
  <xsl:choose>
12280
12451
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
12281
- <fo:block-container>
12452
+ <fo:block-container role="SKIP">
12282
12453
  <xsl:attribute name="margin-left">
12283
12454
  <xsl:choose>
12284
12455
  <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
@@ -12288,7 +12459,7 @@
12288
12459
 
12289
12460
  <xsl:call-template name="refine_list_container_style"/>
12290
12461
 
12291
- <fo:block-container margin-left="0mm">
12462
+ <fo:block-container margin-left="0mm" role="SKIP">
12292
12463
  <fo:block>
12293
12464
  <xsl:apply-templates select="." mode="list"/>
12294
12465
  </fo:block>
@@ -12297,7 +12468,7 @@
12297
12468
  </xsl:when>
12298
12469
  <xsl:otherwise>
12299
12470
 
12300
- <fo:block>
12471
+ <fo:block role="SKIP">
12301
12472
  <xsl:apply-templates select="." mode="list"/>
12302
12473
  </fo:block>
12303
12474
 
@@ -12389,7 +12560,7 @@
12389
12560
  <xsl:call-template name="refine_list-item-style"/>
12390
12561
 
12391
12562
  <fo:list-item-label end-indent="label-end()">
12392
- <fo:block xsl:use-attribute-sets="list-item-label-style">
12563
+ <fo:block xsl:use-attribute-sets="list-item-label-style" role="SKIP">
12393
12564
 
12394
12565
  <xsl:call-template name="refine_list-item-label-style"/>
12395
12566
 
@@ -12403,7 +12574,7 @@
12403
12574
  </fo:block>
12404
12575
  </fo:list-item-label>
12405
12576
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
12406
- <fo:block>
12577
+ <fo:block role="SKIP">
12407
12578
 
12408
12579
  <xsl:call-template name="refine_list-item-body-style"/>
12409
12580
 
@@ -12682,10 +12853,10 @@
12682
12853
  <fo:table-body>
12683
12854
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
12684
12855
 
12685
- <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
12686
- <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
12687
- <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
12688
- <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
12856
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
12857
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
12858
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
12859
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Pages</fo:block></fo:table-cell>
12689
12860
  </fo:table-row>
12690
12861
  <xsl:apply-templates/>
12691
12862
  </fo:table-body>
@@ -12700,7 +12871,7 @@
12700
12871
 
12701
12872
  <xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
12702
12873
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
12703
- <fo:block><xsl:apply-templates/></fo:block>
12874
+ <fo:block role="SKIP"><xsl:apply-templates/></fo:block>
12704
12875
  </fo:table-cell>
12705
12876
  </xsl:template>
12706
12877
  <!-- ============ -->
@@ -12715,7 +12886,10 @@
12715
12886
  <!-- Reference sections (Normative References and Bibliography) -->
12716
12887
  <!-- ========================================================== -->
12717
12888
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
12718
- <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/>
12889
+ <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
12890
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
12891
+
12892
+ </xsl:template>
12719
12893
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
12720
12894
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
12721
12895
 
@@ -12762,15 +12936,15 @@
12762
12936
 
12763
12937
  <!-- Bibliography (non-normative references) -->
12764
12938
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
12765
-
12939
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
12766
12940
  <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
12767
12941
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
12768
12942
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
12769
12943
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
12770
12944
  <fo:list-item>
12771
12945
  <fo:list-item-label end-indent="label-end()">
12772
- <fo:block>
12773
- <fo:inline>
12946
+ <fo:block role="SKIP">
12947
+ <fo:inline role="SKIP">
12774
12948
 
12775
12949
  <xsl:if test="($current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report')">
12776
12950
  <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
@@ -12783,7 +12957,7 @@
12783
12957
  </fo:block>
12784
12958
  </fo:list-item-label>
12785
12959
  <fo:list-item-body start-indent="body-start()">
12786
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style">
12960
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
12787
12961
  <xsl:call-template name="processBibitem">
12788
12962
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
12789
12963
  </xsl:call-template>
@@ -12794,6 +12968,35 @@
12794
12968
 
12795
12969
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
12796
12970
 
12971
+ <xsl:template name="insertListItem_Bibitem">
12972
+ <xsl:choose>
12973
+ <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
12974
+ <xsl:otherwise>
12975
+ <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
12976
+ <fo:list-item-label end-indent="label-end()">
12977
+ <fo:block role="SKIP">
12978
+ <fo:inline role="SKIP">
12979
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
12980
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
12981
+ </xsl:apply-templates>
12982
+ </fo:inline>
12983
+ </fo:block>
12984
+ </fo:list-item-label>
12985
+ <fo:list-item-body start-indent="body-start()">
12986
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
12987
+ <xsl:call-template name="processBibitem">
12988
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
12989
+ </xsl:call-template>
12990
+ </fo:block>
12991
+ </fo:list-item-body>
12992
+ </fo:list-item>
12993
+ </xsl:otherwise>
12994
+ </xsl:choose>
12995
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
12996
+ <xsl:with-param name="skip">false</xsl:with-param>
12997
+ </xsl:apply-templates>
12998
+ </xsl:template>
12999
+
12797
13000
  <xsl:template name="processBibitem">
12798
13001
  <xsl:param name="biblio_tag_part">both</xsl:param>
12799
13002
 
@@ -13010,7 +13213,7 @@
13010
13213
  <xsl:for-each select="*[local-name() = 'tab']">
13011
13214
  <xsl:variable name="current_id" select="generate-id()"/>
13012
13215
  <fo:table-cell>
13013
- <fo:block line-height-shift-adjustment="disregard-shifts">
13216
+ <fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
13014
13217
  <xsl:call-template name="insert_basic_link">
13015
13218
  <xsl:with-param name="element">
13016
13219
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -13028,7 +13231,7 @@
13028
13231
  </xsl:for-each>
13029
13232
  <!-- last column - for page numbers -->
13030
13233
  <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
13031
- <fo:block>
13234
+ <fo:block role="SKIP">
13032
13235
  <xsl:call-template name="insert_basic_link">
13033
13236
  <xsl:with-param name="element">
13034
13237
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -13147,7 +13350,7 @@
13147
13350
  <xsl:attribute name="text-align">left</xsl:attribute>
13148
13351
  </xsl:if>
13149
13352
 
13150
- <fo:block-container xsl:use-attribute-sets="admonition-container-style">
13353
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
13151
13354
 
13152
13355
  <xsl:if test="@type = 'editorial' or not(@type)">
13153
13356
  <xsl:attribute name="padding">0mm</xsl:attribute>
@@ -13157,7 +13360,7 @@
13157
13360
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute>
13158
13361
  </xsl:if>
13159
13362
 
13160
- <fo:block-container margin-left="0mm" margin-right="0mm">
13363
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
13161
13364
  <fo:block xsl:use-attribute-sets="admonition-p-style">
13162
13365
  <fo:inline>
13163
13366
  <xsl:call-template name="displayAdmonitionName">