metanorma-ogc 2.3.12 → 2.3.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -268,8 +268,8 @@
268
268
  <fo:block font-size="11pt" margin-top="8pt"> </fo:block>
269
269
  <fo:block xsl:use-attribute-sets="title-toc-style">
270
270
  <!-- <xsl:text>Table of Figures</xsl:text> -->
271
- <xsl:call-template name="getTitle">
272
- <xsl:with-param name="name" select="'title-table-figures'"/>
271
+ <xsl:call-template name="getLocalizedString">
272
+ <xsl:with-param name="key">table_of_figures</xsl:with-param>
273
273
  </xsl:call-template>
274
274
  </fo:block>
275
275
  <xsl:for-each select="//ogc:figure[@id and ogc:name] | //ogc:table[@id and ogc:name]">
@@ -781,21 +781,32 @@
781
781
  <xsl:variable name="titles_">
782
782
 
783
783
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
784
- <title-toc lang="en">
785
-
784
+ <!-- <title-toc lang="en">
785
+ <xsl:if test="$namespace = 'csd' or $namespace = 'ieee' or $namespace = 'iho' or $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'unece-rec'">
786
+ <xsl:text>Contents</xsl:text>
787
+ </xsl:if>
788
+ <xsl:if test="$namespace = 'csa' or $namespace = 'm3d' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper'">
786
789
  <xsl:text>Table of Contents</xsl:text>
787
-
788
- </title-toc>
789
- <title-toc lang="fr">
790
+ </xsl:if>
791
+ <xsl:if test="$namespace = 'gb'">
792
+ <xsl:text>Table of contents</xsl:text>
793
+ </xsl:if>
794
+ </title-toc> -->
795
+ <title-toc lang="en">Table of contents</title-toc>
796
+ <!-- <title-toc lang="fr">
790
797
  <xsl:text>Sommaire</xsl:text>
791
- </title-toc>
792
- <title-toc lang="zh">
793
-
798
+ </title-toc> -->
799
+ <!-- <title-toc lang="zh">
800
+ <xsl:choose>
801
+ <xsl:when test="$namespace = 'gb'">
802
+ <xsl:text>目次</xsl:text>
803
+ </xsl:when>
804
+ <xsl:otherwise>
794
805
  <xsl:text>Contents</xsl:text>
795
-
796
- </title-toc>
797
-
798
- <title-descriptors lang="en">Descriptors</title-descriptors>
806
+ </xsl:otherwise>
807
+ </xsl:choose>
808
+ </title-toc> -->
809
+ <title-toc lang="zh">目次</title-toc>
799
810
 
800
811
  <title-part lang="en">
801
812
 
@@ -811,20 +822,6 @@
811
822
  <title-subpart lang="en">Sub-part #</title-subpart>
812
823
  <title-subpart lang="fr">Partie de sub #</title-subpart>
813
824
 
814
- <title-list-tables lang="en">List of Tables</title-list-tables>
815
-
816
- <title-list-figures lang="en">List of Figures</title-list-figures>
817
-
818
- <title-table-figures lang="en">Table of Figures</title-table-figures>
819
-
820
- <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
821
-
822
- <title-summary lang="en">Summary</title-summary>
823
-
824
- <title-continued lang="ru">(продолжение)</title-continued>
825
- <title-continued lang="en">(continued)</title-continued>
826
- <title-continued lang="fr">(continué)</title-continued>
827
-
828
825
  </xsl:variable>
829
826
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
830
827
 
@@ -832,8 +829,8 @@
832
829
  <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
833
830
  <xsl:value-of select="$toc_table_title"/>
834
831
  <xsl:if test="normalize-space($toc_table_title) = ''">
835
- <xsl:call-template name="getTitle">
836
- <xsl:with-param name="name" select="'title-list-tables'"/>
832
+ <xsl:call-template name="getLocalizedString">
833
+ <xsl:with-param name="key">toc_tables</xsl:with-param>
837
834
  </xsl:call-template>
838
835
  </xsl:if>
839
836
  </xsl:variable>
@@ -842,8 +839,8 @@
842
839
  <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
843
840
  <xsl:value-of select="$toc_figure_title"/>
844
841
  <xsl:if test="normalize-space($toc_figure_title) = ''">
845
- <xsl:call-template name="getTitle">
846
- <xsl:with-param name="name" select="'title-list-figures'"/>
842
+ <xsl:call-template name="getLocalizedString">
843
+ <xsl:with-param name="key">toc_figures</xsl:with-param>
847
844
  </xsl:call-template>
848
845
  </xsl:if>
849
846
  </xsl:variable>
@@ -852,8 +849,8 @@
852
849
  <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
853
850
  <xsl:value-of select="$toc_requirement_title"/>
854
851
  <xsl:if test="normalize-space($toc_requirement_title) = ''">
855
- <xsl:call-template name="getTitle">
856
- <xsl:with-param name="name" select="'title-list-recommendations'"/>
852
+ <xsl:call-template name="getLocalizedString">
853
+ <xsl:with-param name="key">toc_recommendations</xsl:with-param>
857
854
  </xsl:call-template>
858
855
  </xsl:if>
859
856
  </xsl:variable>
@@ -1664,6 +1661,7 @@
1664
1661
  </xsl:attribute-set>
1665
1662
 
1666
1663
  <xsl:attribute-set name="figure-block-style">
1664
+ <xsl:attribute name="role">SKIP</xsl:attribute>
1667
1665
 
1668
1666
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1669
1667
 
@@ -1674,6 +1672,7 @@
1674
1672
  </xsl:attribute-set>
1675
1673
 
1676
1674
  <xsl:attribute-set name="figure-name-style">
1675
+ <xsl:attribute name="role">Caption</xsl:attribute>
1677
1676
 
1678
1677
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1679
1678
  <xsl:attribute name="text-align">left</xsl:attribute>
@@ -1724,6 +1723,7 @@
1724
1723
  </xsl:template>
1725
1724
 
1726
1725
  <xsl:attribute-set name="image-style">
1726
+ <xsl:attribute name="role">SKIP</xsl:attribute>
1727
1727
  <xsl:attribute name="text-align">center</xsl:attribute>
1728
1728
 
1729
1729
  <xsl:attribute name="space-before">12pt</xsl:attribute>
@@ -2009,6 +2009,11 @@
2009
2009
 
2010
2010
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
2011
2011
 
2012
+ <xsl:attribute-set name="bibitem-non-normative-list-item-style">
2013
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2014
+
2015
+ </xsl:attribute-set>
2016
+
2012
2017
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
2013
2018
  <xsl:attribute-set name="bibitem-normative-list-body-style">
2014
2019
 
@@ -2402,14 +2407,14 @@
2402
2407
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
2403
2408
  </xsl:when>
2404
2409
  <xsl:otherwise>
2405
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
2410
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
2406
2411
  </xsl:otherwise>
2407
2412
  </xsl:choose>
2408
2413
  </xsl:for-each>
2409
2414
  </xsl:when>
2410
2415
 
2411
2416
  <xsl:otherwise>
2412
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
2417
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
2413
2418
  </xsl:otherwise>
2414
2419
 
2415
2420
  </xsl:choose>
@@ -2419,7 +2424,7 @@
2419
2424
  <!-- Preface boilerplate sections processing -->
2420
2425
  <!-- ================================= -->
2421
2426
  <xsl:template match="*[local-name()='copyright-statement']">
2422
- <fo:block xsl:use-attribute-sets="copyright-statement-style">
2427
+ <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
2423
2428
  <xsl:apply-templates/>
2424
2429
  </fo:block>
2425
2430
  </xsl:template> <!-- copyright-statement -->
@@ -2621,7 +2626,7 @@
2621
2626
  </xsl:choose>
2622
2627
  </xsl:variable>
2623
2628
 
2624
- <fo:block-container xsl:use-attribute-sets="table-container-style">
2629
+ <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
2625
2630
 
2626
2631
  <xsl:call-template name="refine_table-container-style">
2627
2632
  <xsl:with-param name="margin-side" select="$margin-side"/>
@@ -3659,7 +3664,7 @@
3659
3664
  </xsl:choose>
3660
3665
  </xsl:variable>
3661
3666
  <xsl:variable name="footnote_inline">
3662
- <fo:inline>
3667
+ <fo:inline role="Reference">
3663
3668
 
3664
3669
  <xsl:variable name="fn_styles">
3665
3670
  <xsl:choose>
@@ -3682,7 +3687,7 @@
3682
3687
 
3683
3688
  <xsl:call-template name="insert_basic_link">
3684
3689
  <xsl:with-param name="element">
3685
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
3690
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
3686
3691
  <xsl:copy-of select="$current_fn_number_text"/>
3687
3692
  </fo:basic-link>
3688
3693
  </xsl:with-param>
@@ -3695,17 +3700,17 @@
3695
3700
  <xsl:copy-of select="$footnote_inline"/>
3696
3701
  </xsl:when>
3697
3702
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
3698
- <fo:footnote xsl:use-attribute-sets="fn-style">
3703
+ <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
3699
3704
  <xsl:copy-of select="$footnote_inline"/>
3700
- <fo:footnote-body>
3705
+ <fo:footnote-body role="Note">
3701
3706
 
3702
- <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
3707
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
3703
3708
 
3704
- <fo:block xsl:use-attribute-sets="fn-body-style">
3709
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
3705
3710
 
3706
3711
  <xsl:call-template name="refine_fn-body-style"/>
3707
3712
 
3708
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
3713
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
3709
3714
 
3710
3715
  <xsl:call-template name="refine_fn-body-num-style"/>
3711
3716
 
@@ -3978,11 +3983,11 @@
3978
3983
  </xsl:template>
3979
3984
 
3980
3985
  <xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
3981
- <fo:inline><xsl:value-of select="."/></fo:inline>
3986
+ <fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
3982
3987
  </xsl:template>
3983
3988
 
3984
3989
  <xsl:template match="*[local-name()='fn']//*[local-name()='p']">
3985
- <fo:inline>
3990
+ <fo:inline role="P">
3986
3991
  <xsl:apply-templates/>
3987
3992
  </fo:inline>
3988
3993
  </xsl:template>
@@ -3997,7 +4002,7 @@
3997
4002
  <xsl:variable name="isAdded" select="@added"/>
3998
4003
  <xsl:variable name="isDeleted" select="@deleted"/>
3999
4004
  <!-- <dl><xsl:copy-of select="."/></dl> -->
4000
- <fo:block-container xsl:use-attribute-sets="dl-block-style">
4005
+ <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
4001
4006
 
4002
4007
  <xsl:call-template name="setBlockSpanAll"/>
4003
4008
 
@@ -4032,7 +4037,7 @@
4032
4037
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
4033
4038
  </xsl:call-template>
4034
4039
 
4035
- <fo:block-container margin-left="0mm">
4040
+ <fo:block-container margin-left="0mm" role="SKIP">
4036
4041
 
4037
4042
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
4038
4043
 
@@ -4097,7 +4102,7 @@
4097
4102
 
4098
4103
  <!-- a few components -->
4099
4104
  <xsl:if test="$onlyOneComponent = 'false'">
4100
- <fo:block>
4105
+ <fo:block role="SKIP">
4101
4106
 
4102
4107
  <xsl:call-template name="refine_multicomponent_style"/>
4103
4108
 
@@ -4105,7 +4110,7 @@
4105
4110
  <xsl:attribute name="margin-top">0</xsl:attribute>
4106
4111
  </xsl:if>
4107
4112
 
4108
- <fo:block>
4113
+ <fo:block role="SKIP">
4109
4114
 
4110
4115
  <xsl:call-template name="refine_multicomponent_block_style"/>
4111
4116
 
@@ -4700,6 +4705,9 @@
4700
4705
 
4701
4706
  <xsl:template name="refine_strong_style">
4702
4707
 
4708
+ <xsl:if test="ancestor::*['preferred']">
4709
+ <xsl:attribute name="role">SKIP</xsl:attribute>
4710
+ </xsl:if>
4703
4711
  </xsl:template>
4704
4712
 
4705
4713
  <xsl:template match="*[local-name()='padding']">
@@ -4749,7 +4757,7 @@
4749
4757
  <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
4750
4758
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
4751
4759
  <xsl:choose>
4752
- <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
4760
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
4753
4761
  <!-- url -->
4754
4762
  <xsl:call-template name="add-zero-spaces-link-java"/>
4755
4763
  </xsl:when>
@@ -5211,10 +5219,13 @@
5211
5219
  </xsl:choose>
5212
5220
  </xsl:variable>
5213
5221
 
5222
+ <!-- replace sequence #x200B to one &#x200B -->
5223
+ <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '​')"/>
5224
+
5214
5225
  <!-- replace sequence #x200B and space TO space -->
5215
- <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
5226
+ <xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>
5216
5227
 
5217
- <xsl:value-of select="$text10"/>
5228
+ <xsl:value-of select="$text11"/>
5218
5229
  </xsl:template>
5219
5230
 
5220
5231
  <xsl:template name="add-zero-spaces-link-java">
@@ -5224,8 +5235,12 @@
5224
5235
  <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
5225
5236
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
5226
5237
  <xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>
5238
+
5239
+ <!-- replace sequence #x200B to one &#x200B -->
5240
+ <xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '​')"/>
5241
+
5227
5242
  <!-- remove zero-width space at the end -->
5228
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
5243
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '​$', '')"/>
5229
5244
  </xsl:template>
5230
5245
 
5231
5246
  <!-- add zero space after dash character (for table's entries) -->
@@ -5636,6 +5651,18 @@
5636
5651
  </xsl:copy>
5637
5652
  </xsl:template>
5638
5653
 
5654
+ <xsl:variable name="font_main_root_style">
5655
+ <root-style xsl:use-attribute-sets="root-style">
5656
+ </root-style>
5657
+ </xsl:variable>
5658
+ <xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
5659
+ <xsl:variable name="font_main">
5660
+ <xsl:choose>
5661
+ <xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
5662
+ <xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
5663
+ </xsl:choose>
5664
+ </xsl:variable>
5665
+
5639
5666
  <xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
5640
5667
  <xsl:param name="id"/>
5641
5668
  <xsl:copy>
@@ -5674,6 +5701,33 @@
5674
5701
 
5675
5702
  <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
5676
5703
 
5704
+ <xsl:variable name="words_with_width">
5705
+ <!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
5706
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
5707
+ <xsl:copy>
5708
+ <xsl:copy-of select="@*"/>
5709
+ <xsl:attribute name="width">
5710
+ <xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
5711
+ </xsl:attribute>
5712
+ <xsl:copy-of select="node()"/>
5713
+ </xsl:copy>
5714
+ </xsl:for-each>
5715
+ </xsl:variable>
5716
+
5717
+ <xsl:variable name="words_with_width_sorted">
5718
+ <xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
5719
+ <xsl:sort select="@width" data-type="number" order="descending"/>
5720
+ <!-- select word maximal width only -->
5721
+ <xsl:if test="position() = 1">
5722
+ <xsl:copy-of select="."/>
5723
+ </xsl:if>
5724
+ </xsl:for-each>
5725
+ <!-- add 'word' with formatting tags inside -->
5726
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
5727
+ <xsl:copy-of select="."/>
5728
+ </xsl:for-each>
5729
+ </xsl:variable>
5730
+
5677
5731
  <xsl:variable name="words">
5678
5732
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
5679
5733
  <word>
@@ -5681,9 +5735,12 @@
5681
5735
  </word>
5682
5736
  </xsl:for-each>
5683
5737
 
5684
- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
5738
+ <xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
5685
5739
  <xsl:copy-of select="."/>
5686
5740
  </xsl:for-each>
5741
+ <!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
5742
+ <xsl:copy-of select="."/>
5743
+ </xsl:for-each> -->
5687
5744
 
5688
5745
  </xsl:variable>
5689
5746
 
@@ -6144,10 +6201,10 @@
6144
6201
  <xsl:copy>
6145
6202
  <xsl:apply-templates select="@*" mode="mathml"/>
6146
6203
  <xsl:if test="not(@lspace)">
6147
- <xsl:attribute name="lspace">0.4em</xsl:attribute>
6204
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
6148
6205
  </xsl:if>
6149
- <xsl:if test="not(@rspace)">
6150
- <xsl:attribute name="rspace">0.4em</xsl:attribute>
6206
+ <xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
6207
+ <xsl:attribute name="rspace">0.2em</xsl:attribute>
6151
6208
  </xsl:if>
6152
6209
  <xsl:apply-templates mode="mathml"/>
6153
6210
  </xsl:copy>
@@ -6164,6 +6221,27 @@
6164
6221
  </xsl:copy>
6165
6222
  </xsl:template>
6166
6223
 
6224
+ <!-- increase space before '(' -->
6225
+ <xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
6226
+ <xsl:copy>
6227
+ <xsl:apply-templates select="@*" mode="mathml"/>
6228
+ <xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
6229
+ <xsl:if test="not(@lspace)">
6230
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
6231
+ <xsl:choose>
6232
+ <xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
6233
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
6234
+ </xsl:when>
6235
+ <xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
6236
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
6237
+ </xsl:when>
6238
+ </xsl:choose>
6239
+ </xsl:if>
6240
+ </xsl:if>
6241
+ <xsl:apply-templates mode="mathml"/>
6242
+ </xsl:copy>
6243
+ </xsl:template>
6244
+
6167
6245
  <!-- Examples:
6168
6246
  <stem type="AsciiMath">x = 1</stem>
6169
6247
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -6323,7 +6401,7 @@
6323
6401
  <!-- formula -->
6324
6402
  <!-- ====== -->
6325
6403
  <xsl:template match="*[local-name() = 'formula']" name="formula">
6326
- <fo:block-container margin-left="0mm">
6404
+ <fo:block-container margin-left="0mm" role="SKIP">
6327
6405
  <xsl:if test="parent::*[local-name() = 'note']">
6328
6406
  <xsl:attribute name="margin-left">
6329
6407
  <xsl:choose>
@@ -6333,7 +6411,7 @@
6333
6411
  </xsl:attribute>
6334
6412
 
6335
6413
  </xsl:if>
6336
- <fo:block-container margin-left="0mm">
6414
+ <fo:block-container margin-left="0mm" role="SKIP">
6337
6415
  <fo:block id="{@id}">
6338
6416
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
6339
6417
  </fo:block>
@@ -6413,19 +6491,19 @@
6413
6491
 
6414
6492
  <xsl:template match="*[local-name() = 'note']" name="note">
6415
6493
 
6416
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
6494
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
6417
6495
 
6418
6496
  <xsl:call-template name="setBlockSpanAll"/>
6419
6497
 
6420
6498
  <xsl:call-template name="refine_note-style"/>
6421
6499
 
6422
- <fo:block-container margin-left="0mm" margin-right="0mm">
6500
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
6423
6501
 
6424
6502
  <fo:block>
6425
6503
 
6426
6504
  <xsl:call-template name="refine_note_block_style"/>
6427
6505
 
6428
- <fo:inline xsl:use-attribute-sets="note-name-style">
6506
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
6429
6507
 
6430
6508
  <xsl:call-template name="refine_note-name-style"/>
6431
6509
 
@@ -6462,12 +6540,12 @@
6462
6540
  <xsl:variable name="num"><xsl:number/></xsl:variable>
6463
6541
  <xsl:choose>
6464
6542
  <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
6465
- <fo:inline xsl:use-attribute-sets="note-p-style">
6543
+ <fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
6466
6544
  <xsl:apply-templates/>
6467
6545
  </fo:inline>
6468
6546
  </xsl:when>
6469
6547
  <xsl:otherwise>
6470
- <fo:block xsl:use-attribute-sets="note-p-style">
6548
+ <fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
6471
6549
  <xsl:apply-templates/>
6472
6550
  </fo:block>
6473
6551
  </xsl:otherwise>
@@ -6583,12 +6661,13 @@
6583
6661
 
6584
6662
  <xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
6585
6663
  <xsl:if test="normalize-space() != ''">
6586
- <xsl:variable name="level">
6664
+ <!-- <xsl:variable name="level">
6587
6665
  <xsl:call-template name="getLevelTermName"/>
6588
6666
  </xsl:variable>
6589
6667
  <fo:inline role="H{$level}">
6590
- <xsl:apply-templates/>
6591
- </fo:inline>
6668
+ <xsl:apply-templates />
6669
+ </fo:inline> -->
6670
+ <xsl:apply-templates/>
6592
6671
  </xsl:if>
6593
6672
  </xsl:template>
6594
6673
  <!-- ====== -->
@@ -6612,7 +6691,7 @@
6612
6691
  <!-- Example: Dimensions in millimeters -->
6613
6692
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
6614
6693
 
6615
- <fo:block xsl:use-attribute-sets="figure-style">
6694
+ <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
6616
6695
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
6617
6696
  </fo:block>
6618
6697
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
@@ -7393,8 +7472,8 @@
7393
7472
  <xsl:if test="$list_of_tables_figures//table_figure">
7394
7473
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
7395
7474
  <fo:bookmark-title>
7396
- <xsl:call-template name="getTitle">
7397
- <xsl:with-param name="name" select="'title-table-figures'"/>
7475
+ <xsl:call-template name="getLocalizedString">
7476
+ <xsl:with-param name="key">table_of_figures</xsl:with-param>
7398
7477
  </xsl:call-template>
7399
7478
  </fo:bookmark-title>
7400
7479
  <xsl:for-each select="$list_of_tables_figures//table_figure">
@@ -7745,7 +7824,7 @@
7745
7824
  </xsl:when>
7746
7825
 
7747
7826
  <xsl:otherwise>
7748
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
7827
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
7749
7828
 
7750
7829
  <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
7751
7830
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -7766,7 +7845,7 @@
7766
7845
  </xsl:attribute>
7767
7846
 
7768
7847
  </xsl:if>
7769
- <fo:block-container margin-left="0mm">
7848
+ <fo:block-container margin-left="0mm" role="SKIP">
7770
7849
 
7771
7850
  <fo:block xsl:use-attribute-sets="sourcecode-style">
7772
7851
 
@@ -8320,11 +8399,11 @@
8320
8399
  <!-- requirement, recommendation, permission table -->
8321
8400
  <!-- ========== -->
8322
8401
  <xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8323
- <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
8402
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
8324
8403
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8325
8404
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
8326
8405
  </xsl:if>
8327
- <fo:block-container margin-left="0mm" margin-right="0mm">
8406
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8328
8407
  <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
8329
8408
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8330
8409
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
@@ -8500,7 +8579,7 @@
8500
8579
  -->
8501
8580
  <xsl:template match="*[local-name() = 'example']">
8502
8581
 
8503
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
8582
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
8504
8583
 
8505
8584
  <xsl:call-template name="setBlockSpanAll"/>
8506
8585
 
@@ -8511,7 +8590,7 @@
8511
8590
  block
8512
8591
  </xsl:variable>
8513
8592
 
8514
- <fo:block-container margin-left="0mm">
8593
+ <fo:block-container margin-left="0mm" role="SKIP">
8515
8594
 
8516
8595
  <xsl:choose>
8517
8596
 
@@ -8524,8 +8603,8 @@
8524
8603
  </xsl:apply-templates>
8525
8604
  </fo:block>
8526
8605
 
8527
- <fo:block-container xsl:use-attribute-sets="example-body-style">
8528
- <fo:block-container margin-left="0mm" margin-right="0mm">
8606
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
8607
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8529
8608
  <xsl:apply-templates select="node()[not(local-name() = 'name')]">
8530
8609
  <xsl:with-param name="fo_element" select="$fo_element"/>
8531
8610
  </xsl:apply-templates>
@@ -8578,8 +8657,8 @@
8578
8657
 
8579
8658
  <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
8580
8659
  <!-- display further elements in blocks -->
8581
- <fo:block-container xsl:use-attribute-sets="example-body-style">
8582
- <fo:block-container margin-left="0mm" margin-right="0mm">
8660
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
8661
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8583
8662
  <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
8584
8663
  <xsl:with-param name="fo_element" select="'block'"/>
8585
8664
  </xsl:apply-templates>
@@ -8632,7 +8711,7 @@
8632
8711
  </xsl:variable>
8633
8712
  <xsl:choose>
8634
8713
  <xsl:when test="starts-with(normalize-space($element), 'block')">
8635
- <fo:block-container>
8714
+ <fo:block-container role="SKIP">
8636
8715
  <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
8637
8716
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
8638
8717
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -8773,7 +8852,7 @@
8773
8852
  <!-- author -->
8774
8853
  <!-- ====== -->
8775
8854
  <xsl:template match="*[local-name() = 'quote']">
8776
- <fo:block-container margin-left="0mm">
8855
+ <fo:block-container margin-left="0mm" role="SKIP">
8777
8856
 
8778
8857
  <xsl:call-template name="setBlockSpanAll"/>
8779
8858
 
@@ -8783,12 +8862,12 @@
8783
8862
  </xsl:if>
8784
8863
  </xsl:if>
8785
8864
 
8786
- <fo:block-container margin-left="0mm">
8787
- <fo:block-container xsl:use-attribute-sets="quote-style">
8865
+ <fo:block-container margin-left="0mm" role="SKIP">
8866
+ <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
8788
8867
 
8789
8868
  <xsl:call-template name="refine_quote-style"/>
8790
8869
 
8791
- <fo:block-container margin-left="0mm" margin-right="0mm">
8870
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8792
8871
  <fo:block role="BlockQuote">
8793
8872
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
8794
8873
  </fo:block>
@@ -8952,10 +9031,10 @@
8952
9031
 
8953
9032
  <xsl:choose>
8954
9033
  <xsl:when test="$lang = 'zh'">
8955
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
9034
+ <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
8956
9035
  </xsl:when>
8957
9036
  <xsl:when test="../../@inline-header = 'true'">
8958
- <fo:inline font-size="90%">
9037
+ <fo:inline font-size="90%" role="SKIP">
8959
9038
  <xsl:call-template name="insertNonBreakSpaces">
8960
9039
  <xsl:with-param name="count" select="$padding-right"/>
8961
9040
  </xsl:call-template>
@@ -8963,7 +9042,7 @@
8963
9042
  </xsl:when>
8964
9043
  <xsl:otherwise>
8965
9044
  <xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
8966
- <fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/>​</fo:inline>
9045
+ <fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/>​</fo:inline>
8967
9046
  </xsl:otherwise>
8968
9047
  </xsl:choose>
8969
9048
 
@@ -8998,12 +9077,12 @@
8998
9077
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
8999
9078
 
9000
9079
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
9001
- <fo:block xsl:use-attribute-sets="term-name-style">
9080
+ <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
9002
9081
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
9003
9082
  </fo:block>
9004
9083
  </xsl:if>
9005
9084
 
9006
- <fo:block xsl:use-attribute-sets="preferred-term-style">
9085
+ <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
9007
9086
  <xsl:call-template name="setStyle_preferred"/>
9008
9087
  <xsl:apply-templates/>
9009
9088
  </fo:block>
@@ -9044,7 +9123,7 @@
9044
9123
  <!-- definition -->
9045
9124
  <!-- ========== -->
9046
9125
  <xsl:template match="*[local-name() = 'definition']">
9047
- <fo:block xsl:use-attribute-sets="definition-style">
9126
+ <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
9048
9127
  <xsl:apply-templates/>
9049
9128
  </fo:block>
9050
9129
  </xsl:template>
@@ -9092,6 +9171,10 @@
9092
9171
 
9093
9172
  <xsl:template match="*[local-name() = 'clause']">
9094
9173
  <fo:block>
9174
+ <xsl:if test="parent::*[local-name() = 'copyright-statement']">
9175
+ <xsl:attribute name="role">SKIP</xsl:attribute>
9176
+ </xsl:if>
9177
+
9095
9178
  <xsl:call-template name="setId"/>
9096
9179
 
9097
9180
  <xsl:call-template name="setBlockSpanAll"/>
@@ -9328,7 +9411,7 @@
9328
9411
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
9329
9412
  <xsl:choose>
9330
9413
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
9331
- <fo:block-container>
9414
+ <fo:block-container role="SKIP">
9332
9415
  <xsl:attribute name="margin-left">
9333
9416
  <xsl:choose>
9334
9417
  <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
@@ -9338,7 +9421,7 @@
9338
9421
 
9339
9422
  <xsl:call-template name="refine_list_container_style"/>
9340
9423
 
9341
- <fo:block-container margin-left="0mm">
9424
+ <fo:block-container margin-left="0mm" role="SKIP">
9342
9425
  <fo:block>
9343
9426
  <xsl:apply-templates select="." mode="list"/>
9344
9427
  </fo:block>
@@ -9347,7 +9430,7 @@
9347
9430
  </xsl:when>
9348
9431
  <xsl:otherwise>
9349
9432
 
9350
- <fo:block>
9433
+ <fo:block role="SKIP">
9351
9434
  <xsl:apply-templates select="." mode="list"/>
9352
9435
  </fo:block>
9353
9436
 
@@ -9765,7 +9848,10 @@
9765
9848
  <!-- Reference sections (Normative References and Bibliography) -->
9766
9849
  <!-- ========================================================== -->
9767
9850
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
9768
- <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/>
9851
+ <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
9852
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
9853
+
9854
+ </xsl:template>
9769
9855
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
9770
9856
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
9771
9857
 
@@ -9814,7 +9900,7 @@
9814
9900
 
9815
9901
  <!-- Bibliography (non-normative references) -->
9816
9902
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
9817
-
9903
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
9818
9904
  <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
9819
9905
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
9820
9906
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
@@ -9842,6 +9928,35 @@
9842
9928
 
9843
9929
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
9844
9930
 
9931
+ <xsl:template name="insertListItem_Bibitem">
9932
+ <xsl:choose>
9933
+ <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
9934
+ <xsl:otherwise>
9935
+ <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
9936
+ <fo:list-item-label end-indent="label-end()">
9937
+ <fo:block role="SKIP">
9938
+ <fo:inline role="SKIP">
9939
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
9940
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
9941
+ </xsl:apply-templates>
9942
+ </fo:inline>
9943
+ </fo:block>
9944
+ </fo:list-item-label>
9945
+ <fo:list-item-body start-indent="body-start()">
9946
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
9947
+ <xsl:call-template name="processBibitem">
9948
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
9949
+ </xsl:call-template>
9950
+ </fo:block>
9951
+ </fo:list-item-body>
9952
+ </fo:list-item>
9953
+ </xsl:otherwise>
9954
+ </xsl:choose>
9955
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
9956
+ <xsl:with-param name="skip">false</xsl:with-param>
9957
+ </xsl:apply-templates>
9958
+ </xsl:template>
9959
+
9845
9960
  <xsl:template name="processBibitem">
9846
9961
  <xsl:param name="biblio_tag_part">both</xsl:param>
9847
9962
 
@@ -10175,7 +10290,7 @@
10175
10290
 
10176
10291
  <xsl:call-template name="setBlockSpanAll"/>
10177
10292
 
10178
- <fo:block-container xsl:use-attribute-sets="admonition-container-style">
10293
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
10179
10294
 
10180
10295
  <fo:block xsl:use-attribute-sets="admonition-name-style">
10181
10296
  <xsl:call-template name="displayAdmonitionName"/>