metanorma-un 0.10.10 → 0.10.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/un/un.plenary-attachment.xsl +292 -90
- data/lib/isodoc/un/un.plenary.xsl +292 -90
- data/lib/isodoc/un/un.recommendation.xsl +292 -90
- data/lib/metanorma/un/boilerplate.adoc +56 -0
- data/lib/metanorma/un/converter.rb +4 -0
- data/lib/metanorma/un/version.rb +1 -1
- metadata +3 -3
- data/lib/metanorma/un/boilerplate.xml +0 -59
@@ -1797,6 +1797,7 @@
|
|
1797
1797
|
</xsl:attribute-set>
|
1798
1798
|
|
1799
1799
|
<xsl:attribute-set name="figure-block-style">
|
1800
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
1800
1801
|
|
1801
1802
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1802
1803
|
|
@@ -1807,6 +1808,7 @@
|
|
1807
1808
|
</xsl:attribute-set>
|
1808
1809
|
|
1809
1810
|
<xsl:attribute-set name="figure-name-style">
|
1811
|
+
<xsl:attribute name="role">Caption</xsl:attribute>
|
1810
1812
|
|
1811
1813
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1812
1814
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
@@ -1851,7 +1853,12 @@
|
|
1851
1853
|
</xsl:attribute-set> <!-- formula-stem-number-style -->
|
1852
1854
|
<!-- End Formula's styles -->
|
1853
1855
|
|
1856
|
+
<xsl:template name="refine_formula-stem-number-style">
|
1857
|
+
|
1858
|
+
</xsl:template>
|
1859
|
+
|
1854
1860
|
<xsl:attribute-set name="image-style">
|
1861
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
1855
1862
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1856
1863
|
|
1857
1864
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -2130,6 +2137,11 @@
|
|
2130
2137
|
|
2131
2138
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
2132
2139
|
|
2140
|
+
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
2141
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2142
|
+
|
2143
|
+
</xsl:attribute-set>
|
2144
|
+
|
2133
2145
|
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
|
2134
2146
|
<xsl:attribute-set name="bibitem-normative-list-body-style">
|
2135
2147
|
|
@@ -2346,13 +2358,13 @@
|
|
2346
2358
|
|
2347
2359
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
2348
2360
|
<xsl:variable name="nodes_preface_">
|
2349
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
2361
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
|
2350
2362
|
<node id="{@id}"/>
|
2351
2363
|
</xsl:for-each>
|
2352
2364
|
</xsl:variable>
|
2353
2365
|
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
2354
2366
|
|
2355
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
2367
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
|
2356
2368
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2357
2369
|
|
2358
2370
|
<!-- process Section's title -->
|
@@ -2386,12 +2398,12 @@
|
|
2386
2398
|
<xsl:apply-templates select="." mode="contents"/>
|
2387
2399
|
</xsl:for-each>
|
2388
2400
|
|
2389
|
-
<xsl:for-each select="/*/*[local-name()='annex']">
|
2401
|
+
<!-- <xsl:for-each select="/*/*[local-name()='annex']">
|
2390
2402
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2391
2403
|
<xsl:apply-templates select="." mode="contents"/>
|
2392
|
-
</xsl:for-each>
|
2404
|
+
</xsl:for-each> -->
|
2393
2405
|
|
2394
|
-
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) > 0] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) > 0]">
|
2406
|
+
<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']) > 0] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) > 0]">
|
2395
2407
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2396
2408
|
<xsl:apply-templates select="." mode="contents"/>
|
2397
2409
|
</xsl:for-each>
|
@@ -2521,14 +2533,14 @@
|
|
2521
2533
|
<xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
|
2522
2534
|
</xsl:when>
|
2523
2535
|
<xsl:otherwise>
|
2524
|
-
<fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
|
2536
|
+
<fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
|
2525
2537
|
</xsl:otherwise>
|
2526
2538
|
</xsl:choose>
|
2527
2539
|
</xsl:for-each>
|
2528
2540
|
</xsl:when>
|
2529
2541
|
|
2530
2542
|
<xsl:otherwise>
|
2531
|
-
<fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
|
2543
|
+
<fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
|
2532
2544
|
</xsl:otherwise>
|
2533
2545
|
|
2534
2546
|
</xsl:choose>
|
@@ -2538,7 +2550,7 @@
|
|
2538
2550
|
<!-- Preface boilerplate sections processing -->
|
2539
2551
|
<!-- ================================= -->
|
2540
2552
|
<xsl:template match="*[local-name()='copyright-statement']">
|
2541
|
-
<fo:block xsl:use-attribute-sets="copyright-statement-style">
|
2553
|
+
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
2542
2554
|
<xsl:apply-templates/>
|
2543
2555
|
</fo:block>
|
2544
2556
|
</xsl:template> <!-- copyright-statement -->
|
@@ -2708,7 +2720,7 @@
|
|
2708
2720
|
</xsl:choose>
|
2709
2721
|
</xsl:variable>
|
2710
2722
|
|
2711
|
-
<fo:block-container xsl:use-attribute-sets="table-container-style">
|
2723
|
+
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
2712
2724
|
|
2713
2725
|
<xsl:call-template name="refine_table-container-style">
|
2714
2726
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
@@ -2892,7 +2904,7 @@
|
|
2892
2904
|
<xsl:param name="continued"/>
|
2893
2905
|
<xsl:if test="normalize-space() != ''">
|
2894
2906
|
|
2895
|
-
<fo:block xsl:use-attribute-sets="table-name-style">
|
2907
|
+
<fo:block xsl:use-attribute-sets="table-name-style" role="SKIP">
|
2896
2908
|
|
2897
2909
|
<xsl:call-template name="refine_table-name-style">
|
2898
2910
|
<xsl:with-param name="continued" select="$continued"/>
|
@@ -3277,8 +3289,8 @@
|
|
3277
3289
|
<xsl:template name="table-header-title">
|
3278
3290
|
<xsl:param name="cols-count"/>
|
3279
3291
|
<!-- row for title -->
|
3280
|
-
<fo:table-row>
|
3281
|
-
<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">
|
3292
|
+
<fo:table-row role="SKIP">
|
3293
|
+
<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">
|
3282
3294
|
|
3283
3295
|
<xsl:call-template name="refine_table-header-title-style"/>
|
3284
3296
|
|
@@ -3287,7 +3299,7 @@
|
|
3287
3299
|
</xsl:apply-templates>
|
3288
3300
|
|
3289
3301
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
3290
|
-
<fo:block/>
|
3302
|
+
<fo:block role="SKIP"/>
|
3291
3303
|
</xsl:if>
|
3292
3304
|
|
3293
3305
|
</fo:table-cell>
|
@@ -3598,7 +3610,7 @@
|
|
3598
3610
|
|
3599
3611
|
<xsl:call-template name="refine_table-header-cell-style"/>
|
3600
3612
|
|
3601
|
-
<fo:block>
|
3613
|
+
<fo:block role="SKIP">
|
3602
3614
|
<xsl:apply-templates/>
|
3603
3615
|
</fo:block>
|
3604
3616
|
</fo:table-cell>
|
@@ -3651,7 +3663,7 @@
|
|
3651
3663
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
3652
3664
|
</xsl:if>
|
3653
3665
|
|
3654
|
-
<fo:block>
|
3666
|
+
<fo:block role="SKIP">
|
3655
3667
|
|
3656
3668
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
3657
3669
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
@@ -3744,7 +3756,7 @@
|
|
3744
3756
|
</xsl:choose>
|
3745
3757
|
</xsl:variable>
|
3746
3758
|
<xsl:variable name="footnote_inline">
|
3747
|
-
<fo:inline>
|
3759
|
+
<fo:inline role="Reference">
|
3748
3760
|
|
3749
3761
|
<xsl:variable name="fn_styles">
|
3750
3762
|
<xsl:choose>
|
@@ -3767,7 +3779,7 @@
|
|
3767
3779
|
|
3768
3780
|
<xsl:call-template name="insert_basic_link">
|
3769
3781
|
<xsl:with-param name="element">
|
3770
|
-
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
3782
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
|
3771
3783
|
<xsl:copy-of select="$current_fn_number_text"/>
|
3772
3784
|
</fo:basic-link>
|
3773
3785
|
</xsl:with-param>
|
@@ -3780,17 +3792,17 @@
|
|
3780
3792
|
<xsl:copy-of select="$footnote_inline"/>
|
3781
3793
|
</xsl:when>
|
3782
3794
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
3783
|
-
<fo:footnote xsl:use-attribute-sets="fn-style">
|
3795
|
+
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
3784
3796
|
<xsl:copy-of select="$footnote_inline"/>
|
3785
|
-
<fo:footnote-body>
|
3797
|
+
<fo:footnote-body role="Note">
|
3786
3798
|
|
3787
|
-
<fo:block-container xsl:use-attribute-sets="fn-container-body-style">
|
3799
|
+
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
3788
3800
|
|
3789
|
-
<fo:block xsl:use-attribute-sets="fn-body-style">
|
3801
|
+
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
3790
3802
|
|
3791
3803
|
<xsl:call-template name="refine_fn-body-style"/>
|
3792
3804
|
|
3793
|
-
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
3805
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
|
3794
3806
|
|
3795
3807
|
<xsl:call-template name="refine_fn-body-num-style"/>
|
3796
3808
|
|
@@ -4052,11 +4064,11 @@
|
|
4052
4064
|
</xsl:template>
|
4053
4065
|
|
4054
4066
|
<xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
4055
|
-
<fo:inline><xsl:value-of select="."/></fo:inline>
|
4067
|
+
<fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
|
4056
4068
|
</xsl:template>
|
4057
4069
|
|
4058
4070
|
<xsl:template match="*[local-name()='fn']//*[local-name()='p']">
|
4059
|
-
<fo:inline>
|
4071
|
+
<fo:inline role="P">
|
4060
4072
|
<xsl:apply-templates/>
|
4061
4073
|
</fo:inline>
|
4062
4074
|
</xsl:template>
|
@@ -4071,7 +4083,7 @@
|
|
4071
4083
|
<xsl:variable name="isAdded" select="@added"/>
|
4072
4084
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
4073
4085
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
4074
|
-
<fo:block-container xsl:use-attribute-sets="dl-block-style">
|
4086
|
+
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
4075
4087
|
|
4076
4088
|
<xsl:call-template name="setBlockSpanAll"/>
|
4077
4089
|
|
@@ -4106,7 +4118,7 @@
|
|
4106
4118
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
4107
4119
|
</xsl:call-template>
|
4108
4120
|
|
4109
|
-
<fo:block-container margin-left="0mm">
|
4121
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
4110
4122
|
|
4111
4123
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
4112
4124
|
|
@@ -4171,7 +4183,7 @@
|
|
4171
4183
|
|
4172
4184
|
<!-- a few components -->
|
4173
4185
|
<xsl:if test="$onlyOneComponent = 'false'">
|
4174
|
-
<fo:block>
|
4186
|
+
<fo:block role="SKIP">
|
4175
4187
|
|
4176
4188
|
<xsl:call-template name="refine_multicomponent_style"/>
|
4177
4189
|
|
@@ -4179,7 +4191,7 @@
|
|
4179
4191
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
4180
4192
|
</xsl:if>
|
4181
4193
|
|
4182
|
-
<fo:block>
|
4194
|
+
<fo:block role="SKIP">
|
4183
4195
|
|
4184
4196
|
<xsl:call-template name="refine_multicomponent_block_style"/>
|
4185
4197
|
|
@@ -4514,7 +4526,7 @@
|
|
4514
4526
|
-->
|
4515
4527
|
<fo:table-row>
|
4516
4528
|
<fo:table-cell number-columns-spanned="2">
|
4517
|
-
<fo:block>
|
4529
|
+
<fo:block role="SKIP">
|
4518
4530
|
<xsl:call-template name="note"/>
|
4519
4531
|
</fo:block>
|
4520
4532
|
</fo:table-cell>
|
@@ -4579,7 +4591,7 @@
|
|
4579
4591
|
|
4580
4592
|
<xsl:call-template name="refine_dt-cell-style"/>
|
4581
4593
|
|
4582
|
-
<fo:block xsl:use-attribute-sets="dt-block-style">
|
4594
|
+
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
4583
4595
|
<xsl:copy-of select="@id"/>
|
4584
4596
|
|
4585
4597
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
@@ -4609,7 +4621,7 @@
|
|
4609
4621
|
|
4610
4622
|
<xsl:call-template name="refine_dd-cell-style"/>
|
4611
4623
|
|
4612
|
-
<fo:block>
|
4624
|
+
<fo:block role="SKIP">
|
4613
4625
|
|
4614
4626
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
4615
4627
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
@@ -4774,6 +4786,9 @@
|
|
4774
4786
|
|
4775
4787
|
<xsl:template name="refine_strong_style">
|
4776
4788
|
|
4789
|
+
<xsl:if test="ancestor::*['preferred']">
|
4790
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
4791
|
+
</xsl:if>
|
4777
4792
|
</xsl:template>
|
4778
4793
|
|
4779
4794
|
<xsl:template match="*[local-name()='padding']">
|
@@ -4982,11 +4997,41 @@
|
|
4982
4997
|
|
4983
4998
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
4984
4999
|
<xsl:variable name="text" select="normalize-space(.)"/>
|
4985
|
-
<fo:inline font-size="75%">
|
5000
|
+
<fo:inline font-size="75%" role="SKIP">
|
4986
5001
|
<xsl:if test="string-length($text) > 0">
|
4987
|
-
<xsl:
|
4988
|
-
<xsl:
|
4989
|
-
|
5002
|
+
<xsl:variable name="smallCapsText">
|
5003
|
+
<xsl:call-template name="recursiveSmallCaps">
|
5004
|
+
<xsl:with-param name="text" select="$text"/>
|
5005
|
+
</xsl:call-template>
|
5006
|
+
</xsl:variable>
|
5007
|
+
<!-- merge neighboring fo:inline -->
|
5008
|
+
<xsl:for-each select="xalan:nodeset($smallCapsText)/node()">
|
5009
|
+
<xsl:choose>
|
5010
|
+
<xsl:when test="self::fo:inline and preceding-sibling::node()[1][self::fo:inline]"><!-- <xsl:copy-of select="."/> --></xsl:when>
|
5011
|
+
<xsl:when test="self::fo:inline and @font-size">
|
5012
|
+
<xsl:variable name="curr_pos" select="count(preceding-sibling::node()) + 1"/>
|
5013
|
+
<!-- <curr_pos><xsl:value-of select="$curr_pos"/></curr_pos> -->
|
5014
|
+
<xsl:variable name="next_text_" select="count(following-sibling::node()[not(local-name() = 'inline')][1]/preceding-sibling::node())"/>
|
5015
|
+
<xsl:variable name="next_text">
|
5016
|
+
<xsl:choose>
|
5017
|
+
<xsl:when test="$next_text_ = 0">99999999</xsl:when>
|
5018
|
+
<xsl:otherwise><xsl:value-of select="$next_text_ + 1"/></xsl:otherwise>
|
5019
|
+
</xsl:choose>
|
5020
|
+
</xsl:variable>
|
5021
|
+
<!-- <next_text><xsl:value-of select="$next_text"/></next_text> -->
|
5022
|
+
<fo:inline>
|
5023
|
+
<xsl:copy-of select="@*"/>
|
5024
|
+
<xsl:copy-of select="./node()"/>
|
5025
|
+
<xsl:for-each select="following-sibling::node()[position() < $next_text - $curr_pos]"> <!-- [self::fo:inline] -->
|
5026
|
+
<xsl:copy-of select="./node()"/>
|
5027
|
+
</xsl:for-each>
|
5028
|
+
</fo:inline>
|
5029
|
+
</xsl:when>
|
5030
|
+
<xsl:otherwise>
|
5031
|
+
<xsl:copy-of select="."/>
|
5032
|
+
</xsl:otherwise>
|
5033
|
+
</xsl:choose>
|
5034
|
+
</xsl:for-each>
|
4990
5035
|
</xsl:if>
|
4991
5036
|
</fo:inline>
|
4992
5037
|
</xsl:template>
|
@@ -4998,7 +5043,7 @@
|
|
4998
5043
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
4999
5044
|
<xsl:choose>
|
5000
5045
|
<xsl:when test="$char=$upperCase">
|
5001
|
-
<fo:inline font-size="{100 div 0.75}%">
|
5046
|
+
<fo:inline font-size="{100 div 0.75}%" role="SKIP">
|
5002
5047
|
<xsl:value-of select="$upperCase"/>
|
5003
5048
|
</fo:inline>
|
5004
5049
|
</xsl:when>
|
@@ -5160,6 +5205,10 @@
|
|
5160
5205
|
|
5161
5206
|
<xsl:when test="not(contains($text, $separator))">
|
5162
5207
|
<word>
|
5208
|
+
<xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
|
5209
|
+
<xsl:text>
|
5210
|
+
</xsl:text> <!-- to add distance between dt and dd -->
|
5211
|
+
</xsl:if>
|
5163
5212
|
<xsl:call-template name="enclose_text_in_tags">
|
5164
5213
|
<xsl:with-param name="text" select="normalize-space($text)"/>
|
5165
5214
|
<xsl:with-param name="tags" select="$tags"/>
|
@@ -5168,6 +5217,10 @@
|
|
5168
5217
|
</xsl:when>
|
5169
5218
|
<xsl:otherwise>
|
5170
5219
|
<word>
|
5220
|
+
<xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
|
5221
|
+
<xsl:text>
|
5222
|
+
</xsl:text> <!-- to add distance between dt and dd -->
|
5223
|
+
</xsl:if>
|
5171
5224
|
<xsl:call-template name="enclose_text_in_tags">
|
5172
5225
|
<xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
|
5173
5226
|
<xsl:with-param name="tags" select="$tags"/>
|
@@ -5351,6 +5404,10 @@
|
|
5351
5404
|
<xsl:template name="getSimpleTable">
|
5352
5405
|
<xsl:param name="id"/>
|
5353
5406
|
|
5407
|
+
<!-- <test0>
|
5408
|
+
<xsl:copy-of select="."/>
|
5409
|
+
</test0> -->
|
5410
|
+
|
5354
5411
|
<xsl:variable name="simple-table">
|
5355
5412
|
|
5356
5413
|
<!-- Step 0. replace <br/> to <p>...</p> -->
|
@@ -5663,6 +5720,18 @@
|
|
5663
5720
|
</xsl:copy>
|
5664
5721
|
</xsl:template>
|
5665
5722
|
|
5723
|
+
<xsl:variable name="font_main_root_style">
|
5724
|
+
<root-style xsl:use-attribute-sets="root-style">
|
5725
|
+
</root-style>
|
5726
|
+
</xsl:variable>
|
5727
|
+
<xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
|
5728
|
+
<xsl:variable name="font_main">
|
5729
|
+
<xsl:choose>
|
5730
|
+
<xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
|
5731
|
+
<xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
|
5732
|
+
</xsl:choose>
|
5733
|
+
</xsl:variable>
|
5734
|
+
|
5666
5735
|
<xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
|
5667
5736
|
<xsl:param name="id"/>
|
5668
5737
|
<xsl:copy>
|
@@ -5701,6 +5770,33 @@
|
|
5701
5770
|
|
5702
5771
|
<!-- td_text='<xsl:copy-of select="$td_text"/>' -->
|
5703
5772
|
|
5773
|
+
<xsl:variable name="words_with_width">
|
5774
|
+
<!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
|
5775
|
+
<xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
|
5776
|
+
<xsl:copy>
|
5777
|
+
<xsl:copy-of select="@*"/>
|
5778
|
+
<xsl:attribute name="width">
|
5779
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
|
5780
|
+
</xsl:attribute>
|
5781
|
+
<xsl:copy-of select="node()"/>
|
5782
|
+
</xsl:copy>
|
5783
|
+
</xsl:for-each>
|
5784
|
+
</xsl:variable>
|
5785
|
+
|
5786
|
+
<xsl:variable name="words_with_width_sorted">
|
5787
|
+
<xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
|
5788
|
+
<xsl:sort select="@width" data-type="number" order="descending"/>
|
5789
|
+
<!-- select word maximal width only -->
|
5790
|
+
<xsl:if test="position() = 1">
|
5791
|
+
<xsl:copy-of select="."/>
|
5792
|
+
</xsl:if>
|
5793
|
+
</xsl:for-each>
|
5794
|
+
<!-- add 'word' with formatting tags inside -->
|
5795
|
+
<xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
|
5796
|
+
<xsl:copy-of select="."/>
|
5797
|
+
</xsl:for-each>
|
5798
|
+
</xsl:variable>
|
5799
|
+
|
5704
5800
|
<xsl:variable name="words">
|
5705
5801
|
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
|
5706
5802
|
<word>
|
@@ -5708,9 +5804,12 @@
|
|
5708
5804
|
</word>
|
5709
5805
|
</xsl:for-each>
|
5710
5806
|
|
5711
|
-
<xsl:for-each select="xalan:nodeset($
|
5807
|
+
<xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
|
5712
5808
|
<xsl:copy-of select="."/>
|
5713
5809
|
</xsl:for-each>
|
5810
|
+
<!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
|
5811
|
+
<xsl:copy-of select="."/>
|
5812
|
+
</xsl:for-each> -->
|
5714
5813
|
|
5715
5814
|
</xsl:variable>
|
5716
5815
|
|
@@ -6171,10 +6270,10 @@
|
|
6171
6270
|
<xsl:copy>
|
6172
6271
|
<xsl:apply-templates select="@*" mode="mathml"/>
|
6173
6272
|
<xsl:if test="not(@lspace)">
|
6174
|
-
<xsl:attribute name="lspace">0.
|
6273
|
+
<xsl:attribute name="lspace">0.2em</xsl:attribute>
|
6175
6274
|
</xsl:if>
|
6176
|
-
<xsl:if test="not(@rspace)">
|
6177
|
-
<xsl:attribute name="rspace">0.
|
6275
|
+
<xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
|
6276
|
+
<xsl:attribute name="rspace">0.2em</xsl:attribute>
|
6178
6277
|
</xsl:if>
|
6179
6278
|
<xsl:apply-templates mode="mathml"/>
|
6180
6279
|
</xsl:copy>
|
@@ -6191,6 +6290,27 @@
|
|
6191
6290
|
</xsl:copy>
|
6192
6291
|
</xsl:template>
|
6193
6292
|
|
6293
|
+
<!-- increase space before '(' -->
|
6294
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
|
6295
|
+
<xsl:copy>
|
6296
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
6297
|
+
<xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
|
6298
|
+
<xsl:if test="not(@lspace)">
|
6299
|
+
<xsl:attribute name="lspace">0.4em</xsl:attribute>
|
6300
|
+
<xsl:choose>
|
6301
|
+
<xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
|
6302
|
+
<xsl:attribute name="lspace">0.2em</xsl:attribute>
|
6303
|
+
</xsl:when>
|
6304
|
+
<xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
|
6305
|
+
<xsl:attribute name="lspace">0.2em</xsl:attribute>
|
6306
|
+
</xsl:when>
|
6307
|
+
</xsl:choose>
|
6308
|
+
</xsl:if>
|
6309
|
+
</xsl:if>
|
6310
|
+
<xsl:apply-templates mode="mathml"/>
|
6311
|
+
</xsl:copy>
|
6312
|
+
</xsl:template>
|
6313
|
+
|
6194
6314
|
<!-- Examples:
|
6195
6315
|
<stem type="AsciiMath">x = 1</stem>
|
6196
6316
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
@@ -6350,7 +6470,7 @@
|
|
6350
6470
|
<!-- formula -->
|
6351
6471
|
<!-- ====== -->
|
6352
6472
|
<xsl:template match="*[local-name() = 'formula']" name="formula">
|
6353
|
-
<fo:block-container margin-left="0mm">
|
6473
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
6354
6474
|
<xsl:if test="parent::*[local-name() = 'note']">
|
6355
6475
|
<xsl:attribute name="margin-left">
|
6356
6476
|
<xsl:choose>
|
@@ -6360,7 +6480,7 @@
|
|
6360
6480
|
</xsl:attribute>
|
6361
6481
|
|
6362
6482
|
</xsl:if>
|
6363
|
-
<fo:block-container margin-left="0mm">
|
6483
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
6364
6484
|
<fo:block id="{@id}">
|
6365
6485
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
6366
6486
|
</fo:block>
|
@@ -6396,7 +6516,7 @@
|
|
6396
6516
|
<fo:table-body>
|
6397
6517
|
<fo:table-row>
|
6398
6518
|
<fo:table-cell display-align="center">
|
6399
|
-
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
6519
|
+
<fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
|
6400
6520
|
|
6401
6521
|
<xsl:call-template name="refine_formula-stem-block-style"/>
|
6402
6522
|
|
@@ -6404,7 +6524,10 @@
|
|
6404
6524
|
</fo:block>
|
6405
6525
|
</fo:table-cell>
|
6406
6526
|
<fo:table-cell display-align="center">
|
6407
|
-
<fo:block xsl:use-attribute-sets="formula-stem-number-style">
|
6527
|
+
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
6528
|
+
|
6529
|
+
<xsl:call-template name="refine_formula-stem-number-style"/>
|
6530
|
+
|
6408
6531
|
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
6409
6532
|
</fo:block>
|
6410
6533
|
</fo:table-cell>
|
@@ -6437,13 +6560,13 @@
|
|
6437
6560
|
|
6438
6561
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
6439
6562
|
|
6440
|
-
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
|
6563
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
6441
6564
|
|
6442
6565
|
<xsl:call-template name="setBlockSpanAll"/>
|
6443
6566
|
|
6444
6567
|
<xsl:call-template name="refine_note-style"/>
|
6445
6568
|
|
6446
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
6569
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
6447
6570
|
|
6448
6571
|
<fo:block>
|
6449
6572
|
|
@@ -6618,12 +6741,13 @@
|
|
6618
6741
|
|
6619
6742
|
<xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
|
6620
6743
|
<xsl:if test="normalize-space() != ''">
|
6621
|
-
<xsl:variable name="level">
|
6744
|
+
<!-- <xsl:variable name="level">
|
6622
6745
|
<xsl:call-template name="getLevelTermName"/>
|
6623
6746
|
</xsl:variable>
|
6624
6747
|
<fo:inline role="H{$level}">
|
6625
|
-
<xsl:apply-templates/>
|
6626
|
-
</fo:inline>
|
6748
|
+
<xsl:apply-templates />
|
6749
|
+
</fo:inline> -->
|
6750
|
+
<xsl:apply-templates/>
|
6627
6751
|
</xsl:if>
|
6628
6752
|
</xsl:template>
|
6629
6753
|
<!-- ====== -->
|
@@ -6647,7 +6771,7 @@
|
|
6647
6771
|
<!-- Example: Dimensions in millimeters -->
|
6648
6772
|
<xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
|
6649
6773
|
|
6650
|
-
<fo:block xsl:use-attribute-sets="figure-style">
|
6774
|
+
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
6651
6775
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
6652
6776
|
</fo:block>
|
6653
6777
|
<xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
|
@@ -7781,7 +7905,7 @@
|
|
7781
7905
|
</xsl:when>
|
7782
7906
|
|
7783
7907
|
<xsl:otherwise>
|
7784
|
-
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
|
7908
|
+
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
|
7785
7909
|
|
7786
7910
|
<xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
|
7787
7911
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -7802,7 +7926,7 @@
|
|
7802
7926
|
</xsl:attribute>
|
7803
7927
|
|
7804
7928
|
</xsl:if>
|
7805
|
-
<fo:block-container margin-left="0mm">
|
7929
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
7806
7930
|
|
7807
7931
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
7808
7932
|
|
@@ -7926,7 +8050,7 @@
|
|
7926
8050
|
<!-- second td with sourcecode -->
|
7927
8051
|
<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'] -->
|
7928
8052
|
<fo:table-cell>
|
7929
|
-
<fo:block>
|
8053
|
+
<fo:block role="SKIP">
|
7930
8054
|
<xsl:apply-templates/>
|
7931
8055
|
</fo:block>
|
7932
8056
|
</fo:table-cell>
|
@@ -8348,11 +8472,11 @@
|
|
8348
8472
|
<!-- requirement, recommendation, permission table -->
|
8349
8473
|
<!-- ========== -->
|
8350
8474
|
<xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
8351
|
-
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
8475
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
|
8352
8476
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
8353
8477
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
8354
8478
|
</xsl:if>
|
8355
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
8479
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
8356
8480
|
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
8357
8481
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
8358
8482
|
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
@@ -8413,7 +8537,7 @@
|
|
8413
8537
|
|
8414
8538
|
<xsl:call-template name="setTableCellAttributes"/>
|
8415
8539
|
|
8416
|
-
<fo:block>
|
8540
|
+
<fo:block role="SKIP">
|
8417
8541
|
<xsl:apply-templates/>
|
8418
8542
|
</fo:block>
|
8419
8543
|
</fo:table-cell>
|
@@ -8435,7 +8559,7 @@
|
|
8435
8559
|
|
8436
8560
|
<xsl:call-template name="setTableCellAttributes"/>
|
8437
8561
|
|
8438
|
-
<fo:block>
|
8562
|
+
<fo:block role="SKIP">
|
8439
8563
|
<xsl:apply-templates/>
|
8440
8564
|
</fo:block>
|
8441
8565
|
</fo:table-cell>
|
@@ -8514,7 +8638,7 @@
|
|
8514
8638
|
-->
|
8515
8639
|
<xsl:template match="*[local-name() = 'example']">
|
8516
8640
|
|
8517
|
-
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
|
8641
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
8518
8642
|
|
8519
8643
|
<xsl:call-template name="setBlockSpanAll"/>
|
8520
8644
|
|
@@ -8525,7 +8649,7 @@
|
|
8525
8649
|
block
|
8526
8650
|
</xsl:variable>
|
8527
8651
|
|
8528
|
-
<fo:block-container margin-left="0mm">
|
8652
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
8529
8653
|
|
8530
8654
|
<xsl:choose>
|
8531
8655
|
|
@@ -8538,8 +8662,8 @@
|
|
8538
8662
|
</xsl:apply-templates>
|
8539
8663
|
</fo:block>
|
8540
8664
|
|
8541
|
-
<fo:block-container xsl:use-attribute-sets="example-body-style">
|
8542
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
8665
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
8666
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
8543
8667
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
8544
8668
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
8545
8669
|
</xsl:apply-templates>
|
@@ -8592,8 +8716,8 @@
|
|
8592
8716
|
|
8593
8717
|
<xsl:if test="*[not(local-name() = 'name')][position() > 1]">
|
8594
8718
|
<!-- display further elements in blocks -->
|
8595
|
-
<fo:block-container xsl:use-attribute-sets="example-body-style">
|
8596
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
8719
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
8720
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
8597
8721
|
<xsl:apply-templates select="*[not(local-name() = 'name')][position() > 1]">
|
8598
8722
|
<xsl:with-param name="fo_element" select="'block'"/>
|
8599
8723
|
</xsl:apply-templates>
|
@@ -8646,7 +8770,7 @@
|
|
8646
8770
|
</xsl:variable>
|
8647
8771
|
<xsl:choose>
|
8648
8772
|
<xsl:when test="starts-with(normalize-space($element), 'block')">
|
8649
|
-
<fo:block-container>
|
8773
|
+
<fo:block-container role="SKIP">
|
8650
8774
|
<xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
|
8651
8775
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
8652
8776
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -8787,7 +8911,7 @@
|
|
8787
8911
|
<!-- author -->
|
8788
8912
|
<!-- ====== -->
|
8789
8913
|
<xsl:template match="*[local-name() = 'quote']">
|
8790
|
-
<fo:block-container margin-left="0mm">
|
8914
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
8791
8915
|
|
8792
8916
|
<xsl:call-template name="setBlockSpanAll"/>
|
8793
8917
|
|
@@ -8797,12 +8921,12 @@
|
|
8797
8921
|
</xsl:if>
|
8798
8922
|
</xsl:if>
|
8799
8923
|
|
8800
|
-
<fo:block-container margin-left="0mm">
|
8801
|
-
<fo:block-container xsl:use-attribute-sets="quote-style">
|
8924
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
8925
|
+
<fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
|
8802
8926
|
|
8803
8927
|
<xsl:call-template name="refine_quote-style"/>
|
8804
8928
|
|
8805
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
8929
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
8806
8930
|
<fo:block role="BlockQuote">
|
8807
8931
|
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
8808
8932
|
</fo:block>
|
@@ -8958,10 +9082,10 @@
|
|
8958
9082
|
|
8959
9083
|
<xsl:choose>
|
8960
9084
|
<xsl:when test="$lang = 'zh'">
|
8961
|
-
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
9085
|
+
<fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
|
8962
9086
|
</xsl:when>
|
8963
9087
|
<xsl:when test="../../@inline-header = 'true'">
|
8964
|
-
<fo:inline font-size="90%">
|
9088
|
+
<fo:inline font-size="90%" role="SKIP">
|
8965
9089
|
<xsl:call-template name="insertNonBreakSpaces">
|
8966
9090
|
<xsl:with-param name="count" select="$padding-right"/>
|
8967
9091
|
</xsl:call-template>
|
@@ -8969,7 +9093,7 @@
|
|
8969
9093
|
</xsl:when>
|
8970
9094
|
<xsl:otherwise>
|
8971
9095
|
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
8972
|
-
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
9096
|
+
<fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/></fo:inline>
|
8973
9097
|
</xsl:otherwise>
|
8974
9098
|
</xsl:choose>
|
8975
9099
|
|
@@ -8999,12 +9123,12 @@
|
|
8999
9123
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
9000
9124
|
|
9001
9125
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
9002
|
-
<fo:block xsl:use-attribute-sets="term-name-style">
|
9126
|
+
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
9003
9127
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
9004
9128
|
</fo:block>
|
9005
9129
|
</xsl:if>
|
9006
9130
|
|
9007
|
-
<fo:block xsl:use-attribute-sets="preferred-term-style">
|
9131
|
+
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
9008
9132
|
<xsl:call-template name="setStyle_preferred"/>
|
9009
9133
|
<xsl:apply-templates/>
|
9010
9134
|
</fo:block>
|
@@ -9045,7 +9169,7 @@
|
|
9045
9169
|
<!-- definition -->
|
9046
9170
|
<!-- ========== -->
|
9047
9171
|
<xsl:template match="*[local-name() = 'definition']">
|
9048
|
-
<fo:block xsl:use-attribute-sets="definition-style">
|
9172
|
+
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
9049
9173
|
<xsl:apply-templates/>
|
9050
9174
|
</fo:block>
|
9051
9175
|
</xsl:template>
|
@@ -9095,6 +9219,10 @@
|
|
9095
9219
|
|
9096
9220
|
<xsl:template match="*[local-name() = 'clause']">
|
9097
9221
|
<fo:block>
|
9222
|
+
<xsl:if test="parent::*[local-name() = 'copyright-statement']">
|
9223
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
9224
|
+
</xsl:if>
|
9225
|
+
|
9098
9226
|
<xsl:call-template name="setId"/>
|
9099
9227
|
|
9100
9228
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -9213,7 +9341,48 @@
|
|
9213
9341
|
</xsl:choose>
|
9214
9342
|
</xsl:when>
|
9215
9343
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
9216
|
-
|
9344
|
+
|
9345
|
+
<xsl:variable name="label">
|
9346
|
+
|
9347
|
+
<xsl:variable name="type" select="../@type"/>
|
9348
|
+
|
9349
|
+
<xsl:variable name="style_prefix_">
|
9350
|
+
<xsl:if test="$type = 'roman'">
|
9351
|
+
<!-- Example: (i) -->
|
9352
|
+
</xsl:if>
|
9353
|
+
</xsl:variable>
|
9354
|
+
<xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
|
9355
|
+
|
9356
|
+
<xsl:variable name="style_suffix_">
|
9357
|
+
<xsl:choose>
|
9358
|
+
<xsl:when test="$type = 'arabic'">
|
9359
|
+
)
|
9360
|
+
</xsl:when>
|
9361
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
9362
|
+
)
|
9363
|
+
</xsl:when>
|
9364
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
9365
|
+
.
|
9366
|
+
</xsl:when>
|
9367
|
+
<xsl:when test="$type = 'roman'">
|
9368
|
+
)
|
9369
|
+
</xsl:when>
|
9370
|
+
<xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
|
9371
|
+
</xsl:choose>
|
9372
|
+
</xsl:variable>
|
9373
|
+
<xsl:variable name="style_suffix" select="normalize-space($style_suffix_)"/>
|
9374
|
+
|
9375
|
+
<xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
|
9376
|
+
<xsl:value-of select="$style_prefix"/>
|
9377
|
+
</xsl:if>
|
9378
|
+
<xsl:value-of select="@label"/>
|
9379
|
+
<xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
|
9380
|
+
<xsl:value-of select="$style_suffix"/>
|
9381
|
+
</xsl:if>
|
9382
|
+
</xsl:variable>
|
9383
|
+
|
9384
|
+
<xsl:value-of select="normalize-space($label)"/>
|
9385
|
+
|
9217
9386
|
</xsl:when>
|
9218
9387
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
9219
9388
|
|
@@ -9295,7 +9464,7 @@
|
|
9295
9464
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
9296
9465
|
<xsl:choose>
|
9297
9466
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
9298
|
-
<fo:block-container>
|
9467
|
+
<fo:block-container role="SKIP">
|
9299
9468
|
<xsl:attribute name="margin-left">
|
9300
9469
|
<xsl:choose>
|
9301
9470
|
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
@@ -9305,7 +9474,7 @@
|
|
9305
9474
|
|
9306
9475
|
<xsl:call-template name="refine_list_container_style"/>
|
9307
9476
|
|
9308
|
-
<fo:block-container margin-left="0mm">
|
9477
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
9309
9478
|
<fo:block>
|
9310
9479
|
<xsl:apply-templates select="." mode="list"/>
|
9311
9480
|
</fo:block>
|
@@ -9314,7 +9483,7 @@
|
|
9314
9483
|
</xsl:when>
|
9315
9484
|
<xsl:otherwise>
|
9316
9485
|
|
9317
|
-
<fo:block>
|
9486
|
+
<fo:block role="SKIP">
|
9318
9487
|
<xsl:apply-templates select="." mode="list"/>
|
9319
9488
|
</fo:block>
|
9320
9489
|
|
@@ -9410,7 +9579,7 @@
|
|
9410
9579
|
<xsl:call-template name="refine_list-item-style"/>
|
9411
9580
|
|
9412
9581
|
<fo:list-item-label end-indent="label-end()">
|
9413
|
-
<fo:block xsl:use-attribute-sets="list-item-label-style">
|
9582
|
+
<fo:block xsl:use-attribute-sets="list-item-label-style" role="SKIP">
|
9414
9583
|
|
9415
9584
|
<xsl:call-template name="refine_list-item-label-style"/>
|
9416
9585
|
|
@@ -9424,7 +9593,7 @@
|
|
9424
9593
|
</fo:block>
|
9425
9594
|
</fo:list-item-label>
|
9426
9595
|
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
9427
|
-
<fo:block>
|
9596
|
+
<fo:block role="SKIP">
|
9428
9597
|
|
9429
9598
|
<xsl:call-template name="refine_list-item-body-style"/>
|
9430
9599
|
|
@@ -9703,10 +9872,10 @@
|
|
9703
9872
|
<fo:table-body>
|
9704
9873
|
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
9705
9874
|
|
9706
|
-
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
9707
|
-
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
9708
|
-
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
9709
|
-
<fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
|
9875
|
+
<fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
|
9876
|
+
<fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
|
9877
|
+
<fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
|
9878
|
+
<fo:table-cell border="1pt solid black"><fo:block role="SKIP">Pages</fo:block></fo:table-cell>
|
9710
9879
|
</fo:table-row>
|
9711
9880
|
<xsl:apply-templates/>
|
9712
9881
|
</fo:table-body>
|
@@ -9721,7 +9890,7 @@
|
|
9721
9890
|
|
9722
9891
|
<xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
|
9723
9892
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
9724
|
-
<fo:block><xsl:apply-templates/></fo:block>
|
9893
|
+
<fo:block role="SKIP"><xsl:apply-templates/></fo:block>
|
9725
9894
|
</fo:table-cell>
|
9726
9895
|
</xsl:template>
|
9727
9896
|
<!-- ============ -->
|
@@ -9736,7 +9905,10 @@
|
|
9736
9905
|
<!-- Reference sections (Normative References and Bibliography) -->
|
9737
9906
|
<!-- ========================================================== -->
|
9738
9907
|
<xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
|
9739
|
-
<xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"
|
9908
|
+
<xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
|
9909
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
|
9910
|
+
|
9911
|
+
</xsl:template>
|
9740
9912
|
<!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
|
9741
9913
|
<xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
|
9742
9914
|
|
@@ -9783,6 +9955,7 @@
|
|
9783
9955
|
|
9784
9956
|
<!-- Bibliography (non-normative references) -->
|
9785
9957
|
<xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
|
9958
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
9786
9959
|
|
9787
9960
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
|
9788
9961
|
<xsl:call-template name="processBibitem"/>
|
@@ -9790,6 +9963,35 @@
|
|
9790
9963
|
|
9791
9964
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
9792
9965
|
|
9966
|
+
<xsl:template name="insertListItem_Bibitem">
|
9967
|
+
<xsl:choose>
|
9968
|
+
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
9969
|
+
<xsl:otherwise>
|
9970
|
+
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
9971
|
+
<fo:list-item-label end-indent="label-end()">
|
9972
|
+
<fo:block role="SKIP">
|
9973
|
+
<fo:inline role="SKIP">
|
9974
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
9975
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
9976
|
+
</xsl:apply-templates>
|
9977
|
+
</fo:inline>
|
9978
|
+
</fo:block>
|
9979
|
+
</fo:list-item-label>
|
9980
|
+
<fo:list-item-body start-indent="body-start()">
|
9981
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
|
9982
|
+
<xsl:call-template name="processBibitem">
|
9983
|
+
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
9984
|
+
</xsl:call-template>
|
9985
|
+
</fo:block>
|
9986
|
+
</fo:list-item-body>
|
9987
|
+
</fo:list-item>
|
9988
|
+
</xsl:otherwise>
|
9989
|
+
</xsl:choose>
|
9990
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
|
9991
|
+
<xsl:with-param name="skip">false</xsl:with-param>
|
9992
|
+
</xsl:apply-templates>
|
9993
|
+
</xsl:template>
|
9994
|
+
|
9793
9995
|
<xsl:template name="processBibitem">
|
9794
9996
|
<xsl:param name="biblio_tag_part">both</xsl:param>
|
9795
9997
|
|
@@ -10003,7 +10205,7 @@
|
|
10003
10205
|
<xsl:for-each select="*[local-name() = 'tab']">
|
10004
10206
|
<xsl:variable name="current_id" select="generate-id()"/>
|
10005
10207
|
<fo:table-cell>
|
10006
|
-
<fo:block line-height-shift-adjustment="disregard-shifts">
|
10208
|
+
<fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
|
10007
10209
|
<xsl:call-template name="insert_basic_link">
|
10008
10210
|
<xsl:with-param name="element">
|
10009
10211
|
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
@@ -10021,7 +10223,7 @@
|
|
10021
10223
|
</xsl:for-each>
|
10022
10224
|
<!-- last column - for page numbers -->
|
10023
10225
|
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
10024
|
-
<fo:block>
|
10226
|
+
<fo:block role="SKIP">
|
10025
10227
|
<xsl:call-template name="insert_basic_link">
|
10026
10228
|
<xsl:with-param name="element">
|
10027
10229
|
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
@@ -10131,9 +10333,9 @@
|
|
10131
10333
|
<xsl:call-template name="displayAdmonitionName"/>
|
10132
10334
|
</fo:block>
|
10133
10335
|
|
10134
|
-
<fo:block-container xsl:use-attribute-sets="admonition-container-style">
|
10336
|
+
<fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
|
10135
10337
|
|
10136
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
10338
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
10137
10339
|
<fo:block>
|
10138
10340
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
10139
10341
|
</fo:block>
|