metanorma-mpfa 0.5.9 → 0.5.14
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 +11 -22
- data/.rubocop.yml +1 -4
- data/lib/asciidoctor/mpfa/basicdoc.rng +20 -3
- data/lib/asciidoctor/mpfa/isodoc.rng +118 -4
- data/lib/asciidoctor/mpfa/mpfd.rng +6 -0
- data/lib/isodoc/mpfa/base_convert.rb +3 -3
- data/lib/isodoc/mpfa/html_convert.rb +2 -2
- data/lib/isodoc/mpfa/{mpfd.circular.xsl → mpfa.circular.xsl} +421 -190
- data/lib/isodoc/mpfa/{mpfd.compliance-standards-for-mpf-trustees.xsl → mpfa.compliance-standards-for-mpf-trustees.xsl} +421 -190
- data/lib/isodoc/mpfa/{mpfd.guidelines.xsl → mpfa.guidelines.xsl} +421 -190
- data/lib/isodoc/mpfa/{mpfd.standards.xsl → mpfa.standards.xsl} +421 -190
- data/lib/isodoc/mpfa/mpfa.supervision-of-mpf-intermediaries.xsl +4507 -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 +8 -0
- data/lib/metanorma/mpfa/version.rb +1 -1
- data/metanorma-mpfd.gemspec +2 -2
- metadata +12 -12
- data/lib/isodoc/mpfa/mpfd.supervision-of-mpf-intermediaries.xsl +0 -4276
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d0d6cfb8a8b522fe0c3746dc20f952b0427e795346d5e531112139140d735ca
|
4
|
+
data.tar.gz: 4eeed080d3d4171e1809bfb1a2d9e83aa02241704d5232b4a65f68e65443cd55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3646378e03da89b45dbcdd41f3e9dd413b26fac8220c7c490924bf1f8192bff24f9687024efd1b0244bf684f7f629d274c7c469f0fe9280e7d1807c7aae8701
|
7
|
+
data.tar.gz: 152d926ee2b8d56efff2d39265fbcf46bc80c82179d78c66dc2c8f52299a59d1841436d554e2328d701f39d09178f27f8e8066a8803620302e8f851d7bb5bc26
|
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,17 +16,17 @@ 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:
|
@@ -35,16 +35,7 @@ jobs:
|
|
35
35
|
- uses: ruby/setup-ruby@v1
|
36
36
|
with:
|
37
37
|
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
|
38
|
+
bundler-cache: true
|
48
39
|
|
49
40
|
- run: bundle exec rake
|
50
41
|
|
@@ -52,11 +43,9 @@ jobs:
|
|
52
43
|
needs: rake
|
53
44
|
runs-on: ubuntu-latest
|
54
45
|
steps:
|
55
|
-
-
|
56
|
-
uses: Sibz/github-status-action@v1
|
46
|
+
- uses: peter-evans/repository-dispatch@v1
|
57
47
|
with:
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
sha: ${{ github.event.pull_request.head.sha || github.sha }}
|
48
|
+
token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
49
|
+
repository: ${{ github.repository }}
|
50
|
+
event-type: notify
|
51
|
+
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
data/.rubocop.yml
CHANGED
@@ -729,12 +729,29 @@
|
|
729
729
|
</define>
|
730
730
|
<define name="index">
|
731
731
|
<element name="index">
|
732
|
-
<attribute name="primary"/>
|
733
732
|
<optional>
|
734
|
-
<attribute name="
|
733
|
+
<attribute name="to">
|
734
|
+
<data type="IDREF"/>
|
735
|
+
</attribute>
|
736
|
+
</optional>
|
737
|
+
<element name="primary">
|
738
|
+
<oneOrMore>
|
739
|
+
<ref name="PureTextElement"/>
|
740
|
+
</oneOrMore>
|
741
|
+
</element>
|
742
|
+
<optional>
|
743
|
+
<element name="secondary">
|
744
|
+
<oneOrMore>
|
745
|
+
<ref name="PureTextElement"/>
|
746
|
+
</oneOrMore>
|
747
|
+
</element>
|
735
748
|
</optional>
|
736
749
|
<optional>
|
737
|
-
<
|
750
|
+
<element name="tertiary">
|
751
|
+
<oneOrMore>
|
752
|
+
<ref name="PureTextElement"/>
|
753
|
+
</oneOrMore>
|
754
|
+
</element>
|
738
755
|
</optional>
|
739
756
|
</element>
|
740
757
|
</define>
|
@@ -55,6 +55,13 @@
|
|
55
55
|
<param name="pattern">\i\c*|\c+#\c+</param>
|
56
56
|
</data>
|
57
57
|
</attribute>
|
58
|
+
<optional>
|
59
|
+
<attribute name="to">
|
60
|
+
<data type="string">
|
61
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
62
|
+
</data>
|
63
|
+
</attribute>
|
64
|
+
</optional>
|
58
65
|
<optional>
|
59
66
|
<attribute name="type">
|
60
67
|
<ref name="ReferenceFormat"/>
|
@@ -246,6 +253,9 @@
|
|
246
253
|
<data type="boolean"/>
|
247
254
|
</attribute>
|
248
255
|
</optional>
|
256
|
+
<optional>
|
257
|
+
<attribute name="width"/>
|
258
|
+
</optional>
|
249
259
|
<optional>
|
250
260
|
<ref name="colgroup"/>
|
251
261
|
</optional>
|
@@ -779,6 +789,9 @@
|
|
779
789
|
<attribute name="width"/>
|
780
790
|
</element>
|
781
791
|
</define>
|
792
|
+
<define name="BibItemType" combine="choice">
|
793
|
+
<value>internal</value>
|
794
|
+
</define>
|
782
795
|
<define name="TextElement" combine="choice">
|
783
796
|
<ref name="concept"/>
|
784
797
|
</define>
|
@@ -799,6 +812,8 @@
|
|
799
812
|
<ref name="requirement"/>
|
800
813
|
<ref name="recommendation"/>
|
801
814
|
<ref name="permission"/>
|
815
|
+
<ref name="imagemap"/>
|
816
|
+
<ref name="svgmap"/>
|
802
817
|
</choice>
|
803
818
|
</define>
|
804
819
|
<define name="bibliography">
|
@@ -829,6 +844,9 @@
|
|
829
844
|
<data type="boolean"/>
|
830
845
|
</attribute>
|
831
846
|
</optional>
|
847
|
+
<optional>
|
848
|
+
<attribute name="number"/>
|
849
|
+
</optional>
|
832
850
|
<optional>
|
833
851
|
<attribute name="obligation">
|
834
852
|
<choice>
|
@@ -884,9 +902,11 @@
|
|
884
902
|
<element name="code">
|
885
903
|
<text/>
|
886
904
|
</element>
|
887
|
-
<
|
888
|
-
<text
|
889
|
-
|
905
|
+
<optional>
|
906
|
+
<element name="text">
|
907
|
+
<text/>
|
908
|
+
</element>
|
909
|
+
</optional>
|
890
910
|
</element>
|
891
911
|
</define>
|
892
912
|
<define name="standard-document">
|
@@ -899,6 +919,9 @@
|
|
899
919
|
</choice>
|
900
920
|
</attribute>
|
901
921
|
<ref name="bibdata"/>
|
922
|
+
<optional>
|
923
|
+
<ref name="misccontainer"/>
|
924
|
+
</optional>
|
902
925
|
<optional>
|
903
926
|
<ref name="boilerplate"/>
|
904
927
|
</optional>
|
@@ -909,11 +932,21 @@
|
|
909
932
|
<zeroOrMore>
|
910
933
|
<ref name="annex"/>
|
911
934
|
</zeroOrMore>
|
935
|
+
<optional>
|
936
|
+
<ref name="bibliography"/>
|
937
|
+
</optional>
|
912
938
|
<zeroOrMore>
|
913
|
-
<ref name="
|
939
|
+
<ref name="indexsect"/>
|
914
940
|
</zeroOrMore>
|
915
941
|
</element>
|
916
942
|
</define>
|
943
|
+
<define name="misccontainer">
|
944
|
+
<element name="misc-container">
|
945
|
+
<oneOrMore>
|
946
|
+
<ref name="AnyElement"/>
|
947
|
+
</oneOrMore>
|
948
|
+
</element>
|
949
|
+
</define>
|
917
950
|
<define name="preface">
|
918
951
|
<element name="preface">
|
919
952
|
<oneOrMore>
|
@@ -937,6 +970,11 @@
|
|
937
970
|
<ref name="Content-Section"/>
|
938
971
|
</element>
|
939
972
|
</define>
|
973
|
+
<define name="indexsect">
|
974
|
+
<element name="indexsect">
|
975
|
+
<ref name="Content-Section"/>
|
976
|
+
</element>
|
977
|
+
</define>
|
940
978
|
<define name="boilerplate">
|
941
979
|
<element name="boilerplate">
|
942
980
|
<optional>
|
@@ -1056,6 +1094,9 @@
|
|
1056
1094
|
</choice>
|
1057
1095
|
</attribute>
|
1058
1096
|
</optional>
|
1097
|
+
<optional>
|
1098
|
+
<attribute name="number"/>
|
1099
|
+
</optional>
|
1059
1100
|
<optional>
|
1060
1101
|
<attribute name="type"/>
|
1061
1102
|
</optional>
|
@@ -1109,6 +1150,9 @@
|
|
1109
1150
|
<optional>
|
1110
1151
|
<attribute name="type"/>
|
1111
1152
|
</optional>
|
1153
|
+
<optional>
|
1154
|
+
<attribute name="number"/>
|
1155
|
+
</optional>
|
1112
1156
|
<optional>
|
1113
1157
|
<ref name="section-title"/>
|
1114
1158
|
</optional>
|
@@ -1211,6 +1255,9 @@
|
|
1211
1255
|
<optional>
|
1212
1256
|
<attribute name="type"/>
|
1213
1257
|
</optional>
|
1258
|
+
<optional>
|
1259
|
+
<attribute name="number"/>
|
1260
|
+
</optional>
|
1214
1261
|
<optional>
|
1215
1262
|
<attribute name="obligation">
|
1216
1263
|
<choice>
|
@@ -1539,6 +1586,7 @@
|
|
1539
1586
|
<value>add</value>
|
1540
1587
|
<value>modify</value>
|
1541
1588
|
<value>delete</value>
|
1589
|
+
<value>replace</value>
|
1542
1590
|
</choice>
|
1543
1591
|
</attribute>
|
1544
1592
|
<optional>
|
@@ -1569,6 +1617,11 @@
|
|
1569
1617
|
</optional>
|
1570
1618
|
<optional>
|
1571
1619
|
<element name="newcontent">
|
1620
|
+
<optional>
|
1621
|
+
<attribute name="id">
|
1622
|
+
<data type="ID"/>
|
1623
|
+
</attribute>
|
1624
|
+
</optional>
|
1572
1625
|
<zeroOrMore>
|
1573
1626
|
<ref name="BasicBlock"/>
|
1574
1627
|
</zeroOrMore>
|
@@ -1602,4 +1655,65 @@
|
|
1602
1655
|
<text/>
|
1603
1656
|
</element>
|
1604
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>
|
1605
1719
|
</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>
|
@@ -40,12 +40,12 @@ module IsoDoc
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
def middle_clause
|
43
|
+
def middle_clause(_docxml)
|
44
44
|
"//clause[parent::sections][not(descendant::terms)]"
|
45
45
|
end
|
46
46
|
|
47
47
|
def middle(isoxml, out)
|
48
|
-
middle_title(out)
|
48
|
+
middle_title(isoxml, out)
|
49
49
|
middle_admonitions(isoxml, out)
|
50
50
|
clause isoxml, out
|
51
51
|
annex isoxml, out
|
@@ -59,7 +59,7 @@ module IsoDoc
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def clause(isoxml, out)
|
62
|
-
isoxml.xpath(ns(middle_clause)).each do |c|
|
62
|
+
isoxml.xpath(ns(middle_clause(isoxml))).each do |c|
|
63
63
|
out.div **attr_code(id: c["id"]) do |s|
|
64
64
|
clause_name(nil, c&.at(ns("./title")), s,
|
65
65
|
class: c["container"] ? "containerhdr" : nil )
|
@@ -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",
|
@@ -1138,6 +1138,7 @@
|
|
1138
1138
|
|
1139
1139
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1140
1140
|
|
1141
|
+
|
1141
1142
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1142
1143
|
|
1143
1144
|
|
@@ -1145,6 +1146,7 @@
|
|
1145
1146
|
|
1146
1147
|
|
1147
1148
|
|
1149
|
+
|
1148
1150
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1149
1151
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
1150
1152
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
@@ -1277,197 +1279,236 @@
|
|
1277
1279
|
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1278
1280
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1279
1281
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1280
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
1282
|
+
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1281
1283
|
|
1282
|
-
<xsl:variable name="
|
1283
|
-
<xsl:call-template name="getSimpleTable"/>
|
1284
|
-
</xsl:variable>
|
1284
|
+
<xsl:variable name="table">
|
1285
1285
|
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
1291
|
-
<fo:block> </fo:block>
|
1292
|
-
</xsl:if> -->
|
1293
|
-
|
1294
|
-
<!-- $namespace = 'iso' or -->
|
1295
|
-
|
1296
|
-
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
<xsl:call-template name="fn_name_display"/>
|
1286
|
+
<xsl:variable name="simple-table">
|
1287
|
+
<xsl:call-template name="getSimpleTable"/>
|
1288
|
+
</xsl:variable>
|
1301
1289
|
|
1302
1290
|
|
1303
|
-
|
1304
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1305
|
-
|
1306
|
-
<!-- <xsl:variable name="cols-count">
|
1307
|
-
<xsl:choose>
|
1308
|
-
<xsl:when test="*[local-name()='thead']">
|
1309
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1310
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1311
|
-
</xsl:call-template>
|
1312
|
-
</xsl:when>
|
1313
|
-
<xsl:otherwise>
|
1314
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1315
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1316
|
-
</xsl:call-template>
|
1317
|
-
</xsl:otherwise>
|
1318
|
-
</xsl:choose>
|
1319
|
-
</xsl:variable> -->
|
1320
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1321
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
<xsl:variable name="colwidths">
|
1326
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1327
|
-
<xsl:call-template name="calculate-column-widths">
|
1328
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1329
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
1330
|
-
</xsl:call-template>
|
1331
|
-
</xsl:if>
|
1332
|
-
</xsl:variable>
|
1333
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1334
|
-
|
1335
|
-
<!-- <xsl:variable name="colwidths2">
|
1336
|
-
<xsl:call-template name="calculate-column-widths">
|
1337
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1338
|
-
</xsl:call-template>
|
1339
|
-
</xsl:variable> -->
|
1340
|
-
|
1341
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1342
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1343
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1344
|
-
|
1345
|
-
<xsl:variable name="margin-left">
|
1346
|
-
<xsl:choose>
|
1347
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1348
|
-
<xsl:otherwise>0</xsl:otherwise>
|
1349
|
-
</xsl:choose>
|
1350
|
-
</xsl:variable>
|
1351
|
-
|
1352
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1353
1291
|
|
1354
1292
|
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
1293
|
|
1294
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1295
|
+
<fo:block> </fo:block>
|
1296
|
+
</xsl:if> -->
|
1359
1297
|
|
1360
|
-
|
1298
|
+
<!-- $namespace = 'iso' or -->
|
1361
1299
|
|
1300
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1362
1301
|
|
1302
|
+
|
1363
1303
|
|
1304
|
+
<xsl:call-template name="fn_name_display"/>
|
1364
1305
|
|
1365
|
-
|
1366
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1367
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1306
|
+
|
1368
1307
|
|
1308
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1369
1309
|
|
1310
|
+
<!-- <xsl:variable name="cols-count">
|
1311
|
+
<xsl:choose>
|
1312
|
+
<xsl:when test="*[local-name()='thead']">
|
1313
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1314
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1315
|
+
</xsl:call-template>
|
1316
|
+
</xsl:when>
|
1317
|
+
<xsl:otherwise>
|
1318
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1319
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1320
|
+
</xsl:call-template>
|
1321
|
+
</xsl:otherwise>
|
1322
|
+
</xsl:choose>
|
1323
|
+
</xsl:variable> -->
|
1324
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1325
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1370
1326
|
|
1371
1327
|
|
1372
|
-
|
1373
|
-
|
1374
|
-
<
|
1375
|
-
|
1376
|
-
|
1328
|
+
|
1329
|
+
<xsl:variable name="colwidths">
|
1330
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1331
|
+
<xsl:call-template name="calculate-column-widths">
|
1332
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1333
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
1334
|
+
</xsl:call-template>
|
1335
|
+
</xsl:if>
|
1336
|
+
</xsl:variable>
|
1337
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1338
|
+
|
1339
|
+
<!-- <xsl:variable name="colwidths2">
|
1340
|
+
<xsl:call-template name="calculate-column-widths">
|
1341
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1342
|
+
</xsl:call-template>
|
1343
|
+
</xsl:variable> -->
|
1344
|
+
|
1345
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1346
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1347
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1348
|
+
|
1349
|
+
<xsl:variable name="margin-left">
|
1350
|
+
<xsl:choose>
|
1351
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1352
|
+
<xsl:otherwise>0</xsl:otherwise>
|
1353
|
+
</xsl:choose>
|
1354
|
+
</xsl:variable>
|
1355
|
+
|
1356
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1377
1357
|
|
1378
1358
|
|
1359
|
+
|
1360
|
+
|
1361
|
+
|
1379
1362
|
|
1380
1363
|
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1364
|
+
|
1384
1365
|
|
1385
1366
|
|
1386
|
-
<attribute name="border-top">2pt solid black</attribute>
|
1387
|
-
<attribute name="border-bottom">2pt solid black</attribute>
|
1388
|
-
|
1389
1367
|
|
1390
|
-
</xsl:variable>
|
1391
|
-
|
1392
|
-
|
1393
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1394
1368
|
|
1395
|
-
|
1396
|
-
<xsl:attribute name="
|
1397
|
-
|
1398
|
-
</xsl:attribute>
|
1399
|
-
</xsl:for-each>
|
1369
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1370
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1371
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1400
1372
|
|
1401
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1402
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1403
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1404
|
-
</xsl:if>
|
1405
1373
|
|
1406
|
-
<xsl:choose>
|
1407
|
-
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1408
|
-
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1409
|
-
<fo:table-column column-width="{@width}"/>
|
1410
|
-
</xsl:for-each>
|
1411
|
-
</xsl:when>
|
1412
|
-
<xsl:otherwise>
|
1413
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1414
|
-
<xsl:choose>
|
1415
|
-
<xsl:when test=". = 1 or . = 0">
|
1416
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
1417
|
-
</xsl:when>
|
1418
|
-
<xsl:otherwise>
|
1419
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
1420
|
-
</xsl:otherwise>
|
1421
|
-
</xsl:choose>
|
1422
|
-
</xsl:for-each>
|
1423
|
-
</xsl:otherwise>
|
1424
|
-
</xsl:choose>
|
1425
1374
|
|
1426
|
-
<xsl:
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
</xsl:otherwise>
|
1433
|
-
</xsl:choose>
|
1375
|
+
<xsl:variable name="table_width">
|
1376
|
+
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1377
|
+
100%
|
1378
|
+
|
1379
|
+
|
1380
|
+
</xsl:variable>
|
1434
1381
|
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
<
|
1451
|
-
|
1452
|
-
|
1382
|
+
<xsl:variable name="table_attributes">
|
1383
|
+
<attribute name="table-layout">fixed</attribute>
|
1384
|
+
<attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
|
1385
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1386
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1387
|
+
|
1388
|
+
|
1389
|
+
|
1390
|
+
|
1391
|
+
|
1392
|
+
|
1393
|
+
|
1394
|
+
|
1395
|
+
|
1396
|
+
<attribute name="border-top">2pt solid black</attribute>
|
1397
|
+
<attribute name="border-bottom">2pt solid black</attribute>
|
1398
|
+
|
1399
|
+
|
1400
|
+
</xsl:variable>
|
1453
1401
|
|
1454
|
-
|
1402
|
+
|
1403
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1404
|
+
|
1405
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1406
|
+
<xsl:attribute name="{@name}">
|
1407
|
+
<xsl:value-of select="."/>
|
1408
|
+
</xsl:attribute>
|
1409
|
+
</xsl:for-each>
|
1410
|
+
|
1411
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1412
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1413
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1414
|
+
</xsl:if>
|
1415
|
+
|
1455
1416
|
<xsl:choose>
|
1456
|
-
<xsl:when test="
|
1457
|
-
<
|
1417
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1418
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1419
|
+
<fo:table-column column-width="{@width}"/>
|
1420
|
+
</xsl:for-each>
|
1458
1421
|
</xsl:when>
|
1459
1422
|
<xsl:otherwise>
|
1460
|
-
<
|
1423
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1424
|
+
<xsl:choose>
|
1425
|
+
<xsl:when test=". = 1 or . = 0">
|
1426
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1427
|
+
</xsl:when>
|
1428
|
+
<xsl:otherwise>
|
1429
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1430
|
+
</xsl:otherwise>
|
1431
|
+
</xsl:choose>
|
1432
|
+
</xsl:for-each>
|
1461
1433
|
</xsl:otherwise>
|
1462
1434
|
</xsl:choose>
|
1435
|
+
|
1436
|
+
<xsl:choose>
|
1437
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1438
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1439
|
+
</xsl:when>
|
1440
|
+
<xsl:otherwise>
|
1441
|
+
<xsl:apply-templates/>
|
1442
|
+
</xsl:otherwise>
|
1443
|
+
</xsl:choose>
|
1444
|
+
|
1445
|
+
</fo:table>
|
1446
|
+
|
1447
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
1448
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1449
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1450
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1451
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1452
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
1453
|
+
</xsl:call-template>
|
1463
1454
|
</xsl:for-each>
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1455
|
+
|
1456
|
+
<!-- insert footer as table -->
|
1457
|
+
<!-- <fo:table>
|
1458
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1459
|
+
<xsl:attribute name="{@name}">
|
1460
|
+
<xsl:value-of select="."/>
|
1461
|
+
</xsl:attribute>
|
1462
|
+
</xsl:for-each>
|
1463
|
+
|
1464
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1465
|
+
<xsl:choose>
|
1466
|
+
<xsl:when test=". = 1 or . = 0">
|
1467
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1468
|
+
</xsl:when>
|
1469
|
+
<xsl:otherwise>
|
1470
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1471
|
+
</xsl:otherwise>
|
1472
|
+
</xsl:choose>
|
1473
|
+
</xsl:for-each>
|
1474
|
+
</fo:table>-->
|
1475
|
+
|
1476
|
+
|
1477
|
+
|
1478
|
+
|
1479
|
+
|
1480
|
+
</fo:block-container>
|
1481
|
+
</xsl:variable>
|
1482
|
+
|
1483
|
+
|
1484
|
+
|
1485
|
+
<xsl:choose>
|
1486
|
+
<xsl:when test="@width">
|
1487
|
+
|
1488
|
+
<!-- centered table when table name is centered (see table-name-style) -->
|
1489
|
+
|
1490
|
+
<fo:table table-layout="fixed" width="100%">
|
1491
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
1492
|
+
<fo:table-column column-width="{@width}"/>
|
1493
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
1494
|
+
<fo:table-body>
|
1495
|
+
<fo:table-row>
|
1496
|
+
<fo:table-cell column-number="2">
|
1497
|
+
<fo:block><xsl:copy-of select="$table"/></fo:block>
|
1498
|
+
</fo:table-cell>
|
1499
|
+
</fo:table-row>
|
1500
|
+
</fo:table-body>
|
1501
|
+
</fo:table>
|
1502
|
+
|
1503
|
+
|
1504
|
+
|
1505
|
+
|
1506
|
+
</xsl:when>
|
1507
|
+
<xsl:otherwise>
|
1508
|
+
<xsl:copy-of select="$table"/>
|
1509
|
+
</xsl:otherwise>
|
1510
|
+
</xsl:choose>
|
1511
|
+
|
1471
1512
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1472
1513
|
<xsl:if test="normalize-space() != ''">
|
1473
1514
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -2147,7 +2188,9 @@
|
|
2147
2188
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2148
2189
|
<fo:block-container>
|
2149
2190
|
|
2150
|
-
<xsl:
|
2191
|
+
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
2192
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2193
|
+
</xsl:if>
|
2151
2194
|
|
2152
2195
|
|
2153
2196
|
<xsl:if test="parent::*[local-name() = 'note']">
|
@@ -2162,6 +2205,7 @@
|
|
2162
2205
|
<fo:block-container>
|
2163
2206
|
|
2164
2207
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2208
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2165
2209
|
|
2166
2210
|
|
2167
2211
|
<xsl:variable name="parent" select="local-name(..)"/>
|
@@ -2278,7 +2322,7 @@
|
|
2278
2322
|
<xsl:with-param name="table" select="$html-table"/>
|
2279
2323
|
</xsl:call-template>
|
2280
2324
|
</xsl:variable>
|
2281
|
-
<!-- colwidths=<xsl:
|
2325
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2282
2326
|
<xsl:variable name="maxlength_dt">
|
2283
2327
|
<xsl:call-template name="getMaxLength_dt"/>
|
2284
2328
|
</xsl:variable>
|
@@ -2307,13 +2351,22 @@
|
|
2307
2351
|
</xsl:when>
|
2308
2352
|
<xsl:otherwise>
|
2309
2353
|
<xsl:choose>
|
2354
|
+
<!-- to set width check most wide chars like `W` -->
|
2310
2355
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
2311
|
-
<fo:table-column column-width="
|
2312
|
-
<fo:table-column column-width="
|
2356
|
+
<fo:table-column column-width="7%"/>
|
2357
|
+
<fo:table-column column-width="93%"/>
|
2358
|
+
</xsl:when>
|
2359
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like ABC, etc -->
|
2360
|
+
<fo:table-column column-width="15%"/>
|
2361
|
+
<fo:table-column column-width="85%"/>
|
2362
|
+
</xsl:when>
|
2363
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
2364
|
+
<fo:table-column column-width="20%"/>
|
2365
|
+
<fo:table-column column-width="80%"/>
|
2313
2366
|
</xsl:when>
|
2314
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <=
|
2315
|
-
<fo:table-column column-width="
|
2316
|
-
<fo:table-column column-width="
|
2367
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
2368
|
+
<fo:table-column column-width="25%"/>
|
2369
|
+
<fo:table-column column-width="75%"/>
|
2317
2370
|
</xsl:when>
|
2318
2371
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
2319
2372
|
<fo:table-column column-width="60%"/>
|
@@ -2345,12 +2398,32 @@
|
|
2345
2398
|
</xsl:otherwise>
|
2346
2399
|
</xsl:choose>
|
2347
2400
|
</xsl:template><xsl:template name="getMaxLength_dt">
|
2348
|
-
<xsl:
|
2349
|
-
<xsl:
|
2350
|
-
|
2351
|
-
<xsl:
|
2352
|
-
|
2353
|
-
|
2401
|
+
<xsl:variable name="lengths">
|
2402
|
+
<xsl:for-each select="*[local-name()='dt']">
|
2403
|
+
<xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
|
2404
|
+
<xsl:variable name="attributes">
|
2405
|
+
<xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
|
2406
|
+
<xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
|
2407
|
+
</xsl:variable>
|
2408
|
+
<length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
|
2409
|
+
</xsl:for-each>
|
2410
|
+
</xsl:variable>
|
2411
|
+
<xsl:variable name="maxLength">
|
2412
|
+
<!-- <xsl:for-each select="*[local-name()='dt']">
|
2413
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
2414
|
+
<xsl:if test="position() = 1">
|
2415
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
2416
|
+
</xsl:if>
|
2417
|
+
</xsl:for-each> -->
|
2418
|
+
<xsl:for-each select="xalan:nodeset($lengths)/length">
|
2419
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
2420
|
+
<xsl:if test="position() = 1">
|
2421
|
+
<xsl:value-of select="."/>
|
2422
|
+
</xsl:if>
|
2423
|
+
</xsl:for-each>
|
2424
|
+
</xsl:variable>
|
2425
|
+
<!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
|
2426
|
+
<xsl:value-of select="$maxLength"/>
|
2354
2427
|
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
2355
2428
|
<xsl:param name="key_iso"/>
|
2356
2429
|
|
@@ -2489,6 +2562,7 @@
|
|
2489
2562
|
|
2490
2563
|
|
2491
2564
|
|
2565
|
+
|
2492
2566
|
|
2493
2567
|
</xsl:variable>
|
2494
2568
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -2502,6 +2576,10 @@
|
|
2502
2576
|
</xsl:if>
|
2503
2577
|
<xsl:apply-templates/>
|
2504
2578
|
</fo:inline>
|
2579
|
+
</xsl:template><xsl:template match="*[local-name()='underline']">
|
2580
|
+
<fo:inline text-decoration="underline">
|
2581
|
+
<xsl:apply-templates/>
|
2582
|
+
</fo:inline>
|
2505
2583
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2506
2584
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
2507
2585
|
<xsl:apply-templates/>
|
@@ -2595,6 +2673,10 @@
|
|
2595
2673
|
<xsl:param name="text" select="."/>
|
2596
2674
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2597
2675
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
2676
|
+
</xsl:template><xsl:template name="add-zero-spaces-link-java">
|
2677
|
+
<xsl:param name="text" select="."/>
|
2678
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2679
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1')"/>
|
2598
2680
|
</xsl:template><xsl:template name="add-zero-spaces">
|
2599
2681
|
<xsl:param name="text" select="."/>
|
2600
2682
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -2855,6 +2937,11 @@
|
|
2855
2937
|
<!-- replace start and end spaces to non-break space -->
|
2856
2938
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
2857
2939
|
</xsl:copy>
|
2940
|
+
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
2941
|
+
<xsl:copy>
|
2942
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
2943
|
+
</xsl:copy>
|
2944
|
+
<mathml:mspace width="0.5ex"/>
|
2858
2945
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2859
2946
|
<xsl:variable name="target">
|
2860
2947
|
<xsl:choose>
|
@@ -2876,7 +2963,10 @@
|
|
2876
2963
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
2877
2964
|
<xsl:choose>
|
2878
2965
|
<xsl:when test="normalize-space(.) = ''">
|
2879
|
-
<xsl:value-of select="$target"/>
|
2966
|
+
<!-- <xsl:value-of select="$target"/> -->
|
2967
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
2968
|
+
<xsl:with-param name="text" select="$target"/>
|
2969
|
+
</xsl:call-template>
|
2880
2970
|
</xsl:when>
|
2881
2971
|
<xsl:otherwise>
|
2882
2972
|
<xsl:apply-templates/>
|
@@ -3078,7 +3168,7 @@
|
|
3078
3168
|
</xsl:if> -->
|
3079
3169
|
</fo:inline>
|
3080
3170
|
</xsl:if>
|
3081
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3171
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3082
3172
|
<fo:block-container id="{@id}">
|
3083
3173
|
|
3084
3174
|
<fo:block>
|
@@ -3147,6 +3237,8 @@
|
|
3147
3237
|
<xsl:variable name="bookmark-title_">
|
3148
3238
|
<xsl:call-template name="getLangVersion">
|
3149
3239
|
<xsl:with-param name="lang" select="@lang"/>
|
3240
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
3241
|
+
<xsl:with-param name="title" select="@title-part"/>
|
3150
3242
|
</xsl:call-template>
|
3151
3243
|
</xsl:variable>
|
3152
3244
|
<xsl:choose>
|
@@ -3164,13 +3256,34 @@
|
|
3164
3256
|
</xsl:choose>
|
3165
3257
|
</fo:bookmark-title>
|
3166
3258
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3259
|
+
|
3260
|
+
<xsl:call-template name="insertFigureBookmarks">
|
3261
|
+
<xsl:with-param name="contents" select="contents"/>
|
3262
|
+
</xsl:call-template>
|
3263
|
+
|
3264
|
+
<xsl:call-template name="insertTableBookmarks">
|
3265
|
+
<xsl:with-param name="contents" select="contents"/>
|
3266
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3267
|
+
</xsl:call-template>
|
3268
|
+
|
3167
3269
|
</fo:bookmark>
|
3168
3270
|
|
3169
3271
|
</xsl:for-each>
|
3170
3272
|
</xsl:when>
|
3171
3273
|
<xsl:otherwise>
|
3172
3274
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3275
|
+
|
3173
3276
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3277
|
+
|
3278
|
+
<xsl:call-template name="insertFigureBookmarks">
|
3279
|
+
<xsl:with-param name="contents" select="contents"/>
|
3280
|
+
</xsl:call-template>
|
3281
|
+
|
3282
|
+
<xsl:call-template name="insertTableBookmarks">
|
3283
|
+
<xsl:with-param name="contents" select="contents"/>
|
3284
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3285
|
+
</xsl:call-template>
|
3286
|
+
|
3174
3287
|
</xsl:for-each>
|
3175
3288
|
</xsl:otherwise>
|
3176
3289
|
</xsl:choose>
|
@@ -3189,8 +3302,44 @@
|
|
3189
3302
|
|
3190
3303
|
</fo:bookmark-tree>
|
3191
3304
|
</xsl:if>
|
3305
|
+
</xsl:template><xsl:template name="insertFigureBookmarks">
|
3306
|
+
<xsl:param name="contents"/>
|
3307
|
+
<xsl:if test="xalan:nodeset($contents)/figure">
|
3308
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
|
3309
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
3310
|
+
<xsl:for-each select="xalan:nodeset($contents)/figure">
|
3311
|
+
<fo:bookmark internal-destination="{@id}">
|
3312
|
+
<fo:bookmark-title>
|
3313
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3314
|
+
</fo:bookmark-title>
|
3315
|
+
</fo:bookmark>
|
3316
|
+
</xsl:for-each>
|
3317
|
+
</fo:bookmark>
|
3318
|
+
</xsl:if>
|
3319
|
+
</xsl:template><xsl:template name="insertTableBookmarks">
|
3320
|
+
<xsl:param name="contents"/>
|
3321
|
+
<xsl:param name="lang"/>
|
3322
|
+
<xsl:if test="xalan:nodeset($contents)/table">
|
3323
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
|
3324
|
+
<fo:bookmark-title>
|
3325
|
+
<xsl:choose>
|
3326
|
+
<xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
|
3327
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
3328
|
+
</xsl:choose>
|
3329
|
+
</fo:bookmark-title>
|
3330
|
+
<xsl:for-each select="xalan:nodeset($contents)/table">
|
3331
|
+
<fo:bookmark internal-destination="{@id}">
|
3332
|
+
<fo:bookmark-title>
|
3333
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3334
|
+
</fo:bookmark-title>
|
3335
|
+
</fo:bookmark>
|
3336
|
+
</xsl:for-each>
|
3337
|
+
</fo:bookmark>
|
3338
|
+
</xsl:if>
|
3192
3339
|
</xsl:template><xsl:template name="getLangVersion">
|
3193
3340
|
<xsl:param name="lang"/>
|
3341
|
+
<xsl:param name="doctype" select="''"/>
|
3342
|
+
<xsl:param name="title" select="''"/>
|
3194
3343
|
<xsl:choose>
|
3195
3344
|
<xsl:when test="$lang = 'en'">
|
3196
3345
|
|
@@ -3226,6 +3375,12 @@
|
|
3226
3375
|
<!-- <xsl:text> </xsl:text> -->
|
3227
3376
|
</xsl:template><xsl:template name="getSection">
|
3228
3377
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3378
|
+
<!--
|
3379
|
+
<xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
|
3380
|
+
<xsl:value-of select="."/>
|
3381
|
+
</xsl:for-each>
|
3382
|
+
-->
|
3383
|
+
|
3229
3384
|
</xsl:template><xsl:template name="getName">
|
3230
3385
|
<xsl:choose>
|
3231
3386
|
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
@@ -3278,6 +3433,12 @@
|
|
3278
3433
|
<xsl:copy>
|
3279
3434
|
<xsl:apply-templates mode="contents_item"/>
|
3280
3435
|
</xsl:copy>
|
3436
|
+
</xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
|
3437
|
+
<xsl:copy>
|
3438
|
+
<xsl:apply-templates mode="contents_item"/>
|
3439
|
+
</xsl:copy>
|
3440
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
3441
|
+
<xsl:copy-of select="."/>
|
3281
3442
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3282
3443
|
<xsl:text> </xsl:text>
|
3283
3444
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -3303,6 +3464,7 @@
|
|
3303
3464
|
|
3304
3465
|
|
3305
3466
|
|
3467
|
+
|
3306
3468
|
|
3307
3469
|
|
3308
3470
|
|
@@ -3679,10 +3841,13 @@
|
|
3679
3841
|
</xsl:if>
|
3680
3842
|
</xsl:if>
|
3681
3843
|
|
3844
|
+
|
3682
3845
|
<fo:block-container margin-left="0mm">
|
3683
3846
|
|
3684
3847
|
<fo:block xsl:use-attribute-sets="quote-style">
|
3685
|
-
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3848
|
+
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
3849
|
+
|
3850
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
3686
3851
|
</fo:block>
|
3687
3852
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3688
3853
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -3831,6 +3996,7 @@
|
|
3831
3996
|
|
3832
3997
|
|
3833
3998
|
|
3999
|
+
|
3834
4000
|
|
3835
4001
|
|
3836
4002
|
|
@@ -3842,7 +4008,7 @@
|
|
3842
4008
|
|
3843
4009
|
|
3844
4010
|
|
3845
|
-
</xsl:template><xsl:template match="
|
4011
|
+
</xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
3846
4012
|
<fo:block break-after="page"/>
|
3847
4013
|
<fo:block>
|
3848
4014
|
<xsl:call-template name="setId"/>
|
@@ -3850,7 +4016,8 @@
|
|
3850
4016
|
</fo:block>
|
3851
4017
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3852
4018
|
<fo:block>
|
3853
|
-
<xsl:call-template name="setId"/>
|
4019
|
+
<xsl:call-template name="setId"/>
|
4020
|
+
|
3854
4021
|
|
3855
4022
|
<xsl:apply-templates/>
|
3856
4023
|
</fo:block>
|
@@ -3996,6 +4163,8 @@
|
|
3996
4163
|
<xsl:value-of select="translate(.,'. ','')"/>
|
3997
4164
|
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
3998
4165
|
<xsl:value-of select="substring(.,1,1)"/>
|
4166
|
+
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4167
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
3999
4168
|
</xsl:template><xsl:template name="convertDate">
|
4000
4169
|
<xsl:param name="date"/>
|
4001
4170
|
<xsl:param name="format" select="'short'"/>
|
@@ -4020,6 +4189,57 @@
|
|
4020
4189
|
</xsl:variable>
|
4021
4190
|
<xsl:variable name="result">
|
4022
4191
|
<xsl:choose>
|
4192
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
4193
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4194
|
+
<xsl:text> </xsl:text>
|
4195
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
4196
|
+
</xsl:when>
|
4197
|
+
<xsl:when test="$format = 'ddMM'">
|
4198
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4199
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
4200
|
+
</xsl:when>
|
4201
|
+
<xsl:when test="$format = 'short' or $day = ''">
|
4202
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
4203
|
+
</xsl:when>
|
4204
|
+
<xsl:otherwise>
|
4205
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
4206
|
+
</xsl:otherwise>
|
4207
|
+
</xsl:choose>
|
4208
|
+
</xsl:variable>
|
4209
|
+
<xsl:value-of select="$result"/>
|
4210
|
+
</xsl:template><xsl:template name="convertDateLocalized">
|
4211
|
+
<xsl:param name="date"/>
|
4212
|
+
<xsl:param name="format" select="'short'"/>
|
4213
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
4214
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
4215
|
+
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
4216
|
+
<xsl:variable name="monthStr">
|
4217
|
+
<xsl:choose>
|
4218
|
+
<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>
|
4219
|
+
<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>
|
4220
|
+
<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>
|
4221
|
+
<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>
|
4222
|
+
<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>
|
4223
|
+
<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>
|
4224
|
+
<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>
|
4225
|
+
<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>
|
4226
|
+
<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>
|
4227
|
+
<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>
|
4228
|
+
<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>
|
4229
|
+
<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>
|
4230
|
+
</xsl:choose>
|
4231
|
+
</xsl:variable>
|
4232
|
+
<xsl:variable name="result">
|
4233
|
+
<xsl:choose>
|
4234
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
4235
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4236
|
+
<xsl:text> </xsl:text>
|
4237
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
4238
|
+
</xsl:when>
|
4239
|
+
<xsl:when test="$format = 'ddMM'">
|
4240
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4241
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
4242
|
+
</xsl:when>
|
4023
4243
|
<xsl:when test="$format = 'short' or $day = ''">
|
4024
4244
|
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
4025
4245
|
</xsl:when>
|
@@ -4035,7 +4255,7 @@
|
|
4035
4255
|
<xsl:param name="charDelim" select="', '"/>
|
4036
4256
|
<xsl:choose>
|
4037
4257
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
4038
|
-
<xsl:for-each select="
|
4258
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4039
4259
|
<xsl:sort data-type="text" order="ascending"/>
|
4040
4260
|
<xsl:call-template name="insertKeyword">
|
4041
4261
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -4044,7 +4264,7 @@
|
|
4044
4264
|
</xsl:for-each>
|
4045
4265
|
</xsl:when>
|
4046
4266
|
<xsl:otherwise>
|
4047
|
-
<xsl:for-each select="
|
4267
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4048
4268
|
<xsl:call-template name="insertKeyword">
|
4049
4269
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
4050
4270
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -4061,6 +4281,9 @@
|
|
4061
4281
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
4062
4282
|
</xsl:choose>
|
4063
4283
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
4284
|
+
<xsl:variable name="lang">
|
4285
|
+
<xsl:call-template name="getLang"/>
|
4286
|
+
</xsl:variable>
|
4064
4287
|
<fo:declarations>
|
4065
4288
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
4066
4289
|
<pdf:dictionary type="normal" key="ViewerPreferences">
|
@@ -4073,13 +4296,16 @@
|
|
4073
4296
|
<!-- Dublin Core properties go here -->
|
4074
4297
|
<dc:title>
|
4075
4298
|
<xsl:variable name="title">
|
4076
|
-
|
4077
|
-
|
4078
|
-
|
4079
|
-
|
4080
|
-
|
4081
|
-
|
4082
|
-
|
4299
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4300
|
+
|
4301
|
+
|
4302
|
+
|
4303
|
+
|
4304
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
4305
|
+
|
4306
|
+
|
4307
|
+
|
4308
|
+
</xsl:for-each>
|
4083
4309
|
</xsl:variable>
|
4084
4310
|
<xsl:choose>
|
4085
4311
|
<xsl:when test="normalize-space($title) != ''">
|
@@ -4091,15 +4317,14 @@
|
|
4091
4317
|
</xsl:choose>
|
4092
4318
|
</dc:title>
|
4093
4319
|
<dc:creator>
|
4094
|
-
|
4095
|
-
|
4096
|
-
|
4097
|
-
</dc:creator>
|
4098
|
-
<dc:description>
|
4099
|
-
<xsl:variable name="abstract">
|
4320
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4100
4321
|
|
4101
4322
|
|
4102
4323
|
|
4324
|
+
</xsl:for-each>
|
4325
|
+
</dc:creator>
|
4326
|
+
<dc:description>
|
4327
|
+
<xsl:variable name="abstract">
|
4103
4328
|
|
4104
4329
|
|
4105
4330
|
</xsl:variable>
|
@@ -4212,6 +4437,7 @@
|
|
4212
4437
|
<xsl:value-of select="document('')//*/namespace::mpfd"/>
|
4213
4438
|
|
4214
4439
|
|
4440
|
+
|
4215
4441
|
</xsl:variable>
|
4216
4442
|
<xsl:if test="$documentNS != $XSLNS">
|
4217
4443
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4271,6 +4497,11 @@
|
|
4271
4497
|
<xsl:call-template name="getLang"/>
|
4272
4498
|
</xsl:variable>
|
4273
4499
|
|
4274
|
-
<xsl:
|
4500
|
+
<xsl:choose>
|
4501
|
+
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
4502
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4503
|
+
</xsl:when>
|
4504
|
+
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
4505
|
+
</xsl:choose>
|
4275
4506
|
|
4276
4507
|
</xsl:template></xsl:stylesheet>
|