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
@@ -1672,6 +1672,7 @@
|
|
1672
1672
|
</xsl:attribute-set>
|
1673
1673
|
|
1674
1674
|
<xsl:attribute-set name="figure-block-style">
|
1675
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
1675
1676
|
|
1676
1677
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1677
1678
|
|
@@ -1682,6 +1683,7 @@
|
|
1682
1683
|
</xsl:attribute-set>
|
1683
1684
|
|
1684
1685
|
<xsl:attribute-set name="figure-name-style">
|
1686
|
+
<xsl:attribute name="role">Caption</xsl:attribute>
|
1685
1687
|
|
1686
1688
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1687
1689
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
@@ -1724,7 +1726,12 @@
|
|
1724
1726
|
</xsl:attribute-set> <!-- formula-stem-number-style -->
|
1725
1727
|
<!-- End Formula's styles -->
|
1726
1728
|
|
1729
|
+
<xsl:template name="refine_formula-stem-number-style">
|
1730
|
+
|
1731
|
+
</xsl:template>
|
1732
|
+
|
1727
1733
|
<xsl:attribute-set name="image-style">
|
1734
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
1728
1735
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1729
1736
|
|
1730
1737
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -1997,6 +2004,11 @@
|
|
1997
2004
|
|
1998
2005
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
1999
2006
|
|
2007
|
+
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
2008
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2009
|
+
|
2010
|
+
</xsl:attribute-set>
|
2011
|
+
|
2000
2012
|
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
|
2001
2013
|
<xsl:attribute-set name="bibitem-normative-list-body-style">
|
2002
2014
|
|
@@ -2213,13 +2225,13 @@
|
|
2213
2225
|
|
2214
2226
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
2215
2227
|
<xsl:variable name="nodes_preface_">
|
2216
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
2228
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
|
2217
2229
|
<node id="{@id}"/>
|
2218
2230
|
</xsl:for-each>
|
2219
2231
|
</xsl:variable>
|
2220
2232
|
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
2221
2233
|
|
2222
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
2234
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
|
2223
2235
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2224
2236
|
|
2225
2237
|
<!-- process Section's title -->
|
@@ -2253,12 +2265,12 @@
|
|
2253
2265
|
<xsl:apply-templates select="." mode="contents"/>
|
2254
2266
|
</xsl:for-each>
|
2255
2267
|
|
2256
|
-
<xsl:for-each select="/*/*[local-name()='annex']">
|
2268
|
+
<!-- <xsl:for-each select="/*/*[local-name()='annex']">
|
2257
2269
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2258
2270
|
<xsl:apply-templates select="." mode="contents"/>
|
2259
|
-
</xsl:for-each>
|
2271
|
+
</xsl:for-each> -->
|
2260
2272
|
|
2261
|
-
<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]">
|
2273
|
+
<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]">
|
2262
2274
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2263
2275
|
<xsl:apply-templates select="." mode="contents"/>
|
2264
2276
|
</xsl:for-each>
|
@@ -2388,14 +2400,14 @@
|
|
2388
2400
|
<xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
|
2389
2401
|
</xsl:when>
|
2390
2402
|
<xsl:otherwise>
|
2391
|
-
<fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
|
2403
|
+
<fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
|
2392
2404
|
</xsl:otherwise>
|
2393
2405
|
</xsl:choose>
|
2394
2406
|
</xsl:for-each>
|
2395
2407
|
</xsl:when>
|
2396
2408
|
|
2397
2409
|
<xsl:otherwise>
|
2398
|
-
<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>
|
2399
2411
|
</xsl:otherwise>
|
2400
2412
|
|
2401
2413
|
</xsl:choose>
|
@@ -2405,7 +2417,7 @@
|
|
2405
2417
|
<!-- Preface boilerplate sections processing -->
|
2406
2418
|
<!-- ================================= -->
|
2407
2419
|
<xsl:template match="*[local-name()='copyright-statement']">
|
2408
|
-
<fo:block xsl:use-attribute-sets="copyright-statement-style">
|
2420
|
+
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
2409
2421
|
<xsl:apply-templates/>
|
2410
2422
|
</fo:block>
|
2411
2423
|
</xsl:template> <!-- copyright-statement -->
|
@@ -2575,7 +2587,7 @@
|
|
2575
2587
|
</xsl:choose>
|
2576
2588
|
</xsl:variable>
|
2577
2589
|
|
2578
|
-
<fo:block-container xsl:use-attribute-sets="table-container-style">
|
2590
|
+
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
2579
2591
|
|
2580
2592
|
<xsl:call-template name="refine_table-container-style">
|
2581
2593
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
@@ -2759,7 +2771,7 @@
|
|
2759
2771
|
<xsl:param name="continued"/>
|
2760
2772
|
<xsl:if test="normalize-space() != ''">
|
2761
2773
|
|
2762
|
-
<fo:block xsl:use-attribute-sets="table-name-style">
|
2774
|
+
<fo:block xsl:use-attribute-sets="table-name-style" role="SKIP">
|
2763
2775
|
|
2764
2776
|
<xsl:call-template name="refine_table-name-style">
|
2765
2777
|
<xsl:with-param name="continued" select="$continued"/>
|
@@ -3144,8 +3156,8 @@
|
|
3144
3156
|
<xsl:template name="table-header-title">
|
3145
3157
|
<xsl:param name="cols-count"/>
|
3146
3158
|
<!-- row for title -->
|
3147
|
-
<fo:table-row>
|
3148
|
-
<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">
|
3159
|
+
<fo:table-row role="SKIP">
|
3160
|
+
<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">
|
3149
3161
|
|
3150
3162
|
<xsl:call-template name="refine_table-header-title-style"/>
|
3151
3163
|
|
@@ -3154,7 +3166,7 @@
|
|
3154
3166
|
</xsl:apply-templates>
|
3155
3167
|
|
3156
3168
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
3157
|
-
<fo:block/>
|
3169
|
+
<fo:block role="SKIP"/>
|
3158
3170
|
</xsl:if>
|
3159
3171
|
|
3160
3172
|
</fo:table-cell>
|
@@ -3469,7 +3481,7 @@
|
|
3469
3481
|
|
3470
3482
|
<xsl:call-template name="refine_table-header-cell-style"/>
|
3471
3483
|
|
3472
|
-
<fo:block>
|
3484
|
+
<fo:block role="SKIP">
|
3473
3485
|
<xsl:apply-templates/>
|
3474
3486
|
</fo:block>
|
3475
3487
|
</fo:table-cell>
|
@@ -3522,7 +3534,7 @@
|
|
3522
3534
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
3523
3535
|
</xsl:if>
|
3524
3536
|
|
3525
|
-
<fo:block>
|
3537
|
+
<fo:block role="SKIP">
|
3526
3538
|
|
3527
3539
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
3528
3540
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
@@ -3615,7 +3627,7 @@
|
|
3615
3627
|
</xsl:choose>
|
3616
3628
|
</xsl:variable>
|
3617
3629
|
<xsl:variable name="footnote_inline">
|
3618
|
-
<fo:inline>
|
3630
|
+
<fo:inline role="Reference">
|
3619
3631
|
|
3620
3632
|
<xsl:variable name="fn_styles">
|
3621
3633
|
<xsl:choose>
|
@@ -3638,7 +3650,7 @@
|
|
3638
3650
|
|
3639
3651
|
<xsl:call-template name="insert_basic_link">
|
3640
3652
|
<xsl:with-param name="element">
|
3641
|
-
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
3653
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
|
3642
3654
|
<xsl:copy-of select="$current_fn_number_text"/>
|
3643
3655
|
</fo:basic-link>
|
3644
3656
|
</xsl:with-param>
|
@@ -3651,17 +3663,17 @@
|
|
3651
3663
|
<xsl:copy-of select="$footnote_inline"/>
|
3652
3664
|
</xsl:when>
|
3653
3665
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
3654
|
-
<fo:footnote xsl:use-attribute-sets="fn-style">
|
3666
|
+
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
3655
3667
|
<xsl:copy-of select="$footnote_inline"/>
|
3656
|
-
<fo:footnote-body>
|
3668
|
+
<fo:footnote-body role="Note">
|
3657
3669
|
|
3658
|
-
<fo:block-container xsl:use-attribute-sets="fn-container-body-style">
|
3670
|
+
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
3659
3671
|
|
3660
|
-
<fo:block xsl:use-attribute-sets="fn-body-style">
|
3672
|
+
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
3661
3673
|
|
3662
3674
|
<xsl:call-template name="refine_fn-body-style"/>
|
3663
3675
|
|
3664
|
-
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
3676
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
|
3665
3677
|
|
3666
3678
|
<xsl:call-template name="refine_fn-body-num-style"/>
|
3667
3679
|
|
@@ -3923,11 +3935,11 @@
|
|
3923
3935
|
</xsl:template>
|
3924
3936
|
|
3925
3937
|
<xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
3926
|
-
<fo:inline><xsl:value-of select="."/></fo:inline>
|
3938
|
+
<fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
|
3927
3939
|
</xsl:template>
|
3928
3940
|
|
3929
3941
|
<xsl:template match="*[local-name()='fn']//*[local-name()='p']">
|
3930
|
-
<fo:inline>
|
3942
|
+
<fo:inline role="P">
|
3931
3943
|
<xsl:apply-templates/>
|
3932
3944
|
</fo:inline>
|
3933
3945
|
</xsl:template>
|
@@ -3942,7 +3954,7 @@
|
|
3942
3954
|
<xsl:variable name="isAdded" select="@added"/>
|
3943
3955
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
3944
3956
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
3945
|
-
<fo:block-container xsl:use-attribute-sets="dl-block-style">
|
3957
|
+
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
3946
3958
|
|
3947
3959
|
<xsl:call-template name="setBlockSpanAll"/>
|
3948
3960
|
|
@@ -3977,7 +3989,7 @@
|
|
3977
3989
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3978
3990
|
</xsl:call-template>
|
3979
3991
|
|
3980
|
-
<fo:block-container margin-left="0mm">
|
3992
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
3981
3993
|
|
3982
3994
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
3983
3995
|
|
@@ -4042,7 +4054,7 @@
|
|
4042
4054
|
|
4043
4055
|
<!-- a few components -->
|
4044
4056
|
<xsl:if test="$onlyOneComponent = 'false'">
|
4045
|
-
<fo:block>
|
4057
|
+
<fo:block role="SKIP">
|
4046
4058
|
|
4047
4059
|
<xsl:call-template name="refine_multicomponent_style"/>
|
4048
4060
|
|
@@ -4050,7 +4062,7 @@
|
|
4050
4062
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
4051
4063
|
</xsl:if>
|
4052
4064
|
|
4053
|
-
<fo:block>
|
4065
|
+
<fo:block role="SKIP">
|
4054
4066
|
|
4055
4067
|
<xsl:call-template name="refine_multicomponent_block_style"/>
|
4056
4068
|
|
@@ -4385,7 +4397,7 @@
|
|
4385
4397
|
-->
|
4386
4398
|
<fo:table-row>
|
4387
4399
|
<fo:table-cell number-columns-spanned="2">
|
4388
|
-
<fo:block>
|
4400
|
+
<fo:block role="SKIP">
|
4389
4401
|
<xsl:call-template name="note"/>
|
4390
4402
|
</fo:block>
|
4391
4403
|
</fo:table-cell>
|
@@ -4450,7 +4462,7 @@
|
|
4450
4462
|
|
4451
4463
|
<xsl:call-template name="refine_dt-cell-style"/>
|
4452
4464
|
|
4453
|
-
<fo:block xsl:use-attribute-sets="dt-block-style">
|
4465
|
+
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
4454
4466
|
<xsl:copy-of select="@id"/>
|
4455
4467
|
|
4456
4468
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
@@ -4480,7 +4492,7 @@
|
|
4480
4492
|
|
4481
4493
|
<xsl:call-template name="refine_dd-cell-style"/>
|
4482
4494
|
|
4483
|
-
<fo:block>
|
4495
|
+
<fo:block role="SKIP">
|
4484
4496
|
|
4485
4497
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
4486
4498
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
@@ -4645,6 +4657,9 @@
|
|
4645
4657
|
|
4646
4658
|
<xsl:template name="refine_strong_style">
|
4647
4659
|
|
4660
|
+
<xsl:if test="ancestor::*['preferred']">
|
4661
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
4662
|
+
</xsl:if>
|
4648
4663
|
</xsl:template>
|
4649
4664
|
|
4650
4665
|
<xsl:template match="*[local-name()='padding']">
|
@@ -4853,11 +4868,41 @@
|
|
4853
4868
|
|
4854
4869
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
4855
4870
|
<xsl:variable name="text" select="normalize-space(.)"/>
|
4856
|
-
<fo:inline font-size="75%">
|
4871
|
+
<fo:inline font-size="75%" role="SKIP">
|
4857
4872
|
<xsl:if test="string-length($text) > 0">
|
4858
|
-
<xsl:
|
4859
|
-
<xsl:
|
4860
|
-
|
4873
|
+
<xsl:variable name="smallCapsText">
|
4874
|
+
<xsl:call-template name="recursiveSmallCaps">
|
4875
|
+
<xsl:with-param name="text" select="$text"/>
|
4876
|
+
</xsl:call-template>
|
4877
|
+
</xsl:variable>
|
4878
|
+
<!-- merge neighboring fo:inline -->
|
4879
|
+
<xsl:for-each select="xalan:nodeset($smallCapsText)/node()">
|
4880
|
+
<xsl:choose>
|
4881
|
+
<xsl:when test="self::fo:inline and preceding-sibling::node()[1][self::fo:inline]"><!-- <xsl:copy-of select="."/> --></xsl:when>
|
4882
|
+
<xsl:when test="self::fo:inline and @font-size">
|
4883
|
+
<xsl:variable name="curr_pos" select="count(preceding-sibling::node()) + 1"/>
|
4884
|
+
<!-- <curr_pos><xsl:value-of select="$curr_pos"/></curr_pos> -->
|
4885
|
+
<xsl:variable name="next_text_" select="count(following-sibling::node()[not(local-name() = 'inline')][1]/preceding-sibling::node())"/>
|
4886
|
+
<xsl:variable name="next_text">
|
4887
|
+
<xsl:choose>
|
4888
|
+
<xsl:when test="$next_text_ = 0">99999999</xsl:when>
|
4889
|
+
<xsl:otherwise><xsl:value-of select="$next_text_ + 1"/></xsl:otherwise>
|
4890
|
+
</xsl:choose>
|
4891
|
+
</xsl:variable>
|
4892
|
+
<!-- <next_text><xsl:value-of select="$next_text"/></next_text> -->
|
4893
|
+
<fo:inline>
|
4894
|
+
<xsl:copy-of select="@*"/>
|
4895
|
+
<xsl:copy-of select="./node()"/>
|
4896
|
+
<xsl:for-each select="following-sibling::node()[position() < $next_text - $curr_pos]"> <!-- [self::fo:inline] -->
|
4897
|
+
<xsl:copy-of select="./node()"/>
|
4898
|
+
</xsl:for-each>
|
4899
|
+
</fo:inline>
|
4900
|
+
</xsl:when>
|
4901
|
+
<xsl:otherwise>
|
4902
|
+
<xsl:copy-of select="."/>
|
4903
|
+
</xsl:otherwise>
|
4904
|
+
</xsl:choose>
|
4905
|
+
</xsl:for-each>
|
4861
4906
|
</xsl:if>
|
4862
4907
|
</fo:inline>
|
4863
4908
|
</xsl:template>
|
@@ -4869,7 +4914,7 @@
|
|
4869
4914
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
4870
4915
|
<xsl:choose>
|
4871
4916
|
<xsl:when test="$char=$upperCase">
|
4872
|
-
<fo:inline font-size="{100 div 0.75}%">
|
4917
|
+
<fo:inline font-size="{100 div 0.75}%" role="SKIP">
|
4873
4918
|
<xsl:value-of select="$upperCase"/>
|
4874
4919
|
</fo:inline>
|
4875
4920
|
</xsl:when>
|
@@ -5031,6 +5076,10 @@
|
|
5031
5076
|
|
5032
5077
|
<xsl:when test="not(contains($text, $separator))">
|
5033
5078
|
<word>
|
5079
|
+
<xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
|
5080
|
+
<xsl:text>
|
5081
|
+
</xsl:text> <!-- to add distance between dt and dd -->
|
5082
|
+
</xsl:if>
|
5034
5083
|
<xsl:call-template name="enclose_text_in_tags">
|
5035
5084
|
<xsl:with-param name="text" select="normalize-space($text)"/>
|
5036
5085
|
<xsl:with-param name="tags" select="$tags"/>
|
@@ -5039,6 +5088,10 @@
|
|
5039
5088
|
</xsl:when>
|
5040
5089
|
<xsl:otherwise>
|
5041
5090
|
<word>
|
5091
|
+
<xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
|
5092
|
+
<xsl:text>
|
5093
|
+
</xsl:text> <!-- to add distance between dt and dd -->
|
5094
|
+
</xsl:if>
|
5042
5095
|
<xsl:call-template name="enclose_text_in_tags">
|
5043
5096
|
<xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
|
5044
5097
|
<xsl:with-param name="tags" select="$tags"/>
|
@@ -5222,6 +5275,10 @@
|
|
5222
5275
|
<xsl:template name="getSimpleTable">
|
5223
5276
|
<xsl:param name="id"/>
|
5224
5277
|
|
5278
|
+
<!-- <test0>
|
5279
|
+
<xsl:copy-of select="."/>
|
5280
|
+
</test0> -->
|
5281
|
+
|
5225
5282
|
<xsl:variable name="simple-table">
|
5226
5283
|
|
5227
5284
|
<!-- Step 0. replace <br/> to <p>...</p> -->
|
@@ -5534,6 +5591,18 @@
|
|
5534
5591
|
</xsl:copy>
|
5535
5592
|
</xsl:template>
|
5536
5593
|
|
5594
|
+
<xsl:variable name="font_main_root_style">
|
5595
|
+
<root-style xsl:use-attribute-sets="root-style">
|
5596
|
+
</root-style>
|
5597
|
+
</xsl:variable>
|
5598
|
+
<xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
|
5599
|
+
<xsl:variable name="font_main">
|
5600
|
+
<xsl:choose>
|
5601
|
+
<xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
|
5602
|
+
<xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
|
5603
|
+
</xsl:choose>
|
5604
|
+
</xsl:variable>
|
5605
|
+
|
5537
5606
|
<xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
|
5538
5607
|
<xsl:param name="id"/>
|
5539
5608
|
<xsl:copy>
|
@@ -5572,6 +5641,33 @@
|
|
5572
5641
|
|
5573
5642
|
<!-- td_text='<xsl:copy-of select="$td_text"/>' -->
|
5574
5643
|
|
5644
|
+
<xsl:variable name="words_with_width">
|
5645
|
+
<!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
|
5646
|
+
<xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
|
5647
|
+
<xsl:copy>
|
5648
|
+
<xsl:copy-of select="@*"/>
|
5649
|
+
<xsl:attribute name="width">
|
5650
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
|
5651
|
+
</xsl:attribute>
|
5652
|
+
<xsl:copy-of select="node()"/>
|
5653
|
+
</xsl:copy>
|
5654
|
+
</xsl:for-each>
|
5655
|
+
</xsl:variable>
|
5656
|
+
|
5657
|
+
<xsl:variable name="words_with_width_sorted">
|
5658
|
+
<xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
|
5659
|
+
<xsl:sort select="@width" data-type="number" order="descending"/>
|
5660
|
+
<!-- select word maximal width only -->
|
5661
|
+
<xsl:if test="position() = 1">
|
5662
|
+
<xsl:copy-of select="."/>
|
5663
|
+
</xsl:if>
|
5664
|
+
</xsl:for-each>
|
5665
|
+
<!-- add 'word' with formatting tags inside -->
|
5666
|
+
<xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
|
5667
|
+
<xsl:copy-of select="."/>
|
5668
|
+
</xsl:for-each>
|
5669
|
+
</xsl:variable>
|
5670
|
+
|
5575
5671
|
<xsl:variable name="words">
|
5576
5672
|
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
|
5577
5673
|
<word>
|
@@ -5579,9 +5675,12 @@
|
|
5579
5675
|
</word>
|
5580
5676
|
</xsl:for-each>
|
5581
5677
|
|
5582
|
-
<xsl:for-each select="xalan:nodeset($
|
5678
|
+
<xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
|
5583
5679
|
<xsl:copy-of select="."/>
|
5584
5680
|
</xsl:for-each>
|
5681
|
+
<!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
|
5682
|
+
<xsl:copy-of select="."/>
|
5683
|
+
</xsl:for-each> -->
|
5585
5684
|
|
5586
5685
|
</xsl:variable>
|
5587
5686
|
|
@@ -6042,10 +6141,10 @@
|
|
6042
6141
|
<xsl:copy>
|
6043
6142
|
<xsl:apply-templates select="@*" mode="mathml"/>
|
6044
6143
|
<xsl:if test="not(@lspace)">
|
6045
|
-
<xsl:attribute name="lspace">0.
|
6144
|
+
<xsl:attribute name="lspace">0.2em</xsl:attribute>
|
6046
6145
|
</xsl:if>
|
6047
|
-
<xsl:if test="not(@rspace)">
|
6048
|
-
<xsl:attribute name="rspace">0.
|
6146
|
+
<xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
|
6147
|
+
<xsl:attribute name="rspace">0.2em</xsl:attribute>
|
6049
6148
|
</xsl:if>
|
6050
6149
|
<xsl:apply-templates mode="mathml"/>
|
6051
6150
|
</xsl:copy>
|
@@ -6062,6 +6161,27 @@
|
|
6062
6161
|
</xsl:copy>
|
6063
6162
|
</xsl:template>
|
6064
6163
|
|
6164
|
+
<!-- increase space before '(' -->
|
6165
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
|
6166
|
+
<xsl:copy>
|
6167
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
6168
|
+
<xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
|
6169
|
+
<xsl:if test="not(@lspace)">
|
6170
|
+
<xsl:attribute name="lspace">0.4em</xsl:attribute>
|
6171
|
+
<xsl:choose>
|
6172
|
+
<xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
|
6173
|
+
<xsl:attribute name="lspace">0.2em</xsl:attribute>
|
6174
|
+
</xsl:when>
|
6175
|
+
<xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
|
6176
|
+
<xsl:attribute name="lspace">0.2em</xsl:attribute>
|
6177
|
+
</xsl:when>
|
6178
|
+
</xsl:choose>
|
6179
|
+
</xsl:if>
|
6180
|
+
</xsl:if>
|
6181
|
+
<xsl:apply-templates mode="mathml"/>
|
6182
|
+
</xsl:copy>
|
6183
|
+
</xsl:template>
|
6184
|
+
|
6065
6185
|
<!-- Examples:
|
6066
6186
|
<stem type="AsciiMath">x = 1</stem>
|
6067
6187
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
@@ -6221,7 +6341,7 @@
|
|
6221
6341
|
<!-- formula -->
|
6222
6342
|
<!-- ====== -->
|
6223
6343
|
<xsl:template match="*[local-name() = 'formula']" name="formula">
|
6224
|
-
<fo:block-container margin-left="0mm">
|
6344
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
6225
6345
|
<xsl:if test="parent::*[local-name() = 'note']">
|
6226
6346
|
<xsl:attribute name="margin-left">
|
6227
6347
|
<xsl:choose>
|
@@ -6231,7 +6351,7 @@
|
|
6231
6351
|
</xsl:attribute>
|
6232
6352
|
|
6233
6353
|
</xsl:if>
|
6234
|
-
<fo:block-container margin-left="0mm">
|
6354
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
6235
6355
|
<fo:block id="{@id}">
|
6236
6356
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
6237
6357
|
</fo:block>
|
@@ -6267,7 +6387,7 @@
|
|
6267
6387
|
<fo:table-body>
|
6268
6388
|
<fo:table-row>
|
6269
6389
|
<fo:table-cell display-align="center">
|
6270
|
-
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
6390
|
+
<fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
|
6271
6391
|
|
6272
6392
|
<xsl:call-template name="refine_formula-stem-block-style"/>
|
6273
6393
|
|
@@ -6275,7 +6395,10 @@
|
|
6275
6395
|
</fo:block>
|
6276
6396
|
</fo:table-cell>
|
6277
6397
|
<fo:table-cell display-align="center">
|
6278
|
-
<fo:block xsl:use-attribute-sets="formula-stem-number-style">
|
6398
|
+
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
6399
|
+
|
6400
|
+
<xsl:call-template name="refine_formula-stem-number-style"/>
|
6401
|
+
|
6279
6402
|
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
6280
6403
|
</fo:block>
|
6281
6404
|
</fo:table-cell>
|
@@ -6308,13 +6431,13 @@
|
|
6308
6431
|
|
6309
6432
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
6310
6433
|
|
6311
|
-
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
|
6434
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
6312
6435
|
|
6313
6436
|
<xsl:call-template name="setBlockSpanAll"/>
|
6314
6437
|
|
6315
6438
|
<xsl:call-template name="refine_note-style"/>
|
6316
6439
|
|
6317
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
6440
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
6318
6441
|
|
6319
6442
|
<fo:block>
|
6320
6443
|
|
@@ -6489,12 +6612,13 @@
|
|
6489
6612
|
|
6490
6613
|
<xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
|
6491
6614
|
<xsl:if test="normalize-space() != ''">
|
6492
|
-
<xsl:variable name="level">
|
6615
|
+
<!-- <xsl:variable name="level">
|
6493
6616
|
<xsl:call-template name="getLevelTermName"/>
|
6494
6617
|
</xsl:variable>
|
6495
6618
|
<fo:inline role="H{$level}">
|
6496
|
-
<xsl:apply-templates/>
|
6497
|
-
</fo:inline>
|
6619
|
+
<xsl:apply-templates />
|
6620
|
+
</fo:inline> -->
|
6621
|
+
<xsl:apply-templates/>
|
6498
6622
|
</xsl:if>
|
6499
6623
|
</xsl:template>
|
6500
6624
|
<!-- ====== -->
|
@@ -6518,7 +6642,7 @@
|
|
6518
6642
|
<!-- Example: Dimensions in millimeters -->
|
6519
6643
|
<xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
|
6520
6644
|
|
6521
|
-
<fo:block xsl:use-attribute-sets="figure-style">
|
6645
|
+
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
6522
6646
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
6523
6647
|
</fo:block>
|
6524
6648
|
<xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
|
@@ -7652,7 +7776,7 @@
|
|
7652
7776
|
</xsl:when>
|
7653
7777
|
|
7654
7778
|
<xsl:otherwise>
|
7655
|
-
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
|
7779
|
+
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
|
7656
7780
|
|
7657
7781
|
<xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
|
7658
7782
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -7673,7 +7797,7 @@
|
|
7673
7797
|
</xsl:attribute>
|
7674
7798
|
|
7675
7799
|
</xsl:if>
|
7676
|
-
<fo:block-container margin-left="0mm">
|
7800
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
7677
7801
|
|
7678
7802
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
7679
7803
|
|
@@ -7797,7 +7921,7 @@
|
|
7797
7921
|
<!-- second td with sourcecode -->
|
7798
7922
|
<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'] -->
|
7799
7923
|
<fo:table-cell>
|
7800
|
-
<fo:block>
|
7924
|
+
<fo:block role="SKIP">
|
7801
7925
|
<xsl:apply-templates/>
|
7802
7926
|
</fo:block>
|
7803
7927
|
</fo:table-cell>
|
@@ -8219,11 +8343,11 @@
|
|
8219
8343
|
<!-- requirement, recommendation, permission table -->
|
8220
8344
|
<!-- ========== -->
|
8221
8345
|
<xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
8222
|
-
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
8346
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
|
8223
8347
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
8224
8348
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
8225
8349
|
</xsl:if>
|
8226
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
8350
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
8227
8351
|
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
8228
8352
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
8229
8353
|
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
@@ -8284,7 +8408,7 @@
|
|
8284
8408
|
|
8285
8409
|
<xsl:call-template name="setTableCellAttributes"/>
|
8286
8410
|
|
8287
|
-
<fo:block>
|
8411
|
+
<fo:block role="SKIP">
|
8288
8412
|
<xsl:apply-templates/>
|
8289
8413
|
</fo:block>
|
8290
8414
|
</fo:table-cell>
|
@@ -8306,7 +8430,7 @@
|
|
8306
8430
|
|
8307
8431
|
<xsl:call-template name="setTableCellAttributes"/>
|
8308
8432
|
|
8309
|
-
<fo:block>
|
8433
|
+
<fo:block role="SKIP">
|
8310
8434
|
<xsl:apply-templates/>
|
8311
8435
|
</fo:block>
|
8312
8436
|
</fo:table-cell>
|
@@ -8385,7 +8509,7 @@
|
|
8385
8509
|
-->
|
8386
8510
|
<xsl:template match="*[local-name() = 'example']">
|
8387
8511
|
|
8388
|
-
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
|
8512
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
8389
8513
|
|
8390
8514
|
<xsl:call-template name="setBlockSpanAll"/>
|
8391
8515
|
|
@@ -8396,7 +8520,7 @@
|
|
8396
8520
|
block
|
8397
8521
|
</xsl:variable>
|
8398
8522
|
|
8399
|
-
<fo:block-container margin-left="0mm">
|
8523
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
8400
8524
|
|
8401
8525
|
<xsl:choose>
|
8402
8526
|
|
@@ -8409,8 +8533,8 @@
|
|
8409
8533
|
</xsl:apply-templates>
|
8410
8534
|
</fo:block>
|
8411
8535
|
|
8412
|
-
<fo:block-container xsl:use-attribute-sets="example-body-style">
|
8413
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
8536
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
8537
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
8414
8538
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
8415
8539
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
8416
8540
|
</xsl:apply-templates>
|
@@ -8463,8 +8587,8 @@
|
|
8463
8587
|
|
8464
8588
|
<xsl:if test="*[not(local-name() = 'name')][position() > 1]">
|
8465
8589
|
<!-- display further elements in blocks -->
|
8466
|
-
<fo:block-container xsl:use-attribute-sets="example-body-style">
|
8467
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
8590
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
8591
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
8468
8592
|
<xsl:apply-templates select="*[not(local-name() = 'name')][position() > 1]">
|
8469
8593
|
<xsl:with-param name="fo_element" select="'block'"/>
|
8470
8594
|
</xsl:apply-templates>
|
@@ -8517,7 +8641,7 @@
|
|
8517
8641
|
</xsl:variable>
|
8518
8642
|
<xsl:choose>
|
8519
8643
|
<xsl:when test="starts-with(normalize-space($element), 'block')">
|
8520
|
-
<fo:block-container>
|
8644
|
+
<fo:block-container role="SKIP">
|
8521
8645
|
<xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
|
8522
8646
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
8523
8647
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -8658,7 +8782,7 @@
|
|
8658
8782
|
<!-- author -->
|
8659
8783
|
<!-- ====== -->
|
8660
8784
|
<xsl:template match="*[local-name() = 'quote']">
|
8661
|
-
<fo:block-container margin-left="0mm">
|
8785
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
8662
8786
|
|
8663
8787
|
<xsl:call-template name="setBlockSpanAll"/>
|
8664
8788
|
|
@@ -8668,12 +8792,12 @@
|
|
8668
8792
|
</xsl:if>
|
8669
8793
|
</xsl:if>
|
8670
8794
|
|
8671
|
-
<fo:block-container margin-left="0mm">
|
8672
|
-
<fo:block-container xsl:use-attribute-sets="quote-style">
|
8795
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
8796
|
+
<fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
|
8673
8797
|
|
8674
8798
|
<xsl:call-template name="refine_quote-style"/>
|
8675
8799
|
|
8676
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
8800
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
8677
8801
|
<fo:block role="BlockQuote">
|
8678
8802
|
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
8679
8803
|
</fo:block>
|
@@ -8831,10 +8955,10 @@
|
|
8831
8955
|
|
8832
8956
|
<xsl:choose>
|
8833
8957
|
<xsl:when test="$lang = 'zh'">
|
8834
|
-
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
8958
|
+
<fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
|
8835
8959
|
</xsl:when>
|
8836
8960
|
<xsl:when test="../../@inline-header = 'true'">
|
8837
|
-
<fo:inline font-size="90%">
|
8961
|
+
<fo:inline font-size="90%" role="SKIP">
|
8838
8962
|
<xsl:call-template name="insertNonBreakSpaces">
|
8839
8963
|
<xsl:with-param name="count" select="$padding-right"/>
|
8840
8964
|
</xsl:call-template>
|
@@ -8842,7 +8966,7 @@
|
|
8842
8966
|
</xsl:when>
|
8843
8967
|
<xsl:otherwise>
|
8844
8968
|
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
8845
|
-
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
8969
|
+
<fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/></fo:inline>
|
8846
8970
|
</xsl:otherwise>
|
8847
8971
|
</xsl:choose>
|
8848
8972
|
|
@@ -8872,12 +8996,12 @@
|
|
8872
8996
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
8873
8997
|
|
8874
8998
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
8875
|
-
<fo:block xsl:use-attribute-sets="term-name-style">
|
8999
|
+
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
8876
9000
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
8877
9001
|
</fo:block>
|
8878
9002
|
</xsl:if>
|
8879
9003
|
|
8880
|
-
<fo:block xsl:use-attribute-sets="preferred-term-style">
|
9004
|
+
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
8881
9005
|
<xsl:call-template name="setStyle_preferred"/>
|
8882
9006
|
<xsl:apply-templates/>
|
8883
9007
|
</fo:block>
|
@@ -8918,7 +9042,7 @@
|
|
8918
9042
|
<!-- definition -->
|
8919
9043
|
<!-- ========== -->
|
8920
9044
|
<xsl:template match="*[local-name() = 'definition']">
|
8921
|
-
<fo:block xsl:use-attribute-sets="definition-style">
|
9045
|
+
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
8922
9046
|
<xsl:apply-templates/>
|
8923
9047
|
</fo:block>
|
8924
9048
|
</xsl:template>
|
@@ -8966,6 +9090,10 @@
|
|
8966
9090
|
|
8967
9091
|
<xsl:template match="*[local-name() = 'clause']">
|
8968
9092
|
<fo:block>
|
9093
|
+
<xsl:if test="parent::*[local-name() = 'copyright-statement']">
|
9094
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
9095
|
+
</xsl:if>
|
9096
|
+
|
8969
9097
|
<xsl:call-template name="setId"/>
|
8970
9098
|
|
8971
9099
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -9084,7 +9212,48 @@
|
|
9084
9212
|
</xsl:choose>
|
9085
9213
|
</xsl:when>
|
9086
9214
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
9087
|
-
|
9215
|
+
|
9216
|
+
<xsl:variable name="label">
|
9217
|
+
|
9218
|
+
<xsl:variable name="type" select="../@type"/>
|
9219
|
+
|
9220
|
+
<xsl:variable name="style_prefix_">
|
9221
|
+
<xsl:if test="$type = 'roman'">
|
9222
|
+
<!-- Example: (i) -->
|
9223
|
+
</xsl:if>
|
9224
|
+
</xsl:variable>
|
9225
|
+
<xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
|
9226
|
+
|
9227
|
+
<xsl:variable name="style_suffix_">
|
9228
|
+
<xsl:choose>
|
9229
|
+
<xsl:when test="$type = 'arabic'">
|
9230
|
+
.
|
9231
|
+
</xsl:when>
|
9232
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
9233
|
+
)
|
9234
|
+
</xsl:when>
|
9235
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
9236
|
+
.
|
9237
|
+
</xsl:when>
|
9238
|
+
<xsl:when test="$type = 'roman'">
|
9239
|
+
)
|
9240
|
+
</xsl:when>
|
9241
|
+
<xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
|
9242
|
+
</xsl:choose>
|
9243
|
+
</xsl:variable>
|
9244
|
+
<xsl:variable name="style_suffix" select="normalize-space($style_suffix_)"/>
|
9245
|
+
|
9246
|
+
<xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
|
9247
|
+
<xsl:value-of select="$style_prefix"/>
|
9248
|
+
</xsl:if>
|
9249
|
+
<xsl:value-of select="@label"/>
|
9250
|
+
<xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
|
9251
|
+
<xsl:value-of select="$style_suffix"/>
|
9252
|
+
</xsl:if>
|
9253
|
+
</xsl:variable>
|
9254
|
+
|
9255
|
+
<xsl:value-of select="normalize-space($label)"/>
|
9256
|
+
|
9088
9257
|
</xsl:when>
|
9089
9258
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
9090
9259
|
|
@@ -9166,7 +9335,7 @@
|
|
9166
9335
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
9167
9336
|
<xsl:choose>
|
9168
9337
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
9169
|
-
<fo:block-container>
|
9338
|
+
<fo:block-container role="SKIP">
|
9170
9339
|
<xsl:attribute name="margin-left">
|
9171
9340
|
<xsl:choose>
|
9172
9341
|
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
@@ -9176,7 +9345,7 @@
|
|
9176
9345
|
|
9177
9346
|
<xsl:call-template name="refine_list_container_style"/>
|
9178
9347
|
|
9179
|
-
<fo:block-container margin-left="0mm">
|
9348
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
9180
9349
|
<fo:block>
|
9181
9350
|
<xsl:apply-templates select="." mode="list"/>
|
9182
9351
|
</fo:block>
|
@@ -9185,7 +9354,7 @@
|
|
9185
9354
|
</xsl:when>
|
9186
9355
|
<xsl:otherwise>
|
9187
9356
|
|
9188
|
-
<fo:block>
|
9357
|
+
<fo:block role="SKIP">
|
9189
9358
|
<xsl:apply-templates select="." mode="list"/>
|
9190
9359
|
</fo:block>
|
9191
9360
|
|
@@ -9281,7 +9450,7 @@
|
|
9281
9450
|
<xsl:call-template name="refine_list-item-style"/>
|
9282
9451
|
|
9283
9452
|
<fo:list-item-label end-indent="label-end()">
|
9284
|
-
<fo:block xsl:use-attribute-sets="list-item-label-style">
|
9453
|
+
<fo:block xsl:use-attribute-sets="list-item-label-style" role="SKIP">
|
9285
9454
|
|
9286
9455
|
<xsl:call-template name="refine_list-item-label-style"/>
|
9287
9456
|
|
@@ -9295,7 +9464,7 @@
|
|
9295
9464
|
</fo:block>
|
9296
9465
|
</fo:list-item-label>
|
9297
9466
|
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
9298
|
-
<fo:block>
|
9467
|
+
<fo:block role="SKIP">
|
9299
9468
|
|
9300
9469
|
<xsl:call-template name="refine_list-item-body-style"/>
|
9301
9470
|
|
@@ -9574,10 +9743,10 @@
|
|
9574
9743
|
<fo:table-body>
|
9575
9744
|
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
9576
9745
|
|
9577
|
-
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
9578
|
-
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
9579
|
-
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
9580
|
-
<fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
|
9746
|
+
<fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
|
9747
|
+
<fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
|
9748
|
+
<fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
|
9749
|
+
<fo:table-cell border="1pt solid black"><fo:block role="SKIP">Pages</fo:block></fo:table-cell>
|
9581
9750
|
</fo:table-row>
|
9582
9751
|
<xsl:apply-templates/>
|
9583
9752
|
</fo:table-body>
|
@@ -9592,7 +9761,7 @@
|
|
9592
9761
|
|
9593
9762
|
<xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
|
9594
9763
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
9595
|
-
<fo:block><xsl:apply-templates/></fo:block>
|
9764
|
+
<fo:block role="SKIP"><xsl:apply-templates/></fo:block>
|
9596
9765
|
</fo:table-cell>
|
9597
9766
|
</xsl:template>
|
9598
9767
|
<!-- ============ -->
|
@@ -9607,7 +9776,10 @@
|
|
9607
9776
|
<!-- Reference sections (Normative References and Bibliography) -->
|
9608
9777
|
<!-- ========================================================== -->
|
9609
9778
|
<xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
|
9610
|
-
<xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"
|
9779
|
+
<xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
|
9780
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
|
9781
|
+
|
9782
|
+
</xsl:template>
|
9611
9783
|
<!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
|
9612
9784
|
<xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
|
9613
9785
|
|
@@ -9654,6 +9826,7 @@
|
|
9654
9826
|
|
9655
9827
|
<!-- Bibliography (non-normative references) -->
|
9656
9828
|
<xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
|
9829
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
9657
9830
|
|
9658
9831
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
|
9659
9832
|
<xsl:call-template name="processBibitem"/>
|
@@ -9661,6 +9834,35 @@
|
|
9661
9834
|
|
9662
9835
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
9663
9836
|
|
9837
|
+
<xsl:template name="insertListItem_Bibitem">
|
9838
|
+
<xsl:choose>
|
9839
|
+
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
9840
|
+
<xsl:otherwise>
|
9841
|
+
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
9842
|
+
<fo:list-item-label end-indent="label-end()">
|
9843
|
+
<fo:block role="SKIP">
|
9844
|
+
<fo:inline role="SKIP">
|
9845
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
9846
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
9847
|
+
</xsl:apply-templates>
|
9848
|
+
</fo:inline>
|
9849
|
+
</fo:block>
|
9850
|
+
</fo:list-item-label>
|
9851
|
+
<fo:list-item-body start-indent="body-start()">
|
9852
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
|
9853
|
+
<xsl:call-template name="processBibitem">
|
9854
|
+
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
9855
|
+
</xsl:call-template>
|
9856
|
+
</fo:block>
|
9857
|
+
</fo:list-item-body>
|
9858
|
+
</fo:list-item>
|
9859
|
+
</xsl:otherwise>
|
9860
|
+
</xsl:choose>
|
9861
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
|
9862
|
+
<xsl:with-param name="skip">false</xsl:with-param>
|
9863
|
+
</xsl:apply-templates>
|
9864
|
+
</xsl:template>
|
9865
|
+
|
9664
9866
|
<xsl:template name="processBibitem">
|
9665
9867
|
<xsl:param name="biblio_tag_part">both</xsl:param>
|
9666
9868
|
|
@@ -9874,7 +10076,7 @@
|
|
9874
10076
|
<xsl:for-each select="*[local-name() = 'tab']">
|
9875
10077
|
<xsl:variable name="current_id" select="generate-id()"/>
|
9876
10078
|
<fo:table-cell>
|
9877
|
-
<fo:block line-height-shift-adjustment="disregard-shifts">
|
10079
|
+
<fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
|
9878
10080
|
<xsl:call-template name="insert_basic_link">
|
9879
10081
|
<xsl:with-param name="element">
|
9880
10082
|
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
@@ -9892,7 +10094,7 @@
|
|
9892
10094
|
</xsl:for-each>
|
9893
10095
|
<!-- last column - for page numbers -->
|
9894
10096
|
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
9895
|
-
<fo:block>
|
10097
|
+
<fo:block role="SKIP">
|
9896
10098
|
<xsl:call-template name="insert_basic_link">
|
9897
10099
|
<xsl:with-param name="element">
|
9898
10100
|
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
@@ -10001,9 +10203,9 @@
|
|
10001
10203
|
|
10002
10204
|
<xsl:call-template name="setBlockSpanAll"/>
|
10003
10205
|
|
10004
|
-
<fo:block-container xsl:use-attribute-sets="admonition-container-style">
|
10206
|
+
<fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
|
10005
10207
|
|
10006
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
10208
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
10007
10209
|
<fo:block>
|
10008
10210
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
10009
10211
|
</fo:block>
|