metanorma-mpfa 0.5.10 → 0.5.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +9 -29
- data/.rubocop.yml +1 -4
- data/lib/asciidoctor/mpfa/basicdoc.rng +5 -3
- data/lib/asciidoctor/mpfa/isodoc.rng +134 -5
- data/lib/asciidoctor/mpfa/mpfd.rng +6 -0
- data/lib/isodoc/mpfa/base_convert.rb +1 -1
- data/lib/isodoc/mpfa/html_convert.rb +2 -2
- data/lib/isodoc/mpfa/{mpfd.circular.xsl → mpfa.circular.xsl} +575 -248
- data/lib/isodoc/mpfa/{mpfd.compliance-standards-for-mpf-trustees.xsl → mpfa.compliance-standards-for-mpf-trustees.xsl} +575 -248
- data/lib/isodoc/mpfa/{mpfd.guidelines.xsl → mpfa.guidelines.xsl} +575 -248
- data/lib/isodoc/mpfa/{mpfd.standards.xsl → mpfa.standards.xsl} +575 -248
- data/lib/isodoc/mpfa/mpfa.supervision-of-mpf-intermediaries.xsl +4687 -0
- data/lib/isodoc/mpfa/pdf_convert.rb +1 -1
- data/lib/isodoc/mpfa/word_convert.rb +2 -2
- data/lib/metanorma/mpfa/processor.rb +1 -0
- data/lib/metanorma/mpfa/version.rb +1 -1
- data/metanorma-mpfd.gemspec +3 -3
- metadata +14 -14
- data/lib/isodoc/mpfa/mpfd.supervision-of-mpf-intermediaries.xsl +0 -4360
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dde9f4dfe2920ea20fed93f7e94deec37c935fd4baee8437e20ded5dec29f2e1
|
4
|
+
data.tar.gz: 60f73d946089c225ac92a3491dbb7b52e0e9986c976848453fb0db493681c916
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cd6bda2272b63bf17dbf4847f7176d9764eb108e5c662a5abcc5a14fbb97e45b484b03c6f6e2ef911f491668fa75d0d3131a7c36847253a71577468195c94eb
|
7
|
+
data.tar.gz: 054b45fa03d082a77bdbdab882e0f175404a957489fc9a51ecc420d551907a93843d2a9b8c4f65c5ed1e79611ef3ddd34ef995dc3acaeb8c5dbb3b63b27450ca
|
data/.github/workflows/rake.yml
CHANGED
@@ -4,7 +4,7 @@ name: rake
|
|
4
4
|
|
5
5
|
on:
|
6
6
|
push:
|
7
|
-
branches: [ master, main
|
7
|
+
branches: [ master, main ]
|
8
8
|
tags: [ v* ]
|
9
9
|
pull_request:
|
10
10
|
|
@@ -16,47 +16,27 @@ jobs:
|
|
16
16
|
strategy:
|
17
17
|
fail-fast: false
|
18
18
|
matrix:
|
19
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
19
|
+
ruby: [ '2.7', '2.6', '2.5', '2.4' ]
|
20
20
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
21
|
experimental: [ false ]
|
22
22
|
include:
|
23
|
-
- ruby: '
|
23
|
+
- ruby: '3.0'
|
24
24
|
os: 'ubuntu-latest'
|
25
25
|
experimental: true
|
26
|
-
- ruby: '
|
26
|
+
- ruby: '3.0'
|
27
27
|
os: 'windows-latest'
|
28
28
|
experimental: true
|
29
|
-
- ruby: '
|
29
|
+
- ruby: '3.0'
|
30
30
|
os: 'macos-latest'
|
31
31
|
experimental: true
|
32
32
|
steps:
|
33
|
-
- uses: actions/checkout@
|
33
|
+
- uses: actions/checkout@v2
|
34
|
+
with:
|
35
|
+
submodules: true
|
34
36
|
|
35
37
|
- uses: ruby/setup-ruby@v1
|
36
38
|
with:
|
37
39
|
ruby-version: ${{ matrix.ruby }}
|
38
|
-
|
39
|
-
- uses: actions/cache@v2
|
40
|
-
with:
|
41
|
-
path: vendor/bundle
|
42
|
-
key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
|
43
|
-
restore-keys: bundle-${{ matrix.os }}-${{ matrix.ruby }}
|
44
|
-
|
45
|
-
- run: bundle config set path 'vendor/bundle'
|
46
|
-
|
47
|
-
- run: bundle install --jobs 4 --retry 3
|
40
|
+
bundler-cache: true
|
48
41
|
|
49
42
|
- run: bundle exec rake
|
50
|
-
|
51
|
-
tests-passed:
|
52
|
-
needs: rake
|
53
|
-
runs-on: ubuntu-latest
|
54
|
-
steps:
|
55
|
-
- name: Trigger tests passed event
|
56
|
-
uses: Sibz/github-status-action@v1
|
57
|
-
with:
|
58
|
-
authToken: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
59
|
-
context: 'tests-passed-successfully'
|
60
|
-
description: 'Tests passed successfully'
|
61
|
-
state: 'success'
|
62
|
-
sha: ${{ github.event.pull_request.head.sha || github.sha }}
|
data/.rubocop.yml
CHANGED
@@ -729,9 +729,11 @@
|
|
729
729
|
</define>
|
730
730
|
<define name="index">
|
731
731
|
<element name="index">
|
732
|
-
<
|
733
|
-
<
|
734
|
-
|
732
|
+
<optional>
|
733
|
+
<attribute name="to">
|
734
|
+
<data type="IDREF"/>
|
735
|
+
</attribute>
|
736
|
+
</optional>
|
735
737
|
<element name="primary">
|
736
738
|
<oneOrMore>
|
737
739
|
<ref name="PureTextElement"/>
|
@@ -102,7 +102,7 @@
|
|
102
102
|
</attribute>
|
103
103
|
</optional>
|
104
104
|
<oneOrMore>
|
105
|
-
<ref name="
|
105
|
+
<ref name="ul_li"/>
|
106
106
|
</oneOrMore>
|
107
107
|
<zeroOrMore>
|
108
108
|
<ref name="note"/>
|
@@ -253,6 +253,9 @@
|
|
253
253
|
<data type="boolean"/>
|
254
254
|
</attribute>
|
255
255
|
</optional>
|
256
|
+
<optional>
|
257
|
+
<attribute name="width"/>
|
258
|
+
</optional>
|
256
259
|
<optional>
|
257
260
|
<ref name="colgroup"/>
|
258
261
|
</optional>
|
@@ -786,6 +789,9 @@
|
|
786
789
|
<attribute name="width"/>
|
787
790
|
</element>
|
788
791
|
</define>
|
792
|
+
<define name="BibItemType" combine="choice">
|
793
|
+
<value>internal</value>
|
794
|
+
</define>
|
789
795
|
<define name="TextElement" combine="choice">
|
790
796
|
<ref name="concept"/>
|
791
797
|
</define>
|
@@ -806,6 +812,8 @@
|
|
806
812
|
<ref name="requirement"/>
|
807
813
|
<ref name="recommendation"/>
|
808
814
|
<ref name="permission"/>
|
815
|
+
<ref name="imagemap"/>
|
816
|
+
<ref name="svgmap"/>
|
809
817
|
</choice>
|
810
818
|
</define>
|
811
819
|
<define name="bibliography">
|
@@ -836,6 +844,9 @@
|
|
836
844
|
<data type="boolean"/>
|
837
845
|
</attribute>
|
838
846
|
</optional>
|
847
|
+
<optional>
|
848
|
+
<attribute name="number"/>
|
849
|
+
</optional>
|
839
850
|
<optional>
|
840
851
|
<attribute name="obligation">
|
841
852
|
<choice>
|
@@ -891,9 +902,11 @@
|
|
891
902
|
<element name="code">
|
892
903
|
<text/>
|
893
904
|
</element>
|
894
|
-
<
|
895
|
-
<text
|
896
|
-
|
905
|
+
<optional>
|
906
|
+
<element name="text">
|
907
|
+
<text/>
|
908
|
+
</element>
|
909
|
+
</optional>
|
897
910
|
</element>
|
898
911
|
</define>
|
899
912
|
<define name="standard-document">
|
@@ -906,6 +919,9 @@
|
|
906
919
|
</choice>
|
907
920
|
</attribute>
|
908
921
|
<ref name="bibdata"/>
|
922
|
+
<optional>
|
923
|
+
<ref name="misccontainer"/>
|
924
|
+
</optional>
|
909
925
|
<optional>
|
910
926
|
<ref name="boilerplate"/>
|
911
927
|
</optional>
|
@@ -916,11 +932,21 @@
|
|
916
932
|
<zeroOrMore>
|
917
933
|
<ref name="annex"/>
|
918
934
|
</zeroOrMore>
|
935
|
+
<optional>
|
936
|
+
<ref name="bibliography"/>
|
937
|
+
</optional>
|
919
938
|
<zeroOrMore>
|
920
|
-
<ref name="
|
939
|
+
<ref name="indexsect"/>
|
921
940
|
</zeroOrMore>
|
922
941
|
</element>
|
923
942
|
</define>
|
943
|
+
<define name="misccontainer">
|
944
|
+
<element name="misc-container">
|
945
|
+
<oneOrMore>
|
946
|
+
<ref name="AnyElement"/>
|
947
|
+
</oneOrMore>
|
948
|
+
</element>
|
949
|
+
</define>
|
924
950
|
<define name="preface">
|
925
951
|
<element name="preface">
|
926
952
|
<oneOrMore>
|
@@ -944,6 +970,11 @@
|
|
944
970
|
<ref name="Content-Section"/>
|
945
971
|
</element>
|
946
972
|
</define>
|
973
|
+
<define name="indexsect">
|
974
|
+
<element name="indexsect">
|
975
|
+
<ref name="Content-Section"/>
|
976
|
+
</element>
|
977
|
+
</define>
|
947
978
|
<define name="boilerplate">
|
948
979
|
<element name="boilerplate">
|
949
980
|
<optional>
|
@@ -1063,6 +1094,9 @@
|
|
1063
1094
|
</choice>
|
1064
1095
|
</attribute>
|
1065
1096
|
</optional>
|
1097
|
+
<optional>
|
1098
|
+
<attribute name="number"/>
|
1099
|
+
</optional>
|
1066
1100
|
<optional>
|
1067
1101
|
<attribute name="type"/>
|
1068
1102
|
</optional>
|
@@ -1116,6 +1150,9 @@
|
|
1116
1150
|
<optional>
|
1117
1151
|
<attribute name="type"/>
|
1118
1152
|
</optional>
|
1153
|
+
<optional>
|
1154
|
+
<attribute name="number"/>
|
1155
|
+
</optional>
|
1119
1156
|
<optional>
|
1120
1157
|
<ref name="section-title"/>
|
1121
1158
|
</optional>
|
@@ -1218,6 +1255,9 @@
|
|
1218
1255
|
<optional>
|
1219
1256
|
<attribute name="type"/>
|
1220
1257
|
</optional>
|
1258
|
+
<optional>
|
1259
|
+
<attribute name="number"/>
|
1260
|
+
</optional>
|
1221
1261
|
<optional>
|
1222
1262
|
<attribute name="obligation">
|
1223
1263
|
<choice>
|
@@ -1546,6 +1586,7 @@
|
|
1546
1586
|
<value>add</value>
|
1547
1587
|
<value>modify</value>
|
1548
1588
|
<value>delete</value>
|
1589
|
+
<value>replace</value>
|
1549
1590
|
</choice>
|
1550
1591
|
</attribute>
|
1551
1592
|
<optional>
|
@@ -1576,6 +1617,11 @@
|
|
1576
1617
|
</optional>
|
1577
1618
|
<optional>
|
1578
1619
|
<element name="newcontent">
|
1620
|
+
<optional>
|
1621
|
+
<attribute name="id">
|
1622
|
+
<data type="ID"/>
|
1623
|
+
</attribute>
|
1624
|
+
</optional>
|
1579
1625
|
<zeroOrMore>
|
1580
1626
|
<ref name="BasicBlock"/>
|
1581
1627
|
</zeroOrMore>
|
@@ -1609,4 +1655,87 @@
|
|
1609
1655
|
<text/>
|
1610
1656
|
</element>
|
1611
1657
|
</define>
|
1658
|
+
<define name="imagemap">
|
1659
|
+
<element name="imagemap">
|
1660
|
+
<ref name="figure"/>
|
1661
|
+
<zeroOrMore>
|
1662
|
+
<element name="area">
|
1663
|
+
<attribute name="type">
|
1664
|
+
<choice>
|
1665
|
+
<value>rect</value>
|
1666
|
+
<value>circle</value>
|
1667
|
+
<value>ellipse</value>
|
1668
|
+
<value>poly</value>
|
1669
|
+
</choice>
|
1670
|
+
</attribute>
|
1671
|
+
<choice>
|
1672
|
+
<ref name="xref"/>
|
1673
|
+
<ref name="hyperlink"/>
|
1674
|
+
<ref name="eref"/>
|
1675
|
+
</choice>
|
1676
|
+
<oneOrMore>
|
1677
|
+
<element name="coords">
|
1678
|
+
<attribute name="x">
|
1679
|
+
<data type="float"/>
|
1680
|
+
</attribute>
|
1681
|
+
<attribute name="y">
|
1682
|
+
<data type="float"/>
|
1683
|
+
</attribute>
|
1684
|
+
</element>
|
1685
|
+
</oneOrMore>
|
1686
|
+
<optional>
|
1687
|
+
<element name="radius">
|
1688
|
+
<attribute name="x">
|
1689
|
+
<data type="float"/>
|
1690
|
+
</attribute>
|
1691
|
+
<optional>
|
1692
|
+
<attribute name="y">
|
1693
|
+
<data type="float"/>
|
1694
|
+
</attribute>
|
1695
|
+
</optional>
|
1696
|
+
</element>
|
1697
|
+
</optional>
|
1698
|
+
</element>
|
1699
|
+
</zeroOrMore>
|
1700
|
+
</element>
|
1701
|
+
</define>
|
1702
|
+
<define name="svgmap">
|
1703
|
+
<element name="svgmap">
|
1704
|
+
<ref name="figure"/>
|
1705
|
+
<zeroOrMore>
|
1706
|
+
<element name="target">
|
1707
|
+
<attribute name="href">
|
1708
|
+
<data type="anyURI"/>
|
1709
|
+
</attribute>
|
1710
|
+
<choice>
|
1711
|
+
<ref name="xref"/>
|
1712
|
+
<ref name="hyperlink"/>
|
1713
|
+
<ref name="eref"/>
|
1714
|
+
</choice>
|
1715
|
+
</element>
|
1716
|
+
</zeroOrMore>
|
1717
|
+
</element>
|
1718
|
+
</define>
|
1719
|
+
<define name="ul_li">
|
1720
|
+
<element name="li">
|
1721
|
+
<optional>
|
1722
|
+
<attribute name="id">
|
1723
|
+
<data type="ID"/>
|
1724
|
+
</attribute>
|
1725
|
+
</optional>
|
1726
|
+
<optional>
|
1727
|
+
<attribute name="uncheckedcheckbox">
|
1728
|
+
<data type="boolean"/>
|
1729
|
+
</attribute>
|
1730
|
+
</optional>
|
1731
|
+
<optional>
|
1732
|
+
<attribute name="checkedcheckbox">
|
1733
|
+
<data type="boolean"/>
|
1734
|
+
</attribute>
|
1735
|
+
</optional>
|
1736
|
+
<oneOrMore>
|
1737
|
+
<ref name="BasicBlock"/>
|
1738
|
+
</oneOrMore>
|
1739
|
+
</element>
|
1740
|
+
</define>
|
1612
1741
|
</grammar>
|
@@ -70,6 +70,9 @@
|
|
70
70
|
<zeroOrMore>
|
71
71
|
<ref name="termdocsource"/>
|
72
72
|
</zeroOrMore>
|
73
|
+
<optional>
|
74
|
+
<ref name="misccontainer"/>
|
75
|
+
</optional>
|
73
76
|
<optional>
|
74
77
|
<ref name="boilerplate"/>
|
75
78
|
</optional>
|
@@ -81,6 +84,9 @@
|
|
81
84
|
<ref name="annex"/>
|
82
85
|
</zeroOrMore>
|
83
86
|
<ref name="bibliography"/>
|
87
|
+
<zeroOrMore>
|
88
|
+
<ref name="indexsect"/>
|
89
|
+
</zeroOrMore>
|
84
90
|
</element>
|
85
91
|
</define>
|
86
92
|
</grammar>
|
@@ -18,8 +18,8 @@ module IsoDoc
|
|
18
18
|
|
19
19
|
def default_fonts(options)
|
20
20
|
{
|
21
|
-
bodyfont: (options[:script] == "Hans" ? '"
|
22
|
-
headerfont: (options[:script] == "Hans" ? '"
|
21
|
+
bodyfont: (options[:script] == "Hans" ? '"Source Han Sans",serif' : '"Titillium Web",sans-serif'),
|
22
|
+
headerfont: (options[:script] == "Hans" ? '"Source Han Sans",sans-serif' : '"Titillium Web",sans-serif'),
|
23
23
|
monospacefont: '"Space Mono",monospace',
|
24
24
|
normalfontsize: "15px",
|
25
25
|
footnotefontsize: "0.9em",
|
@@ -3,6 +3,7 @@
|
|
3
3
|
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
5
5
|
<xsl:param name="svg_images"/>
|
6
|
+
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
6
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
7
8
|
|
8
9
|
<xsl:key name="kfn" match="mpfd:p/mpfd:fn" use="@reference"/>
|
@@ -94,7 +95,9 @@
|
|
94
95
|
|
95
96
|
</fo:layout-master-set>
|
96
97
|
|
97
|
-
<
|
98
|
+
<fo:declarations>
|
99
|
+
<xsl:call-template name="addPDFUAmeta"/>
|
100
|
+
</fo:declarations>
|
98
101
|
|
99
102
|
<xsl:call-template name="addBookmarks">
|
100
103
|
<xsl:with-param name="contents" select="$contents"/>
|
@@ -1039,6 +1042,7 @@
|
|
1039
1042
|
|
1040
1043
|
|
1041
1044
|
|
1045
|
+
|
1042
1046
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1043
1047
|
|
1044
1048
|
|
@@ -1146,6 +1150,7 @@
|
|
1146
1150
|
|
1147
1151
|
|
1148
1152
|
|
1153
|
+
|
1149
1154
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1150
1155
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
1151
1156
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
@@ -1278,197 +1283,236 @@
|
|
1278
1283
|
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1279
1284
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1280
1285
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1281
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
1286
|
+
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1282
1287
|
|
1283
|
-
<xsl:variable name="
|
1284
|
-
<xsl:call-template name="getSimpleTable"/>
|
1285
|
-
</xsl:variable>
|
1288
|
+
<xsl:variable name="table">
|
1286
1289
|
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
1292
|
-
<fo:block> </fo:block>
|
1293
|
-
</xsl:if> -->
|
1294
|
-
|
1295
|
-
<!-- $namespace = 'iso' or -->
|
1296
|
-
|
1297
|
-
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
<xsl:call-template name="fn_name_display"/>
|
1290
|
+
<xsl:variable name="simple-table">
|
1291
|
+
<xsl:call-template name="getSimpleTable"/>
|
1292
|
+
</xsl:variable>
|
1302
1293
|
|
1303
1294
|
|
1304
|
-
|
1305
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1306
|
-
|
1307
|
-
<!-- <xsl:variable name="cols-count">
|
1308
|
-
<xsl:choose>
|
1309
|
-
<xsl:when test="*[local-name()='thead']">
|
1310
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1311
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1312
|
-
</xsl:call-template>
|
1313
|
-
</xsl:when>
|
1314
|
-
<xsl:otherwise>
|
1315
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1316
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1317
|
-
</xsl:call-template>
|
1318
|
-
</xsl:otherwise>
|
1319
|
-
</xsl:choose>
|
1320
|
-
</xsl:variable> -->
|
1321
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1322
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
<xsl:variable name="colwidths">
|
1327
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1328
|
-
<xsl:call-template name="calculate-column-widths">
|
1329
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1330
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
1331
|
-
</xsl:call-template>
|
1332
|
-
</xsl:if>
|
1333
|
-
</xsl:variable>
|
1334
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1335
|
-
|
1336
|
-
<!-- <xsl:variable name="colwidths2">
|
1337
|
-
<xsl:call-template name="calculate-column-widths">
|
1338
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1339
|
-
</xsl:call-template>
|
1340
|
-
</xsl:variable> -->
|
1341
|
-
|
1342
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1343
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1344
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1345
|
-
|
1346
|
-
<xsl:variable name="margin-left">
|
1347
|
-
<xsl:choose>
|
1348
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1349
|
-
<xsl:otherwise>0</xsl:otherwise>
|
1350
|
-
</xsl:choose>
|
1351
|
-
</xsl:variable>
|
1352
|
-
|
1353
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1354
1295
|
|
1355
1296
|
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
1297
|
|
1298
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1299
|
+
<fo:block> </fo:block>
|
1300
|
+
</xsl:if> -->
|
1301
|
+
|
1302
|
+
<!-- $namespace = 'iso' or -->
|
1360
1303
|
|
1361
|
-
|
1304
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1305
|
+
|
1306
|
+
|
1307
|
+
|
1308
|
+
<xsl:call-template name="fn_name_display"/>
|
1362
1309
|
|
1310
|
+
|
1311
|
+
|
1312
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1313
|
+
|
1314
|
+
<!-- <xsl:variable name="cols-count">
|
1315
|
+
<xsl:choose>
|
1316
|
+
<xsl:when test="*[local-name()='thead']">
|
1317
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1318
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1319
|
+
</xsl:call-template>
|
1320
|
+
</xsl:when>
|
1321
|
+
<xsl:otherwise>
|
1322
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1323
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1324
|
+
</xsl:call-template>
|
1325
|
+
</xsl:otherwise>
|
1326
|
+
</xsl:choose>
|
1327
|
+
</xsl:variable> -->
|
1328
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1329
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1363
1330
|
|
1364
1331
|
|
1365
1332
|
|
1366
|
-
|
1367
|
-
<xsl:
|
1368
|
-
|
1333
|
+
<xsl:variable name="colwidths">
|
1334
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1335
|
+
<xsl:call-template name="calculate-column-widths">
|
1336
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1337
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
1338
|
+
</xsl:call-template>
|
1339
|
+
</xsl:if>
|
1340
|
+
</xsl:variable>
|
1341
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1369
1342
|
|
1343
|
+
<!-- <xsl:variable name="colwidths2">
|
1344
|
+
<xsl:call-template name="calculate-column-widths">
|
1345
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1346
|
+
</xsl:call-template>
|
1347
|
+
</xsl:variable> -->
|
1370
1348
|
|
1349
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1350
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1351
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1371
1352
|
|
1353
|
+
<xsl:variable name="margin-left">
|
1354
|
+
<xsl:choose>
|
1355
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1356
|
+
<xsl:otherwise>0</xsl:otherwise>
|
1357
|
+
</xsl:choose>
|
1358
|
+
</xsl:variable>
|
1372
1359
|
|
1373
|
-
<
|
1374
|
-
<attribute name="table-layout">fixed</attribute>
|
1375
|
-
<attribute name="width">100%</attribute>
|
1376
|
-
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1377
|
-
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1360
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1378
1361
|
|
1379
1362
|
|
1363
|
+
|
1364
|
+
|
1365
|
+
|
1380
1366
|
|
1381
1367
|
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1368
|
+
|
1385
1369
|
|
1386
1370
|
|
1387
|
-
<attribute name="border-top">2pt solid black</attribute>
|
1388
|
-
<attribute name="border-bottom">2pt solid black</attribute>
|
1389
|
-
|
1390
1371
|
|
1391
|
-
</xsl:variable>
|
1392
|
-
|
1393
|
-
|
1394
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1395
1372
|
|
1396
|
-
|
1397
|
-
<xsl:attribute name="
|
1398
|
-
|
1399
|
-
</xsl:attribute>
|
1400
|
-
</xsl:for-each>
|
1373
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1374
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1375
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1401
1376
|
|
1402
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1403
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1404
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1405
|
-
</xsl:if>
|
1406
1377
|
|
1407
|
-
<xsl:choose>
|
1408
|
-
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1409
|
-
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1410
|
-
<fo:table-column column-width="{@width}"/>
|
1411
|
-
</xsl:for-each>
|
1412
|
-
</xsl:when>
|
1413
|
-
<xsl:otherwise>
|
1414
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1415
|
-
<xsl:choose>
|
1416
|
-
<xsl:when test=". = 1 or . = 0">
|
1417
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
1418
|
-
</xsl:when>
|
1419
|
-
<xsl:otherwise>
|
1420
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
1421
|
-
</xsl:otherwise>
|
1422
|
-
</xsl:choose>
|
1423
|
-
</xsl:for-each>
|
1424
|
-
</xsl:otherwise>
|
1425
|
-
</xsl:choose>
|
1426
1378
|
|
1427
|
-
<xsl:
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
</xsl:otherwise>
|
1434
|
-
</xsl:choose>
|
1379
|
+
<xsl:variable name="table_width">
|
1380
|
+
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1381
|
+
100%
|
1382
|
+
|
1383
|
+
|
1384
|
+
</xsl:variable>
|
1435
1385
|
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
<
|
1452
|
-
|
1453
|
-
|
1386
|
+
<xsl:variable name="table_attributes">
|
1387
|
+
<attribute name="table-layout">fixed</attribute>
|
1388
|
+
<attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
|
1389
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1390
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1391
|
+
|
1392
|
+
|
1393
|
+
|
1394
|
+
|
1395
|
+
|
1396
|
+
|
1397
|
+
|
1398
|
+
|
1399
|
+
|
1400
|
+
<attribute name="border-top">2pt solid black</attribute>
|
1401
|
+
<attribute name="border-bottom">2pt solid black</attribute>
|
1402
|
+
|
1403
|
+
|
1404
|
+
</xsl:variable>
|
1454
1405
|
|
1455
|
-
|
1406
|
+
|
1407
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1408
|
+
|
1409
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1410
|
+
<xsl:attribute name="{@name}">
|
1411
|
+
<xsl:value-of select="."/>
|
1412
|
+
</xsl:attribute>
|
1413
|
+
</xsl:for-each>
|
1414
|
+
|
1415
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1416
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1417
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1418
|
+
</xsl:if>
|
1419
|
+
|
1420
|
+
<xsl:choose>
|
1421
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1422
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1423
|
+
<fo:table-column column-width="{@width}"/>
|
1424
|
+
</xsl:for-each>
|
1425
|
+
</xsl:when>
|
1426
|
+
<xsl:otherwise>
|
1427
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1428
|
+
<xsl:choose>
|
1429
|
+
<xsl:when test=". = 1 or . = 0">
|
1430
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1431
|
+
</xsl:when>
|
1432
|
+
<xsl:otherwise>
|
1433
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1434
|
+
</xsl:otherwise>
|
1435
|
+
</xsl:choose>
|
1436
|
+
</xsl:for-each>
|
1437
|
+
</xsl:otherwise>
|
1438
|
+
</xsl:choose>
|
1439
|
+
|
1456
1440
|
<xsl:choose>
|
1457
|
-
<xsl:when test="
|
1458
|
-
<
|
1441
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1442
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1459
1443
|
</xsl:when>
|
1460
1444
|
<xsl:otherwise>
|
1461
|
-
<
|
1445
|
+
<xsl:apply-templates/>
|
1462
1446
|
</xsl:otherwise>
|
1463
1447
|
</xsl:choose>
|
1448
|
+
|
1449
|
+
</fo:table>
|
1450
|
+
|
1451
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
1452
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1453
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1454
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1455
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1456
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
1457
|
+
</xsl:call-template>
|
1464
1458
|
</xsl:for-each>
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1459
|
+
|
1460
|
+
<!-- insert footer as table -->
|
1461
|
+
<!-- <fo:table>
|
1462
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1463
|
+
<xsl:attribute name="{@name}">
|
1464
|
+
<xsl:value-of select="."/>
|
1465
|
+
</xsl:attribute>
|
1466
|
+
</xsl:for-each>
|
1467
|
+
|
1468
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1469
|
+
<xsl:choose>
|
1470
|
+
<xsl:when test=". = 1 or . = 0">
|
1471
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1472
|
+
</xsl:when>
|
1473
|
+
<xsl:otherwise>
|
1474
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1475
|
+
</xsl:otherwise>
|
1476
|
+
</xsl:choose>
|
1477
|
+
</xsl:for-each>
|
1478
|
+
</fo:table>-->
|
1479
|
+
|
1480
|
+
|
1481
|
+
|
1482
|
+
|
1483
|
+
|
1484
|
+
</fo:block-container>
|
1485
|
+
</xsl:variable>
|
1486
|
+
|
1487
|
+
|
1488
|
+
|
1489
|
+
<xsl:choose>
|
1490
|
+
<xsl:when test="@width">
|
1491
|
+
|
1492
|
+
<!-- centered table when table name is centered (see table-name-style) -->
|
1493
|
+
|
1494
|
+
<fo:table table-layout="fixed" width="100%">
|
1495
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
1496
|
+
<fo:table-column column-width="{@width}"/>
|
1497
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
1498
|
+
<fo:table-body>
|
1499
|
+
<fo:table-row>
|
1500
|
+
<fo:table-cell column-number="2">
|
1501
|
+
<fo:block><xsl:copy-of select="$table"/></fo:block>
|
1502
|
+
</fo:table-cell>
|
1503
|
+
</fo:table-row>
|
1504
|
+
</fo:table-body>
|
1505
|
+
</fo:table>
|
1506
|
+
|
1507
|
+
|
1508
|
+
|
1509
|
+
|
1510
|
+
</xsl:when>
|
1511
|
+
<xsl:otherwise>
|
1512
|
+
<xsl:copy-of select="$table"/>
|
1513
|
+
</xsl:otherwise>
|
1514
|
+
</xsl:choose>
|
1515
|
+
|
1472
1516
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1473
1517
|
<xsl:if test="normalize-space() != ''">
|
1474
1518
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -1596,7 +1640,15 @@
|
|
1596
1640
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1597
1641
|
<xsl:value-of select="@target"/>
|
1598
1642
|
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1599
|
-
<xsl:variable name="
|
1643
|
+
<xsl:variable name="mathml">
|
1644
|
+
<xsl:for-each select="*">
|
1645
|
+
<xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
|
1646
|
+
<xsl:copy-of select="."/>
|
1647
|
+
</xsl:if>
|
1648
|
+
</xsl:for-each>
|
1649
|
+
</xsl:variable>
|
1650
|
+
|
1651
|
+
<xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
|
1600
1652
|
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1601
1653
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1602
1654
|
<xsl:param name="cols-count"/>
|
@@ -2282,7 +2334,7 @@
|
|
2282
2334
|
<xsl:with-param name="table" select="$html-table"/>
|
2283
2335
|
</xsl:call-template>
|
2284
2336
|
</xsl:variable>
|
2285
|
-
<!-- colwidths=<xsl:
|
2337
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2286
2338
|
<xsl:variable name="maxlength_dt">
|
2287
2339
|
<xsl:call-template name="getMaxLength_dt"/>
|
2288
2340
|
</xsl:variable>
|
@@ -2311,13 +2363,22 @@
|
|
2311
2363
|
</xsl:when>
|
2312
2364
|
<xsl:otherwise>
|
2313
2365
|
<xsl:choose>
|
2366
|
+
<!-- to set width check most wide chars like `W` -->
|
2314
2367
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
2315
|
-
<fo:table-column column-width="
|
2316
|
-
<fo:table-column column-width="
|
2368
|
+
<fo:table-column column-width="7%"/>
|
2369
|
+
<fo:table-column column-width="93%"/>
|
2370
|
+
</xsl:when>
|
2371
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like ABC, etc -->
|
2372
|
+
<fo:table-column column-width="15%"/>
|
2373
|
+
<fo:table-column column-width="85%"/>
|
2374
|
+
</xsl:when>
|
2375
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
2376
|
+
<fo:table-column column-width="20%"/>
|
2377
|
+
<fo:table-column column-width="80%"/>
|
2317
2378
|
</xsl:when>
|
2318
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <=
|
2319
|
-
<fo:table-column column-width="
|
2320
|
-
<fo:table-column column-width="
|
2379
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
2380
|
+
<fo:table-column column-width="25%"/>
|
2381
|
+
<fo:table-column column-width="75%"/>
|
2321
2382
|
</xsl:when>
|
2322
2383
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
2323
2384
|
<fo:table-column column-width="60%"/>
|
@@ -2513,6 +2574,7 @@
|
|
2513
2574
|
|
2514
2575
|
|
2515
2576
|
|
2577
|
+
|
2516
2578
|
|
2517
2579
|
</xsl:variable>
|
2518
2580
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -2526,10 +2588,18 @@
|
|
2526
2588
|
</xsl:if>
|
2527
2589
|
<xsl:apply-templates/>
|
2528
2590
|
</fo:inline>
|
2591
|
+
</xsl:template><xsl:template match="*[local-name()='underline']">
|
2592
|
+
<fo:inline text-decoration="underline">
|
2593
|
+
<xsl:apply-templates/>
|
2594
|
+
</fo:inline>
|
2529
2595
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2530
2596
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
2531
2597
|
<xsl:apply-templates/>
|
2532
2598
|
</fo:inline>
|
2599
|
+
</xsl:template><xsl:template match="*[local-name()='hi']">
|
2600
|
+
<fo:inline background-color="yellow">
|
2601
|
+
<xsl:apply-templates/>
|
2602
|
+
</fo:inline>
|
2533
2603
|
</xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
2534
2604
|
<xsl:variable name="text" select="normalize-space(.)"/>
|
2535
2605
|
<fo:inline font-size="75%">
|
@@ -2619,6 +2689,10 @@
|
|
2619
2689
|
<xsl:param name="text" select="."/>
|
2620
2690
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2621
2691
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
2692
|
+
</xsl:template><xsl:template name="add-zero-spaces-link-java">
|
2693
|
+
<xsl:param name="text" select="."/>
|
2694
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2695
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1')"/>
|
2622
2696
|
</xsl:template><xsl:template name="add-zero-spaces">
|
2623
2697
|
<xsl:param name="text" select="."/>
|
2624
2698
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -2866,6 +2940,7 @@
|
|
2866
2940
|
<xsl:apply-templates select="." mode="mathml"/>
|
2867
2941
|
</xsl:variable>
|
2868
2942
|
<fo:instream-foreign-object fox:alt-text="Math">
|
2943
|
+
|
2869
2944
|
<!-- <xsl:copy-of select="."/> -->
|
2870
2945
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
2871
2946
|
</fo:instream-foreign-object>
|
@@ -2879,7 +2954,12 @@
|
|
2879
2954
|
<!-- replace start and end spaces to non-break space -->
|
2880
2955
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
2881
2956
|
</xsl:copy>
|
2882
|
-
</xsl:template><xsl:template match="
|
2957
|
+
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
2958
|
+
<xsl:copy>
|
2959
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
2960
|
+
</xsl:copy>
|
2961
|
+
<mathml:mspace width="0.5ex"/>
|
2962
|
+
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2883
2963
|
<xsl:variable name="target">
|
2884
2964
|
<xsl:choose>
|
2885
2965
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
@@ -2900,7 +2980,10 @@
|
|
2900
2980
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
2901
2981
|
<xsl:choose>
|
2902
2982
|
<xsl:when test="normalize-space(.) = ''">
|
2903
|
-
<xsl:value-of select="$target"/>
|
2983
|
+
<!-- <xsl:value-of select="$target"/> -->
|
2984
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
2985
|
+
<xsl:with-param name="text" select="$target"/>
|
2986
|
+
</xsl:call-template>
|
2904
2987
|
</xsl:when>
|
2905
2988
|
<xsl:otherwise>
|
2906
2989
|
<xsl:apply-templates/>
|
@@ -2910,8 +2993,6 @@
|
|
2910
2993
|
</xsl:otherwise>
|
2911
2994
|
</xsl:choose>
|
2912
2995
|
</fo:inline>
|
2913
|
-
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
2914
|
-
<fo:inline id="{@id}"/>
|
2915
2996
|
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
2916
2997
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
2917
2998
|
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
@@ -3102,7 +3183,7 @@
|
|
3102
3183
|
</xsl:if> -->
|
3103
3184
|
</fo:inline>
|
3104
3185
|
</xsl:if>
|
3105
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3186
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3106
3187
|
<fo:block-container id="{@id}">
|
3107
3188
|
|
3108
3189
|
<fo:block>
|
@@ -3118,6 +3199,7 @@
|
|
3118
3199
|
<fo:block id="{@id}">
|
3119
3200
|
<xsl:apply-templates/>
|
3120
3201
|
</fo:block>
|
3202
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3121
3203
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
3122
3204
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
3123
3205
|
<xsl:apply-templates/>
|
@@ -3309,6 +3391,12 @@
|
|
3309
3391
|
<!-- <xsl:text> </xsl:text> -->
|
3310
3392
|
</xsl:template><xsl:template name="getSection">
|
3311
3393
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3394
|
+
<!--
|
3395
|
+
<xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
|
3396
|
+
<xsl:value-of select="."/>
|
3397
|
+
</xsl:for-each>
|
3398
|
+
-->
|
3399
|
+
|
3312
3400
|
</xsl:template><xsl:template name="getName">
|
3313
3401
|
<xsl:choose>
|
3314
3402
|
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
@@ -3361,6 +3449,12 @@
|
|
3361
3449
|
<xsl:copy>
|
3362
3450
|
<xsl:apply-templates mode="contents_item"/>
|
3363
3451
|
</xsl:copy>
|
3452
|
+
</xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
|
3453
|
+
<xsl:copy>
|
3454
|
+
<xsl:apply-templates mode="contents_item"/>
|
3455
|
+
</xsl:copy>
|
3456
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
3457
|
+
<xsl:copy-of select="."/>
|
3364
3458
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3365
3459
|
<xsl:text> </xsl:text>
|
3366
3460
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -3386,6 +3480,7 @@
|
|
3386
3480
|
|
3387
3481
|
|
3388
3482
|
|
3483
|
+
|
3389
3484
|
|
3390
3485
|
|
3391
3486
|
|
@@ -3688,10 +3783,11 @@
|
|
3688
3783
|
</xsl:choose>
|
3689
3784
|
|
3690
3785
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3691
|
-
|
3786
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
3692
3787
|
<xsl:variable name="element">
|
3693
3788
|
block
|
3694
3789
|
|
3790
|
+
|
3695
3791
|
</xsl:variable>
|
3696
3792
|
<xsl:choose>
|
3697
3793
|
<xsl:when test="normalize-space($element) = 'block'">
|
@@ -3762,11 +3858,13 @@
|
|
3762
3858
|
</xsl:if>
|
3763
3859
|
</xsl:if>
|
3764
3860
|
|
3861
|
+
|
3765
3862
|
<fo:block-container margin-left="0mm">
|
3766
3863
|
|
3767
3864
|
<fo:block xsl:use-attribute-sets="quote-style">
|
3768
3865
|
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
3769
|
-
|
3866
|
+
|
3867
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
3770
3868
|
</fo:block>
|
3771
3869
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3772
3870
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -3789,32 +3887,50 @@
|
|
3789
3887
|
<xsl:text>— </xsl:text>
|
3790
3888
|
<xsl:apply-templates/>
|
3791
3889
|
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
3792
|
-
|
3793
|
-
|
3794
|
-
|
3795
|
-
|
3796
|
-
|
3797
|
-
|
3798
|
-
|
3799
|
-
|
3800
|
-
|
3801
|
-
|
3802
|
-
|
3803
|
-
|
3804
|
-
|
3805
|
-
|
3806
|
-
|
3807
|
-
|
3808
|
-
|
3809
|
-
|
3810
|
-
|
3811
|
-
|
3812
|
-
|
3813
|
-
|
3814
|
-
|
3815
|
-
|
3816
|
-
|
3817
|
-
|
3890
|
+
|
3891
|
+
<xsl:variable name="bibitemid">
|
3892
|
+
<xsl:choose>
|
3893
|
+
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
|
3894
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
3895
|
+
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
3896
|
+
</xsl:choose>
|
3897
|
+
</xsl:variable>
|
3898
|
+
|
3899
|
+
<xsl:choose>
|
3900
|
+
<xsl:when test="normalize-space($bibitemid) != ''">
|
3901
|
+
<fo:inline xsl:use-attribute-sets="eref-style">
|
3902
|
+
<xsl:if test="@type = 'footnote'">
|
3903
|
+
|
3904
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
3905
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3906
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
3907
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3908
|
+
|
3909
|
+
|
3910
|
+
</xsl:if>
|
3911
|
+
|
3912
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3913
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
3914
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
3915
|
+
</xsl:if>
|
3916
|
+
<xsl:if test="@type = 'inline'">
|
3917
|
+
|
3918
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
3919
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3920
|
+
|
3921
|
+
|
3922
|
+
|
3923
|
+
</xsl:if>
|
3924
|
+
|
3925
|
+
<xsl:apply-templates/>
|
3926
|
+
</fo:basic-link>
|
3927
|
+
|
3928
|
+
</fo:inline>
|
3929
|
+
</xsl:when>
|
3930
|
+
<xsl:otherwise>
|
3931
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
3932
|
+
</xsl:otherwise>
|
3933
|
+
</xsl:choose>
|
3818
3934
|
</xsl:template><xsl:template match="*[local-name() = 'tab']">
|
3819
3935
|
<!-- zero-space char -->
|
3820
3936
|
<xsl:variable name="depth">
|
@@ -3915,6 +4031,7 @@
|
|
3915
4031
|
|
3916
4032
|
|
3917
4033
|
|
4034
|
+
|
3918
4035
|
|
3919
4036
|
|
3920
4037
|
|
@@ -3926,7 +4043,7 @@
|
|
3926
4043
|
|
3927
4044
|
|
3928
4045
|
|
3929
|
-
</xsl:template><xsl:template match="
|
4046
|
+
</xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
3930
4047
|
<fo:block break-after="page"/>
|
3931
4048
|
<fo:block>
|
3932
4049
|
<xsl:call-template name="setId"/>
|
@@ -3934,7 +4051,8 @@
|
|
3934
4051
|
</fo:block>
|
3935
4052
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3936
4053
|
<fo:block>
|
3937
|
-
<xsl:call-template name="setId"/>
|
4054
|
+
<xsl:call-template name="setId"/>
|
4055
|
+
|
3938
4056
|
|
3939
4057
|
<xsl:apply-templates/>
|
3940
4058
|
</fo:block>
|
@@ -3985,6 +4103,153 @@
|
|
3985
4103
|
</fo:block>
|
3986
4104
|
</xsl:otherwise>
|
3987
4105
|
</xsl:choose>
|
4106
|
+
</xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
|
4107
|
+
<xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
|
4108
|
+
<bookmark><xsl:value-of select="@id"/></bookmark>
|
4109
|
+
</xsl:for-each>
|
4110
|
+
</xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
|
4111
|
+
<xsl:copy>
|
4112
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id"/>
|
4113
|
+
</xsl:copy>
|
4114
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
4115
|
+
<xsl:variable name="id">
|
4116
|
+
<xsl:call-template name="generateIndexXrefId"/>
|
4117
|
+
</xsl:variable>
|
4118
|
+
<xsl:copy> <!-- add id to xref -->
|
4119
|
+
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
4120
|
+
<xsl:attribute name="id">
|
4121
|
+
<xsl:value-of select="$id"/>
|
4122
|
+
</xsl:attribute>
|
4123
|
+
<xsl:apply-templates mode="index_add_id"/>
|
4124
|
+
</xsl:copy>
|
4125
|
+
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
4126
|
+
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
4127
|
+
<xsl:if test="@to">
|
4128
|
+
<xsl:value-of select="$dash"/>
|
4129
|
+
<xsl:copy>
|
4130
|
+
<xsl:copy-of select="@*"/>
|
4131
|
+
<xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
|
4132
|
+
<xsl:attribute name="id">
|
4133
|
+
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
4134
|
+
</xsl:attribute>
|
4135
|
+
<xsl:apply-templates mode="index_add_id"/>
|
4136
|
+
</xsl:copy>
|
4137
|
+
</xsl:if>
|
4138
|
+
</xsl:template><xsl:template match="@*|node()" mode="index_update">
|
4139
|
+
<xsl:copy>
|
4140
|
+
<xsl:apply-templates select="@*|node()" mode="index_update"/>
|
4141
|
+
</xsl:copy>
|
4142
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" mode="index_update">
|
4143
|
+
<xsl:copy>
|
4144
|
+
<xsl:apply-templates select="@*" mode="index_update"/>
|
4145
|
+
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
4146
|
+
</xsl:copy>
|
4147
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/node()" mode="process_li_element" priority="2">
|
4148
|
+
<xsl:param name="element"/>
|
4149
|
+
<xsl:param name="remove" select="'false'"/>
|
4150
|
+
<xsl:param name="target"/>
|
4151
|
+
<!-- <node></node> -->
|
4152
|
+
<xsl:choose>
|
4153
|
+
<xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
|
4154
|
+
<!-- skip text (i.e. remove it) and process next element -->
|
4155
|
+
<!-- [removed_<xsl:value-of select="."/>] -->
|
4156
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4157
|
+
<xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
|
4158
|
+
</xsl:apply-templates>
|
4159
|
+
</xsl:when>
|
4160
|
+
<xsl:when test="self::text()">
|
4161
|
+
<xsl:value-of select="."/>
|
4162
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4163
|
+
</xsl:when>
|
4164
|
+
<xsl:when test="self::* and local-name(.) = 'xref'">
|
4165
|
+
<xsl:variable name="id" select="@id"/>
|
4166
|
+
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
4167
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
4168
|
+
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
4169
|
+
|
4170
|
+
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
4171
|
+
<xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
|
4172
|
+
|
4173
|
+
<xsl:choose>
|
4174
|
+
<!-- 2nd pass -->
|
4175
|
+
<!-- if page is equal to page for next and page is not the end of range -->
|
4176
|
+
<xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
|
4177
|
+
<!-- skip element (i.e. remove it) and remove next text ',' -->
|
4178
|
+
<!-- [removed_xref] -->
|
4179
|
+
|
4180
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4181
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
4182
|
+
<xsl:with-param name="target">
|
4183
|
+
<xsl:choose>
|
4184
|
+
<xsl:when test="$target != ''"><xsl:value-of select="$target"/></xsl:when>
|
4185
|
+
<xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise>
|
4186
|
+
</xsl:choose>
|
4187
|
+
</xsl:with-param>
|
4188
|
+
</xsl:apply-templates>
|
4189
|
+
</xsl:when>
|
4190
|
+
|
4191
|
+
<xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
|
4192
|
+
<!-- remove xref -->
|
4193
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4194
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
4195
|
+
</xsl:apply-templates>
|
4196
|
+
</xsl:when>
|
4197
|
+
|
4198
|
+
<xsl:otherwise>
|
4199
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
4200
|
+
<xsl:with-param name="target" select="$target"/>
|
4201
|
+
</xsl:apply-templates>
|
4202
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4203
|
+
</xsl:otherwise>
|
4204
|
+
</xsl:choose>
|
4205
|
+
</xsl:when>
|
4206
|
+
<xsl:when test="self::* and local-name(.) = 'ul'">
|
4207
|
+
<!-- ul -->
|
4208
|
+
<xsl:apply-templates select="." mode="index_update"/>
|
4209
|
+
</xsl:when>
|
4210
|
+
<xsl:otherwise>
|
4211
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
4212
|
+
<xsl:with-param name="target" select="$target"/>
|
4213
|
+
</xsl:apply-templates>
|
4214
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4215
|
+
</xsl:otherwise>
|
4216
|
+
</xsl:choose>
|
4217
|
+
</xsl:template><xsl:template match="@*|node()" mode="xref_copy">
|
4218
|
+
<xsl:param name="target"/>
|
4219
|
+
<xsl:copy>
|
4220
|
+
<xsl:apply-templates select="@*" mode="xref_copy"/>
|
4221
|
+
<xsl:if test="$target != '' and not(xalan:nodeset($bookmark_in_fn)//bookmark[. = $target])">
|
4222
|
+
<xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
|
4223
|
+
</xsl:if>
|
4224
|
+
<xsl:apply-templates select="node()" mode="xref_copy"/>
|
4225
|
+
</xsl:copy>
|
4226
|
+
</xsl:template><xsl:template name="generateIndexXrefId">
|
4227
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
4228
|
+
|
4229
|
+
<xsl:variable name="docid">
|
4230
|
+
<xsl:call-template name="getDocumentId"/>
|
4231
|
+
</xsl:variable>
|
4232
|
+
<xsl:variable name="item_number">
|
4233
|
+
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
4234
|
+
</xsl:variable>
|
4235
|
+
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
4236
|
+
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
4237
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
|
4238
|
+
<xsl:apply-templates/>
|
4239
|
+
<fo:block>
|
4240
|
+
<xsl:if test="following-sibling::*[local-name() = 'clause']">
|
4241
|
+
<fo:block> </fo:block>
|
4242
|
+
</xsl:if>
|
4243
|
+
</fo:block>
|
4244
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
|
4245
|
+
<xsl:apply-templates/>
|
4246
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
4247
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
4248
|
+
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
4249
|
+
<xsl:apply-templates/>
|
4250
|
+
</fo:block>
|
4251
|
+
</xsl:template><xsl:template match="*[local-name() = 'bookmark']">
|
4252
|
+
<fo:inline id="{@id}"/>
|
3988
4253
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3989
4254
|
<!-- <row>
|
3990
4255
|
<date>05-07-2013</date>
|
@@ -4080,6 +4345,8 @@
|
|
4080
4345
|
<xsl:value-of select="translate(.,'. ','')"/>
|
4081
4346
|
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4082
4347
|
<xsl:value-of select="substring(.,1,1)"/>
|
4348
|
+
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4349
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4083
4350
|
</xsl:template><xsl:template name="convertDate">
|
4084
4351
|
<xsl:param name="date"/>
|
4085
4352
|
<xsl:param name="format" select="'short'"/>
|
@@ -4104,6 +4371,57 @@
|
|
4104
4371
|
</xsl:variable>
|
4105
4372
|
<xsl:variable name="result">
|
4106
4373
|
<xsl:choose>
|
4374
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
4375
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4376
|
+
<xsl:text> </xsl:text>
|
4377
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
4378
|
+
</xsl:when>
|
4379
|
+
<xsl:when test="$format = 'ddMM'">
|
4380
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4381
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
4382
|
+
</xsl:when>
|
4383
|
+
<xsl:when test="$format = 'short' or $day = ''">
|
4384
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
4385
|
+
</xsl:when>
|
4386
|
+
<xsl:otherwise>
|
4387
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
4388
|
+
</xsl:otherwise>
|
4389
|
+
</xsl:choose>
|
4390
|
+
</xsl:variable>
|
4391
|
+
<xsl:value-of select="$result"/>
|
4392
|
+
</xsl:template><xsl:template name="convertDateLocalized">
|
4393
|
+
<xsl:param name="date"/>
|
4394
|
+
<xsl:param name="format" select="'short'"/>
|
4395
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
4396
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
4397
|
+
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
4398
|
+
<xsl:variable name="monthStr">
|
4399
|
+
<xsl:choose>
|
4400
|
+
<xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
|
4401
|
+
<xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
|
4402
|
+
<xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
|
4403
|
+
<xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
|
4404
|
+
<xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
|
4405
|
+
<xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
|
4406
|
+
<xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
|
4407
|
+
<xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
|
4408
|
+
<xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
|
4409
|
+
<xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
|
4410
|
+
<xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
|
4411
|
+
<xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
|
4412
|
+
</xsl:choose>
|
4413
|
+
</xsl:variable>
|
4414
|
+
<xsl:variable name="result">
|
4415
|
+
<xsl:choose>
|
4416
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
4417
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4418
|
+
<xsl:text> </xsl:text>
|
4419
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
4420
|
+
</xsl:when>
|
4421
|
+
<xsl:when test="$format = 'ddMM'">
|
4422
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4423
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
4424
|
+
</xsl:when>
|
4107
4425
|
<xsl:when test="$format = 'short' or $day = ''">
|
4108
4426
|
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
4109
4427
|
</xsl:when>
|
@@ -4119,7 +4437,7 @@
|
|
4119
4437
|
<xsl:param name="charDelim" select="', '"/>
|
4120
4438
|
<xsl:choose>
|
4121
4439
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
4122
|
-
<xsl:for-each select="
|
4440
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4123
4441
|
<xsl:sort data-type="text" order="ascending"/>
|
4124
4442
|
<xsl:call-template name="insertKeyword">
|
4125
4443
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -4128,7 +4446,7 @@
|
|
4128
4446
|
</xsl:for-each>
|
4129
4447
|
</xsl:when>
|
4130
4448
|
<xsl:otherwise>
|
4131
|
-
<xsl:for-each select="
|
4449
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4132
4450
|
<xsl:call-template name="insertKeyword">
|
4133
4451
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
4134
4452
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -4145,61 +4463,64 @@
|
|
4145
4463
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
4146
4464
|
</xsl:choose>
|
4147
4465
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
4148
|
-
<
|
4149
|
-
<
|
4150
|
-
|
4151
|
-
|
4152
|
-
|
4153
|
-
|
4154
|
-
|
4155
|
-
|
4156
|
-
|
4157
|
-
|
4158
|
-
|
4159
|
-
|
4466
|
+
<xsl:variable name="lang">
|
4467
|
+
<xsl:call-template name="getLang"/>
|
4468
|
+
</xsl:variable>
|
4469
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
4470
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
4471
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
4472
|
+
</pdf:dictionary>
|
4473
|
+
</pdf:catalog>
|
4474
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
4475
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
4476
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
4477
|
+
<!-- Dublin Core properties go here -->
|
4478
|
+
<dc:title>
|
4479
|
+
<xsl:variable name="title">
|
4480
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4481
|
+
|
4160
4482
|
|
4161
4483
|
|
4162
4484
|
|
4163
|
-
<xsl:value-of select="
|
4485
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
4164
4486
|
|
4165
4487
|
|
4166
4488
|
|
4167
|
-
</xsl:
|
4168
|
-
|
4169
|
-
|
4170
|
-
|
4171
|
-
|
4172
|
-
|
4173
|
-
|
4174
|
-
</xsl:
|
4175
|
-
</xsl:
|
4176
|
-
</
|
4177
|
-
|
4489
|
+
</xsl:for-each>
|
4490
|
+
</xsl:variable>
|
4491
|
+
<xsl:choose>
|
4492
|
+
<xsl:when test="normalize-space($title) != ''">
|
4493
|
+
<xsl:value-of select="$title"/>
|
4494
|
+
</xsl:when>
|
4495
|
+
<xsl:otherwise>
|
4496
|
+
<xsl:text> </xsl:text>
|
4497
|
+
</xsl:otherwise>
|
4498
|
+
</xsl:choose>
|
4499
|
+
</dc:title>
|
4500
|
+
<dc:creator>
|
4501
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4178
4502
|
|
4179
4503
|
|
4180
4504
|
|
4181
|
-
</
|
4182
|
-
|
4183
|
-
|
4184
|
-
|
4185
|
-
|
4186
|
-
|
4187
|
-
|
4188
|
-
|
4189
|
-
|
4190
|
-
|
4191
|
-
|
4192
|
-
|
4193
|
-
|
4194
|
-
|
4195
|
-
|
4196
|
-
<
|
4197
|
-
|
4198
|
-
|
4199
|
-
|
4200
|
-
</rdf:RDF>
|
4201
|
-
</x:xmpmeta>
|
4202
|
-
</fo:declarations>
|
4505
|
+
</xsl:for-each>
|
4506
|
+
</dc:creator>
|
4507
|
+
<dc:description>
|
4508
|
+
<xsl:variable name="abstract">
|
4509
|
+
|
4510
|
+
|
4511
|
+
</xsl:variable>
|
4512
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
4513
|
+
</dc:description>
|
4514
|
+
<pdf:Keywords>
|
4515
|
+
<xsl:call-template name="insertKeywords"/>
|
4516
|
+
</pdf:Keywords>
|
4517
|
+
</rdf:Description>
|
4518
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
4519
|
+
<!-- XMP properties go here -->
|
4520
|
+
<xmp:CreatorTool/>
|
4521
|
+
</rdf:Description>
|
4522
|
+
</rdf:RDF>
|
4523
|
+
</x:xmpmeta>
|
4203
4524
|
</xsl:template><xsl:template name="getId">
|
4204
4525
|
<xsl:choose>
|
4205
4526
|
<xsl:when test="../@id">
|
@@ -4296,6 +4617,7 @@
|
|
4296
4617
|
<xsl:value-of select="document('')//*/namespace::mpfd"/>
|
4297
4618
|
|
4298
4619
|
|
4620
|
+
|
4299
4621
|
</xsl:variable>
|
4300
4622
|
<xsl:if test="$documentNS != $XSLNS">
|
4301
4623
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4355,6 +4677,11 @@
|
|
4355
4677
|
<xsl:call-template name="getLang"/>
|
4356
4678
|
</xsl:variable>
|
4357
4679
|
|
4358
|
-
<xsl:
|
4680
|
+
<xsl:choose>
|
4681
|
+
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
4682
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4683
|
+
</xsl:when>
|
4684
|
+
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
4685
|
+
</xsl:choose>
|
4359
4686
|
|
4360
4687
|
</xsl:template></xsl:stylesheet>
|