metanorma-iho 0.7.11 → 0.7.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -1806,6 +1806,7 @@
1806
1806
  </xsl:attribute-set>
1807
1807
 
1808
1808
  <xsl:attribute-set name="figure-block-style">
1809
+ <xsl:attribute name="role">SKIP</xsl:attribute>
1809
1810
 
1810
1811
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1811
1812
 
@@ -1816,6 +1817,7 @@
1816
1817
  </xsl:attribute-set>
1817
1818
 
1818
1819
  <xsl:attribute-set name="figure-name-style">
1820
+ <xsl:attribute name="role">Caption</xsl:attribute>
1819
1821
 
1820
1822
  <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
1821
1823
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -1856,7 +1858,12 @@
1856
1858
  </xsl:attribute-set> <!-- formula-stem-number-style -->
1857
1859
  <!-- End Formula's styles -->
1858
1860
 
1861
+ <xsl:template name="refine_formula-stem-number-style">
1862
+
1863
+ </xsl:template>
1864
+
1859
1865
  <xsl:attribute-set name="image-style">
1866
+ <xsl:attribute name="role">SKIP</xsl:attribute>
1860
1867
  <xsl:attribute name="text-align">center</xsl:attribute>
1861
1868
 
1862
1869
  </xsl:attribute-set>
@@ -2131,6 +2138,11 @@
2131
2138
 
2132
2139
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
2133
2140
 
2141
+ <xsl:attribute-set name="bibitem-non-normative-list-item-style">
2142
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2143
+
2144
+ </xsl:attribute-set>
2145
+
2134
2146
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
2135
2147
  <xsl:attribute-set name="bibitem-normative-list-body-style">
2136
2148
 
@@ -2350,13 +2362,13 @@
2350
2362
 
2351
2363
  <xsl:template name="processPrefaceSectionsDefault_Contents">
2352
2364
  <xsl:variable name="nodes_preface_">
2353
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2365
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
2354
2366
  <node id="{@id}"/>
2355
2367
  </xsl:for-each>
2356
2368
  </xsl:variable>
2357
2369
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
2358
2370
 
2359
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2371
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
2360
2372
  <xsl:sort select="@displayorder" data-type="number"/>
2361
2373
 
2362
2374
  <!-- process Section's title -->
@@ -2390,12 +2402,12 @@
2390
2402
  <xsl:apply-templates select="." mode="contents"/>
2391
2403
  </xsl:for-each>
2392
2404
 
2393
- <xsl:for-each select="/*/*[local-name()='annex']">
2405
+ <!-- <xsl:for-each select="/*/*[local-name()='annex']">
2394
2406
  <xsl:sort select="@displayorder" data-type="number"/>
2395
2407
  <xsl:apply-templates select="." mode="contents"/>
2396
- </xsl:for-each>
2408
+ </xsl:for-each> -->
2397
2409
 
2398
- <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]">
2410
+ <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]">
2399
2411
  <xsl:sort select="@displayorder" data-type="number"/>
2400
2412
  <xsl:apply-templates select="." mode="contents"/>
2401
2413
  </xsl:for-each>
@@ -2525,14 +2537,14 @@
2525
2537
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
2526
2538
  </xsl:when>
2527
2539
  <xsl:otherwise>
2528
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
2540
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
2529
2541
  </xsl:otherwise>
2530
2542
  </xsl:choose>
2531
2543
  </xsl:for-each>
2532
2544
  </xsl:when>
2533
2545
 
2534
2546
  <xsl:otherwise>
2535
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
2547
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
2536
2548
  </xsl:otherwise>
2537
2549
 
2538
2550
  </xsl:choose>
@@ -2542,7 +2554,7 @@
2542
2554
  <!-- Preface boilerplate sections processing -->
2543
2555
  <!-- ================================= -->
2544
2556
  <xsl:template match="*[local-name()='copyright-statement']">
2545
- <fo:block xsl:use-attribute-sets="copyright-statement-style">
2557
+ <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
2546
2558
  <xsl:apply-templates/>
2547
2559
  </fo:block>
2548
2560
  </xsl:template> <!-- copyright-statement -->
@@ -2712,7 +2724,7 @@
2712
2724
  </xsl:choose>
2713
2725
  </xsl:variable>
2714
2726
 
2715
- <fo:block-container xsl:use-attribute-sets="table-container-style">
2727
+ <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
2716
2728
 
2717
2729
  <xsl:call-template name="refine_table-container-style">
2718
2730
  <xsl:with-param name="margin-side" select="$margin-side"/>
@@ -2850,7 +2862,7 @@
2850
2862
  <fo:table-row>
2851
2863
  <fo:table-cell column-number="2">
2852
2864
  <xsl:copy-of select="$table-preamble"/>
2853
- <fo:block>
2865
+ <fo:block role="SKIP">
2854
2866
  <xsl:call-template name="setTrackChangesStyles">
2855
2867
  <xsl:with-param name="isAdded" select="$isAdded"/>
2856
2868
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
@@ -2893,7 +2905,7 @@
2893
2905
  <xsl:param name="continued"/>
2894
2906
  <xsl:if test="normalize-space() != ''">
2895
2907
 
2896
- <fo:block xsl:use-attribute-sets="table-name-style">
2908
+ <fo:block xsl:use-attribute-sets="table-name-style" role="SKIP">
2897
2909
 
2898
2910
  <xsl:call-template name="refine_table-name-style">
2899
2911
  <xsl:with-param name="continued" select="$continued"/>
@@ -3278,8 +3290,8 @@
3278
3290
  <xsl:template name="table-header-title">
3279
3291
  <xsl:param name="cols-count"/>
3280
3292
  <!-- row for title -->
3281
- <fo:table-row>
3282
- <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">
3293
+ <fo:table-row role="SKIP">
3294
+ <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">
3283
3295
 
3284
3296
  <xsl:call-template name="refine_table-header-title-style"/>
3285
3297
 
@@ -3288,7 +3300,7 @@
3288
3300
  </xsl:apply-templates>
3289
3301
 
3290
3302
  <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
3291
- <fo:block/>
3303
+ <fo:block role="SKIP"/>
3292
3304
  </xsl:if>
3293
3305
 
3294
3306
  </fo:table-cell>
@@ -3599,7 +3611,7 @@
3599
3611
 
3600
3612
  <xsl:call-template name="refine_table-header-cell-style"/>
3601
3613
 
3602
- <fo:block>
3614
+ <fo:block role="SKIP">
3603
3615
  <xsl:apply-templates/>
3604
3616
  </fo:block>
3605
3617
  </fo:table-cell>
@@ -3652,7 +3664,7 @@
3652
3664
  <xsl:attribute name="text-align">left</xsl:attribute>
3653
3665
  </xsl:if>
3654
3666
 
3655
- <fo:block>
3667
+ <fo:block role="SKIP">
3656
3668
 
3657
3669
  <xsl:if test="$isGenerateTableIF = 'true'">
3658
3670
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -3745,7 +3757,7 @@
3745
3757
  </xsl:choose>
3746
3758
  </xsl:variable>
3747
3759
  <xsl:variable name="footnote_inline">
3748
- <fo:inline>
3760
+ <fo:inline role="Reference">
3749
3761
 
3750
3762
  <xsl:variable name="fn_styles">
3751
3763
  <xsl:choose>
@@ -3768,7 +3780,7 @@
3768
3780
 
3769
3781
  <xsl:call-template name="insert_basic_link">
3770
3782
  <xsl:with-param name="element">
3771
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
3783
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
3772
3784
  <xsl:copy-of select="$current_fn_number_text"/>
3773
3785
  </fo:basic-link>
3774
3786
  </xsl:with-param>
@@ -3781,17 +3793,17 @@
3781
3793
  <xsl:copy-of select="$footnote_inline"/>
3782
3794
  </xsl:when>
3783
3795
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
3784
- <fo:footnote xsl:use-attribute-sets="fn-style">
3796
+ <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
3785
3797
  <xsl:copy-of select="$footnote_inline"/>
3786
- <fo:footnote-body>
3798
+ <fo:footnote-body role="Note">
3787
3799
 
3788
- <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
3800
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
3789
3801
 
3790
- <fo:block xsl:use-attribute-sets="fn-body-style">
3802
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
3791
3803
 
3792
3804
  <xsl:call-template name="refine_fn-body-style"/>
3793
3805
 
3794
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
3806
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
3795
3807
 
3796
3808
  <xsl:call-template name="refine_fn-body-num-style"/>
3797
3809
 
@@ -4053,11 +4065,11 @@
4053
4065
  </xsl:template>
4054
4066
 
4055
4067
  <xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
4056
- <fo:inline><xsl:value-of select="."/></fo:inline>
4068
+ <fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
4057
4069
  </xsl:template>
4058
4070
 
4059
4071
  <xsl:template match="*[local-name()='fn']//*[local-name()='p']">
4060
- <fo:inline>
4072
+ <fo:inline role="P">
4061
4073
  <xsl:apply-templates/>
4062
4074
  </fo:inline>
4063
4075
  </xsl:template>
@@ -4072,7 +4084,7 @@
4072
4084
  <xsl:variable name="isAdded" select="@added"/>
4073
4085
  <xsl:variable name="isDeleted" select="@deleted"/>
4074
4086
  <!-- <dl><xsl:copy-of select="."/></dl> -->
4075
- <fo:block-container xsl:use-attribute-sets="dl-block-style">
4087
+ <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
4076
4088
 
4077
4089
  <xsl:call-template name="setBlockSpanAll"/>
4078
4090
 
@@ -4107,7 +4119,7 @@
4107
4119
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
4108
4120
  </xsl:call-template>
4109
4121
 
4110
- <fo:block-container margin-left="0mm">
4122
+ <fo:block-container margin-left="0mm" role="SKIP">
4111
4123
 
4112
4124
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
4113
4125
 
@@ -4172,7 +4184,7 @@
4172
4184
 
4173
4185
  <!-- a few components -->
4174
4186
  <xsl:if test="$onlyOneComponent = 'false'">
4175
- <fo:block>
4187
+ <fo:block role="SKIP">
4176
4188
 
4177
4189
  <xsl:call-template name="refine_multicomponent_style"/>
4178
4190
 
@@ -4180,7 +4192,7 @@
4180
4192
  <xsl:attribute name="margin-top">0</xsl:attribute>
4181
4193
  </xsl:if>
4182
4194
 
4183
- <fo:block>
4195
+ <fo:block role="SKIP">
4184
4196
 
4185
4197
  <xsl:call-template name="refine_multicomponent_block_style"/>
4186
4198
 
@@ -4521,7 +4533,7 @@
4521
4533
  -->
4522
4534
  <fo:table-row>
4523
4535
  <fo:table-cell number-columns-spanned="2">
4524
- <fo:block>
4536
+ <fo:block role="SKIP">
4525
4537
  <xsl:call-template name="note"/>
4526
4538
  </fo:block>
4527
4539
  </fo:table-cell>
@@ -4586,7 +4598,7 @@
4586
4598
 
4587
4599
  <xsl:call-template name="refine_dt-cell-style"/>
4588
4600
 
4589
- <fo:block xsl:use-attribute-sets="dt-block-style">
4601
+ <fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
4590
4602
  <xsl:copy-of select="@id"/>
4591
4603
 
4592
4604
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -4616,7 +4628,7 @@
4616
4628
 
4617
4629
  <xsl:call-template name="refine_dd-cell-style"/>
4618
4630
 
4619
- <fo:block>
4631
+ <fo:block role="SKIP">
4620
4632
 
4621
4633
  <xsl:if test="$isGenerateTableIF = 'true'">
4622
4634
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -4758,10 +4770,15 @@
4758
4770
  <!-- ========================= -->
4759
4771
  <xsl:template match="*[local-name()='em']">
4760
4772
  <fo:inline font-style="italic">
4773
+ <xsl:call-template name="refine_italic_style"/>
4761
4774
  <xsl:apply-templates/>
4762
4775
  </fo:inline>
4763
4776
  </xsl:template>
4764
4777
 
4778
+ <xsl:template name="refine_italic_style">
4779
+
4780
+ </xsl:template>
4781
+
4765
4782
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
4766
4783
  <xsl:param name="split_keep-within-line"/>
4767
4784
  <fo:inline font-weight="bold">
@@ -4776,6 +4793,9 @@
4776
4793
 
4777
4794
  <xsl:template name="refine_strong_style">
4778
4795
 
4796
+ <xsl:if test="ancestor::*['preferred']">
4797
+ <xsl:attribute name="role">SKIP</xsl:attribute>
4798
+ </xsl:if>
4779
4799
  </xsl:template>
4780
4800
 
4781
4801
  <xsl:template match="*[local-name()='padding']">
@@ -4985,11 +5005,41 @@
4985
5005
 
4986
5006
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
4987
5007
  <xsl:variable name="text" select="normalize-space(.)"/>
4988
- <fo:inline font-size="75%">
5008
+ <fo:inline font-size="75%" role="SKIP">
4989
5009
  <xsl:if test="string-length($text) &gt; 0">
4990
- <xsl:call-template name="recursiveSmallCaps">
4991
- <xsl:with-param name="text" select="$text"/>
4992
- </xsl:call-template>
5010
+ <xsl:variable name="smallCapsText">
5011
+ <xsl:call-template name="recursiveSmallCaps">
5012
+ <xsl:with-param name="text" select="$text"/>
5013
+ </xsl:call-template>
5014
+ </xsl:variable>
5015
+ <!-- merge neighboring fo:inline -->
5016
+ <xsl:for-each select="xalan:nodeset($smallCapsText)/node()">
5017
+ <xsl:choose>
5018
+ <xsl:when test="self::fo:inline and preceding-sibling::node()[1][self::fo:inline]"><!-- <xsl:copy-of select="."/> --></xsl:when>
5019
+ <xsl:when test="self::fo:inline and @font-size">
5020
+ <xsl:variable name="curr_pos" select="count(preceding-sibling::node()) + 1"/>
5021
+ <!-- <curr_pos><xsl:value-of select="$curr_pos"/></curr_pos> -->
5022
+ <xsl:variable name="next_text_" select="count(following-sibling::node()[not(local-name() = 'inline')][1]/preceding-sibling::node())"/>
5023
+ <xsl:variable name="next_text">
5024
+ <xsl:choose>
5025
+ <xsl:when test="$next_text_ = 0">99999999</xsl:when>
5026
+ <xsl:otherwise><xsl:value-of select="$next_text_ + 1"/></xsl:otherwise>
5027
+ </xsl:choose>
5028
+ </xsl:variable>
5029
+ <!-- <next_text><xsl:value-of select="$next_text"/></next_text> -->
5030
+ <fo:inline>
5031
+ <xsl:copy-of select="@*"/>
5032
+ <xsl:copy-of select="./node()"/>
5033
+ <xsl:for-each select="following-sibling::node()[position() &lt; $next_text - $curr_pos]"> <!-- [self::fo:inline] -->
5034
+ <xsl:copy-of select="./node()"/>
5035
+ </xsl:for-each>
5036
+ </fo:inline>
5037
+ </xsl:when>
5038
+ <xsl:otherwise>
5039
+ <xsl:copy-of select="."/>
5040
+ </xsl:otherwise>
5041
+ </xsl:choose>
5042
+ </xsl:for-each>
4993
5043
  </xsl:if>
4994
5044
  </fo:inline>
4995
5045
  </xsl:template>
@@ -5001,7 +5051,7 @@
5001
5051
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
5002
5052
  <xsl:choose>
5003
5053
  <xsl:when test="$char=$upperCase">
5004
- <fo:inline font-size="{100 div 0.75}%">
5054
+ <fo:inline font-size="{100 div 0.75}%" role="SKIP">
5005
5055
  <xsl:value-of select="$upperCase"/>
5006
5056
  </fo:inline>
5007
5057
  </xsl:when>
@@ -5234,6 +5284,10 @@
5234
5284
 
5235
5285
  <xsl:when test="not(contains($text, $separator))">
5236
5286
  <word>
5287
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
5288
+ <xsl:text>
5289
+  </xsl:text> <!-- to add distance between dt and dd -->
5290
+ </xsl:if>
5237
5291
  <xsl:call-template name="enclose_text_in_tags">
5238
5292
  <xsl:with-param name="text" select="normalize-space($text)"/>
5239
5293
  <xsl:with-param name="tags" select="$tags"/>
@@ -5242,6 +5296,10 @@
5242
5296
  </xsl:when>
5243
5297
  <xsl:otherwise>
5244
5298
  <word>
5299
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
5300
+ <xsl:text>
5301
+  </xsl:text> <!-- to add distance between dt and dd -->
5302
+ </xsl:if>
5245
5303
  <xsl:call-template name="enclose_text_in_tags">
5246
5304
  <xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
5247
5305
  <xsl:with-param name="tags" select="$tags"/>
@@ -5425,6 +5483,10 @@
5425
5483
  <xsl:template name="getSimpleTable">
5426
5484
  <xsl:param name="id"/>
5427
5485
 
5486
+ <!-- <test0>
5487
+ <xsl:copy-of select="."/>
5488
+ </test0> -->
5489
+
5428
5490
  <xsl:variable name="simple-table">
5429
5491
 
5430
5492
  <!-- Step 0. replace <br/> to <p>...</p> -->
@@ -5737,6 +5799,18 @@
5737
5799
  </xsl:copy>
5738
5800
  </xsl:template>
5739
5801
 
5802
+ <xsl:variable name="font_main_root_style">
5803
+ <root-style xsl:use-attribute-sets="root-style">
5804
+ </root-style>
5805
+ </xsl:variable>
5806
+ <xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
5807
+ <xsl:variable name="font_main">
5808
+ <xsl:choose>
5809
+ <xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
5810
+ <xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
5811
+ </xsl:choose>
5812
+ </xsl:variable>
5813
+
5740
5814
  <xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
5741
5815
  <xsl:param name="id"/>
5742
5816
  <xsl:copy>
@@ -5775,6 +5849,33 @@
5775
5849
 
5776
5850
  <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
5777
5851
 
5852
+ <xsl:variable name="words_with_width">
5853
+ <!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
5854
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
5855
+ <xsl:copy>
5856
+ <xsl:copy-of select="@*"/>
5857
+ <xsl:attribute name="width">
5858
+ <xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
5859
+ </xsl:attribute>
5860
+ <xsl:copy-of select="node()"/>
5861
+ </xsl:copy>
5862
+ </xsl:for-each>
5863
+ </xsl:variable>
5864
+
5865
+ <xsl:variable name="words_with_width_sorted">
5866
+ <xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
5867
+ <xsl:sort select="@width" data-type="number" order="descending"/>
5868
+ <!-- select word maximal width only -->
5869
+ <xsl:if test="position() = 1">
5870
+ <xsl:copy-of select="."/>
5871
+ </xsl:if>
5872
+ </xsl:for-each>
5873
+ <!-- add 'word' with formatting tags inside -->
5874
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
5875
+ <xsl:copy-of select="."/>
5876
+ </xsl:for-each>
5877
+ </xsl:variable>
5878
+
5778
5879
  <xsl:variable name="words">
5779
5880
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
5780
5881
  <word>
@@ -5782,9 +5883,12 @@
5782
5883
  </word>
5783
5884
  </xsl:for-each>
5784
5885
 
5785
- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
5886
+ <xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
5786
5887
  <xsl:copy-of select="."/>
5787
5888
  </xsl:for-each>
5889
+ <!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
5890
+ <xsl:copy-of select="."/>
5891
+ </xsl:for-each> -->
5788
5892
 
5789
5893
  </xsl:variable>
5790
5894
 
@@ -6245,10 +6349,10 @@
6245
6349
  <xsl:copy>
6246
6350
  <xsl:apply-templates select="@*" mode="mathml"/>
6247
6351
  <xsl:if test="not(@lspace)">
6248
- <xsl:attribute name="lspace">0.4em</xsl:attribute>
6352
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
6249
6353
  </xsl:if>
6250
- <xsl:if test="not(@rspace)">
6251
- <xsl:attribute name="rspace">0.4em</xsl:attribute>
6354
+ <xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
6355
+ <xsl:attribute name="rspace">0.2em</xsl:attribute>
6252
6356
  </xsl:if>
6253
6357
  <xsl:apply-templates mode="mathml"/>
6254
6358
  </xsl:copy>
@@ -6265,6 +6369,27 @@
6265
6369
  </xsl:copy>
6266
6370
  </xsl:template>
6267
6371
 
6372
+ <!-- increase space before '(' -->
6373
+ <xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
6374
+ <xsl:copy>
6375
+ <xsl:apply-templates select="@*" mode="mathml"/>
6376
+ <xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
6377
+ <xsl:if test="not(@lspace)">
6378
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
6379
+ <xsl:choose>
6380
+ <xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
6381
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
6382
+ </xsl:when>
6383
+ <xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
6384
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
6385
+ </xsl:when>
6386
+ </xsl:choose>
6387
+ </xsl:if>
6388
+ </xsl:if>
6389
+ <xsl:apply-templates mode="mathml"/>
6390
+ </xsl:copy>
6391
+ </xsl:template>
6392
+
6268
6393
  <!-- Examples:
6269
6394
  <stem type="AsciiMath">x = 1</stem>
6270
6395
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -6424,7 +6549,7 @@
6424
6549
  <!-- formula -->
6425
6550
  <!-- ====== -->
6426
6551
  <xsl:template match="*[local-name() = 'formula']" name="formula">
6427
- <fo:block-container margin-left="0mm">
6552
+ <fo:block-container margin-left="0mm" role="SKIP">
6428
6553
  <xsl:if test="parent::*[local-name() = 'note']">
6429
6554
  <xsl:attribute name="margin-left">
6430
6555
  <xsl:choose>
@@ -6434,7 +6559,7 @@
6434
6559
  </xsl:attribute>
6435
6560
 
6436
6561
  </xsl:if>
6437
- <fo:block-container margin-left="0mm">
6562
+ <fo:block-container margin-left="0mm" role="SKIP">
6438
6563
  <fo:block id="{@id}">
6439
6564
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
6440
6565
  </fo:block>
@@ -6470,7 +6595,7 @@
6470
6595
  <fo:table-body>
6471
6596
  <fo:table-row>
6472
6597
  <fo:table-cell display-align="center">
6473
- <fo:block xsl:use-attribute-sets="formula-stem-block-style">
6598
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
6474
6599
 
6475
6600
  <xsl:call-template name="refine_formula-stem-block-style"/>
6476
6601
 
@@ -6478,7 +6603,10 @@
6478
6603
  </fo:block>
6479
6604
  </fo:table-cell>
6480
6605
  <fo:table-cell display-align="center">
6481
- <fo:block xsl:use-attribute-sets="formula-stem-number-style">
6606
+ <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
6607
+
6608
+ <xsl:call-template name="refine_formula-stem-number-style"/>
6609
+
6482
6610
  <xsl:apply-templates select="../*[local-name() = 'name']"/>
6483
6611
  </fo:block>
6484
6612
  </fo:table-cell>
@@ -6511,13 +6639,13 @@
6511
6639
 
6512
6640
  <xsl:template match="*[local-name() = 'note']" name="note">
6513
6641
 
6514
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
6642
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
6515
6643
 
6516
6644
  <xsl:call-template name="setBlockSpanAll"/>
6517
6645
 
6518
6646
  <xsl:call-template name="refine_note-style"/>
6519
6647
 
6520
- <fo:block-container margin-left="0mm" margin-right="0mm">
6648
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
6521
6649
 
6522
6650
  <fo:block>
6523
6651
 
@@ -6681,12 +6809,13 @@
6681
6809
 
6682
6810
  <xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
6683
6811
  <xsl:if test="normalize-space() != ''">
6684
- <xsl:variable name="level">
6812
+ <!-- <xsl:variable name="level">
6685
6813
  <xsl:call-template name="getLevelTermName"/>
6686
6814
  </xsl:variable>
6687
6815
  <fo:inline role="H{$level}">
6688
- <xsl:apply-templates/>
6689
- </fo:inline>
6816
+ <xsl:apply-templates />
6817
+ </fo:inline> -->
6818
+ <xsl:apply-templates/>
6690
6819
  </xsl:if>
6691
6820
  </xsl:template>
6692
6821
  <!-- ====== -->
@@ -6710,7 +6839,7 @@
6710
6839
  <!-- Example: Dimensions in millimeters -->
6711
6840
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
6712
6841
 
6713
- <fo:block xsl:use-attribute-sets="figure-style">
6842
+ <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
6714
6843
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
6715
6844
  </fo:block>
6716
6845
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
@@ -7844,7 +7973,7 @@
7844
7973
  </xsl:when>
7845
7974
 
7846
7975
  <xsl:otherwise>
7847
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
7976
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
7848
7977
 
7849
7978
  <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
7850
7979
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -7865,7 +7994,7 @@
7865
7994
  </xsl:attribute>
7866
7995
 
7867
7996
  </xsl:if>
7868
- <fo:block-container margin-left="0mm">
7997
+ <fo:block-container margin-left="0mm" role="SKIP">
7869
7998
 
7870
7999
  <fo:block xsl:use-attribute-sets="sourcecode-style">
7871
8000
 
@@ -7989,7 +8118,7 @@
7989
8118
  <!-- second td with sourcecode -->
7990
8119
  <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'] -->
7991
8120
  <fo:table-cell>
7992
- <fo:block>
8121
+ <fo:block role="SKIP">
7993
8122
  <xsl:apply-templates/>
7994
8123
  </fo:block>
7995
8124
  </fo:table-cell>
@@ -8411,11 +8540,11 @@
8411
8540
  <!-- requirement, recommendation, permission table -->
8412
8541
  <!-- ========== -->
8413
8542
  <xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8414
- <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
8543
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
8415
8544
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8416
8545
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
8417
8546
  </xsl:if>
8418
- <fo:block-container margin-left="0mm" margin-right="0mm">
8547
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8419
8548
  <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
8420
8549
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8421
8550
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
@@ -8476,7 +8605,7 @@
8476
8605
 
8477
8606
  <xsl:call-template name="setTableCellAttributes"/>
8478
8607
 
8479
- <fo:block>
8608
+ <fo:block role="SKIP">
8480
8609
  <xsl:apply-templates/>
8481
8610
  </fo:block>
8482
8611
  </fo:table-cell>
@@ -8498,7 +8627,7 @@
8498
8627
 
8499
8628
  <xsl:call-template name="setTableCellAttributes"/>
8500
8629
 
8501
- <fo:block>
8630
+ <fo:block role="SKIP">
8502
8631
  <xsl:apply-templates/>
8503
8632
  </fo:block>
8504
8633
  </fo:table-cell>
@@ -8577,7 +8706,7 @@
8577
8706
  -->
8578
8707
  <xsl:template match="*[local-name() = 'example']">
8579
8708
 
8580
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
8709
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
8581
8710
 
8582
8711
  <xsl:call-template name="setBlockSpanAll"/>
8583
8712
 
@@ -8588,7 +8717,7 @@
8588
8717
  inline
8589
8718
  </xsl:variable>
8590
8719
 
8591
- <fo:block-container margin-left="0mm">
8720
+ <fo:block-container margin-left="0mm" role="SKIP">
8592
8721
 
8593
8722
  <xsl:choose>
8594
8723
 
@@ -8601,8 +8730,8 @@
8601
8730
  </xsl:apply-templates>
8602
8731
  </fo:block>
8603
8732
 
8604
- <fo:block-container xsl:use-attribute-sets="example-body-style">
8605
- <fo:block-container margin-left="0mm" margin-right="0mm">
8733
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
8734
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8606
8735
  <xsl:apply-templates select="node()[not(local-name() = 'name')]">
8607
8736
  <xsl:with-param name="fo_element" select="$fo_element"/>
8608
8737
  </xsl:apply-templates>
@@ -8655,8 +8784,8 @@
8655
8784
 
8656
8785
  <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
8657
8786
  <!-- display further elements in blocks -->
8658
- <fo:block-container xsl:use-attribute-sets="example-body-style">
8659
- <fo:block-container margin-left="0mm" margin-right="0mm">
8787
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
8788
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8660
8789
  <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
8661
8790
  <xsl:with-param name="fo_element" select="'block'"/>
8662
8791
  </xsl:apply-templates>
@@ -8709,7 +8838,7 @@
8709
8838
  </xsl:variable>
8710
8839
  <xsl:choose>
8711
8840
  <xsl:when test="starts-with(normalize-space($element), 'block')">
8712
- <fo:block-container>
8841
+ <fo:block-container role="SKIP">
8713
8842
  <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
8714
8843
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
8715
8844
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -8850,7 +8979,7 @@
8850
8979
  <!-- author -->
8851
8980
  <!-- ====== -->
8852
8981
  <xsl:template match="*[local-name() = 'quote']">
8853
- <fo:block-container margin-left="0mm">
8982
+ <fo:block-container margin-left="0mm" role="SKIP">
8854
8983
 
8855
8984
  <xsl:call-template name="setBlockSpanAll"/>
8856
8985
 
@@ -8860,12 +8989,12 @@
8860
8989
  </xsl:if>
8861
8990
  </xsl:if>
8862
8991
 
8863
- <fo:block-container margin-left="0mm">
8864
- <fo:block-container xsl:use-attribute-sets="quote-style">
8992
+ <fo:block-container margin-left="0mm" role="SKIP">
8993
+ <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
8865
8994
 
8866
8995
  <xsl:call-template name="refine_quote-style"/>
8867
8996
 
8868
- <fo:block-container margin-left="0mm" margin-right="0mm">
8997
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8869
8998
  <fo:block role="BlockQuote">
8870
8999
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
8871
9000
  </fo:block>
@@ -9025,10 +9154,10 @@
9025
9154
 
9026
9155
  <xsl:choose>
9027
9156
  <xsl:when test="$lang = 'zh'">
9028
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
9157
+ <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
9029
9158
  </xsl:when>
9030
9159
  <xsl:when test="../../@inline-header = 'true'">
9031
- <fo:inline font-size="90%">
9160
+ <fo:inline font-size="90%" role="SKIP">
9032
9161
  <xsl:call-template name="insertNonBreakSpaces">
9033
9162
  <xsl:with-param name="count" select="$padding-right"/>
9034
9163
  </xsl:call-template>
@@ -9036,7 +9165,7 @@
9036
9165
  </xsl:when>
9037
9166
  <xsl:otherwise>
9038
9167
  <xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
9039
- <fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/>​</fo:inline>
9168
+ <fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/>​</fo:inline>
9040
9169
  </xsl:otherwise>
9041
9170
  </xsl:choose>
9042
9171
 
@@ -9066,12 +9195,12 @@
9066
9195
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
9067
9196
 
9068
9197
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
9069
- <fo:block xsl:use-attribute-sets="term-name-style">
9198
+ <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
9070
9199
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
9071
9200
  </fo:block>
9072
9201
  </xsl:if>
9073
9202
 
9074
- <fo:block xsl:use-attribute-sets="preferred-term-style">
9203
+ <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
9075
9204
  <xsl:call-template name="setStyle_preferred"/>
9076
9205
  <xsl:apply-templates/>
9077
9206
  </fo:block>
@@ -9112,7 +9241,7 @@
9112
9241
  <!-- definition -->
9113
9242
  <!-- ========== -->
9114
9243
  <xsl:template match="*[local-name() = 'definition']">
9115
- <fo:block xsl:use-attribute-sets="definition-style">
9244
+ <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
9116
9245
  <xsl:apply-templates/>
9117
9246
  </fo:block>
9118
9247
  </xsl:template>
@@ -9155,6 +9284,10 @@
9155
9284
 
9156
9285
  <xsl:template match="*[local-name() = 'clause']">
9157
9286
  <fo:block>
9287
+ <xsl:if test="parent::*[local-name() = 'copyright-statement']">
9288
+ <xsl:attribute name="role">SKIP</xsl:attribute>
9289
+ </xsl:if>
9290
+
9158
9291
  <xsl:call-template name="setId"/>
9159
9292
 
9160
9293
  <xsl:call-template name="setBlockSpanAll"/>
@@ -9271,7 +9404,48 @@
9271
9404
  </xsl:choose>
9272
9405
  </xsl:when>
9273
9406
  <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
9274
- <xsl:value-of select="@label"/>
9407
+
9408
+ <xsl:variable name="label">
9409
+
9410
+ <xsl:variable name="type" select="../@type"/>
9411
+
9412
+ <xsl:variable name="style_prefix_">
9413
+ <xsl:if test="$type = 'roman'">
9414
+ <!-- Example: (i) -->
9415
+ </xsl:if>
9416
+ </xsl:variable>
9417
+ <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
9418
+
9419
+ <xsl:variable name="style_suffix_">
9420
+ <xsl:choose>
9421
+ <xsl:when test="$type = 'arabic'">
9422
+ )
9423
+ </xsl:when>
9424
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
9425
+ )
9426
+ </xsl:when>
9427
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
9428
+ .
9429
+ </xsl:when>
9430
+ <xsl:when test="$type = 'roman'">
9431
+ )
9432
+ </xsl:when>
9433
+ <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
9434
+ </xsl:choose>
9435
+ </xsl:variable>
9436
+ <xsl:variable name="style_suffix" select="normalize-space($style_suffix_)"/>
9437
+
9438
+ <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
9439
+ <xsl:value-of select="$style_prefix"/>
9440
+ </xsl:if>
9441
+ <xsl:value-of select="@label"/>
9442
+ <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
9443
+ <xsl:value-of select="$style_suffix"/>
9444
+ </xsl:if>
9445
+ </xsl:variable>
9446
+
9447
+ <xsl:value-of select="normalize-space($label)"/>
9448
+
9275
9449
  </xsl:when>
9276
9450
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
9277
9451
 
@@ -9353,7 +9527,7 @@
9353
9527
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
9354
9528
  <xsl:choose>
9355
9529
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
9356
- <fo:block-container>
9530
+ <fo:block-container role="SKIP">
9357
9531
  <xsl:attribute name="margin-left">
9358
9532
  <xsl:choose>
9359
9533
  <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
@@ -9363,7 +9537,7 @@
9363
9537
 
9364
9538
  <xsl:call-template name="refine_list_container_style"/>
9365
9539
 
9366
- <fo:block-container margin-left="0mm">
9540
+ <fo:block-container margin-left="0mm" role="SKIP">
9367
9541
  <fo:block>
9368
9542
  <xsl:apply-templates select="." mode="list"/>
9369
9543
  </fo:block>
@@ -9372,7 +9546,7 @@
9372
9546
  </xsl:when>
9373
9547
  <xsl:otherwise>
9374
9548
 
9375
- <fo:block>
9549
+ <fo:block role="SKIP">
9376
9550
  <xsl:apply-templates select="." mode="list"/>
9377
9551
  </fo:block>
9378
9552
 
@@ -9464,7 +9638,7 @@
9464
9638
  <xsl:call-template name="refine_list-item-style"/>
9465
9639
 
9466
9640
  <fo:list-item-label end-indent="label-end()">
9467
- <fo:block xsl:use-attribute-sets="list-item-label-style">
9641
+ <fo:block xsl:use-attribute-sets="list-item-label-style" role="SKIP">
9468
9642
 
9469
9643
  <xsl:call-template name="refine_list-item-label-style"/>
9470
9644
 
@@ -9478,7 +9652,7 @@
9478
9652
  </fo:block>
9479
9653
  </fo:list-item-label>
9480
9654
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
9481
- <fo:block>
9655
+ <fo:block role="SKIP">
9482
9656
 
9483
9657
  <xsl:call-template name="refine_list-item-body-style"/>
9484
9658
 
@@ -9757,10 +9931,10 @@
9757
9931
  <fo:table-body>
9758
9932
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
9759
9933
 
9760
- <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
9761
- <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
9762
- <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
9763
- <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
9934
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
9935
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
9936
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
9937
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Pages</fo:block></fo:table-cell>
9764
9938
  </fo:table-row>
9765
9939
  <xsl:apply-templates/>
9766
9940
  </fo:table-body>
@@ -9775,7 +9949,7 @@
9775
9949
 
9776
9950
  <xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
9777
9951
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
9778
- <fo:block><xsl:apply-templates/></fo:block>
9952
+ <fo:block role="SKIP"><xsl:apply-templates/></fo:block>
9779
9953
  </fo:table-cell>
9780
9954
  </xsl:template>
9781
9955
  <!-- ============ -->
@@ -9790,7 +9964,10 @@
9790
9964
  <!-- Reference sections (Normative References and Bibliography) -->
9791
9965
  <!-- ========================================================== -->
9792
9966
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
9793
- <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/>
9967
+ <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
9968
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
9969
+
9970
+ </xsl:template>
9794
9971
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
9795
9972
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
9796
9973
 
@@ -9868,11 +10045,41 @@
9868
10045
 
9869
10046
  <!-- Bibliography (non-normative references) -->
9870
10047
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
10048
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
9871
10049
 
9872
10050
  <xsl:call-template name="bibitem"/>
9873
10051
 
9874
10052
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
9875
10053
 
10054
+ <xsl:template name="insertListItem_Bibitem">
10055
+ <xsl:choose>
10056
+ <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
10057
+ <xsl:otherwise>
10058
+ <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
10059
+ <fo:list-item-label end-indent="label-end()">
10060
+ <fo:block role="SKIP">
10061
+ <fo:inline role="SKIP">
10062
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
10063
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
10064
+ </xsl:apply-templates>
10065
+ </fo:inline>
10066
+ </fo:block>
10067
+ </fo:list-item-label>
10068
+ <fo:list-item-body start-indent="body-start()">
10069
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
10070
+ <xsl:call-template name="processBibitem">
10071
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
10072
+ </xsl:call-template>
10073
+ </fo:block>
10074
+ </fo:list-item-body>
10075
+ </fo:list-item>
10076
+ </xsl:otherwise>
10077
+ </xsl:choose>
10078
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
10079
+ <xsl:with-param name="skip">false</xsl:with-param>
10080
+ </xsl:apply-templates>
10081
+ </xsl:template>
10082
+
9876
10083
  <xsl:template name="processBibitem">
9877
10084
  <xsl:param name="biblio_tag_part">both</xsl:param>
9878
10085
 
@@ -10084,7 +10291,7 @@
10084
10291
  <xsl:for-each select="*[local-name() = 'tab']">
10085
10292
  <xsl:variable name="current_id" select="generate-id()"/>
10086
10293
  <fo:table-cell>
10087
- <fo:block line-height-shift-adjustment="disregard-shifts">
10294
+ <fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
10088
10295
  <xsl:call-template name="insert_basic_link">
10089
10296
  <xsl:with-param name="element">
10090
10297
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -10102,7 +10309,7 @@
10102
10309
  </xsl:for-each>
10103
10310
  <!-- last column - for page numbers -->
10104
10311
  <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
10105
- <fo:block>
10312
+ <fo:block role="SKIP">
10106
10313
  <xsl:call-template name="insert_basic_link">
10107
10314
  <xsl:with-param name="element">
10108
10315
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -10206,7 +10413,7 @@
10206
10413
 
10207
10414
  <xsl:call-template name="setBlockSpanAll"/>
10208
10415
 
10209
- <fo:block-container xsl:use-attribute-sets="admonition-container-style">
10416
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
10210
10417
 
10211
10418
  <fo:block xsl:use-attribute-sets="admonition-name-style">
10212
10419
  <xsl:call-template name="displayAdmonitionName"/>