metanorma-bipm 2.2.11 → 2.2.13

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.
@@ -4854,6 +4854,7 @@
4854
4854
  </xsl:attribute-set>
4855
4855
 
4856
4856
  <xsl:attribute-set name="figure-block-style">
4857
+ <xsl:attribute name="role">SKIP</xsl:attribute>
4857
4858
 
4858
4859
  </xsl:attribute-set>
4859
4860
 
@@ -4862,6 +4863,7 @@
4862
4863
  </xsl:attribute-set>
4863
4864
 
4864
4865
  <xsl:attribute-set name="figure-name-style">
4866
+ <xsl:attribute name="role">Caption</xsl:attribute>
4865
4867
 
4866
4868
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
4867
4869
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -4903,7 +4905,12 @@
4903
4905
  </xsl:attribute-set> <!-- formula-stem-number-style -->
4904
4906
  <!-- End Formula's styles -->
4905
4907
 
4908
+ <xsl:template name="refine_formula-stem-number-style">
4909
+
4910
+ </xsl:template>
4911
+
4906
4912
  <xsl:attribute-set name="image-style">
4913
+ <xsl:attribute name="role">SKIP</xsl:attribute>
4907
4914
  <xsl:attribute name="text-align">center</xsl:attribute>
4908
4915
 
4909
4916
  </xsl:attribute-set>
@@ -5179,6 +5186,11 @@
5179
5186
 
5180
5187
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
5181
5188
 
5189
+ <xsl:attribute-set name="bibitem-non-normative-list-item-style">
5190
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5191
+
5192
+ </xsl:attribute-set>
5193
+
5182
5194
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
5183
5195
  <xsl:attribute-set name="bibitem-normative-list-body-style">
5184
5196
 
@@ -5406,13 +5418,13 @@
5406
5418
 
5407
5419
  <xsl:template name="processPrefaceSectionsDefault_Contents">
5408
5420
  <xsl:variable name="nodes_preface_">
5409
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
5421
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
5410
5422
  <node id="{@id}"/>
5411
5423
  </xsl:for-each>
5412
5424
  </xsl:variable>
5413
5425
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
5414
5426
 
5415
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
5427
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
5416
5428
  <xsl:sort select="@displayorder" data-type="number"/>
5417
5429
 
5418
5430
  <!-- process Section's title -->
@@ -5446,12 +5458,12 @@
5446
5458
  <xsl:apply-templates select="." mode="contents"/>
5447
5459
  </xsl:for-each>
5448
5460
 
5449
- <xsl:for-each select="/*/*[local-name()='annex']">
5461
+ <!-- <xsl:for-each select="/*/*[local-name()='annex']">
5450
5462
  <xsl:sort select="@displayorder" data-type="number"/>
5451
5463
  <xsl:apply-templates select="." mode="contents"/>
5452
- </xsl:for-each>
5464
+ </xsl:for-each> -->
5453
5465
 
5454
- <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]">
5466
+ <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]">
5455
5467
  <xsl:sort select="@displayorder" data-type="number"/>
5456
5468
  <xsl:apply-templates select="." mode="contents"/>
5457
5469
  </xsl:for-each>
@@ -5581,14 +5593,14 @@
5581
5593
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
5582
5594
  </xsl:when>
5583
5595
  <xsl:otherwise>
5584
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
5596
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
5585
5597
  </xsl:otherwise>
5586
5598
  </xsl:choose>
5587
5599
  </xsl:for-each>
5588
5600
  </xsl:when>
5589
5601
 
5590
5602
  <xsl:otherwise>
5591
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
5603
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
5592
5604
  </xsl:otherwise>
5593
5605
 
5594
5606
  </xsl:choose>
@@ -5598,7 +5610,7 @@
5598
5610
  <!-- Preface boilerplate sections processing -->
5599
5611
  <!-- ================================= -->
5600
5612
  <xsl:template match="*[local-name()='copyright-statement']">
5601
- <fo:block xsl:use-attribute-sets="copyright-statement-style">
5613
+ <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
5602
5614
  <xsl:apply-templates/>
5603
5615
  </fo:block>
5604
5616
  </xsl:template> <!-- copyright-statement -->
@@ -5774,7 +5786,7 @@
5774
5786
  </xsl:choose>
5775
5787
  </xsl:variable>
5776
5788
 
5777
- <fo:block-container xsl:use-attribute-sets="table-container-style">
5789
+ <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
5778
5790
 
5779
5791
  <xsl:call-template name="refine_table-container-style">
5780
5792
  <xsl:with-param name="margin-side" select="$margin-side"/>
@@ -6359,8 +6371,8 @@
6359
6371
  <xsl:template name="table-header-title">
6360
6372
  <xsl:param name="cols-count"/>
6361
6373
  <!-- row for title -->
6362
- <fo:table-row>
6363
- <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">
6374
+ <fo:table-row role="SKIP">
6375
+ <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">
6364
6376
 
6365
6377
  <xsl:call-template name="refine_table-header-title-style"/>
6366
6378
 
@@ -6369,7 +6381,7 @@
6369
6381
  </xsl:apply-templates>
6370
6382
 
6371
6383
  <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
6372
- <fo:block/>
6384
+ <fo:block role="SKIP"/>
6373
6385
  </xsl:if>
6374
6386
 
6375
6387
  </fo:table-cell>
@@ -6471,7 +6483,7 @@
6471
6483
  <!-- fn will be processed inside 'note' processing -->
6472
6484
 
6473
6485
  <xsl:if test="count(ancestor::bipm:table//*[local-name()='note']) &gt; 1">
6474
- <fo:block font-weight="bold">
6486
+ <fo:block font-weight="bold" role="SKIP">
6475
6487
  <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language"/>
6476
6488
  <xsl:choose>
6477
6489
  <xsl:when test="$curr_lang = 'fr'">Remarques</xsl:when>
@@ -6697,7 +6709,7 @@
6697
6709
 
6698
6710
  <xsl:call-template name="refine_table-header-cell-style"/>
6699
6711
 
6700
- <fo:block>
6712
+ <fo:block role="SKIP">
6701
6713
  <xsl:apply-templates/>
6702
6714
  </fo:block>
6703
6715
  </fo:table-cell>
@@ -6750,7 +6762,7 @@
6750
6762
  <xsl:attribute name="text-align">left</xsl:attribute>
6751
6763
  </xsl:if>
6752
6764
 
6753
- <fo:block>
6765
+ <fo:block role="SKIP">
6754
6766
 
6755
6767
  <xsl:if test="$isGenerateTableIF = 'true'">
6756
6768
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -6856,7 +6868,7 @@
6856
6868
  </xsl:choose>
6857
6869
  </xsl:variable>
6858
6870
  <xsl:variable name="footnote_inline">
6859
- <fo:inline>
6871
+ <fo:inline role="Reference">
6860
6872
 
6861
6873
  <xsl:variable name="fn_styles">
6862
6874
  <xsl:choose>
@@ -6879,7 +6891,7 @@
6879
6891
 
6880
6892
  <xsl:call-template name="insert_basic_link">
6881
6893
  <xsl:with-param name="element">
6882
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
6894
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
6883
6895
  <xsl:copy-of select="$current_fn_number_text"/>
6884
6896
  </fo:basic-link>
6885
6897
  </xsl:with-param>
@@ -6892,17 +6904,17 @@
6892
6904
  <xsl:copy-of select="$footnote_inline"/>
6893
6905
  </xsl:when>
6894
6906
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
6895
- <fo:footnote xsl:use-attribute-sets="fn-style">
6907
+ <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
6896
6908
  <xsl:copy-of select="$footnote_inline"/>
6897
- <fo:footnote-body>
6909
+ <fo:footnote-body role="Note">
6898
6910
 
6899
- <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
6911
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
6900
6912
 
6901
- <fo:block xsl:use-attribute-sets="fn-body-style">
6913
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
6902
6914
 
6903
6915
  <xsl:call-template name="refine_fn-body-style"/>
6904
6916
 
6905
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
6917
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
6906
6918
 
6907
6919
  <xsl:call-template name="refine_fn-body-num-style"/>
6908
6920
 
@@ -7172,11 +7184,11 @@
7172
7184
  </xsl:template>
7173
7185
 
7174
7186
  <xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
7175
- <fo:inline><xsl:value-of select="."/></fo:inline>
7187
+ <fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
7176
7188
  </xsl:template>
7177
7189
 
7178
7190
  <xsl:template match="*[local-name()='fn']//*[local-name()='p']">
7179
- <fo:inline>
7191
+ <fo:inline role="P">
7180
7192
  <xsl:apply-templates/>
7181
7193
  </fo:inline>
7182
7194
  </xsl:template>
@@ -7191,7 +7203,7 @@
7191
7203
  <xsl:variable name="isAdded" select="@added"/>
7192
7204
  <xsl:variable name="isDeleted" select="@deleted"/>
7193
7205
  <!-- <dl><xsl:copy-of select="."/></dl> -->
7194
- <fo:block-container xsl:use-attribute-sets="dl-block-style">
7206
+ <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
7195
7207
 
7196
7208
  <xsl:call-template name="setBlockSpanAll"/>
7197
7209
 
@@ -7229,7 +7241,7 @@
7229
7241
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
7230
7242
  </xsl:call-template>
7231
7243
 
7232
- <fo:block-container margin-left="0mm">
7244
+ <fo:block-container margin-left="0mm" role="SKIP">
7233
7245
 
7234
7246
  <xsl:variable name="parent" select="local-name(..)"/>
7235
7247
 
@@ -7292,7 +7304,7 @@
7292
7304
 
7293
7305
  <!-- a few components -->
7294
7306
  <xsl:if test="$onlyOneComponent = 'false'">
7295
- <fo:block>
7307
+ <fo:block role="SKIP">
7296
7308
 
7297
7309
  <xsl:call-template name="refine_multicomponent_style"/>
7298
7310
 
@@ -7300,7 +7312,7 @@
7300
7312
  <xsl:attribute name="margin-top">0</xsl:attribute>
7301
7313
  </xsl:if>
7302
7314
 
7303
- <fo:block>
7315
+ <fo:block role="SKIP">
7304
7316
 
7305
7317
  <xsl:call-template name="refine_multicomponent_block_style"/>
7306
7318
 
@@ -7635,7 +7647,7 @@
7635
7647
  -->
7636
7648
  <fo:table-row>
7637
7649
  <fo:table-cell number-columns-spanned="2">
7638
- <fo:block>
7650
+ <fo:block role="SKIP">
7639
7651
  <xsl:call-template name="note"/>
7640
7652
  </fo:block>
7641
7653
  </fo:table-cell>
@@ -7700,7 +7712,7 @@
7700
7712
 
7701
7713
  <xsl:call-template name="refine_dt-cell-style"/>
7702
7714
 
7703
- <fo:block xsl:use-attribute-sets="dt-block-style">
7715
+ <fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
7704
7716
  <xsl:copy-of select="@id"/>
7705
7717
 
7706
7718
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -7730,7 +7742,7 @@
7730
7742
 
7731
7743
  <xsl:call-template name="refine_dd-cell-style"/>
7732
7744
 
7733
- <fo:block>
7745
+ <fo:block role="SKIP">
7734
7746
 
7735
7747
  <xsl:if test="$isGenerateTableIF = 'true'">
7736
7748
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -7895,6 +7907,9 @@
7895
7907
 
7896
7908
  <xsl:template name="refine_strong_style">
7897
7909
 
7910
+ <xsl:if test="ancestor::*['preferred']">
7911
+ <xsl:attribute name="role">SKIP</xsl:attribute>
7912
+ </xsl:if>
7898
7913
  </xsl:template>
7899
7914
 
7900
7915
  <xsl:template match="*[local-name()='padding']">
@@ -8103,11 +8118,41 @@
8103
8118
 
8104
8119
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
8105
8120
  <xsl:variable name="text" select="normalize-space(.)"/>
8106
- <fo:inline font-size="75%">
8121
+ <fo:inline font-size="75%" role="SKIP">
8107
8122
  <xsl:if test="string-length($text) &gt; 0">
8108
- <xsl:call-template name="recursiveSmallCaps">
8109
- <xsl:with-param name="text" select="$text"/>
8110
- </xsl:call-template>
8123
+ <xsl:variable name="smallCapsText">
8124
+ <xsl:call-template name="recursiveSmallCaps">
8125
+ <xsl:with-param name="text" select="$text"/>
8126
+ </xsl:call-template>
8127
+ </xsl:variable>
8128
+ <!-- merge neighboring fo:inline -->
8129
+ <xsl:for-each select="xalan:nodeset($smallCapsText)/node()">
8130
+ <xsl:choose>
8131
+ <xsl:when test="self::fo:inline and preceding-sibling::node()[1][self::fo:inline]"><!-- <xsl:copy-of select="."/> --></xsl:when>
8132
+ <xsl:when test="self::fo:inline and @font-size">
8133
+ <xsl:variable name="curr_pos" select="count(preceding-sibling::node()) + 1"/>
8134
+ <!-- <curr_pos><xsl:value-of select="$curr_pos"/></curr_pos> -->
8135
+ <xsl:variable name="next_text_" select="count(following-sibling::node()[not(local-name() = 'inline')][1]/preceding-sibling::node())"/>
8136
+ <xsl:variable name="next_text">
8137
+ <xsl:choose>
8138
+ <xsl:when test="$next_text_ = 0">99999999</xsl:when>
8139
+ <xsl:otherwise><xsl:value-of select="$next_text_ + 1"/></xsl:otherwise>
8140
+ </xsl:choose>
8141
+ </xsl:variable>
8142
+ <!-- <next_text><xsl:value-of select="$next_text"/></next_text> -->
8143
+ <fo:inline>
8144
+ <xsl:copy-of select="@*"/>
8145
+ <xsl:copy-of select="./node()"/>
8146
+ <xsl:for-each select="following-sibling::node()[position() &lt; $next_text - $curr_pos]"> <!-- [self::fo:inline] -->
8147
+ <xsl:copy-of select="./node()"/>
8148
+ </xsl:for-each>
8149
+ </fo:inline>
8150
+ </xsl:when>
8151
+ <xsl:otherwise>
8152
+ <xsl:copy-of select="."/>
8153
+ </xsl:otherwise>
8154
+ </xsl:choose>
8155
+ </xsl:for-each>
8111
8156
  </xsl:if>
8112
8157
  </fo:inline>
8113
8158
  </xsl:template>
@@ -8119,7 +8164,7 @@
8119
8164
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
8120
8165
  <xsl:choose>
8121
8166
  <xsl:when test="$char=$upperCase">
8122
- <fo:inline font-size="{100 div 0.75}%">
8167
+ <fo:inline font-size="{100 div 0.75}%" role="SKIP">
8123
8168
  <xsl:value-of select="$upperCase"/>
8124
8169
  </fo:inline>
8125
8170
  </xsl:when>
@@ -8281,6 +8326,10 @@
8281
8326
 
8282
8327
  <xsl:when test="not(contains($text, $separator))">
8283
8328
  <word>
8329
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
8330
+ <xsl:text>
8331
+  </xsl:text> <!-- to add distance between dt and dd -->
8332
+ </xsl:if>
8284
8333
  <xsl:call-template name="enclose_text_in_tags">
8285
8334
  <xsl:with-param name="text" select="normalize-space($text)"/>
8286
8335
  <xsl:with-param name="tags" select="$tags"/>
@@ -8289,6 +8338,10 @@
8289
8338
  </xsl:when>
8290
8339
  <xsl:otherwise>
8291
8340
  <word>
8341
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
8342
+ <xsl:text>
8343
+  </xsl:text> <!-- to add distance between dt and dd -->
8344
+ </xsl:if>
8292
8345
  <xsl:call-template name="enclose_text_in_tags">
8293
8346
  <xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
8294
8347
  <xsl:with-param name="tags" select="$tags"/>
@@ -8472,6 +8525,10 @@
8472
8525
  <xsl:template name="getSimpleTable">
8473
8526
  <xsl:param name="id"/>
8474
8527
 
8528
+ <!-- <test0>
8529
+ <xsl:copy-of select="."/>
8530
+ </test0> -->
8531
+
8475
8532
  <xsl:variable name="simple-table">
8476
8533
 
8477
8534
  <!-- Step 0. replace <br/> to <p>...</p> -->
@@ -8784,6 +8841,18 @@
8784
8841
  </xsl:copy>
8785
8842
  </xsl:template>
8786
8843
 
8844
+ <xsl:variable name="font_main_root_style">
8845
+ <root-style xsl:use-attribute-sets="root-style">
8846
+ </root-style>
8847
+ </xsl:variable>
8848
+ <xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
8849
+ <xsl:variable name="font_main">
8850
+ <xsl:choose>
8851
+ <xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
8852
+ <xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
8853
+ </xsl:choose>
8854
+ </xsl:variable>
8855
+
8787
8856
  <xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
8788
8857
  <xsl:param name="id"/>
8789
8858
  <xsl:copy>
@@ -8822,6 +8891,33 @@
8822
8891
 
8823
8892
  <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
8824
8893
 
8894
+ <xsl:variable name="words_with_width">
8895
+ <!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
8896
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
8897
+ <xsl:copy>
8898
+ <xsl:copy-of select="@*"/>
8899
+ <xsl:attribute name="width">
8900
+ <xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
8901
+ </xsl:attribute>
8902
+ <xsl:copy-of select="node()"/>
8903
+ </xsl:copy>
8904
+ </xsl:for-each>
8905
+ </xsl:variable>
8906
+
8907
+ <xsl:variable name="words_with_width_sorted">
8908
+ <xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
8909
+ <xsl:sort select="@width" data-type="number" order="descending"/>
8910
+ <!-- select word maximal width only -->
8911
+ <xsl:if test="position() = 1">
8912
+ <xsl:copy-of select="."/>
8913
+ </xsl:if>
8914
+ </xsl:for-each>
8915
+ <!-- add 'word' with formatting tags inside -->
8916
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
8917
+ <xsl:copy-of select="."/>
8918
+ </xsl:for-each>
8919
+ </xsl:variable>
8920
+
8825
8921
  <xsl:variable name="words">
8826
8922
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
8827
8923
  <word>
@@ -8829,9 +8925,12 @@
8829
8925
  </word>
8830
8926
  </xsl:for-each>
8831
8927
 
8832
- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
8928
+ <xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
8833
8929
  <xsl:copy-of select="."/>
8834
8930
  </xsl:for-each>
8931
+ <!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
8932
+ <xsl:copy-of select="."/>
8933
+ </xsl:for-each> -->
8835
8934
 
8836
8935
  </xsl:variable>
8837
8936
 
@@ -9324,10 +9423,10 @@
9324
9423
  <xsl:copy>
9325
9424
  <xsl:apply-templates select="@*" mode="mathml"/>
9326
9425
  <xsl:if test="not(@lspace)">
9327
- <xsl:attribute name="lspace">0.4em</xsl:attribute>
9426
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
9328
9427
  </xsl:if>
9329
- <xsl:if test="not(@rspace)">
9330
- <xsl:attribute name="rspace">0.4em</xsl:attribute>
9428
+ <xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
9429
+ <xsl:attribute name="rspace">0.2em</xsl:attribute>
9331
9430
  </xsl:if>
9332
9431
  <xsl:apply-templates mode="mathml"/>
9333
9432
  </xsl:copy>
@@ -9344,6 +9443,27 @@
9344
9443
  </xsl:copy>
9345
9444
  </xsl:template>
9346
9445
 
9446
+ <!-- increase space before '(' -->
9447
+ <xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
9448
+ <xsl:copy>
9449
+ <xsl:apply-templates select="@*" mode="mathml"/>
9450
+ <xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
9451
+ <xsl:if test="not(@lspace)">
9452
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
9453
+ <xsl:choose>
9454
+ <xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
9455
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
9456
+ </xsl:when>
9457
+ <xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
9458
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
9459
+ </xsl:when>
9460
+ </xsl:choose>
9461
+ </xsl:if>
9462
+ </xsl:if>
9463
+ <xsl:apply-templates mode="mathml"/>
9464
+ </xsl:copy>
9465
+ </xsl:template>
9466
+
9347
9467
  <!-- Examples:
9348
9468
  <stem type="AsciiMath">x = 1</stem>
9349
9469
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -9503,7 +9623,7 @@
9503
9623
  <!-- formula -->
9504
9624
  <!-- ====== -->
9505
9625
  <xsl:template match="*[local-name() = 'formula']" name="formula">
9506
- <fo:block-container margin-left="0mm">
9626
+ <fo:block-container margin-left="0mm" role="SKIP">
9507
9627
  <xsl:if test="parent::*[local-name() = 'note']">
9508
9628
  <xsl:attribute name="margin-left">
9509
9629
  <xsl:choose>
@@ -9513,7 +9633,7 @@
9513
9633
  </xsl:attribute>
9514
9634
 
9515
9635
  </xsl:if>
9516
- <fo:block-container margin-left="0mm">
9636
+ <fo:block-container margin-left="0mm" role="SKIP">
9517
9637
  <fo:block id="{@id}">
9518
9638
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
9519
9639
  </fo:block>
@@ -9549,7 +9669,7 @@
9549
9669
  <fo:table-body>
9550
9670
  <fo:table-row>
9551
9671
  <fo:table-cell display-align="center">
9552
- <fo:block xsl:use-attribute-sets="formula-stem-block-style">
9672
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
9553
9673
 
9554
9674
  <xsl:call-template name="refine_formula-stem-block-style"/>
9555
9675
 
@@ -9557,7 +9677,10 @@
9557
9677
  </fo:block>
9558
9678
  </fo:table-cell>
9559
9679
  <fo:table-cell display-align="center">
9560
- <fo:block xsl:use-attribute-sets="formula-stem-number-style">
9680
+ <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
9681
+
9682
+ <xsl:call-template name="refine_formula-stem-number-style"/>
9683
+
9561
9684
  <xsl:apply-templates select="../*[local-name() = 'name']"/>
9562
9685
  </fo:block>
9563
9686
  </fo:table-cell>
@@ -9590,13 +9713,13 @@
9590
9713
 
9591
9714
  <xsl:template match="*[local-name() = 'note']" name="note">
9592
9715
 
9593
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
9716
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9594
9717
 
9595
9718
  <xsl:call-template name="setBlockSpanAll"/>
9596
9719
 
9597
9720
  <xsl:call-template name="refine_note-style"/>
9598
9721
 
9599
- <fo:block-container margin-left="0mm" margin-right="0mm">
9722
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9600
9723
 
9601
9724
  <fo:block>
9602
9725
 
@@ -9779,12 +9902,13 @@
9779
9902
 
9780
9903
  <xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
9781
9904
  <xsl:if test="normalize-space() != ''">
9782
- <xsl:variable name="level">
9905
+ <!-- <xsl:variable name="level">
9783
9906
  <xsl:call-template name="getLevelTermName"/>
9784
9907
  </xsl:variable>
9785
9908
  <fo:inline role="H{$level}">
9786
- <xsl:apply-templates/>
9787
- </fo:inline>
9909
+ <xsl:apply-templates />
9910
+ </fo:inline> -->
9911
+ <xsl:apply-templates/>
9788
9912
  </xsl:if>
9789
9913
  </xsl:template>
9790
9914
  <!-- ====== -->
@@ -9812,7 +9936,7 @@
9812
9936
  <!-- Example: Dimensions in millimeters -->
9813
9937
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
9814
9938
 
9815
- <fo:block xsl:use-attribute-sets="figure-style">
9939
+ <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
9816
9940
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
9817
9941
  </fo:block>
9818
9942
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
@@ -10959,7 +11083,7 @@
10959
11083
  </xsl:when>
10960
11084
 
10961
11085
  <xsl:otherwise>
10962
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
11086
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
10963
11087
 
10964
11088
  <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
10965
11089
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -10980,7 +11104,7 @@
10980
11104
  </xsl:attribute>
10981
11105
 
10982
11106
  </xsl:if>
10983
- <fo:block-container margin-left="0mm">
11107
+ <fo:block-container margin-left="0mm" role="SKIP">
10984
11108
 
10985
11109
  <fo:block xsl:use-attribute-sets="sourcecode-style">
10986
11110
 
@@ -11104,7 +11228,7 @@
11104
11228
  <!-- second td with sourcecode -->
11105
11229
  <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'] -->
11106
11230
  <fo:table-cell>
11107
- <fo:block>
11231
+ <fo:block role="SKIP">
11108
11232
  <xsl:apply-templates/>
11109
11233
  </fo:block>
11110
11234
  </fo:table-cell>
@@ -11526,11 +11650,11 @@
11526
11650
  <!-- requirement, recommendation, permission table -->
11527
11651
  <!-- ========== -->
11528
11652
  <xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
11529
- <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
11653
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
11530
11654
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
11531
11655
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
11532
11656
  </xsl:if>
11533
- <fo:block-container margin-left="0mm" margin-right="0mm">
11657
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11534
11658
  <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
11535
11659
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
11536
11660
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
@@ -11591,7 +11715,7 @@
11591
11715
 
11592
11716
  <xsl:call-template name="setTableCellAttributes"/>
11593
11717
 
11594
- <fo:block>
11718
+ <fo:block role="SKIP">
11595
11719
  <xsl:apply-templates/>
11596
11720
  </fo:block>
11597
11721
  </fo:table-cell>
@@ -11613,7 +11737,7 @@
11613
11737
 
11614
11738
  <xsl:call-template name="setTableCellAttributes"/>
11615
11739
 
11616
- <fo:block>
11740
+ <fo:block role="SKIP">
11617
11741
  <xsl:apply-templates/>
11618
11742
  </fo:block>
11619
11743
  </fo:table-cell>
@@ -11692,7 +11816,7 @@
11692
11816
  -->
11693
11817
  <xsl:template match="*[local-name() = 'example']">
11694
11818
 
11695
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
11819
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
11696
11820
 
11697
11821
  <xsl:call-template name="setBlockSpanAll"/>
11698
11822
 
@@ -11703,7 +11827,7 @@
11703
11827
  block
11704
11828
  </xsl:variable>
11705
11829
 
11706
- <fo:block-container margin-left="0mm">
11830
+ <fo:block-container margin-left="0mm" role="SKIP">
11707
11831
 
11708
11832
  <xsl:choose>
11709
11833
 
@@ -11716,8 +11840,8 @@
11716
11840
  </xsl:apply-templates>
11717
11841
  </fo:block>
11718
11842
 
11719
- <fo:block-container xsl:use-attribute-sets="example-body-style">
11720
- <fo:block-container margin-left="0mm" margin-right="0mm">
11843
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
11844
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11721
11845
  <xsl:apply-templates select="node()[not(local-name() = 'name')]">
11722
11846
  <xsl:with-param name="fo_element" select="$fo_element"/>
11723
11847
  </xsl:apply-templates>
@@ -11770,8 +11894,8 @@
11770
11894
 
11771
11895
  <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
11772
11896
  <!-- display further elements in blocks -->
11773
- <fo:block-container xsl:use-attribute-sets="example-body-style">
11774
- <fo:block-container margin-left="0mm" margin-right="0mm">
11897
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
11898
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11775
11899
  <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
11776
11900
  <xsl:with-param name="fo_element" select="'block'"/>
11777
11901
  </xsl:apply-templates>
@@ -11824,7 +11948,7 @@
11824
11948
  </xsl:variable>
11825
11949
  <xsl:choose>
11826
11950
  <xsl:when test="starts-with(normalize-space($element), 'block')">
11827
- <fo:block-container>
11951
+ <fo:block-container role="SKIP">
11828
11952
  <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
11829
11953
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
11830
11954
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -11965,7 +12089,7 @@
11965
12089
  <!-- author -->
11966
12090
  <!-- ====== -->
11967
12091
  <xsl:template match="*[local-name() = 'quote']">
11968
- <fo:block-container margin-left="0mm">
12092
+ <fo:block-container margin-left="0mm" role="SKIP">
11969
12093
 
11970
12094
  <xsl:call-template name="setBlockSpanAll"/>
11971
12095
 
@@ -11975,12 +12099,12 @@
11975
12099
  </xsl:if>
11976
12100
  </xsl:if>
11977
12101
 
11978
- <fo:block-container margin-left="0mm">
11979
- <fo:block-container xsl:use-attribute-sets="quote-style">
12102
+ <fo:block-container margin-left="0mm" role="SKIP">
12103
+ <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
11980
12104
 
11981
12105
  <xsl:call-template name="refine_quote-style"/>
11982
12106
 
11983
- <fo:block-container margin-left="0mm" margin-right="0mm">
12107
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11984
12108
  <fo:block role="BlockQuote">
11985
12109
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
11986
12110
  </fo:block>
@@ -12145,10 +12269,10 @@
12145
12269
 
12146
12270
  <xsl:choose>
12147
12271
  <xsl:when test="$lang = 'zh'">
12148
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
12272
+ <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
12149
12273
  </xsl:when>
12150
12274
  <xsl:when test="../../@inline-header = 'true'">
12151
- <fo:inline font-size="90%">
12275
+ <fo:inline font-size="90%" role="SKIP">
12152
12276
  <xsl:call-template name="insertNonBreakSpaces">
12153
12277
  <xsl:with-param name="count" select="$padding-right"/>
12154
12278
  </xsl:call-template>
@@ -12156,7 +12280,7 @@
12156
12280
  </xsl:when>
12157
12281
  <xsl:otherwise>
12158
12282
  <xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
12159
- <fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/>​</fo:inline>
12283
+ <fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/>​</fo:inline>
12160
12284
  </xsl:otherwise>
12161
12285
  </xsl:choose>
12162
12286
 
@@ -12186,12 +12310,12 @@
12186
12310
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
12187
12311
 
12188
12312
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
12189
- <fo:block xsl:use-attribute-sets="term-name-style">
12313
+ <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
12190
12314
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
12191
12315
  </fo:block>
12192
12316
  </xsl:if>
12193
12317
 
12194
- <fo:block xsl:use-attribute-sets="preferred-term-style">
12318
+ <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
12195
12319
  <xsl:call-template name="setStyle_preferred"/>
12196
12320
  <xsl:apply-templates/>
12197
12321
  </fo:block>
@@ -12232,7 +12356,7 @@
12232
12356
  <!-- definition -->
12233
12357
  <!-- ========== -->
12234
12358
  <xsl:template match="*[local-name() = 'definition']">
12235
- <fo:block xsl:use-attribute-sets="definition-style">
12359
+ <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
12236
12360
  <xsl:apply-templates/>
12237
12361
  </fo:block>
12238
12362
  </xsl:template>
@@ -12275,6 +12399,10 @@
12275
12399
 
12276
12400
  <xsl:template match="*[local-name() = 'clause']">
12277
12401
  <fo:block>
12402
+ <xsl:if test="parent::*[local-name() = 'copyright-statement']">
12403
+ <xsl:attribute name="role">SKIP</xsl:attribute>
12404
+ </xsl:if>
12405
+
12278
12406
  <xsl:call-template name="setId"/>
12279
12407
 
12280
12408
  <xsl:call-template name="setBlockSpanAll"/>
@@ -12392,7 +12520,48 @@
12392
12520
  </xsl:choose>
12393
12521
  </xsl:when>
12394
12522
  <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
12395
- <xsl:value-of select="@label"/>
12523
+
12524
+ <xsl:variable name="label">
12525
+
12526
+ <xsl:variable name="type" select="../@type"/>
12527
+
12528
+ <xsl:variable name="style_prefix_">
12529
+ <xsl:if test="$type = 'roman'">
12530
+ ( <!-- Example: (i) -->
12531
+ </xsl:if>
12532
+ </xsl:variable>
12533
+ <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
12534
+
12535
+ <xsl:variable name="style_suffix_">
12536
+ <xsl:choose>
12537
+ <xsl:when test="$type = 'arabic'">
12538
+ .
12539
+ </xsl:when>
12540
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
12541
+ )
12542
+ </xsl:when>
12543
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
12544
+ .
12545
+ </xsl:when>
12546
+ <xsl:when test="$type = 'roman'">
12547
+ )
12548
+ </xsl:when>
12549
+ <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
12550
+ </xsl:choose>
12551
+ </xsl:variable>
12552
+ <xsl:variable name="style_suffix" select="normalize-space($style_suffix_)"/>
12553
+
12554
+ <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
12555
+ <xsl:value-of select="$style_prefix"/>
12556
+ </xsl:if>
12557
+ <xsl:value-of select="@label"/>
12558
+ <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
12559
+ <xsl:value-of select="$style_suffix"/>
12560
+ </xsl:if>
12561
+ </xsl:variable>
12562
+
12563
+ <xsl:value-of select="normalize-space($label)"/>
12564
+
12396
12565
  </xsl:when>
12397
12566
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
12398
12567
 
@@ -12474,7 +12643,7 @@
12474
12643
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
12475
12644
  <xsl:choose>
12476
12645
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
12477
- <fo:block-container>
12646
+ <fo:block-container role="SKIP">
12478
12647
  <xsl:attribute name="margin-left">
12479
12648
  <xsl:choose>
12480
12649
  <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
@@ -12484,7 +12653,7 @@
12484
12653
 
12485
12654
  <xsl:call-template name="refine_list_container_style"/>
12486
12655
 
12487
- <fo:block-container margin-left="0mm">
12656
+ <fo:block-container margin-left="0mm" role="SKIP">
12488
12657
  <fo:block>
12489
12658
  <xsl:apply-templates select="." mode="list"/>
12490
12659
  </fo:block>
@@ -12493,7 +12662,7 @@
12493
12662
  </xsl:when>
12494
12663
  <xsl:otherwise>
12495
12664
 
12496
- <fo:block>
12665
+ <fo:block role="SKIP">
12497
12666
  <xsl:apply-templates select="." mode="list"/>
12498
12667
  </fo:block>
12499
12668
 
@@ -12587,7 +12756,7 @@
12587
12756
  <xsl:call-template name="refine_list-item-style"/>
12588
12757
 
12589
12758
  <fo:list-item-label end-indent="label-end()">
12590
- <fo:block xsl:use-attribute-sets="list-item-label-style">
12759
+ <fo:block xsl:use-attribute-sets="list-item-label-style" role="SKIP">
12591
12760
 
12592
12761
  <xsl:call-template name="refine_list-item-label-style"/>
12593
12762
 
@@ -12601,7 +12770,7 @@
12601
12770
  </fo:block>
12602
12771
  </fo:list-item-label>
12603
12772
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
12604
- <fo:block>
12773
+ <fo:block role="SKIP">
12605
12774
 
12606
12775
  <xsl:call-template name="refine_list-item-body-style"/>
12607
12776
 
@@ -12880,10 +13049,10 @@
12880
13049
  <fo:table-body>
12881
13050
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
12882
13051
 
12883
- <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
12884
- <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
12885
- <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
12886
- <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
13052
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
13053
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
13054
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
13055
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Pages</fo:block></fo:table-cell>
12887
13056
  </fo:table-row>
12888
13057
  <xsl:apply-templates/>
12889
13058
  </fo:table-body>
@@ -12898,7 +13067,7 @@
12898
13067
 
12899
13068
  <xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
12900
13069
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
12901
- <fo:block><xsl:apply-templates/></fo:block>
13070
+ <fo:block role="SKIP"><xsl:apply-templates/></fo:block>
12902
13071
  </fo:table-cell>
12903
13072
  </xsl:template>
12904
13073
  <!-- ============ -->
@@ -12913,7 +13082,10 @@
12913
13082
  <!-- Reference sections (Normative References and Bibliography) -->
12914
13083
  <!-- ========================================================== -->
12915
13084
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
12916
- <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/>
13085
+ <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
13086
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
13087
+
13088
+ </xsl:template>
12917
13089
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
12918
13090
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
12919
13091
 
@@ -12962,6 +13134,7 @@
12962
13134
 
12963
13135
  <!-- Bibliography (non-normative references) -->
12964
13136
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
13137
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
12965
13138
 
12966
13139
  <!-- start BIPM bibitem processing -->
12967
13140
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
@@ -12988,6 +13161,35 @@
12988
13161
 
12989
13162
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
12990
13163
 
13164
+ <xsl:template name="insertListItem_Bibitem">
13165
+ <xsl:choose>
13166
+ <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
13167
+ <xsl:otherwise>
13168
+ <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
13169
+ <fo:list-item-label end-indent="label-end()">
13170
+ <fo:block role="SKIP">
13171
+ <fo:inline role="SKIP">
13172
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
13173
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
13174
+ </xsl:apply-templates>
13175
+ </fo:inline>
13176
+ </fo:block>
13177
+ </fo:list-item-label>
13178
+ <fo:list-item-body start-indent="body-start()">
13179
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
13180
+ <xsl:call-template name="processBibitem">
13181
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
13182
+ </xsl:call-template>
13183
+ </fo:block>
13184
+ </fo:list-item-body>
13185
+ </fo:list-item>
13186
+ </xsl:otherwise>
13187
+ </xsl:choose>
13188
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
13189
+ <xsl:with-param name="skip">false</xsl:with-param>
13190
+ </xsl:apply-templates>
13191
+ </xsl:template>
13192
+
12991
13193
  <xsl:template name="processBibitem">
12992
13194
  <xsl:param name="biblio_tag_part">both</xsl:param>
12993
13195
 
@@ -13199,7 +13401,7 @@
13199
13401
  <xsl:for-each select="*[local-name() = 'tab']">
13200
13402
  <xsl:variable name="current_id" select="generate-id()"/>
13201
13403
  <fo:table-cell>
13202
- <fo:block line-height-shift-adjustment="disregard-shifts">
13404
+ <fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
13203
13405
  <xsl:call-template name="insert_basic_link">
13204
13406
  <xsl:with-param name="element">
13205
13407
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -13217,7 +13419,7 @@
13217
13419
  </xsl:for-each>
13218
13420
  <!-- last column - for page numbers -->
13219
13421
  <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
13220
- <fo:block>
13422
+ <fo:block role="SKIP">
13221
13423
  <xsl:call-template name="insert_basic_link">
13222
13424
  <xsl:with-param name="element">
13223
13425
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -13321,7 +13523,7 @@
13321
13523
 
13322
13524
  <xsl:call-template name="setBlockSpanAll"/>
13323
13525
 
13324
- <fo:block-container xsl:use-attribute-sets="admonition-container-style">
13526
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
13325
13527
 
13326
13528
  <fo:block xsl:use-attribute-sets="admonition-name-style">
13327
13529
  <xsl:call-template name="displayAdmonitionName"/>