metanorma-itu 2.2.13 → 2.2.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -2280,19 +2280,32 @@
2280
2280
  <xsl:variable name="titles_">
2281
2281
 
2282
2282
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
2283
- <title-toc lang="en">
2284
-
2285
- </title-toc>
2286
- <title-toc lang="fr">
2283
+ <!-- <title-toc lang="en">
2284
+ <xsl:if test="$namespace = 'csd' or $namespace = 'ieee' or $namespace = 'iho' or $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'unece-rec'">
2285
+ <xsl:text>Contents</xsl:text>
2286
+ </xsl:if>
2287
+ <xsl:if test="$namespace = 'csa' or $namespace = 'm3d' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper'">
2288
+ <xsl:text>Table of Contents</xsl:text>
2289
+ </xsl:if>
2290
+ <xsl:if test="$namespace = 'gb'">
2291
+ <xsl:text>Table of contents</xsl:text>
2292
+ </xsl:if>
2293
+ </title-toc> -->
2294
+ <title-toc lang="en">Table of contents</title-toc>
2295
+ <!-- <title-toc lang="fr">
2287
2296
  <xsl:text>Sommaire</xsl:text>
2288
- </title-toc>
2289
- <title-toc lang="zh">
2290
-
2297
+ </title-toc> -->
2298
+ <!-- <title-toc lang="zh">
2299
+ <xsl:choose>
2300
+ <xsl:when test="$namespace = 'gb'">
2301
+ <xsl:text>目次</xsl:text>
2302
+ </xsl:when>
2303
+ <xsl:otherwise>
2291
2304
  <xsl:text>Contents</xsl:text>
2292
-
2293
- </title-toc>
2294
-
2295
- <title-descriptors lang="en">Descriptors</title-descriptors>
2305
+ </xsl:otherwise>
2306
+ </xsl:choose>
2307
+ </title-toc> -->
2308
+ <title-toc lang="zh">目次</title-toc>
2296
2309
 
2297
2310
  <title-part lang="en">
2298
2311
 
@@ -2308,20 +2321,6 @@
2308
2321
  <title-subpart lang="en">Sub-part #</title-subpart>
2309
2322
  <title-subpart lang="fr">Partie de sub #</title-subpart>
2310
2323
 
2311
- <title-list-tables lang="en">List of Tables</title-list-tables>
2312
-
2313
- <title-list-figures lang="en">List of Figures</title-list-figures>
2314
-
2315
- <title-table-figures lang="en">Table of Figures</title-table-figures>
2316
-
2317
- <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
2318
-
2319
- <title-summary lang="en">Summary</title-summary>
2320
-
2321
- <title-continued lang="ru">(продолжение)</title-continued>
2322
- <title-continued lang="en">(continued)</title-continued>
2323
- <title-continued lang="fr">(continué)</title-continued>
2324
-
2325
2324
  </xsl:variable>
2326
2325
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
2327
2326
 
@@ -2329,8 +2328,8 @@
2329
2328
  <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
2330
2329
  <xsl:value-of select="$toc_table_title"/>
2331
2330
  <xsl:if test="normalize-space($toc_table_title) = ''">
2332
- <xsl:call-template name="getTitle">
2333
- <xsl:with-param name="name" select="'title-list-tables'"/>
2331
+ <xsl:call-template name="getLocalizedString">
2332
+ <xsl:with-param name="key">toc_tables</xsl:with-param>
2334
2333
  </xsl:call-template>
2335
2334
  </xsl:if>
2336
2335
  </xsl:variable>
@@ -2339,8 +2338,8 @@
2339
2338
  <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
2340
2339
  <xsl:value-of select="$toc_figure_title"/>
2341
2340
  <xsl:if test="normalize-space($toc_figure_title) = ''">
2342
- <xsl:call-template name="getTitle">
2343
- <xsl:with-param name="name" select="'title-list-figures'"/>
2341
+ <xsl:call-template name="getLocalizedString">
2342
+ <xsl:with-param name="key">toc_figures</xsl:with-param>
2344
2343
  </xsl:call-template>
2345
2344
  </xsl:if>
2346
2345
  </xsl:variable>
@@ -2349,8 +2348,8 @@
2349
2348
  <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
2350
2349
  <xsl:value-of select="$toc_requirement_title"/>
2351
2350
  <xsl:if test="normalize-space($toc_requirement_title) = ''">
2352
- <xsl:call-template name="getTitle">
2353
- <xsl:with-param name="name" select="'title-list-recommendations'"/>
2351
+ <xsl:call-template name="getLocalizedString">
2352
+ <xsl:with-param name="key">toc_recommendations</xsl:with-param>
2354
2353
  </xsl:call-template>
2355
2354
  </xsl:if>
2356
2355
  </xsl:variable>
@@ -3110,6 +3109,7 @@
3110
3109
  </xsl:attribute-set>
3111
3110
 
3112
3111
  <xsl:attribute-set name="figure-block-style">
3112
+ <xsl:attribute name="role">SKIP</xsl:attribute>
3113
3113
 
3114
3114
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3115
3115
 
@@ -3120,6 +3120,7 @@
3120
3120
  </xsl:attribute-set>
3121
3121
 
3122
3122
  <xsl:attribute-set name="figure-name-style">
3123
+ <xsl:attribute name="role">Caption</xsl:attribute>
3123
3124
 
3124
3125
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3125
3126
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -3170,6 +3171,7 @@
3170
3171
  </xsl:template>
3171
3172
 
3172
3173
  <xsl:attribute-set name="image-style">
3174
+ <xsl:attribute name="role">SKIP</xsl:attribute>
3173
3175
  <xsl:attribute name="text-align">center</xsl:attribute>
3174
3176
 
3175
3177
  </xsl:attribute-set>
@@ -3442,6 +3444,11 @@
3442
3444
 
3443
3445
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
3444
3446
 
3447
+ <xsl:attribute-set name="bibitem-non-normative-list-item-style">
3448
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3449
+
3450
+ </xsl:attribute-set>
3451
+
3445
3452
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
3446
3453
  <xsl:attribute-set name="bibitem-normative-list-body-style">
3447
3454
 
@@ -3844,14 +3851,14 @@
3844
3851
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
3845
3852
  </xsl:when>
3846
3853
  <xsl:otherwise>
3847
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
3854
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
3848
3855
  </xsl:otherwise>
3849
3856
  </xsl:choose>
3850
3857
  </xsl:for-each>
3851
3858
  </xsl:when>
3852
3859
 
3853
3860
  <xsl:otherwise>
3854
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
3861
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
3855
3862
  </xsl:otherwise>
3856
3863
 
3857
3864
  </xsl:choose>
@@ -3861,7 +3868,7 @@
3861
3868
  <!-- Preface boilerplate sections processing -->
3862
3869
  <!-- ================================= -->
3863
3870
  <xsl:template match="*[local-name()='copyright-statement']">
3864
- <fo:block xsl:use-attribute-sets="copyright-statement-style">
3871
+ <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
3865
3872
  <xsl:apply-templates/>
3866
3873
  </fo:block>
3867
3874
  </xsl:template> <!-- copyright-statement -->
@@ -4044,7 +4051,7 @@
4044
4051
  </xsl:choose>
4045
4052
  </xsl:variable>
4046
4053
 
4047
- <fo:block-container xsl:use-attribute-sets="table-container-style">
4054
+ <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
4048
4055
 
4049
4056
  <xsl:call-template name="refine_table-container-style">
4050
4057
  <xsl:with-param name="margin-side" select="$margin-side"/>
@@ -5091,7 +5098,7 @@
5091
5098
  </xsl:choose>
5092
5099
  </xsl:variable>
5093
5100
  <xsl:variable name="footnote_inline">
5094
- <fo:inline>
5101
+ <fo:inline role="Reference">
5095
5102
 
5096
5103
  <xsl:variable name="fn_styles">
5097
5104
  <xsl:choose>
@@ -5114,7 +5121,7 @@
5114
5121
 
5115
5122
  <xsl:call-template name="insert_basic_link">
5116
5123
  <xsl:with-param name="element">
5117
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
5124
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
5118
5125
  <xsl:copy-of select="$current_fn_number_text"/>
5119
5126
  </fo:basic-link>
5120
5127
  </xsl:with-param>
@@ -5127,17 +5134,17 @@
5127
5134
  <xsl:copy-of select="$footnote_inline"/>
5128
5135
  </xsl:when>
5129
5136
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
5130
- <fo:footnote xsl:use-attribute-sets="fn-style">
5137
+ <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
5131
5138
  <xsl:copy-of select="$footnote_inline"/>
5132
- <fo:footnote-body>
5139
+ <fo:footnote-body role="Note">
5133
5140
 
5134
- <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
5141
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
5135
5142
 
5136
- <fo:block xsl:use-attribute-sets="fn-body-style">
5143
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
5137
5144
 
5138
5145
  <xsl:call-template name="refine_fn-body-style"/>
5139
5146
 
5140
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
5147
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
5141
5148
 
5142
5149
  <xsl:call-template name="refine_fn-body-num-style"/>
5143
5150
 
@@ -5405,11 +5412,11 @@
5405
5412
  </xsl:template>
5406
5413
 
5407
5414
  <xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
5408
- <fo:inline><xsl:value-of select="."/></fo:inline>
5415
+ <fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
5409
5416
  </xsl:template>
5410
5417
 
5411
5418
  <xsl:template match="*[local-name()='fn']//*[local-name()='p']">
5412
- <fo:inline>
5419
+ <fo:inline role="P">
5413
5420
  <xsl:apply-templates/>
5414
5421
  </fo:inline>
5415
5422
  </xsl:template>
@@ -5424,7 +5431,7 @@
5424
5431
  <xsl:variable name="isAdded" select="@added"/>
5425
5432
  <xsl:variable name="isDeleted" select="@deleted"/>
5426
5433
  <!-- <dl><xsl:copy-of select="."/></dl> -->
5427
- <fo:block-container xsl:use-attribute-sets="dl-block-style">
5434
+ <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
5428
5435
 
5429
5436
  <xsl:call-template name="setBlockSpanAll"/>
5430
5437
 
@@ -5459,7 +5466,7 @@
5459
5466
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
5460
5467
  </xsl:call-template>
5461
5468
 
5462
- <fo:block-container margin-left="0mm">
5469
+ <fo:block-container margin-left="0mm" role="SKIP">
5463
5470
 
5464
5471
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
5465
5472
 
@@ -5524,7 +5531,7 @@
5524
5531
 
5525
5532
  <!-- a few components -->
5526
5533
  <xsl:if test="$onlyOneComponent = 'false'">
5527
- <fo:block>
5534
+ <fo:block role="SKIP">
5528
5535
 
5529
5536
  <xsl:call-template name="refine_multicomponent_style"/>
5530
5537
 
@@ -5532,7 +5539,7 @@
5532
5539
  <xsl:attribute name="margin-top">0</xsl:attribute>
5533
5540
  </xsl:if>
5534
5541
 
5535
- <fo:block>
5542
+ <fo:block role="SKIP">
5536
5543
 
5537
5544
  <xsl:call-template name="refine_multicomponent_block_style"/>
5538
5545
 
@@ -6139,6 +6146,9 @@
6139
6146
 
6140
6147
  <xsl:template name="refine_strong_style">
6141
6148
 
6149
+ <xsl:if test="ancestor::*['preferred']">
6150
+ <xsl:attribute name="role">SKIP</xsl:attribute>
6151
+ </xsl:if>
6142
6152
  </xsl:template>
6143
6153
 
6144
6154
  <xsl:template match="*[local-name()='padding']">
@@ -6183,7 +6193,7 @@
6183
6193
  <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
6184
6194
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
6185
6195
  <xsl:choose>
6186
- <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
6196
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
6187
6197
  <!-- url -->
6188
6198
  <xsl:call-template name="add-zero-spaces-link-java"/>
6189
6199
  </xsl:when>
@@ -6645,10 +6655,13 @@
6645
6655
  </xsl:choose>
6646
6656
  </xsl:variable>
6647
6657
 
6658
+ <!-- replace sequence #x200B to one &#x200B -->
6659
+ <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '​')"/>
6660
+
6648
6661
  <!-- replace sequence #x200B and space TO space -->
6649
- <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
6662
+ <xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>
6650
6663
 
6651
- <xsl:value-of select="$text10"/>
6664
+ <xsl:value-of select="$text11"/>
6652
6665
  </xsl:template>
6653
6666
 
6654
6667
  <xsl:template name="add-zero-spaces-link-java">
@@ -6658,8 +6671,12 @@
6658
6671
  <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
6659
6672
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
6660
6673
  <xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>
6674
+
6675
+ <!-- replace sequence #x200B to one &#x200B -->
6676
+ <xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '​')"/>
6677
+
6661
6678
  <!-- remove zero-width space at the end -->
6662
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
6679
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '​$', '')"/>
6663
6680
  </xsl:template>
6664
6681
 
6665
6682
  <!-- add zero space after dash character (for table's entries) -->
@@ -7070,6 +7087,18 @@
7070
7087
  </xsl:copy>
7071
7088
  </xsl:template>
7072
7089
 
7090
+ <xsl:variable name="font_main_root_style">
7091
+ <root-style xsl:use-attribute-sets="root-style">
7092
+ </root-style>
7093
+ </xsl:variable>
7094
+ <xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
7095
+ <xsl:variable name="font_main">
7096
+ <xsl:choose>
7097
+ <xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
7098
+ <xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
7099
+ </xsl:choose>
7100
+ </xsl:variable>
7101
+
7073
7102
  <xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
7074
7103
  <xsl:param name="id"/>
7075
7104
  <xsl:copy>
@@ -7108,6 +7137,33 @@
7108
7137
 
7109
7138
  <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
7110
7139
 
7140
+ <xsl:variable name="words_with_width">
7141
+ <!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
7142
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
7143
+ <xsl:copy>
7144
+ <xsl:copy-of select="@*"/>
7145
+ <xsl:attribute name="width">
7146
+ <xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
7147
+ </xsl:attribute>
7148
+ <xsl:copy-of select="node()"/>
7149
+ </xsl:copy>
7150
+ </xsl:for-each>
7151
+ </xsl:variable>
7152
+
7153
+ <xsl:variable name="words_with_width_sorted">
7154
+ <xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
7155
+ <xsl:sort select="@width" data-type="number" order="descending"/>
7156
+ <!-- select word maximal width only -->
7157
+ <xsl:if test="position() = 1">
7158
+ <xsl:copy-of select="."/>
7159
+ </xsl:if>
7160
+ </xsl:for-each>
7161
+ <!-- add 'word' with formatting tags inside -->
7162
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
7163
+ <xsl:copy-of select="."/>
7164
+ </xsl:for-each>
7165
+ </xsl:variable>
7166
+
7111
7167
  <xsl:variable name="words">
7112
7168
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
7113
7169
  <word>
@@ -7115,9 +7171,12 @@
7115
7171
  </word>
7116
7172
  </xsl:for-each>
7117
7173
 
7118
- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
7174
+ <xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
7119
7175
  <xsl:copy-of select="."/>
7120
7176
  </xsl:for-each>
7177
+ <!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
7178
+ <xsl:copy-of select="."/>
7179
+ </xsl:for-each> -->
7121
7180
 
7122
7181
  </xsl:variable>
7123
7182
 
@@ -7578,10 +7637,10 @@
7578
7637
  <xsl:copy>
7579
7638
  <xsl:apply-templates select="@*" mode="mathml"/>
7580
7639
  <xsl:if test="not(@lspace)">
7581
- <xsl:attribute name="lspace">0.4em</xsl:attribute>
7640
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7582
7641
  </xsl:if>
7583
- <xsl:if test="not(@rspace)">
7584
- <xsl:attribute name="rspace">0.4em</xsl:attribute>
7642
+ <xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
7643
+ <xsl:attribute name="rspace">0.2em</xsl:attribute>
7585
7644
  </xsl:if>
7586
7645
  <xsl:apply-templates mode="mathml"/>
7587
7646
  </xsl:copy>
@@ -7598,6 +7657,27 @@
7598
7657
  </xsl:copy>
7599
7658
  </xsl:template>
7600
7659
 
7660
+ <!-- increase space before '(' -->
7661
+ <xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
7662
+ <xsl:copy>
7663
+ <xsl:apply-templates select="@*" mode="mathml"/>
7664
+ <xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
7665
+ <xsl:if test="not(@lspace)">
7666
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
7667
+ <xsl:choose>
7668
+ <xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
7669
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7670
+ </xsl:when>
7671
+ <xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
7672
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7673
+ </xsl:when>
7674
+ </xsl:choose>
7675
+ </xsl:if>
7676
+ </xsl:if>
7677
+ <xsl:apply-templates mode="mathml"/>
7678
+ </xsl:copy>
7679
+ </xsl:template>
7680
+
7601
7681
  <!-- Examples:
7602
7682
  <stem type="AsciiMath">x = 1</stem>
7603
7683
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -7757,7 +7837,7 @@
7757
7837
  <!-- formula -->
7758
7838
  <!-- ====== -->
7759
7839
  <xsl:template match="*[local-name() = 'formula']" name="formula">
7760
- <fo:block-container margin-left="0mm">
7840
+ <fo:block-container margin-left="0mm" role="SKIP">
7761
7841
  <xsl:if test="parent::*[local-name() = 'note']">
7762
7842
  <xsl:attribute name="margin-left">
7763
7843
  <xsl:choose>
@@ -7767,7 +7847,7 @@
7767
7847
  </xsl:attribute>
7768
7848
 
7769
7849
  </xsl:if>
7770
- <fo:block-container margin-left="0mm">
7850
+ <fo:block-container margin-left="0mm" role="SKIP">
7771
7851
  <fo:block id="{@id}">
7772
7852
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
7773
7853
  </fo:block>
@@ -7847,19 +7927,19 @@
7847
7927
 
7848
7928
  <xsl:template match="*[local-name() = 'note']" name="note">
7849
7929
 
7850
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
7930
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7851
7931
 
7852
7932
  <xsl:call-template name="setBlockSpanAll"/>
7853
7933
 
7854
7934
  <xsl:call-template name="refine_note-style"/>
7855
7935
 
7856
- <fo:block-container margin-left="0mm" margin-right="0mm">
7936
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7857
7937
 
7858
7938
  <fo:block>
7859
7939
 
7860
7940
  <xsl:call-template name="refine_note_block_style"/>
7861
7941
 
7862
- <fo:inline xsl:use-attribute-sets="note-name-style">
7942
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7863
7943
 
7864
7944
  <xsl:call-template name="refine_note-name-style"/>
7865
7945
 
@@ -7900,12 +7980,12 @@
7900
7980
  <xsl:variable name="num"><xsl:number/></xsl:variable>
7901
7981
  <xsl:choose>
7902
7982
  <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
7903
- <fo:inline xsl:use-attribute-sets="note-p-style">
7983
+ <fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
7904
7984
  <xsl:apply-templates/>
7905
7985
  </fo:inline>
7906
7986
  </xsl:when>
7907
7987
  <xsl:otherwise>
7908
- <fo:block xsl:use-attribute-sets="note-p-style">
7988
+ <fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
7909
7989
  <xsl:apply-templates/>
7910
7990
  </fo:block>
7911
7991
  </xsl:otherwise>
@@ -8023,12 +8103,13 @@
8023
8103
 
8024
8104
  <xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
8025
8105
  <xsl:if test="normalize-space() != ''">
8026
- <xsl:variable name="level">
8106
+ <!-- <xsl:variable name="level">
8027
8107
  <xsl:call-template name="getLevelTermName"/>
8028
8108
  </xsl:variable>
8029
8109
  <fo:inline role="H{$level}">
8030
- <xsl:apply-templates/>
8031
- </fo:inline>
8110
+ <xsl:apply-templates />
8111
+ </fo:inline> -->
8112
+ <xsl:apply-templates/>
8032
8113
  </xsl:if>
8033
8114
  </xsl:template>
8034
8115
  <!-- ====== -->
@@ -8052,7 +8133,7 @@
8052
8133
  <!-- Example: Dimensions in millimeters -->
8053
8134
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
8054
8135
 
8055
- <fo:block xsl:use-attribute-sets="figure-style">
8136
+ <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
8056
8137
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
8057
8138
  </fo:block>
8058
8139
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
@@ -9187,7 +9268,7 @@
9187
9268
  </xsl:when>
9188
9269
 
9189
9270
  <xsl:otherwise>
9190
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
9271
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
9191
9272
 
9192
9273
  <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
9193
9274
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -9208,7 +9289,7 @@
9208
9289
  </xsl:attribute>
9209
9290
 
9210
9291
  </xsl:if>
9211
- <fo:block-container margin-left="0mm">
9292
+ <fo:block-container margin-left="0mm" role="SKIP">
9212
9293
 
9213
9294
  <fo:block xsl:use-attribute-sets="sourcecode-style">
9214
9295
 
@@ -9754,11 +9835,11 @@
9754
9835
  <!-- requirement, recommendation, permission table -->
9755
9836
  <!-- ========== -->
9756
9837
  <xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9757
- <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
9838
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
9758
9839
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9759
9840
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
9760
9841
  </xsl:if>
9761
- <fo:block-container margin-left="0mm" margin-right="0mm">
9842
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9762
9843
  <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
9763
9844
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9764
9845
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
@@ -9920,7 +10001,7 @@
9920
10001
  -->
9921
10002
  <xsl:template match="*[local-name() = 'example']">
9922
10003
 
9923
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
10004
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
9924
10005
 
9925
10006
  <xsl:call-template name="setBlockSpanAll"/>
9926
10007
 
@@ -9931,7 +10012,7 @@
9931
10012
  block
9932
10013
  </xsl:variable>
9933
10014
 
9934
- <fo:block-container margin-left="0mm">
10015
+ <fo:block-container margin-left="0mm" role="SKIP">
9935
10016
 
9936
10017
  <xsl:choose>
9937
10018
 
@@ -9944,8 +10025,8 @@
9944
10025
  </xsl:apply-templates>
9945
10026
  </fo:block>
9946
10027
 
9947
- <fo:block-container xsl:use-attribute-sets="example-body-style">
9948
- <fo:block-container margin-left="0mm" margin-right="0mm">
10028
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10029
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9949
10030
  <xsl:apply-templates select="node()[not(local-name() = 'name')]">
9950
10031
  <xsl:with-param name="fo_element" select="$fo_element"/>
9951
10032
  </xsl:apply-templates>
@@ -9998,8 +10079,8 @@
9998
10079
 
9999
10080
  <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
10000
10081
  <!-- display further elements in blocks -->
10001
- <fo:block-container xsl:use-attribute-sets="example-body-style">
10002
- <fo:block-container margin-left="0mm" margin-right="0mm">
10082
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10083
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10003
10084
  <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
10004
10085
  <xsl:with-param name="fo_element" select="'block'"/>
10005
10086
  </xsl:apply-templates>
@@ -10052,7 +10133,7 @@
10052
10133
  </xsl:variable>
10053
10134
  <xsl:choose>
10054
10135
  <xsl:when test="starts-with(normalize-space($element), 'block')">
10055
- <fo:block-container>
10136
+ <fo:block-container role="SKIP">
10056
10137
  <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
10057
10138
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
10058
10139
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -10193,7 +10274,7 @@
10193
10274
  <!-- author -->
10194
10275
  <!-- ====== -->
10195
10276
  <xsl:template match="*[local-name() = 'quote']">
10196
- <fo:block-container margin-left="0mm">
10277
+ <fo:block-container margin-left="0mm" role="SKIP">
10197
10278
 
10198
10279
  <xsl:call-template name="setBlockSpanAll"/>
10199
10280
 
@@ -10203,12 +10284,12 @@
10203
10284
  </xsl:if>
10204
10285
  </xsl:if>
10205
10286
 
10206
- <fo:block-container margin-left="0mm">
10207
- <fo:block-container xsl:use-attribute-sets="quote-style">
10287
+ <fo:block-container margin-left="0mm" role="SKIP">
10288
+ <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
10208
10289
 
10209
10290
  <xsl:call-template name="refine_quote-style"/>
10210
10291
 
10211
- <fo:block-container margin-left="0mm" margin-right="0mm">
10292
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10212
10293
  <fo:block role="BlockQuote">
10213
10294
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
10214
10295
  </fo:block>
@@ -10367,10 +10448,10 @@
10367
10448
 
10368
10449
  <xsl:choose>
10369
10450
  <xsl:when test="$lang = 'zh'">
10370
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
10451
+ <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
10371
10452
  </xsl:when>
10372
10453
  <xsl:when test="../../@inline-header = 'true'">
10373
- <fo:inline font-size="90%">
10454
+ <fo:inline font-size="90%" role="SKIP">
10374
10455
  <xsl:call-template name="insertNonBreakSpaces">
10375
10456
  <xsl:with-param name="count" select="$padding-right"/>
10376
10457
  </xsl:call-template>
@@ -10378,7 +10459,7 @@
10378
10459
  </xsl:when>
10379
10460
  <xsl:otherwise>
10380
10461
  <xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
10381
- <fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/>​</fo:inline>
10462
+ <fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/>​</fo:inline>
10382
10463
  </xsl:otherwise>
10383
10464
  </xsl:choose>
10384
10465
 
@@ -10408,12 +10489,12 @@
10408
10489
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
10409
10490
 
10410
10491
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
10411
- <fo:block xsl:use-attribute-sets="term-name-style">
10492
+ <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
10412
10493
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
10413
10494
  </fo:block>
10414
10495
  </xsl:if>
10415
10496
 
10416
- <fo:block xsl:use-attribute-sets="preferred-term-style">
10497
+ <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
10417
10498
  <xsl:call-template name="setStyle_preferred"/>
10418
10499
  <xsl:apply-templates/>
10419
10500
  </fo:block>
@@ -10454,7 +10535,7 @@
10454
10535
  <!-- definition -->
10455
10536
  <!-- ========== -->
10456
10537
  <xsl:template match="*[local-name() = 'definition']">
10457
- <fo:block xsl:use-attribute-sets="definition-style">
10538
+ <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
10458
10539
  <xsl:apply-templates/>
10459
10540
  </fo:block>
10460
10541
  </xsl:template>
@@ -10504,6 +10585,10 @@
10504
10585
 
10505
10586
  <xsl:template match="*[local-name() = 'clause']">
10506
10587
  <fo:block>
10588
+ <xsl:if test="parent::*[local-name() = 'copyright-statement']">
10589
+ <xsl:attribute name="role">SKIP</xsl:attribute>
10590
+ </xsl:if>
10591
+
10507
10592
  <xsl:call-template name="setId"/>
10508
10593
 
10509
10594
  <xsl:call-template name="setBlockSpanAll"/>
@@ -10746,7 +10831,7 @@
10746
10831
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
10747
10832
  <xsl:choose>
10748
10833
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
10749
- <fo:block-container>
10834
+ <fo:block-container role="SKIP">
10750
10835
  <xsl:attribute name="margin-left">
10751
10836
  <xsl:choose>
10752
10837
  <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
@@ -10756,7 +10841,7 @@
10756
10841
 
10757
10842
  <xsl:call-template name="refine_list_container_style"/>
10758
10843
 
10759
- <fo:block-container margin-left="0mm">
10844
+ <fo:block-container margin-left="0mm" role="SKIP">
10760
10845
  <fo:block>
10761
10846
  <xsl:apply-templates select="." mode="list"/>
10762
10847
  </fo:block>
@@ -10765,7 +10850,7 @@
10765
10850
  </xsl:when>
10766
10851
  <xsl:otherwise>
10767
10852
 
10768
- <fo:block>
10853
+ <fo:block role="SKIP">
10769
10854
  <xsl:apply-templates select="." mode="list"/>
10770
10855
  </fo:block>
10771
10856
 
@@ -11183,7 +11268,10 @@
11183
11268
  <!-- Reference sections (Normative References and Bibliography) -->
11184
11269
  <!-- ========================================================== -->
11185
11270
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
11186
- <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/>
11271
+ <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
11272
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
11273
+
11274
+ </xsl:template>
11187
11275
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
11188
11276
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
11189
11277
 
@@ -11232,6 +11320,7 @@
11232
11320
 
11233
11321
  <!-- Bibliography (non-normative references) -->
11234
11322
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
11323
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
11235
11324
 
11236
11325
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
11237
11326
  <xsl:call-template name="processBibitem"/>
@@ -11239,6 +11328,35 @@
11239
11328
 
11240
11329
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
11241
11330
 
11331
+ <xsl:template name="insertListItem_Bibitem">
11332
+ <xsl:choose>
11333
+ <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
11334
+ <xsl:otherwise>
11335
+ <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
11336
+ <fo:list-item-label end-indent="label-end()">
11337
+ <fo:block role="SKIP">
11338
+ <fo:inline role="SKIP">
11339
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11340
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
11341
+ </xsl:apply-templates>
11342
+ </fo:inline>
11343
+ </fo:block>
11344
+ </fo:list-item-label>
11345
+ <fo:list-item-body start-indent="body-start()">
11346
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
11347
+ <xsl:call-template name="processBibitem">
11348
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11349
+ </xsl:call-template>
11350
+ </fo:block>
11351
+ </fo:list-item-body>
11352
+ </fo:list-item>
11353
+ </xsl:otherwise>
11354
+ </xsl:choose>
11355
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
11356
+ <xsl:with-param name="skip">false</xsl:with-param>
11357
+ </xsl:apply-templates>
11358
+ </xsl:template>
11359
+
11242
11360
  <xsl:template name="processBibitem">
11243
11361
  <xsl:param name="biblio_tag_part">both</xsl:param>
11244
11362
 
@@ -11621,7 +11739,7 @@
11621
11739
 
11622
11740
  <xsl:call-template name="setBlockSpanAll"/>
11623
11741
 
11624
- <fo:block-container xsl:use-attribute-sets="admonition-container-style">
11742
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
11625
11743
 
11626
11744
  <fo:block xsl:use-attribute-sets="admonition-name-style">
11627
11745
  <xsl:call-template name="displayAdmonitionName"/>