metanorma-mpfa 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/mpfa/basicdoc.rng +4 -11
- data/lib/asciidoctor/mpfa/isodoc.rng +13 -6
- data/lib/asciidoctor/mpfa/mpfd.rng +7 -0
- data/lib/isodoc/mpfa/mpfd.circular.xsl +166 -29
- data/lib/isodoc/mpfa/mpfd.compliance-standards-for-mpf-trustees.xsl +166 -29
- data/lib/isodoc/mpfa/mpfd.guidelines.xsl +166 -29
- data/lib/isodoc/mpfa/mpfd.standards.xsl +166 -29
- data/lib/isodoc/mpfa/mpfd.supervision-of-mpf-intermediaries.xsl +166 -29
- data/lib/isodoc/mpfa/xref.rb +1 -1
- data/lib/metanorma/mpfa/version.rb +1 -1
- data/metanorma-mpfd.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dcb7661da4f2fcbfb39f502092f2bf7ebb0600931d4af01b4afc47f6ba07cda
|
4
|
+
data.tar.gz: cc08933866ff4413dbe87680e7663eb68a17d31c9ae9c334d285a0255de738d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4dae79748378fc5be7e487e49bd398b3a0cf6fed4ffb8f1942adfb904c3e95ba8b73224fe66eb1505a753ab56b46c1fd00deafe20ec137e9b29f43be907e465
|
7
|
+
data.tar.gz: 99c560df54d0530e2a11f3ef9a2156aea1a1d10e06abd7183e174b40cc845b67cd4bb55c7835cc364328b83b211bafa7cf5eb0ca670fdc7bc297c7b6593ef488
|
@@ -158,17 +158,7 @@
|
|
158
158
|
<data type="ID"/>
|
159
159
|
</attribute>
|
160
160
|
<oneOrMore>
|
161
|
-
<
|
162
|
-
<ref name="formula"/>
|
163
|
-
<ref name="ul"/>
|
164
|
-
<ref name="ol"/>
|
165
|
-
<ref name="dl"/>
|
166
|
-
<ref name="quote"/>
|
167
|
-
<ref name="sourcecode"/>
|
168
|
-
<ref name="paragraph"/>
|
169
|
-
<ref name="table"/>
|
170
|
-
<ref name="figure"/>
|
171
|
-
</choice>
|
161
|
+
<ref name="paragraph"/>
|
172
162
|
</oneOrMore>
|
173
163
|
</element>
|
174
164
|
</define>
|
@@ -1028,6 +1018,9 @@
|
|
1028
1018
|
<value>alphabet_upper</value>
|
1029
1019
|
</choice>
|
1030
1020
|
</attribute>
|
1021
|
+
<optional>
|
1022
|
+
<attribute name="start"/>
|
1023
|
+
</optional>
|
1031
1024
|
<oneOrMore>
|
1032
1025
|
<ref name="li"/>
|
1033
1026
|
</oneOrMore>
|
@@ -64,6 +64,11 @@
|
|
64
64
|
</choice>
|
65
65
|
</attribute>
|
66
66
|
</optional>
|
67
|
+
<optional>
|
68
|
+
<attribute name="droploc">
|
69
|
+
<data type="boolean"/>
|
70
|
+
</attribute>
|
71
|
+
</optional>
|
67
72
|
<text/>
|
68
73
|
</element>
|
69
74
|
</define>
|
@@ -859,6 +864,13 @@
|
|
859
864
|
</define>
|
860
865
|
<define name="standard-document">
|
861
866
|
<element name="standard-document">
|
867
|
+
<attribute name="version"/>
|
868
|
+
<attribute name="type">
|
869
|
+
<choice>
|
870
|
+
<value>semantic</value>
|
871
|
+
<value>presentation</value>
|
872
|
+
</choice>
|
873
|
+
</attribute>
|
862
874
|
<ref name="bibdata"/>
|
863
875
|
<optional>
|
864
876
|
<ref name="boilerplate"/>
|
@@ -880,7 +892,7 @@
|
|
880
892
|
<oneOrMore>
|
881
893
|
<choice>
|
882
894
|
<ref name="content"/>
|
883
|
-
<ref name="
|
895
|
+
<ref name="abstract"/>
|
884
896
|
<ref name="foreword"/>
|
885
897
|
<ref name="introduction"/>
|
886
898
|
<ref name="acknowledgements"/>
|
@@ -1481,11 +1493,6 @@
|
|
1481
1493
|
</optional>
|
1482
1494
|
</element>
|
1483
1495
|
</define>
|
1484
|
-
<define name="preface_abstract">
|
1485
|
-
<element name="abstract">
|
1486
|
-
<ref name="Basic-Section"/>
|
1487
|
-
</element>
|
1488
|
-
</define>
|
1489
1496
|
<define name="term-clause">
|
1490
1497
|
<element name="clause">
|
1491
1498
|
<optional>
|
@@ -59,6 +59,13 @@
|
|
59
59
|
</define>
|
60
60
|
<define name="mpfd-standard">
|
61
61
|
<element name="mpfd-standard">
|
62
|
+
<attribute name="version"/>
|
63
|
+
<attribute name="type">
|
64
|
+
<choice>
|
65
|
+
<value>semantic</value>
|
66
|
+
<value>presentation</value>
|
67
|
+
</choice>
|
68
|
+
</attribute>
|
62
69
|
<ref name="bibdata"/>
|
63
70
|
<zeroOrMore>
|
64
71
|
<ref name="termdocsource"/>
|
@@ -96,6 +96,10 @@
|
|
96
96
|
|
97
97
|
<xsl:call-template name="addPDFUAmeta"/>
|
98
98
|
|
99
|
+
<xsl:call-template name="addBookmarks">
|
100
|
+
<xsl:with-param name="contents" select="$contents"/>
|
101
|
+
</xsl:call-template>
|
102
|
+
|
99
103
|
<fo:page-sequence master-reference="cover" force-page-count="no-force">
|
100
104
|
<fo:static-content flow-name="cover-header">
|
101
105
|
<fo:block-container height="100%">
|
@@ -171,7 +175,7 @@
|
|
171
175
|
</xsl:variable>
|
172
176
|
<fo:block font-size="14pt" margin-bottom="15.5pt"><xsl:value-of select="$title-toc"/></fo:block>
|
173
177
|
<fo:block line-height="115%">
|
174
|
-
<xsl:for-each select="xalan:nodeset($contents)//item">
|
178
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
175
179
|
<fo:block>
|
176
180
|
<xsl:if test="@level = 1">
|
177
181
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -193,8 +197,8 @@
|
|
193
197
|
</fo:list-item-label>
|
194
198
|
<fo:list-item-body start-indent="body-start()">
|
195
199
|
<fo:block text-align-last="justify">
|
196
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="
|
197
|
-
<xsl:apply-templates/>
|
200
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
201
|
+
<xsl:apply-templates select="title"/>
|
198
202
|
<fo:inline keep-together.within-line="always">
|
199
203
|
<fo:leader leader-pattern="dots"/>
|
200
204
|
<fo:page-number-citation ref-id="{@id}"/>
|
@@ -274,25 +278,34 @@
|
|
274
278
|
</xsl:variable>
|
275
279
|
|
276
280
|
<xsl:variable name="display">
|
277
|
-
<xsl:choose>
|
278
|
-
<xsl:when test="ancestor-or-self::mpfd:bibitem">false</xsl:when>
|
279
|
-
<xsl:when test="ancestor-or-self::mpfd:term">false</xsl:when>
|
281
|
+
<xsl:choose>
|
280
282
|
<xsl:when test="$level >= 3">false</xsl:when>
|
281
283
|
<xsl:otherwise>true</xsl:otherwise>
|
282
284
|
</xsl:choose>
|
283
285
|
</xsl:variable>
|
284
286
|
|
285
|
-
<xsl:
|
287
|
+
<xsl:variable name="skip">
|
288
|
+
<xsl:choose>
|
289
|
+
<xsl:when test="ancestor-or-self::mpfd:bibitem">true</xsl:when>
|
290
|
+
<xsl:when test="ancestor-or-self::mpfd:term">true</xsl:when>
|
291
|
+
<xsl:otherwise>false</xsl:otherwise>
|
292
|
+
</xsl:choose>
|
293
|
+
</xsl:variable>
|
294
|
+
|
295
|
+
<xsl:if test="$skip = 'false'">
|
286
296
|
|
287
297
|
<xsl:variable name="title">
|
288
298
|
<xsl:call-template name="getName"/>
|
289
299
|
</xsl:variable>
|
290
300
|
|
291
|
-
<item level="{$level}" section="{$section}" type="{$type}">
|
301
|
+
<item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
292
302
|
<xsl:call-template name="setId"/>
|
293
|
-
<
|
303
|
+
<title>
|
304
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
305
|
+
</title>
|
306
|
+
<xsl:apply-templates mode="contents"/>
|
294
307
|
</item>
|
295
|
-
|
308
|
+
|
296
309
|
</xsl:if>
|
297
310
|
|
298
311
|
</xsl:template>
|
@@ -783,6 +796,12 @@
|
|
783
796
|
|
784
797
|
</title-edition>
|
785
798
|
|
799
|
+
<title-edition lang="fr">
|
800
|
+
|
801
|
+
<xsl:text>Édition </xsl:text>
|
802
|
+
|
803
|
+
</title-edition>
|
804
|
+
|
786
805
|
|
787
806
|
<title-toc lang="en">
|
788
807
|
|
@@ -889,7 +908,9 @@
|
|
889
908
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
890
909
|
</xsl:otherwise>
|
891
910
|
</xsl:choose>
|
892
|
-
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="
|
911
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
912
|
+
|
913
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
893
914
|
|
894
915
|
<xsl:attribute name="color">blue</xsl:attribute>
|
895
916
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
@@ -2782,12 +2803,101 @@
|
|
2782
2803
|
|
2783
2804
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2784
2805
|
</fo:block>
|
2785
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
2806
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
2786
2807
|
<xsl:apply-templates mode="contents"/>
|
2787
2808
|
<xsl:text> </xsl:text>
|
2788
|
-
</xsl:template><xsl:template match="
|
2809
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
2810
|
+
<xsl:apply-templates mode="bookmarks"/>
|
2811
|
+
<xsl:text> </xsl:text>
|
2812
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
2789
2813
|
<xsl:value-of select="."/>
|
2790
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
2814
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
2815
|
+
<xsl:value-of select="."/>
|
2816
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
2817
|
+
<xsl:apply-templates mode="contents"/>
|
2818
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
2819
|
+
<xsl:apply-templates mode="bookmarks"/>
|
2820
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
2821
|
+
<xsl:apply-templates select="."/>
|
2822
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
2823
|
+
<xsl:apply-templates mode="bookmarks"/>
|
2824
|
+
</xsl:template><xsl:template name="addBookmarks">
|
2825
|
+
<xsl:param name="contents"/>
|
2826
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
2827
|
+
<fo:bookmark-tree>
|
2828
|
+
<xsl:choose>
|
2829
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
2830
|
+
<xsl:choose>
|
2831
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
2832
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
2833
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
2834
|
+
<fo:bookmark-title>
|
2835
|
+
<xsl:variable name="bookmark-title_">
|
2836
|
+
<xsl:choose>
|
2837
|
+
<xsl:when test="@lang = 'en'">
|
2838
|
+
|
2839
|
+
|
2840
|
+
</xsl:when>
|
2841
|
+
<xsl:when test="@lang = 'fr'">
|
2842
|
+
|
2843
|
+
|
2844
|
+
</xsl:when>
|
2845
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
2846
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
2847
|
+
</xsl:choose>
|
2848
|
+
</xsl:variable>
|
2849
|
+
<xsl:choose>
|
2850
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
2851
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
2852
|
+
</xsl:when>
|
2853
|
+
<xsl:otherwise>
|
2854
|
+
<xsl:choose>
|
2855
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
2856
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
2857
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
2858
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
2859
|
+
</xsl:choose>
|
2860
|
+
</xsl:otherwise>
|
2861
|
+
</xsl:choose>
|
2862
|
+
</fo:bookmark-title>
|
2863
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
2864
|
+
</fo:bookmark>
|
2865
|
+
|
2866
|
+
</xsl:for-each>
|
2867
|
+
</xsl:when>
|
2868
|
+
<xsl:otherwise>
|
2869
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
2870
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
2871
|
+
</xsl:for-each>
|
2872
|
+
</xsl:otherwise>
|
2873
|
+
</xsl:choose>
|
2874
|
+
</xsl:when>
|
2875
|
+
<xsl:otherwise>
|
2876
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
2877
|
+
</xsl:otherwise>
|
2878
|
+
</xsl:choose>
|
2879
|
+
|
2880
|
+
|
2881
|
+
|
2882
|
+
|
2883
|
+
|
2884
|
+
|
2885
|
+
|
2886
|
+
|
2887
|
+
</fo:bookmark-tree>
|
2888
|
+
</xsl:if>
|
2889
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
2890
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
2891
|
+
<fo:bookmark-title>
|
2892
|
+
<xsl:if test="@section != ''">
|
2893
|
+
<xsl:value-of select="@section"/>
|
2894
|
+
<xsl:text> </xsl:text>
|
2895
|
+
</xsl:if>
|
2896
|
+
<xsl:value-of select="normalize-space(title)"/>
|
2897
|
+
</fo:bookmark-title>
|
2898
|
+
<xsl:apply-templates mode="bookmark"/>
|
2899
|
+
</fo:bookmark>
|
2900
|
+
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
2791
2901
|
<xsl:if test="normalize-space() != ''">
|
2792
2902
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2793
2903
|
|
@@ -2845,7 +2955,7 @@
|
|
2845
2955
|
<xsl:apply-templates/>
|
2846
2956
|
</xsl:otherwise>
|
2847
2957
|
</xsl:choose>
|
2848
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
2958
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
2849
2959
|
<xsl:text> </xsl:text>
|
2850
2960
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
2851
2961
|
<xsl:copy>
|
@@ -3441,20 +3551,29 @@
|
|
3441
3551
|
<!-- 0xA0 to space replacement -->
|
3442
3552
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3443
3553
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
3444
|
-
<
|
3445
|
-
<xsl:
|
3446
|
-
<
|
3447
|
-
<xsl:
|
3448
|
-
<xsl:
|
3449
|
-
|
3450
|
-
|
3451
|
-
|
3452
|
-
|
3453
|
-
|
3454
|
-
|
3455
|
-
|
3456
|
-
|
3457
|
-
|
3554
|
+
<xsl:choose>
|
3555
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
3556
|
+
<fo:block-container>
|
3557
|
+
<xsl:attribute name="margin-left">
|
3558
|
+
<xsl:choose>
|
3559
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3560
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3561
|
+
</xsl:choose>
|
3562
|
+
</xsl:attribute>
|
3563
|
+
|
3564
|
+
<fo:block-container margin-left="0mm">
|
3565
|
+
<fo:block>
|
3566
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3567
|
+
</fo:block>
|
3568
|
+
</fo:block-container>
|
3569
|
+
</fo:block-container>
|
3570
|
+
</xsl:when>
|
3571
|
+
<xsl:otherwise>
|
3572
|
+
<fo:block>
|
3573
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3574
|
+
</fo:block>
|
3575
|
+
</xsl:otherwise>
|
3576
|
+
</xsl:choose>
|
3458
3577
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3459
3578
|
<!-- <row>
|
3460
3579
|
<date>05-07-2013</date>
|
@@ -3748,6 +3867,7 @@
|
|
3748
3867
|
|
3749
3868
|
<xsl:value-of select="document('')//*/namespace::mpfd"/>
|
3750
3869
|
|
3870
|
+
|
3751
3871
|
</xsl:variable>
|
3752
3872
|
<xsl:if test="$documentNS != $XSLNS">
|
3753
3873
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3773,4 +3893,21 @@
|
|
3773
3893
|
</xsl:otherwise>
|
3774
3894
|
</xsl:choose>
|
3775
3895
|
</xsl:attribute>
|
3896
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
3897
|
+
<xsl:param name="text"/>
|
3898
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
3899
|
+
<xsl:if test="string-length($text) > 0">
|
3900
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
3901
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
3902
|
+
<xsl:if test="$char = '®'">
|
3903
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
3904
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
3905
|
+
</xsl:if>
|
3906
|
+
<xsl:value-of select="$char"/>
|
3907
|
+
</fo:inline>
|
3908
|
+
<xsl:call-template name="add-letter-spacing">
|
3909
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
3910
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
3911
|
+
</xsl:call-template>
|
3912
|
+
</xsl:if>
|
3776
3913
|
</xsl:template></xsl:stylesheet>
|
@@ -96,6 +96,10 @@
|
|
96
96
|
|
97
97
|
<xsl:call-template name="addPDFUAmeta"/>
|
98
98
|
|
99
|
+
<xsl:call-template name="addBookmarks">
|
100
|
+
<xsl:with-param name="contents" select="$contents"/>
|
101
|
+
</xsl:call-template>
|
102
|
+
|
99
103
|
<fo:page-sequence master-reference="cover" force-page-count="no-force">
|
100
104
|
<fo:static-content flow-name="cover-header">
|
101
105
|
<fo:block-container height="100%">
|
@@ -171,7 +175,7 @@
|
|
171
175
|
</xsl:variable>
|
172
176
|
<fo:block font-size="14pt" margin-bottom="15.5pt"><xsl:value-of select="$title-toc"/></fo:block>
|
173
177
|
<fo:block line-height="115%">
|
174
|
-
<xsl:for-each select="xalan:nodeset($contents)//item">
|
178
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
175
179
|
<fo:block>
|
176
180
|
<xsl:if test="@level = 1">
|
177
181
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -193,8 +197,8 @@
|
|
193
197
|
</fo:list-item-label>
|
194
198
|
<fo:list-item-body start-indent="body-start()">
|
195
199
|
<fo:block text-align-last="justify">
|
196
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="
|
197
|
-
<xsl:apply-templates/>
|
200
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
201
|
+
<xsl:apply-templates select="title"/>
|
198
202
|
<fo:inline keep-together.within-line="always">
|
199
203
|
<fo:leader leader-pattern="dots"/>
|
200
204
|
<fo:page-number-citation ref-id="{@id}"/>
|
@@ -274,25 +278,34 @@
|
|
274
278
|
</xsl:variable>
|
275
279
|
|
276
280
|
<xsl:variable name="display">
|
277
|
-
<xsl:choose>
|
278
|
-
<xsl:when test="ancestor-or-self::mpfd:bibitem">false</xsl:when>
|
279
|
-
<xsl:when test="ancestor-or-self::mpfd:term">false</xsl:when>
|
281
|
+
<xsl:choose>
|
280
282
|
<xsl:when test="$level >= 3">false</xsl:when>
|
281
283
|
<xsl:otherwise>true</xsl:otherwise>
|
282
284
|
</xsl:choose>
|
283
285
|
</xsl:variable>
|
284
286
|
|
285
|
-
<xsl:
|
287
|
+
<xsl:variable name="skip">
|
288
|
+
<xsl:choose>
|
289
|
+
<xsl:when test="ancestor-or-self::mpfd:bibitem">true</xsl:when>
|
290
|
+
<xsl:when test="ancestor-or-self::mpfd:term">true</xsl:when>
|
291
|
+
<xsl:otherwise>false</xsl:otherwise>
|
292
|
+
</xsl:choose>
|
293
|
+
</xsl:variable>
|
294
|
+
|
295
|
+
<xsl:if test="$skip = 'false'">
|
286
296
|
|
287
297
|
<xsl:variable name="title">
|
288
298
|
<xsl:call-template name="getName"/>
|
289
299
|
</xsl:variable>
|
290
300
|
|
291
|
-
<item level="{$level}" section="{$section}" type="{$type}">
|
301
|
+
<item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
292
302
|
<xsl:call-template name="setId"/>
|
293
|
-
<
|
303
|
+
<title>
|
304
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
305
|
+
</title>
|
306
|
+
<xsl:apply-templates mode="contents"/>
|
294
307
|
</item>
|
295
|
-
|
308
|
+
|
296
309
|
</xsl:if>
|
297
310
|
|
298
311
|
</xsl:template>
|
@@ -783,6 +796,12 @@
|
|
783
796
|
|
784
797
|
</title-edition>
|
785
798
|
|
799
|
+
<title-edition lang="fr">
|
800
|
+
|
801
|
+
<xsl:text>Édition </xsl:text>
|
802
|
+
|
803
|
+
</title-edition>
|
804
|
+
|
786
805
|
|
787
806
|
<title-toc lang="en">
|
788
807
|
|
@@ -889,7 +908,9 @@
|
|
889
908
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
890
909
|
</xsl:otherwise>
|
891
910
|
</xsl:choose>
|
892
|
-
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="
|
911
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
912
|
+
|
913
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
893
914
|
|
894
915
|
<xsl:attribute name="color">blue</xsl:attribute>
|
895
916
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
@@ -2782,12 +2803,101 @@
|
|
2782
2803
|
|
2783
2804
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2784
2805
|
</fo:block>
|
2785
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
2806
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
2786
2807
|
<xsl:apply-templates mode="contents"/>
|
2787
2808
|
<xsl:text> </xsl:text>
|
2788
|
-
</xsl:template><xsl:template match="
|
2809
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
2810
|
+
<xsl:apply-templates mode="bookmarks"/>
|
2811
|
+
<xsl:text> </xsl:text>
|
2812
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
2789
2813
|
<xsl:value-of select="."/>
|
2790
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
2814
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
2815
|
+
<xsl:value-of select="."/>
|
2816
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
2817
|
+
<xsl:apply-templates mode="contents"/>
|
2818
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
2819
|
+
<xsl:apply-templates mode="bookmarks"/>
|
2820
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
2821
|
+
<xsl:apply-templates select="."/>
|
2822
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
2823
|
+
<xsl:apply-templates mode="bookmarks"/>
|
2824
|
+
</xsl:template><xsl:template name="addBookmarks">
|
2825
|
+
<xsl:param name="contents"/>
|
2826
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
2827
|
+
<fo:bookmark-tree>
|
2828
|
+
<xsl:choose>
|
2829
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
2830
|
+
<xsl:choose>
|
2831
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
2832
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
2833
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
2834
|
+
<fo:bookmark-title>
|
2835
|
+
<xsl:variable name="bookmark-title_">
|
2836
|
+
<xsl:choose>
|
2837
|
+
<xsl:when test="@lang = 'en'">
|
2838
|
+
|
2839
|
+
|
2840
|
+
</xsl:when>
|
2841
|
+
<xsl:when test="@lang = 'fr'">
|
2842
|
+
|
2843
|
+
|
2844
|
+
</xsl:when>
|
2845
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
2846
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
2847
|
+
</xsl:choose>
|
2848
|
+
</xsl:variable>
|
2849
|
+
<xsl:choose>
|
2850
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
2851
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
2852
|
+
</xsl:when>
|
2853
|
+
<xsl:otherwise>
|
2854
|
+
<xsl:choose>
|
2855
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
2856
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
2857
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
2858
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
2859
|
+
</xsl:choose>
|
2860
|
+
</xsl:otherwise>
|
2861
|
+
</xsl:choose>
|
2862
|
+
</fo:bookmark-title>
|
2863
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
2864
|
+
</fo:bookmark>
|
2865
|
+
|
2866
|
+
</xsl:for-each>
|
2867
|
+
</xsl:when>
|
2868
|
+
<xsl:otherwise>
|
2869
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
2870
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
2871
|
+
</xsl:for-each>
|
2872
|
+
</xsl:otherwise>
|
2873
|
+
</xsl:choose>
|
2874
|
+
</xsl:when>
|
2875
|
+
<xsl:otherwise>
|
2876
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
2877
|
+
</xsl:otherwise>
|
2878
|
+
</xsl:choose>
|
2879
|
+
|
2880
|
+
|
2881
|
+
|
2882
|
+
|
2883
|
+
|
2884
|
+
|
2885
|
+
|
2886
|
+
|
2887
|
+
</fo:bookmark-tree>
|
2888
|
+
</xsl:if>
|
2889
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
2890
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
2891
|
+
<fo:bookmark-title>
|
2892
|
+
<xsl:if test="@section != ''">
|
2893
|
+
<xsl:value-of select="@section"/>
|
2894
|
+
<xsl:text> </xsl:text>
|
2895
|
+
</xsl:if>
|
2896
|
+
<xsl:value-of select="normalize-space(title)"/>
|
2897
|
+
</fo:bookmark-title>
|
2898
|
+
<xsl:apply-templates mode="bookmark"/>
|
2899
|
+
</fo:bookmark>
|
2900
|
+
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
2791
2901
|
<xsl:if test="normalize-space() != ''">
|
2792
2902
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2793
2903
|
|
@@ -2845,7 +2955,7 @@
|
|
2845
2955
|
<xsl:apply-templates/>
|
2846
2956
|
</xsl:otherwise>
|
2847
2957
|
</xsl:choose>
|
2848
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
2958
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
2849
2959
|
<xsl:text> </xsl:text>
|
2850
2960
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
2851
2961
|
<xsl:copy>
|
@@ -3441,20 +3551,29 @@
|
|
3441
3551
|
<!-- 0xA0 to space replacement -->
|
3442
3552
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3443
3553
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
3444
|
-
<
|
3445
|
-
<xsl:
|
3446
|
-
<
|
3447
|
-
<xsl:
|
3448
|
-
<xsl:
|
3449
|
-
|
3450
|
-
|
3451
|
-
|
3452
|
-
|
3453
|
-
|
3454
|
-
|
3455
|
-
|
3456
|
-
|
3457
|
-
|
3554
|
+
<xsl:choose>
|
3555
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
3556
|
+
<fo:block-container>
|
3557
|
+
<xsl:attribute name="margin-left">
|
3558
|
+
<xsl:choose>
|
3559
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3560
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3561
|
+
</xsl:choose>
|
3562
|
+
</xsl:attribute>
|
3563
|
+
|
3564
|
+
<fo:block-container margin-left="0mm">
|
3565
|
+
<fo:block>
|
3566
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3567
|
+
</fo:block>
|
3568
|
+
</fo:block-container>
|
3569
|
+
</fo:block-container>
|
3570
|
+
</xsl:when>
|
3571
|
+
<xsl:otherwise>
|
3572
|
+
<fo:block>
|
3573
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3574
|
+
</fo:block>
|
3575
|
+
</xsl:otherwise>
|
3576
|
+
</xsl:choose>
|
3458
3577
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3459
3578
|
<!-- <row>
|
3460
3579
|
<date>05-07-2013</date>
|
@@ -3748,6 +3867,7 @@
|
|
3748
3867
|
|
3749
3868
|
<xsl:value-of select="document('')//*/namespace::mpfd"/>
|
3750
3869
|
|
3870
|
+
|
3751
3871
|
</xsl:variable>
|
3752
3872
|
<xsl:if test="$documentNS != $XSLNS">
|
3753
3873
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3773,4 +3893,21 @@
|
|
3773
3893
|
</xsl:otherwise>
|
3774
3894
|
</xsl:choose>
|
3775
3895
|
</xsl:attribute>
|
3896
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
3897
|
+
<xsl:param name="text"/>
|
3898
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
3899
|
+
<xsl:if test="string-length($text) > 0">
|
3900
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
3901
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
3902
|
+
<xsl:if test="$char = '®'">
|
3903
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
3904
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
3905
|
+
</xsl:if>
|
3906
|
+
<xsl:value-of select="$char"/>
|
3907
|
+
</fo:inline>
|
3908
|
+
<xsl:call-template name="add-letter-spacing">
|
3909
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
3910
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
3911
|
+
</xsl:call-template>
|
3912
|
+
</xsl:if>
|
3776
3913
|
</xsl:template></xsl:stylesheet>
|