metanorma-m3aawg 1.6.3 → 1.6.8
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 +0 -4
- data/lib/asciidoctor/m3aawg/basicdoc.rng +5 -3
- data/lib/asciidoctor/m3aawg/isodoc.rng +134 -5
- data/lib/asciidoctor/m3aawg/m3d.rng +6 -0
- data/lib/isodoc/m3aawg/{m3d.report.xsl → m3aawg.policy.xsl} +573 -241
- data/lib/isodoc/m3aawg/m3aawg.report.xsl +4837 -0
- data/lib/isodoc/m3aawg/pdf_convert.rb +1 -1
- data/lib/metanorma/m3aawg/processor.rb +1 -1
- data/lib/metanorma/m3aawg/version.rb +1 -1
- data/metanorma-m3d.gemspec +2 -2
- data/metanorma.yml +2 -2
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2c14367a19ac3e626087fc058207b281990867aa528f08f70ba6eb2780f1fbe
|
4
|
+
data.tar.gz: 7f9d8fcdc4d946e525d089521c9cab8309a134d1288571cd0c5f81cd83b84876
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d51169449e5e14b5803fdea2f394f9e38e2ab5a4d8d6065391a1c956bc06bafc9c3a2ae6306f09aafd67627ba39186764e304b2f54c1d79c7f73822159d51641
|
7
|
+
data.tar.gz: f8e1825ec91766a43d741f0cd8f6db401d16ada002bed0b1a3d7c73838d292074d5ba1187c22e557128f1fb8f96a769ae29c1c50cfca1636c74202eeef0faaa8
|
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>
|
@@ -100,6 +100,9 @@
|
|
100
100
|
<zeroOrMore>
|
101
101
|
<ref name="termdocsource"/>
|
102
102
|
</zeroOrMore>
|
103
|
+
<optional>
|
104
|
+
<ref name="misccontainer"/>
|
105
|
+
</optional>
|
103
106
|
<optional>
|
104
107
|
<ref name="boilerplate"/>
|
105
108
|
</optional>
|
@@ -111,6 +114,9 @@
|
|
111
114
|
<ref name="annex"/>
|
112
115
|
</zeroOrMore>
|
113
116
|
<ref name="bibliography"/>
|
117
|
+
<zeroOrMore>
|
118
|
+
<ref name="indexsect"/>
|
119
|
+
</zeroOrMore>
|
114
120
|
</element>
|
115
121
|
</define>
|
116
122
|
</grammar>
|
@@ -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
|
|
@@ -73,7 +74,9 @@
|
|
73
74
|
|
74
75
|
</fo:layout-master-set>
|
75
76
|
|
76
|
-
<
|
77
|
+
<fo:declarations>
|
78
|
+
<xsl:call-template name="addPDFUAmeta"/>
|
79
|
+
</fo:declarations>
|
77
80
|
|
78
81
|
<xsl:call-template name="addBookmarks">
|
79
82
|
<xsl:with-param name="contents" select="$contents"/>
|
@@ -1146,6 +1149,7 @@
|
|
1146
1149
|
|
1147
1150
|
|
1148
1151
|
|
1152
|
+
|
1149
1153
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1150
1154
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1151
1155
|
|
@@ -1281,6 +1285,7 @@
|
|
1281
1285
|
|
1282
1286
|
|
1283
1287
|
|
1288
|
+
|
1284
1289
|
</xsl:attribute-set><xsl:attribute-set name="quote-source-style">
|
1285
1290
|
|
1286
1291
|
|
@@ -1415,190 +1420,229 @@
|
|
1415
1420
|
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1416
1421
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1417
1422
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1418
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
1423
|
+
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1419
1424
|
|
1420
|
-
<xsl:variable name="
|
1421
|
-
<xsl:call-template name="getSimpleTable"/>
|
1422
|
-
</xsl:variable>
|
1425
|
+
<xsl:variable name="table">
|
1423
1426
|
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
1429
|
-
<fo:block> </fo:block>
|
1430
|
-
</xsl:if> -->
|
1431
|
-
|
1432
|
-
<!-- $namespace = 'iso' or -->
|
1433
|
-
|
1434
|
-
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
<xsl:call-template name="fn_name_display"/>
|
1427
|
+
<xsl:variable name="simple-table">
|
1428
|
+
<xsl:call-template name="getSimpleTable"/>
|
1429
|
+
</xsl:variable>
|
1439
1430
|
|
1440
1431
|
|
1441
|
-
|
1442
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1443
|
-
|
1444
|
-
<!-- <xsl:variable name="cols-count">
|
1445
|
-
<xsl:choose>
|
1446
|
-
<xsl:when test="*[local-name()='thead']">
|
1447
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1448
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1449
|
-
</xsl:call-template>
|
1450
|
-
</xsl:when>
|
1451
|
-
<xsl:otherwise>
|
1452
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1453
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1454
|
-
</xsl:call-template>
|
1455
|
-
</xsl:otherwise>
|
1456
|
-
</xsl:choose>
|
1457
|
-
</xsl:variable> -->
|
1458
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1459
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
<xsl:variable name="colwidths">
|
1464
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1465
|
-
<xsl:call-template name="calculate-column-widths">
|
1466
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1467
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
1468
|
-
</xsl:call-template>
|
1469
|
-
</xsl:if>
|
1470
|
-
</xsl:variable>
|
1471
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1472
|
-
|
1473
|
-
<!-- <xsl:variable name="colwidths2">
|
1474
|
-
<xsl:call-template name="calculate-column-widths">
|
1475
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1476
|
-
</xsl:call-template>
|
1477
|
-
</xsl:variable> -->
|
1478
|
-
|
1479
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1480
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1481
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1482
|
-
|
1483
|
-
<xsl:variable name="margin-left">
|
1484
|
-
<xsl:choose>
|
1485
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1486
|
-
<xsl:otherwise>0</xsl:otherwise>
|
1487
|
-
</xsl:choose>
|
1488
|
-
</xsl:variable>
|
1489
|
-
|
1490
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1491
1432
|
|
1492
1433
|
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
1434
|
|
1435
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1436
|
+
<fo:block> </fo:block>
|
1437
|
+
</xsl:if> -->
|
1497
1438
|
|
1498
|
-
|
1439
|
+
<!-- $namespace = 'iso' or -->
|
1440
|
+
|
1441
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1442
|
+
|
1443
|
+
|
1444
|
+
|
1445
|
+
<xsl:call-template name="fn_name_display"/>
|
1446
|
+
|
1447
|
+
|
1448
|
+
|
1449
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1450
|
+
|
1451
|
+
<!-- <xsl:variable name="cols-count">
|
1452
|
+
<xsl:choose>
|
1453
|
+
<xsl:when test="*[local-name()='thead']">
|
1454
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1455
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1456
|
+
</xsl:call-template>
|
1457
|
+
</xsl:when>
|
1458
|
+
<xsl:otherwise>
|
1459
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1460
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1461
|
+
</xsl:call-template>
|
1462
|
+
</xsl:otherwise>
|
1463
|
+
</xsl:choose>
|
1464
|
+
</xsl:variable> -->
|
1465
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1466
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1499
1467
|
|
1500
1468
|
|
1501
1469
|
|
1470
|
+
<xsl:variable name="colwidths">
|
1471
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1472
|
+
<xsl:call-template name="calculate-column-widths">
|
1473
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1474
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
1475
|
+
</xsl:call-template>
|
1476
|
+
</xsl:if>
|
1477
|
+
</xsl:variable>
|
1478
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1502
1479
|
|
1480
|
+
<!-- <xsl:variable name="colwidths2">
|
1481
|
+
<xsl:call-template name="calculate-column-widths">
|
1482
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1483
|
+
</xsl:call-template>
|
1484
|
+
</xsl:variable> -->
|
1503
1485
|
|
1486
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1487
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1488
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1504
1489
|
|
1490
|
+
<xsl:variable name="margin-left">
|
1491
|
+
<xsl:choose>
|
1492
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1493
|
+
<xsl:otherwise>0</xsl:otherwise>
|
1494
|
+
</xsl:choose>
|
1495
|
+
</xsl:variable>
|
1505
1496
|
|
1506
|
-
<
|
1507
|
-
<attribute name="table-layout">fixed</attribute>
|
1508
|
-
<attribute name="width">100%</attribute>
|
1509
|
-
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1510
|
-
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1497
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1511
1498
|
|
1512
1499
|
|
1500
|
+
|
1501
|
+
|
1502
|
+
|
1513
1503
|
|
1514
1504
|
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1505
|
+
|
1518
1506
|
|
1519
|
-
|
1520
1507
|
|
1521
|
-
</xsl:variable>
|
1522
|
-
|
1523
|
-
|
1524
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1525
1508
|
|
1526
|
-
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1527
|
-
<xsl:attribute name="{@name}">
|
1528
|
-
<xsl:value-of select="."/>
|
1529
|
-
</xsl:attribute>
|
1530
|
-
</xsl:for-each>
|
1531
1509
|
|
1532
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1533
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1534
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1535
|
-
</xsl:if>
|
1536
1510
|
|
1537
|
-
<xsl:choose>
|
1538
|
-
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1539
|
-
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1540
|
-
<fo:table-column column-width="{@width}"/>
|
1541
|
-
</xsl:for-each>
|
1542
|
-
</xsl:when>
|
1543
|
-
<xsl:otherwise>
|
1544
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1545
|
-
<xsl:choose>
|
1546
|
-
<xsl:when test=". = 1 or . = 0">
|
1547
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
1548
|
-
</xsl:when>
|
1549
|
-
<xsl:otherwise>
|
1550
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
1551
|
-
</xsl:otherwise>
|
1552
|
-
</xsl:choose>
|
1553
|
-
</xsl:for-each>
|
1554
|
-
</xsl:otherwise>
|
1555
|
-
</xsl:choose>
|
1556
1511
|
|
1557
|
-
<xsl:
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1512
|
+
<xsl:variable name="table_width">
|
1513
|
+
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1514
|
+
100%
|
1515
|
+
|
1516
|
+
|
1517
|
+
</xsl:variable>
|
1518
|
+
|
1519
|
+
<xsl:variable name="table_attributes">
|
1520
|
+
<attribute name="table-layout">fixed</attribute>
|
1521
|
+
<attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
|
1522
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1523
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1524
|
+
|
1525
|
+
|
1526
|
+
|
1527
|
+
|
1528
|
+
|
1529
|
+
|
1530
|
+
|
1531
|
+
|
1532
|
+
|
1533
|
+
|
1534
|
+
</xsl:variable>
|
1565
1535
|
|
1566
|
-
</fo:table>
|
1567
|
-
|
1568
|
-
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
1569
|
-
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1570
|
-
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1571
|
-
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1572
|
-
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1573
|
-
<xsl:with-param name="colgroup" select="$colgroup"/>
|
1574
|
-
</xsl:call-template>
|
1575
|
-
</xsl:for-each>
|
1576
|
-
|
1577
|
-
<!-- insert footer as table -->
|
1578
|
-
<!-- <fo:table>
|
1579
|
-
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1580
|
-
<xsl:attribute name="{@name}">
|
1581
|
-
<xsl:value-of select="."/>
|
1582
|
-
</xsl:attribute>
|
1583
|
-
</xsl:for-each>
|
1584
1536
|
|
1585
|
-
<
|
1537
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1538
|
+
|
1539
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1540
|
+
<xsl:attribute name="{@name}">
|
1541
|
+
<xsl:value-of select="."/>
|
1542
|
+
</xsl:attribute>
|
1543
|
+
</xsl:for-each>
|
1544
|
+
|
1545
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1546
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1547
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1548
|
+
</xsl:if>
|
1549
|
+
|
1550
|
+
<xsl:choose>
|
1551
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1552
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1553
|
+
<fo:table-column column-width="{@width}"/>
|
1554
|
+
</xsl:for-each>
|
1555
|
+
</xsl:when>
|
1556
|
+
<xsl:otherwise>
|
1557
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1558
|
+
<xsl:choose>
|
1559
|
+
<xsl:when test=". = 1 or . = 0">
|
1560
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1561
|
+
</xsl:when>
|
1562
|
+
<xsl:otherwise>
|
1563
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1564
|
+
</xsl:otherwise>
|
1565
|
+
</xsl:choose>
|
1566
|
+
</xsl:for-each>
|
1567
|
+
</xsl:otherwise>
|
1568
|
+
</xsl:choose>
|
1569
|
+
|
1586
1570
|
<xsl:choose>
|
1587
|
-
<xsl:when test="
|
1588
|
-
<
|
1571
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1572
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1589
1573
|
</xsl:when>
|
1590
1574
|
<xsl:otherwise>
|
1591
|
-
<
|
1575
|
+
<xsl:apply-templates/>
|
1592
1576
|
</xsl:otherwise>
|
1593
1577
|
</xsl:choose>
|
1578
|
+
|
1579
|
+
</fo:table>
|
1580
|
+
|
1581
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
1582
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1583
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1584
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1585
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1586
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
1587
|
+
</xsl:call-template>
|
1594
1588
|
</xsl:for-each>
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1589
|
+
|
1590
|
+
<!-- insert footer as table -->
|
1591
|
+
<!-- <fo:table>
|
1592
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1593
|
+
<xsl:attribute name="{@name}">
|
1594
|
+
<xsl:value-of select="."/>
|
1595
|
+
</xsl:attribute>
|
1596
|
+
</xsl:for-each>
|
1597
|
+
|
1598
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1599
|
+
<xsl:choose>
|
1600
|
+
<xsl:when test=". = 1 or . = 0">
|
1601
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1602
|
+
</xsl:when>
|
1603
|
+
<xsl:otherwise>
|
1604
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1605
|
+
</xsl:otherwise>
|
1606
|
+
</xsl:choose>
|
1607
|
+
</xsl:for-each>
|
1608
|
+
</fo:table>-->
|
1609
|
+
|
1610
|
+
|
1611
|
+
|
1612
|
+
|
1613
|
+
|
1614
|
+
</fo:block-container>
|
1615
|
+
</xsl:variable>
|
1616
|
+
|
1617
|
+
|
1618
|
+
|
1619
|
+
<xsl:choose>
|
1620
|
+
<xsl:when test="@width">
|
1621
|
+
|
1622
|
+
<!-- centered table when table name is centered (see table-name-style) -->
|
1623
|
+
|
1624
|
+
<fo:table table-layout="fixed" width="100%">
|
1625
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
1626
|
+
<fo:table-column column-width="{@width}"/>
|
1627
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
1628
|
+
<fo:table-body>
|
1629
|
+
<fo:table-row>
|
1630
|
+
<fo:table-cell column-number="2">
|
1631
|
+
<fo:block><xsl:copy-of select="$table"/></fo:block>
|
1632
|
+
</fo:table-cell>
|
1633
|
+
</fo:table-row>
|
1634
|
+
</fo:table-body>
|
1635
|
+
</fo:table>
|
1636
|
+
|
1637
|
+
|
1638
|
+
|
1639
|
+
|
1640
|
+
</xsl:when>
|
1641
|
+
<xsl:otherwise>
|
1642
|
+
<xsl:copy-of select="$table"/>
|
1643
|
+
</xsl:otherwise>
|
1644
|
+
</xsl:choose>
|
1645
|
+
|
1602
1646
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1603
1647
|
<xsl:if test="normalize-space() != ''">
|
1604
1648
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -1726,7 +1770,15 @@
|
|
1726
1770
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1727
1771
|
<xsl:value-of select="@target"/>
|
1728
1772
|
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1729
|
-
<xsl:variable name="
|
1773
|
+
<xsl:variable name="mathml">
|
1774
|
+
<xsl:for-each select="*">
|
1775
|
+
<xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
|
1776
|
+
<xsl:copy-of select="."/>
|
1777
|
+
</xsl:if>
|
1778
|
+
</xsl:for-each>
|
1779
|
+
</xsl:variable>
|
1780
|
+
|
1781
|
+
<xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
|
1730
1782
|
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1731
1783
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1732
1784
|
<xsl:param name="cols-count"/>
|
@@ -2411,7 +2463,7 @@
|
|
2411
2463
|
<xsl:with-param name="table" select="$html-table"/>
|
2412
2464
|
</xsl:call-template>
|
2413
2465
|
</xsl:variable>
|
2414
|
-
<!-- colwidths=<xsl:
|
2466
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2415
2467
|
<xsl:variable name="maxlength_dt">
|
2416
2468
|
<xsl:call-template name="getMaxLength_dt"/>
|
2417
2469
|
</xsl:variable>
|
@@ -2440,13 +2492,22 @@
|
|
2440
2492
|
</xsl:when>
|
2441
2493
|
<xsl:otherwise>
|
2442
2494
|
<xsl:choose>
|
2495
|
+
<!-- to set width check most wide chars like `W` -->
|
2443
2496
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
2444
|
-
<fo:table-column column-width="
|
2445
|
-
<fo:table-column column-width="
|
2497
|
+
<fo:table-column column-width="7%"/>
|
2498
|
+
<fo:table-column column-width="93%"/>
|
2499
|
+
</xsl:when>
|
2500
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like ABC, etc -->
|
2501
|
+
<fo:table-column column-width="15%"/>
|
2502
|
+
<fo:table-column column-width="85%"/>
|
2503
|
+
</xsl:when>
|
2504
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
2505
|
+
<fo:table-column column-width="20%"/>
|
2506
|
+
<fo:table-column column-width="80%"/>
|
2446
2507
|
</xsl:when>
|
2447
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <=
|
2448
|
-
<fo:table-column column-width="
|
2449
|
-
<fo:table-column column-width="
|
2508
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
2509
|
+
<fo:table-column column-width="25%"/>
|
2510
|
+
<fo:table-column column-width="75%"/>
|
2450
2511
|
</xsl:when>
|
2451
2512
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
2452
2513
|
<fo:table-column column-width="60%"/>
|
@@ -2637,6 +2698,7 @@
|
|
2637
2698
|
|
2638
2699
|
|
2639
2700
|
|
2701
|
+
|
2640
2702
|
<xsl:choose>
|
2641
2703
|
<xsl:when test="not(ancestor::*[local-name()='note'])">10</xsl:when>
|
2642
2704
|
<xsl:otherwise>11</xsl:otherwise>
|
@@ -2660,10 +2722,18 @@
|
|
2660
2722
|
</xsl:if>
|
2661
2723
|
<xsl:apply-templates/>
|
2662
2724
|
</fo:inline>
|
2725
|
+
</xsl:template><xsl:template match="*[local-name()='underline']">
|
2726
|
+
<fo:inline text-decoration="underline">
|
2727
|
+
<xsl:apply-templates/>
|
2728
|
+
</fo:inline>
|
2663
2729
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2664
2730
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
2665
2731
|
<xsl:apply-templates/>
|
2666
2732
|
</fo:inline>
|
2733
|
+
</xsl:template><xsl:template match="*[local-name()='hi']">
|
2734
|
+
<fo:inline background-color="yellow">
|
2735
|
+
<xsl:apply-templates/>
|
2736
|
+
</fo:inline>
|
2667
2737
|
</xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
2668
2738
|
<xsl:variable name="text" select="normalize-space(.)"/>
|
2669
2739
|
<fo:inline font-size="75%">
|
@@ -2753,6 +2823,10 @@
|
|
2753
2823
|
<xsl:param name="text" select="."/>
|
2754
2824
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2755
2825
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
2826
|
+
</xsl:template><xsl:template name="add-zero-spaces-link-java">
|
2827
|
+
<xsl:param name="text" select="."/>
|
2828
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2829
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1')"/>
|
2756
2830
|
</xsl:template><xsl:template name="add-zero-spaces">
|
2757
2831
|
<xsl:param name="text" select="."/>
|
2758
2832
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -3000,6 +3074,7 @@
|
|
3000
3074
|
<xsl:apply-templates select="." mode="mathml"/>
|
3001
3075
|
</xsl:variable>
|
3002
3076
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3077
|
+
|
3003
3078
|
<!-- <xsl:copy-of select="."/> -->
|
3004
3079
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3005
3080
|
</fo:instream-foreign-object>
|
@@ -3013,7 +3088,12 @@
|
|
3013
3088
|
<!-- replace start and end spaces to non-break space -->
|
3014
3089
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3015
3090
|
</xsl:copy>
|
3016
|
-
</xsl:template><xsl:template match="
|
3091
|
+
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
3092
|
+
<xsl:copy>
|
3093
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3094
|
+
</xsl:copy>
|
3095
|
+
<mathml:mspace width="0.5ex"/>
|
3096
|
+
</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">
|
3017
3097
|
<xsl:variable name="target">
|
3018
3098
|
<xsl:choose>
|
3019
3099
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
@@ -3034,7 +3114,10 @@
|
|
3034
3114
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
3035
3115
|
<xsl:choose>
|
3036
3116
|
<xsl:when test="normalize-space(.) = ''">
|
3037
|
-
<xsl:value-of select="$target"/>
|
3117
|
+
<!-- <xsl:value-of select="$target"/> -->
|
3118
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
3119
|
+
<xsl:with-param name="text" select="$target"/>
|
3120
|
+
</xsl:call-template>
|
3038
3121
|
</xsl:when>
|
3039
3122
|
<xsl:otherwise>
|
3040
3123
|
<xsl:apply-templates/>
|
@@ -3044,8 +3127,6 @@
|
|
3044
3127
|
</xsl:otherwise>
|
3045
3128
|
</xsl:choose>
|
3046
3129
|
</fo:inline>
|
3047
|
-
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
3048
|
-
<fo:inline id="{@id}"/>
|
3049
3130
|
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
3050
3131
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
3051
3132
|
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
@@ -3242,7 +3323,7 @@
|
|
3242
3323
|
</xsl:if> -->
|
3243
3324
|
</fo:inline>
|
3244
3325
|
</xsl:if>
|
3245
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3326
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3246
3327
|
<fo:block-container id="{@id}">
|
3247
3328
|
|
3248
3329
|
<fo:block>
|
@@ -3258,6 +3339,7 @@
|
|
3258
3339
|
<fo:block id="{@id}">
|
3259
3340
|
<xsl:apply-templates/>
|
3260
3341
|
</fo:block>
|
3342
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3261
3343
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
3262
3344
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
3263
3345
|
<xsl:apply-templates/>
|
@@ -3449,6 +3531,12 @@
|
|
3449
3531
|
<!-- <xsl:text> </xsl:text> -->
|
3450
3532
|
</xsl:template><xsl:template name="getSection">
|
3451
3533
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3534
|
+
<!--
|
3535
|
+
<xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
|
3536
|
+
<xsl:value-of select="."/>
|
3537
|
+
</xsl:for-each>
|
3538
|
+
-->
|
3539
|
+
|
3452
3540
|
</xsl:template><xsl:template name="getName">
|
3453
3541
|
<xsl:choose>
|
3454
3542
|
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
@@ -3501,6 +3589,12 @@
|
|
3501
3589
|
<xsl:copy>
|
3502
3590
|
<xsl:apply-templates mode="contents_item"/>
|
3503
3591
|
</xsl:copy>
|
3592
|
+
</xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
|
3593
|
+
<xsl:copy>
|
3594
|
+
<xsl:apply-templates mode="contents_item"/>
|
3595
|
+
</xsl:copy>
|
3596
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
3597
|
+
<xsl:copy-of select="."/>
|
3504
3598
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3505
3599
|
<xsl:text> </xsl:text>
|
3506
3600
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -3526,6 +3620,7 @@
|
|
3526
3620
|
|
3527
3621
|
|
3528
3622
|
|
3623
|
+
|
3529
3624
|
|
3530
3625
|
|
3531
3626
|
|
@@ -3828,10 +3923,11 @@
|
|
3828
3923
|
</xsl:choose>
|
3829
3924
|
|
3830
3925
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3831
|
-
|
3926
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
3832
3927
|
<xsl:variable name="element">
|
3833
3928
|
block
|
3834
3929
|
|
3930
|
+
|
3835
3931
|
</xsl:variable>
|
3836
3932
|
<xsl:choose>
|
3837
3933
|
<xsl:when test="normalize-space($element) = 'block'">
|
@@ -3893,11 +3989,13 @@
|
|
3893
3989
|
</xsl:if>
|
3894
3990
|
</xsl:if>
|
3895
3991
|
|
3992
|
+
|
3896
3993
|
<fo:block-container margin-left="0mm">
|
3897
3994
|
|
3898
3995
|
<fo:block xsl:use-attribute-sets="quote-style">
|
3899
3996
|
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
3900
|
-
|
3997
|
+
|
3998
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
3901
3999
|
</fo:block>
|
3902
4000
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3903
4001
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -3920,29 +4018,47 @@
|
|
3920
4018
|
<xsl:text>— </xsl:text>
|
3921
4019
|
<xsl:apply-templates/>
|
3922
4020
|
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
3923
|
-
|
3924
|
-
|
3925
|
-
|
3926
|
-
|
3927
|
-
|
3928
|
-
|
3929
|
-
|
3930
|
-
|
3931
|
-
|
3932
|
-
|
3933
|
-
|
3934
|
-
|
3935
|
-
|
3936
|
-
|
3937
|
-
|
3938
|
-
|
3939
|
-
|
3940
|
-
|
3941
|
-
|
3942
|
-
|
3943
|
-
|
3944
|
-
|
3945
|
-
|
4021
|
+
|
4022
|
+
<xsl:variable name="bibitemid">
|
4023
|
+
<xsl:choose>
|
4024
|
+
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
|
4025
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
4026
|
+
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
4027
|
+
</xsl:choose>
|
4028
|
+
</xsl:variable>
|
4029
|
+
|
4030
|
+
<xsl:choose>
|
4031
|
+
<xsl:when test="normalize-space($bibitemid) != ''">
|
4032
|
+
<fo:inline xsl:use-attribute-sets="eref-style">
|
4033
|
+
<xsl:if test="@type = 'footnote'">
|
4034
|
+
|
4035
|
+
|
4036
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
4037
|
+
<xsl:attribute name="font-size">50%</xsl:attribute>
|
4038
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
4039
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
4040
|
+
|
4041
|
+
</xsl:if>
|
4042
|
+
|
4043
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4044
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4045
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
4046
|
+
</xsl:if>
|
4047
|
+
<xsl:if test="@type = 'inline'">
|
4048
|
+
|
4049
|
+
|
4050
|
+
|
4051
|
+
</xsl:if>
|
4052
|
+
|
4053
|
+
<xsl:apply-templates/>
|
4054
|
+
</fo:basic-link>
|
4055
|
+
|
4056
|
+
</fo:inline>
|
4057
|
+
</xsl:when>
|
4058
|
+
<xsl:otherwise>
|
4059
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4060
|
+
</xsl:otherwise>
|
4061
|
+
</xsl:choose>
|
3946
4062
|
</xsl:template><xsl:template match="*[local-name() = 'tab']">
|
3947
4063
|
<!-- zero-space char -->
|
3948
4064
|
<xsl:variable name="depth">
|
@@ -4054,6 +4170,7 @@
|
|
4054
4170
|
|
4055
4171
|
|
4056
4172
|
|
4173
|
+
|
4057
4174
|
<xsl:variable name="pos"><xsl:number count="m3d:sections/m3d:clause | m3d:sections/m3d:terms"/></xsl:variable>
|
4058
4175
|
<xsl:if test="$pos >= 2">
|
4059
4176
|
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
@@ -4069,7 +4186,7 @@
|
|
4069
4186
|
|
4070
4187
|
|
4071
4188
|
|
4072
|
-
</xsl:template><xsl:template match="
|
4189
|
+
</xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
4073
4190
|
<fo:block break-after="page"/>
|
4074
4191
|
<fo:block>
|
4075
4192
|
<xsl:call-template name="setId"/>
|
@@ -4077,7 +4194,8 @@
|
|
4077
4194
|
</fo:block>
|
4078
4195
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4079
4196
|
<fo:block>
|
4080
|
-
<xsl:call-template name="setId"/>
|
4197
|
+
<xsl:call-template name="setId"/>
|
4198
|
+
|
4081
4199
|
|
4082
4200
|
<xsl:apply-templates/>
|
4083
4201
|
</fo:block>
|
@@ -4128,6 +4246,153 @@
|
|
4128
4246
|
</fo:block>
|
4129
4247
|
</xsl:otherwise>
|
4130
4248
|
</xsl:choose>
|
4249
|
+
</xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
|
4250
|
+
<xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
|
4251
|
+
<bookmark><xsl:value-of select="@id"/></bookmark>
|
4252
|
+
</xsl:for-each>
|
4253
|
+
</xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
|
4254
|
+
<xsl:copy>
|
4255
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id"/>
|
4256
|
+
</xsl:copy>
|
4257
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
4258
|
+
<xsl:variable name="id">
|
4259
|
+
<xsl:call-template name="generateIndexXrefId"/>
|
4260
|
+
</xsl:variable>
|
4261
|
+
<xsl:copy> <!-- add id to xref -->
|
4262
|
+
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
4263
|
+
<xsl:attribute name="id">
|
4264
|
+
<xsl:value-of select="$id"/>
|
4265
|
+
</xsl:attribute>
|
4266
|
+
<xsl:apply-templates mode="index_add_id"/>
|
4267
|
+
</xsl:copy>
|
4268
|
+
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
4269
|
+
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
4270
|
+
<xsl:if test="@to">
|
4271
|
+
<xsl:value-of select="$dash"/>
|
4272
|
+
<xsl:copy>
|
4273
|
+
<xsl:copy-of select="@*"/>
|
4274
|
+
<xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
|
4275
|
+
<xsl:attribute name="id">
|
4276
|
+
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
4277
|
+
</xsl:attribute>
|
4278
|
+
<xsl:apply-templates mode="index_add_id"/>
|
4279
|
+
</xsl:copy>
|
4280
|
+
</xsl:if>
|
4281
|
+
</xsl:template><xsl:template match="@*|node()" mode="index_update">
|
4282
|
+
<xsl:copy>
|
4283
|
+
<xsl:apply-templates select="@*|node()" mode="index_update"/>
|
4284
|
+
</xsl:copy>
|
4285
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" mode="index_update">
|
4286
|
+
<xsl:copy>
|
4287
|
+
<xsl:apply-templates select="@*" mode="index_update"/>
|
4288
|
+
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
4289
|
+
</xsl:copy>
|
4290
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/node()" mode="process_li_element" priority="2">
|
4291
|
+
<xsl:param name="element"/>
|
4292
|
+
<xsl:param name="remove" select="'false'"/>
|
4293
|
+
<xsl:param name="target"/>
|
4294
|
+
<!-- <node></node> -->
|
4295
|
+
<xsl:choose>
|
4296
|
+
<xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
|
4297
|
+
<!-- skip text (i.e. remove it) and process next element -->
|
4298
|
+
<!-- [removed_<xsl:value-of select="."/>] -->
|
4299
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4300
|
+
<xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
|
4301
|
+
</xsl:apply-templates>
|
4302
|
+
</xsl:when>
|
4303
|
+
<xsl:when test="self::text()">
|
4304
|
+
<xsl:value-of select="."/>
|
4305
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4306
|
+
</xsl:when>
|
4307
|
+
<xsl:when test="self::* and local-name(.) = 'xref'">
|
4308
|
+
<xsl:variable name="id" select="@id"/>
|
4309
|
+
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
4310
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
4311
|
+
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
4312
|
+
|
4313
|
+
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
4314
|
+
<xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
|
4315
|
+
|
4316
|
+
<xsl:choose>
|
4317
|
+
<!-- 2nd pass -->
|
4318
|
+
<!-- if page is equal to page for next and page is not the end of range -->
|
4319
|
+
<xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
|
4320
|
+
<!-- skip element (i.e. remove it) and remove next text ',' -->
|
4321
|
+
<!-- [removed_xref] -->
|
4322
|
+
|
4323
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4324
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
4325
|
+
<xsl:with-param name="target">
|
4326
|
+
<xsl:choose>
|
4327
|
+
<xsl:when test="$target != ''"><xsl:value-of select="$target"/></xsl:when>
|
4328
|
+
<xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise>
|
4329
|
+
</xsl:choose>
|
4330
|
+
</xsl:with-param>
|
4331
|
+
</xsl:apply-templates>
|
4332
|
+
</xsl:when>
|
4333
|
+
|
4334
|
+
<xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
|
4335
|
+
<!-- remove xref -->
|
4336
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4337
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
4338
|
+
</xsl:apply-templates>
|
4339
|
+
</xsl:when>
|
4340
|
+
|
4341
|
+
<xsl:otherwise>
|
4342
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
4343
|
+
<xsl:with-param name="target" select="$target"/>
|
4344
|
+
</xsl:apply-templates>
|
4345
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4346
|
+
</xsl:otherwise>
|
4347
|
+
</xsl:choose>
|
4348
|
+
</xsl:when>
|
4349
|
+
<xsl:when test="self::* and local-name(.) = 'ul'">
|
4350
|
+
<!-- ul -->
|
4351
|
+
<xsl:apply-templates select="." mode="index_update"/>
|
4352
|
+
</xsl:when>
|
4353
|
+
<xsl:otherwise>
|
4354
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
4355
|
+
<xsl:with-param name="target" select="$target"/>
|
4356
|
+
</xsl:apply-templates>
|
4357
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4358
|
+
</xsl:otherwise>
|
4359
|
+
</xsl:choose>
|
4360
|
+
</xsl:template><xsl:template match="@*|node()" mode="xref_copy">
|
4361
|
+
<xsl:param name="target"/>
|
4362
|
+
<xsl:copy>
|
4363
|
+
<xsl:apply-templates select="@*" mode="xref_copy"/>
|
4364
|
+
<xsl:if test="$target != '' and not(xalan:nodeset($bookmark_in_fn)//bookmark[. = $target])">
|
4365
|
+
<xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
|
4366
|
+
</xsl:if>
|
4367
|
+
<xsl:apply-templates select="node()" mode="xref_copy"/>
|
4368
|
+
</xsl:copy>
|
4369
|
+
</xsl:template><xsl:template name="generateIndexXrefId">
|
4370
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
4371
|
+
|
4372
|
+
<xsl:variable name="docid">
|
4373
|
+
<xsl:call-template name="getDocumentId"/>
|
4374
|
+
</xsl:variable>
|
4375
|
+
<xsl:variable name="item_number">
|
4376
|
+
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
4377
|
+
</xsl:variable>
|
4378
|
+
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
4379
|
+
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
4380
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
|
4381
|
+
<xsl:apply-templates/>
|
4382
|
+
<fo:block>
|
4383
|
+
<xsl:if test="following-sibling::*[local-name() = 'clause']">
|
4384
|
+
<fo:block> </fo:block>
|
4385
|
+
</xsl:if>
|
4386
|
+
</fo:block>
|
4387
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
|
4388
|
+
<xsl:apply-templates/>
|
4389
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
4390
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
4391
|
+
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
4392
|
+
<xsl:apply-templates/>
|
4393
|
+
</fo:block>
|
4394
|
+
</xsl:template><xsl:template match="*[local-name() = 'bookmark']">
|
4395
|
+
<fo:inline id="{@id}"/>
|
4131
4396
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4132
4397
|
<!-- <row>
|
4133
4398
|
<date>05-07-2013</date>
|
@@ -4223,6 +4488,8 @@
|
|
4223
4488
|
<xsl:value-of select="translate(.,'. ','')"/>
|
4224
4489
|
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4225
4490
|
<xsl:value-of select="substring(.,1,1)"/>
|
4491
|
+
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4492
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4226
4493
|
</xsl:template><xsl:template name="convertDate">
|
4227
4494
|
<xsl:param name="date"/>
|
4228
4495
|
<xsl:param name="format" select="'short'"/>
|
@@ -4247,6 +4514,57 @@
|
|
4247
4514
|
</xsl:variable>
|
4248
4515
|
<xsl:variable name="result">
|
4249
4516
|
<xsl:choose>
|
4517
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
4518
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4519
|
+
<xsl:text> </xsl:text>
|
4520
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
4521
|
+
</xsl:when>
|
4522
|
+
<xsl:when test="$format = 'ddMM'">
|
4523
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4524
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
4525
|
+
</xsl:when>
|
4526
|
+
<xsl:when test="$format = 'short' or $day = ''">
|
4527
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
4528
|
+
</xsl:when>
|
4529
|
+
<xsl:otherwise>
|
4530
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
4531
|
+
</xsl:otherwise>
|
4532
|
+
</xsl:choose>
|
4533
|
+
</xsl:variable>
|
4534
|
+
<xsl:value-of select="$result"/>
|
4535
|
+
</xsl:template><xsl:template name="convertDateLocalized">
|
4536
|
+
<xsl:param name="date"/>
|
4537
|
+
<xsl:param name="format" select="'short'"/>
|
4538
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
4539
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
4540
|
+
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
4541
|
+
<xsl:variable name="monthStr">
|
4542
|
+
<xsl:choose>
|
4543
|
+
<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>
|
4544
|
+
<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>
|
4545
|
+
<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>
|
4546
|
+
<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>
|
4547
|
+
<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>
|
4548
|
+
<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>
|
4549
|
+
<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>
|
4550
|
+
<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>
|
4551
|
+
<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>
|
4552
|
+
<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>
|
4553
|
+
<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>
|
4554
|
+
<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>
|
4555
|
+
</xsl:choose>
|
4556
|
+
</xsl:variable>
|
4557
|
+
<xsl:variable name="result">
|
4558
|
+
<xsl:choose>
|
4559
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
4560
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4561
|
+
<xsl:text> </xsl:text>
|
4562
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
4563
|
+
</xsl:when>
|
4564
|
+
<xsl:when test="$format = 'ddMM'">
|
4565
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4566
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
4567
|
+
</xsl:when>
|
4250
4568
|
<xsl:when test="$format = 'short' or $day = ''">
|
4251
4569
|
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
4252
4570
|
</xsl:when>
|
@@ -4262,7 +4580,7 @@
|
|
4262
4580
|
<xsl:param name="charDelim" select="', '"/>
|
4263
4581
|
<xsl:choose>
|
4264
4582
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
4265
|
-
<xsl:for-each select="
|
4583
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4266
4584
|
<xsl:sort data-type="text" order="ascending"/>
|
4267
4585
|
<xsl:call-template name="insertKeyword">
|
4268
4586
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -4271,7 +4589,7 @@
|
|
4271
4589
|
</xsl:for-each>
|
4272
4590
|
</xsl:when>
|
4273
4591
|
<xsl:otherwise>
|
4274
|
-
<xsl:for-each select="
|
4592
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4275
4593
|
<xsl:call-template name="insertKeyword">
|
4276
4594
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
4277
4595
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -4288,63 +4606,71 @@
|
|
4288
4606
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
4289
4607
|
</xsl:choose>
|
4290
4608
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
4291
|
-
<
|
4292
|
-
<
|
4293
|
-
|
4294
|
-
|
4295
|
-
|
4296
|
-
|
4297
|
-
|
4298
|
-
|
4299
|
-
|
4300
|
-
|
4301
|
-
|
4302
|
-
|
4609
|
+
<xsl:variable name="lang">
|
4610
|
+
<xsl:call-template name="getLang"/>
|
4611
|
+
</xsl:variable>
|
4612
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
4613
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
4614
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
4615
|
+
</pdf:dictionary>
|
4616
|
+
</pdf:catalog>
|
4617
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
4618
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
4619
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
4620
|
+
<!-- Dublin Core properties go here -->
|
4621
|
+
<dc:title>
|
4622
|
+
<xsl:variable name="title">
|
4623
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4624
|
+
|
4303
4625
|
|
4304
4626
|
|
4305
4627
|
|
4306
4628
|
|
4307
|
-
<xsl:value-of select="
|
4629
|
+
<xsl:value-of select="*[local-name() = 'title']"/>
|
4308
4630
|
|
4309
4631
|
|
4310
|
-
</xsl:
|
4311
|
-
|
4312
|
-
|
4313
|
-
|
4314
|
-
|
4315
|
-
|
4316
|
-
|
4317
|
-
</xsl:
|
4318
|
-
</xsl:
|
4319
|
-
</
|
4320
|
-
|
4632
|
+
</xsl:for-each>
|
4633
|
+
</xsl:variable>
|
4634
|
+
<xsl:choose>
|
4635
|
+
<xsl:when test="normalize-space($title) != ''">
|
4636
|
+
<xsl:value-of select="$title"/>
|
4637
|
+
</xsl:when>
|
4638
|
+
<xsl:otherwise>
|
4639
|
+
<xsl:text> </xsl:text>
|
4640
|
+
</xsl:otherwise>
|
4641
|
+
</xsl:choose>
|
4642
|
+
</dc:title>
|
4643
|
+
<dc:creator>
|
4644
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4321
4645
|
|
4322
|
-
<xsl:
|
4646
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
4647
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
4648
|
+
<xsl:if test="position() != last()">; </xsl:if>
|
4649
|
+
</xsl:for-each>
|
4323
4650
|
|
4324
4651
|
|
4325
4652
|
|
4326
|
-
</
|
4327
|
-
|
4328
|
-
|
4329
|
-
|
4330
|
-
|
4331
|
-
|
4332
|
-
|
4333
|
-
|
4334
|
-
|
4335
|
-
|
4336
|
-
|
4337
|
-
|
4338
|
-
|
4339
|
-
|
4340
|
-
|
4341
|
-
|
4342
|
-
|
4343
|
-
|
4344
|
-
|
4345
|
-
|
4346
|
-
|
4347
|
-
</fo:declarations>
|
4653
|
+
</xsl:for-each>
|
4654
|
+
</dc:creator>
|
4655
|
+
<dc:description>
|
4656
|
+
<xsl:variable name="abstract">
|
4657
|
+
|
4658
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
4659
|
+
|
4660
|
+
|
4661
|
+
</xsl:variable>
|
4662
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
4663
|
+
</dc:description>
|
4664
|
+
<pdf:Keywords>
|
4665
|
+
<xsl:call-template name="insertKeywords"/>
|
4666
|
+
</pdf:Keywords>
|
4667
|
+
</rdf:Description>
|
4668
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
4669
|
+
<!-- XMP properties go here -->
|
4670
|
+
<xmp:CreatorTool/>
|
4671
|
+
</rdf:Description>
|
4672
|
+
</rdf:RDF>
|
4673
|
+
</x:xmpmeta>
|
4348
4674
|
</xsl:template><xsl:template name="getId">
|
4349
4675
|
<xsl:choose>
|
4350
4676
|
<xsl:when test="../@id">
|
@@ -4441,6 +4767,7 @@
|
|
4441
4767
|
|
4442
4768
|
|
4443
4769
|
|
4770
|
+
|
4444
4771
|
</xsl:variable>
|
4445
4772
|
<xsl:if test="$documentNS != $XSLNS">
|
4446
4773
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4500,6 +4827,11 @@
|
|
4500
4827
|
<xsl:call-template name="getLang"/>
|
4501
4828
|
</xsl:variable>
|
4502
4829
|
|
4503
|
-
<xsl:
|
4830
|
+
<xsl:choose>
|
4831
|
+
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
4832
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4833
|
+
</xsl:when>
|
4834
|
+
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
4835
|
+
</xsl:choose>
|
4504
4836
|
|
4505
4837
|
</xsl:template></xsl:stylesheet>
|