metanorma-un 0.6.0 → 0.6.5
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 +12 -11
- data/.hound.yml +3 -1
- data/.rubocop.yml +4 -8
- data/lib/asciidoctor/un/biblio.rng +1 -0
- data/lib/asciidoctor/un/isodoc.rng +191 -3
- data/lib/asciidoctor/un/un.rng +3 -0
- data/lib/isodoc/un/un.plenary-attachment.xsl +538 -66
- data/lib/isodoc/un/un.plenary.xsl +538 -66
- data/lib/isodoc/un/un.recommendation.xsl +538 -66
- data/lib/metanorma/un/version.rb +1 -1
- data/metanorma-unece.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24fe47575535e25483251e6ed1b2f278df382c1fe7878560b986a0bf9220eb9b
|
4
|
+
data.tar.gz: 2ed7c0507c32d4733ffe26f91a8b9f1f4a019105d5dbd61c3edc1f8fbd7eccc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2503fe478117ca61d6cf544b59fdacabfa136e8e72faa5cec74867323daa883156f3564579714bb62b8c960580fb419d16f97aa4ab68e998329fd1518e0c8b28
|
7
|
+
data.tar.gz: 19b1cda0b57151e0b5c51b8780f72de396e581947450bf7f8b39118d240e3b9d92438139a758e7f14fe4bf843a175ed59f3c536ec179e7ded65c959806a8e3b3
|
data/.github/workflows/rake.yml
CHANGED
@@ -16,19 +16,9 @@ jobs:
|
|
16
16
|
strategy:
|
17
17
|
fail-fast: false
|
18
18
|
matrix:
|
19
|
-
ruby: [ '2.7', '2.6', '2.5', '2.4' ]
|
19
|
+
ruby: [ '3.0', '2.7', '2.6', '2.5', '2.4' ]
|
20
20
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
21
|
experimental: [ false ]
|
22
|
-
include:
|
23
|
-
- ruby: '3.0'
|
24
|
-
os: 'ubuntu-latest'
|
25
|
-
experimental: true
|
26
|
-
- ruby: '3.0'
|
27
|
-
os: 'windows-latest'
|
28
|
-
experimental: true
|
29
|
-
- ruby: '3.0'
|
30
|
-
os: 'macos-latest'
|
31
|
-
experimental: true
|
32
22
|
steps:
|
33
23
|
- uses: actions/checkout@v2
|
34
24
|
with:
|
@@ -40,3 +30,14 @@ jobs:
|
|
40
30
|
bundler-cache: true
|
41
31
|
|
42
32
|
- run: bundle exec rake
|
33
|
+
|
34
|
+
tests-passed:
|
35
|
+
needs: rake
|
36
|
+
runs-on: ubuntu-latest
|
37
|
+
steps:
|
38
|
+
- uses: peter-evans/repository-dispatch@v1
|
39
|
+
with:
|
40
|
+
token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
41
|
+
repository: ${{ github.repository }}
|
42
|
+
event-type: tests-passed
|
43
|
+
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
data/.hound.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,14 +1,10 @@
|
|
1
|
-
#
|
2
|
-
# https://github.com/
|
3
|
-
# All project-specific additions and overrides should be specified in this file.
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
4
3
|
inherit_from:
|
5
4
|
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
6
5
|
|
7
6
|
# local repo-specific modifications
|
7
|
+
# ...
|
8
8
|
|
9
9
|
AllCops:
|
10
|
-
|
11
|
-
StyleGuideCopsOnly: false
|
12
|
-
TargetRubyVersion: 2.4
|
13
|
-
Rails:
|
14
|
-
Enabled: true
|
10
|
+
TargetRubyVersion: 2.5
|
@@ -45,6 +45,11 @@
|
|
45
45
|
<optional>
|
46
46
|
<attribute name="alt"/>
|
47
47
|
</optional>
|
48
|
+
<optional>
|
49
|
+
<attribute name="updatetype">
|
50
|
+
<data type="boolean"/>
|
51
|
+
</attribute>
|
52
|
+
</optional>
|
48
53
|
<text/>
|
49
54
|
</element>
|
50
55
|
</define>
|
@@ -543,6 +548,9 @@
|
|
543
548
|
</define>
|
544
549
|
<define name="BibDataExtensionType">
|
545
550
|
<ref name="doctype"/>
|
551
|
+
<optional>
|
552
|
+
<ref name="docsubtype"/>
|
553
|
+
</optional>
|
546
554
|
<optional>
|
547
555
|
<ref name="editorialgroup"/>
|
548
556
|
</optional>
|
@@ -876,8 +884,28 @@
|
|
876
884
|
</zeroOrMore>
|
877
885
|
</element>
|
878
886
|
</define>
|
887
|
+
<define name="pagebreak">
|
888
|
+
<element name="pagebreak">
|
889
|
+
<optional>
|
890
|
+
<attribute name="orientation">
|
891
|
+
<choice>
|
892
|
+
<value>landscape</value>
|
893
|
+
<value>portrait</value>
|
894
|
+
</choice>
|
895
|
+
</attribute>
|
896
|
+
</optional>
|
897
|
+
</element>
|
898
|
+
</define>
|
879
899
|
</include>
|
880
900
|
<!-- end overrides -->
|
901
|
+
<define name="docsubtype">
|
902
|
+
<element name="docsubtype">
|
903
|
+
<ref name="DocumentSubtype"/>
|
904
|
+
</element>
|
905
|
+
</define>
|
906
|
+
<define name="DocumentSubtype">
|
907
|
+
<text/>
|
908
|
+
</define>
|
881
909
|
<define name="colgroup">
|
882
910
|
<element name="colgroup">
|
883
911
|
<oneOrMore>
|
@@ -943,8 +971,170 @@
|
|
943
971
|
<ref name="permission"/>
|
944
972
|
<ref name="imagemap"/>
|
945
973
|
<ref name="svgmap"/>
|
974
|
+
<ref name="inputform"/>
|
975
|
+
</choice>
|
976
|
+
</define>
|
977
|
+
<define name="inputform">
|
978
|
+
<element name="form">
|
979
|
+
<attribute name="id">
|
980
|
+
<data type="ID"/>
|
981
|
+
</attribute>
|
982
|
+
<attribute name="name"/>
|
983
|
+
<attribute name="action"/>
|
984
|
+
<zeroOrMore>
|
985
|
+
<choice>
|
986
|
+
<ref name="TextElement"/>
|
987
|
+
<ref name="FormInput"/>
|
988
|
+
</choice>
|
989
|
+
</zeroOrMore>
|
990
|
+
</element>
|
991
|
+
</define>
|
992
|
+
<define name="FormInput">
|
993
|
+
<choice>
|
994
|
+
<ref name="input"/>
|
995
|
+
<ref name="formlabel"/>
|
996
|
+
<ref name="select"/>
|
997
|
+
<ref name="textarea"/>
|
998
|
+
</choice>
|
999
|
+
</define>
|
1000
|
+
<define name="InputType">
|
1001
|
+
<choice>
|
1002
|
+
<value>button</value>
|
1003
|
+
<value>checkbox</value>
|
1004
|
+
<value>date</value>
|
1005
|
+
<value>file</value>
|
1006
|
+
<value>password</value>
|
1007
|
+
<value>radio</value>
|
1008
|
+
<value>submit</value>
|
1009
|
+
<value>text</value>
|
946
1010
|
</choice>
|
947
1011
|
</define>
|
1012
|
+
<define name="input">
|
1013
|
+
<element name="input">
|
1014
|
+
<attribute name="type">
|
1015
|
+
<ref name="InputType"/>
|
1016
|
+
</attribute>
|
1017
|
+
<optional>
|
1018
|
+
<attribute name="checked">
|
1019
|
+
<data type="boolean"/>
|
1020
|
+
</attribute>
|
1021
|
+
</optional>
|
1022
|
+
<optional>
|
1023
|
+
<attribute name="disabled">
|
1024
|
+
<data type="boolean"/>
|
1025
|
+
</attribute>
|
1026
|
+
</optional>
|
1027
|
+
<optional>
|
1028
|
+
<attribute name="readonly">
|
1029
|
+
<data type="boolean"/>
|
1030
|
+
</attribute>
|
1031
|
+
</optional>
|
1032
|
+
<optional>
|
1033
|
+
<attribute name="maxlength">
|
1034
|
+
<data type="int"/>
|
1035
|
+
</attribute>
|
1036
|
+
</optional>
|
1037
|
+
<optional>
|
1038
|
+
<attribute name="minlength">
|
1039
|
+
<data type="int"/>
|
1040
|
+
</attribute>
|
1041
|
+
</optional>
|
1042
|
+
<optional>
|
1043
|
+
<attribute name="name"/>
|
1044
|
+
</optional>
|
1045
|
+
<optional>
|
1046
|
+
<attribute name="value"/>
|
1047
|
+
</optional>
|
1048
|
+
<optional>
|
1049
|
+
<attribute name="id">
|
1050
|
+
<data type="ID"/>
|
1051
|
+
</attribute>
|
1052
|
+
</optional>
|
1053
|
+
</element>
|
1054
|
+
</define>
|
1055
|
+
<define name="formlabel">
|
1056
|
+
<element name="label">
|
1057
|
+
<attribute name="for">
|
1058
|
+
<data type="IDREF"/>
|
1059
|
+
</attribute>
|
1060
|
+
<zeroOrMore>
|
1061
|
+
<ref name="PureTextElement"/>
|
1062
|
+
</zeroOrMore>
|
1063
|
+
</element>
|
1064
|
+
</define>
|
1065
|
+
<define name="select">
|
1066
|
+
<element name="select">
|
1067
|
+
<optional>
|
1068
|
+
<attribute name="name"/>
|
1069
|
+
</optional>
|
1070
|
+
<optional>
|
1071
|
+
<attribute name="value"/>
|
1072
|
+
</optional>
|
1073
|
+
<optional>
|
1074
|
+
<attribute name="id">
|
1075
|
+
<data type="ID"/>
|
1076
|
+
</attribute>
|
1077
|
+
</optional>
|
1078
|
+
<optional>
|
1079
|
+
<attribute name="disabled">
|
1080
|
+
<data type="boolean"/>
|
1081
|
+
</attribute>
|
1082
|
+
</optional>
|
1083
|
+
<optional>
|
1084
|
+
<attribute name="multiple">
|
1085
|
+
<data type="boolean"/>
|
1086
|
+
</attribute>
|
1087
|
+
</optional>
|
1088
|
+
<optional>
|
1089
|
+
<attribute name="size">
|
1090
|
+
<data type="int"/>
|
1091
|
+
</attribute>
|
1092
|
+
</optional>
|
1093
|
+
<oneOrMore>
|
1094
|
+
<ref name="option"/>
|
1095
|
+
</oneOrMore>
|
1096
|
+
</element>
|
1097
|
+
</define>
|
1098
|
+
<define name="option">
|
1099
|
+
<element name="option">
|
1100
|
+
<optional>
|
1101
|
+
<attribute name="disabled">
|
1102
|
+
<data type="boolean"/>
|
1103
|
+
</attribute>
|
1104
|
+
</optional>
|
1105
|
+
<optional>
|
1106
|
+
<attribute name="value"/>
|
1107
|
+
</optional>
|
1108
|
+
<zeroOrMore>
|
1109
|
+
<ref name="PureTextElement"/>
|
1110
|
+
</zeroOrMore>
|
1111
|
+
</element>
|
1112
|
+
</define>
|
1113
|
+
<define name="textarea">
|
1114
|
+
<element name="textarea">
|
1115
|
+
<optional>
|
1116
|
+
<attribute name="name"/>
|
1117
|
+
</optional>
|
1118
|
+
<optional>
|
1119
|
+
<attribute name="value"/>
|
1120
|
+
</optional>
|
1121
|
+
<optional>
|
1122
|
+
<attribute name="id">
|
1123
|
+
<data type="ID"/>
|
1124
|
+
</attribute>
|
1125
|
+
</optional>
|
1126
|
+
<optional>
|
1127
|
+
<attribute name="rows">
|
1128
|
+
<data type="int"/>
|
1129
|
+
</attribute>
|
1130
|
+
</optional>
|
1131
|
+
<optional>
|
1132
|
+
<attribute name="cols">
|
1133
|
+
<data type="int"/>
|
1134
|
+
</attribute>
|
1135
|
+
</optional>
|
1136
|
+
</element>
|
1137
|
+
</define>
|
948
1138
|
<define name="bibliography">
|
949
1139
|
<element name="bibliography">
|
950
1140
|
<oneOrMore>
|
@@ -1017,9 +1207,7 @@
|
|
1017
1207
|
</define>
|
1018
1208
|
<define name="IsoWorkgroup">
|
1019
1209
|
<optional>
|
1020
|
-
<attribute name="number"
|
1021
|
-
<data type="int"/>
|
1022
|
-
</attribute>
|
1210
|
+
<attribute name="number"/>
|
1023
1211
|
</optional>
|
1024
1212
|
<optional>
|
1025
1213
|
<attribute name="type"/>
|
data/lib/asciidoctor/un/un.rng
CHANGED
@@ -1326,6 +1326,9 @@
|
|
1326
1326
|
<title-continued lang="en">(continued)</title-continued>
|
1327
1327
|
<title-continued lang="fr">(continué)</title-continued>
|
1328
1328
|
|
1329
|
+
</xsl:variable><xsl:variable name="bibdata">
|
1330
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
1331
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
1329
1332
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1330
1333
|
<xsl:param name="name"/>
|
1331
1334
|
<xsl:param name="lang"/>
|
@@ -1351,10 +1354,13 @@
|
|
1351
1354
|
</xsl:choose>
|
1352
1355
|
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
1353
1356
|
|
1357
|
+
|
1354
1358
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1355
1359
|
|
1356
1360
|
|
1357
1361
|
|
1362
|
+
|
1363
|
+
|
1358
1364
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1359
1365
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1360
1366
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -1400,7 +1406,7 @@
|
|
1400
1406
|
|
1401
1407
|
|
1402
1408
|
|
1403
|
-
|
1409
|
+
|
1404
1410
|
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
1405
1411
|
|
1406
1412
|
|
@@ -1413,6 +1419,7 @@
|
|
1413
1419
|
|
1414
1420
|
|
1415
1421
|
|
1422
|
+
|
1416
1423
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1417
1424
|
|
1418
1425
|
|
@@ -1429,9 +1436,7 @@
|
|
1429
1436
|
|
1430
1437
|
|
1431
1438
|
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1439
|
+
|
1435
1440
|
|
1436
1441
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1437
1442
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -1466,8 +1471,10 @@
|
|
1466
1471
|
|
1467
1472
|
|
1468
1473
|
|
1474
|
+
|
1469
1475
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1470
1476
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1477
|
+
|
1471
1478
|
|
1472
1479
|
|
1473
1480
|
|
@@ -1487,6 +1494,9 @@
|
|
1487
1494
|
|
1488
1495
|
|
1489
1496
|
|
1497
|
+
|
1498
|
+
</xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
|
1499
|
+
|
1490
1500
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1491
1501
|
|
1492
1502
|
|
@@ -1499,6 +1509,8 @@
|
|
1499
1509
|
|
1500
1510
|
|
1501
1511
|
|
1512
|
+
|
1513
|
+
|
1502
1514
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1503
1515
|
|
1504
1516
|
|
@@ -1506,10 +1518,12 @@
|
|
1506
1518
|
|
1507
1519
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1508
1520
|
|
1521
|
+
|
1509
1522
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1510
1523
|
|
1511
1524
|
|
1512
1525
|
|
1526
|
+
|
1513
1527
|
|
1514
1528
|
|
1515
1529
|
|
@@ -1523,6 +1537,7 @@
|
|
1523
1537
|
|
1524
1538
|
|
1525
1539
|
|
1540
|
+
|
1526
1541
|
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
1527
1542
|
|
1528
1543
|
|
@@ -1535,6 +1550,7 @@
|
|
1535
1550
|
|
1536
1551
|
|
1537
1552
|
|
1553
|
+
|
1538
1554
|
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
1539
1555
|
|
1540
1556
|
|
@@ -1559,13 +1575,17 @@
|
|
1559
1575
|
|
1560
1576
|
|
1561
1577
|
|
1578
|
+
|
1562
1579
|
|
1563
1580
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1564
1581
|
|
1565
1582
|
|
1583
|
+
|
1566
1584
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1585
|
+
|
1567
1586
|
|
1568
1587
|
|
1588
|
+
|
1569
1589
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1570
1590
|
|
1571
1591
|
|
@@ -1584,14 +1604,18 @@
|
|
1584
1604
|
|
1585
1605
|
|
1586
1606
|
|
1607
|
+
|
1608
|
+
|
1587
1609
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1588
1610
|
|
1589
1611
|
|
1590
1612
|
|
1613
|
+
|
1591
1614
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1592
1615
|
|
1593
1616
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1594
1617
|
|
1618
|
+
|
1595
1619
|
|
1596
1620
|
|
1597
1621
|
|
@@ -1605,6 +1629,7 @@
|
|
1605
1629
|
|
1606
1630
|
|
1607
1631
|
|
1632
|
+
|
1608
1633
|
|
1609
1634
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1610
1635
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -1620,6 +1645,7 @@
|
|
1620
1645
|
|
1621
1646
|
|
1622
1647
|
|
1648
|
+
|
1623
1649
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1624
1650
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1625
1651
|
<xsl:attribute name="border">2pt solid black</xsl:attribute>
|
@@ -1631,6 +1657,7 @@
|
|
1631
1657
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1632
1658
|
|
1633
1659
|
|
1660
|
+
|
1634
1661
|
<xsl:attribute name="width">100%</xsl:attribute>
|
1635
1662
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
1636
1663
|
<xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
@@ -1655,18 +1682,35 @@
|
|
1655
1682
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1656
1683
|
|
1657
1684
|
|
1685
|
+
|
1658
1686
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1659
1687
|
|
1688
|
+
|
1660
1689
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1661
1690
|
|
1662
1691
|
|
1663
|
-
|
1692
|
+
|
1693
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
1694
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
1695
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
1664
1696
|
<xsl:attribute name="color">red</xsl:attribute>
|
1665
1697
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1666
|
-
|
1667
|
-
<xsl:attribute name="color"
|
1698
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
1699
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
1700
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
1701
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
1702
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
1703
|
+
<xsl:text>red</xsl:text>
|
1704
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
1705
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
1668
1706
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
1669
|
-
</xsl:attribute-set><xsl:
|
1707
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
1708
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
1709
|
+
|
1710
|
+
|
1711
|
+
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1712
|
+
|
1713
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1670
1714
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1671
1715
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1672
1716
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -1711,18 +1755,19 @@
|
|
1711
1755
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1712
1756
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1713
1757
|
|
1758
|
+
<xsl:variable name="table-preamble">
|
1759
|
+
|
1760
|
+
|
1761
|
+
</xsl:variable>
|
1762
|
+
|
1714
1763
|
<xsl:variable name="table">
|
1715
1764
|
|
1716
1765
|
<xsl:variable name="simple-table">
|
1717
|
-
<xsl:call-template name="getSimpleTable"/>
|
1766
|
+
<xsl:call-template name="getSimpleTable"/>
|
1718
1767
|
</xsl:variable>
|
1719
1768
|
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
1769
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
1725
|
-
<fo:block> </fo:block>
|
1770
|
+
<fo:block> </fo:block>
|
1726
1771
|
</xsl:if> -->
|
1727
1772
|
|
1728
1773
|
<!-- $namespace = 'iso' or -->
|
@@ -1735,7 +1780,7 @@
|
|
1735
1780
|
|
1736
1781
|
|
1737
1782
|
|
1738
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
1783
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
1739
1784
|
|
1740
1785
|
<!-- <xsl:variable name="cols-count">
|
1741
1786
|
<xsl:choose>
|
@@ -1754,8 +1799,6 @@
|
|
1754
1799
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1755
1800
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1756
1801
|
|
1757
|
-
|
1758
|
-
|
1759
1802
|
<xsl:variable name="colwidths">
|
1760
1803
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1761
1804
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1783,9 +1826,11 @@
|
|
1783
1826
|
</xsl:choose>
|
1784
1827
|
</xsl:variable>
|
1785
1828
|
|
1829
|
+
|
1786
1830
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1787
1831
|
|
1788
1832
|
|
1833
|
+
|
1789
1834
|
|
1790
1835
|
|
1791
1836
|
|
@@ -1801,6 +1846,8 @@
|
|
1801
1846
|
|
1802
1847
|
|
1803
1848
|
|
1849
|
+
|
1850
|
+
|
1804
1851
|
<xsl:variable name="table_width">
|
1805
1852
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1806
1853
|
|
@@ -1822,6 +1869,8 @@
|
|
1822
1869
|
|
1823
1870
|
|
1824
1871
|
|
1872
|
+
|
1873
|
+
|
1825
1874
|
|
1826
1875
|
|
1827
1876
|
|
@@ -1830,6 +1879,7 @@
|
|
1830
1879
|
|
1831
1880
|
|
1832
1881
|
|
1882
|
+
|
1833
1883
|
</xsl:variable>
|
1834
1884
|
|
1835
1885
|
|
@@ -1913,7 +1963,8 @@
|
|
1913
1963
|
</fo:block-container>
|
1914
1964
|
</xsl:variable>
|
1915
1965
|
|
1916
|
-
|
1966
|
+
<xsl:variable name="isAdded" select="@added"/>
|
1967
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
1917
1968
|
|
1918
1969
|
<xsl:choose>
|
1919
1970
|
<xsl:when test="@width">
|
@@ -1922,21 +1973,65 @@
|
|
1922
1973
|
|
1923
1974
|
|
1924
1975
|
|
1925
|
-
<xsl:
|
1976
|
+
<xsl:choose>
|
1977
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
1978
|
+
<xsl:copy-of select="$table-preamble"/>
|
1979
|
+
<fo:block>
|
1980
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1981
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1982
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1983
|
+
</xsl:call-template>
|
1984
|
+
<xsl:copy-of select="$table"/>
|
1985
|
+
</fo:block>
|
1986
|
+
</xsl:when>
|
1987
|
+
<xsl:otherwise>
|
1988
|
+
<xsl:copy-of select="$table-preamble"/>
|
1989
|
+
<xsl:copy-of select="$table"/>
|
1990
|
+
</xsl:otherwise>
|
1991
|
+
</xsl:choose>
|
1926
1992
|
|
1927
1993
|
|
1928
1994
|
</xsl:when>
|
1929
1995
|
<xsl:otherwise>
|
1930
|
-
<xsl:
|
1996
|
+
<xsl:choose>
|
1997
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
1998
|
+
<xsl:copy-of select="$table-preamble"/>
|
1999
|
+
<fo:block>
|
2000
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2001
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2002
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2003
|
+
</xsl:call-template>
|
2004
|
+
<xsl:copy-of select="$table"/>
|
2005
|
+
</fo:block>
|
2006
|
+
</xsl:when>
|
2007
|
+
<xsl:otherwise>
|
2008
|
+
<xsl:copy-of select="$table-preamble"/>
|
2009
|
+
<xsl:copy-of select="$table"/>
|
2010
|
+
</xsl:otherwise>
|
2011
|
+
</xsl:choose>
|
1931
2012
|
</xsl:otherwise>
|
1932
2013
|
</xsl:choose>
|
1933
2014
|
|
1934
2015
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
2016
|
+
<xsl:param name="continued"/>
|
1935
2017
|
<xsl:if test="normalize-space() != ''">
|
1936
2018
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1937
2019
|
|
1938
2020
|
|
1939
|
-
|
2021
|
+
|
2022
|
+
|
2023
|
+
|
2024
|
+
<xsl:choose>
|
2025
|
+
<xsl:when test="$continued = 'true'">
|
2026
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
2027
|
+
|
2028
|
+
</xsl:when>
|
2029
|
+
<xsl:otherwise>
|
2030
|
+
<xsl:apply-templates/>
|
2031
|
+
</xsl:otherwise>
|
2032
|
+
</xsl:choose>
|
2033
|
+
|
2034
|
+
|
1940
2035
|
</fo:block>
|
1941
2036
|
</xsl:if>
|
1942
2037
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -1988,7 +2083,7 @@
|
|
1988
2083
|
</xsl:for-each>
|
1989
2084
|
</xsl:when>
|
1990
2085
|
<xsl:otherwise>
|
1991
|
-
<xsl:for-each select="xalan:nodeset($table)
|
2086
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
1992
2087
|
<xsl:variable name="td_text">
|
1993
2088
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1994
2089
|
|
@@ -2073,21 +2168,22 @@
|
|
2073
2168
|
<!-- font-weight="bold" -->
|
2074
2169
|
<fo:table-header>
|
2075
2170
|
|
2171
|
+
|
2076
2172
|
<xsl:apply-templates/>
|
2077
2173
|
</fo:table-header>
|
2078
2174
|
</xsl:template><xsl:template name="table-header-title">
|
2079
|
-
<xsl:param name="cols-count"/>
|
2175
|
+
<xsl:param name="cols-count"/>
|
2080
2176
|
<!-- row for title -->
|
2081
2177
|
<fo:table-row>
|
2082
2178
|
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
2083
|
-
|
2179
|
+
|
2180
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
2181
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
2182
|
+
</xsl:apply-templates>
|
2084
2183
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
2085
2184
|
<xsl:call-template name="fn_name_display"/>
|
2086
|
-
</xsl:for-each>
|
2087
|
-
|
2088
|
-
<xsl:text> </xsl:text>
|
2089
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
2090
|
-
</fo:block>
|
2185
|
+
</xsl:for-each>
|
2186
|
+
|
2091
2187
|
</fo:table-cell>
|
2092
2188
|
</fo:table-row>
|
2093
2189
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -2308,6 +2404,7 @@
|
|
2308
2404
|
|
2309
2405
|
|
2310
2406
|
|
2407
|
+
|
2311
2408
|
</xsl:if>
|
2312
2409
|
<xsl:if test="$parent-name = 'tfoot'">
|
2313
2410
|
|
@@ -2321,6 +2418,10 @@
|
|
2321
2418
|
|
2322
2419
|
|
2323
2420
|
|
2421
|
+
|
2422
|
+
|
2423
|
+
|
2424
|
+
|
2324
2425
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
2325
2426
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
2326
2427
|
</xsl:if> -->
|
@@ -2332,7 +2433,8 @@
|
|
2332
2433
|
<xsl:attribute name="text-align">
|
2333
2434
|
<xsl:choose>
|
2334
2435
|
<xsl:when test="@align">
|
2335
|
-
<xsl:
|
2436
|
+
<xsl:call-template name="setAlignment"/>
|
2437
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2336
2438
|
</xsl:when>
|
2337
2439
|
<xsl:otherwise>center</xsl:otherwise>
|
2338
2440
|
</xsl:choose>
|
@@ -2346,6 +2448,7 @@
|
|
2346
2448
|
|
2347
2449
|
|
2348
2450
|
|
2451
|
+
|
2349
2452
|
<xsl:attribute name="display-align">center</xsl:attribute>
|
2350
2453
|
<xsl:attribute name="font-style">italic</xsl:attribute>
|
2351
2454
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
@@ -2358,6 +2461,10 @@
|
|
2358
2461
|
|
2359
2462
|
|
2360
2463
|
|
2464
|
+
|
2465
|
+
<xsl:if test="$lang = 'ar'">
|
2466
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2467
|
+
</xsl:if>
|
2361
2468
|
<xsl:if test="@colspan">
|
2362
2469
|
<xsl:attribute name="number-columns-spanned">
|
2363
2470
|
<xsl:value-of select="@colspan"/>
|
@@ -2389,11 +2496,16 @@
|
|
2389
2496
|
<xsl:attribute name="text-align">
|
2390
2497
|
<xsl:choose>
|
2391
2498
|
<xsl:when test="@align">
|
2392
|
-
<xsl:
|
2499
|
+
<xsl:call-template name="setAlignment"/>
|
2500
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2393
2501
|
</xsl:when>
|
2394
2502
|
<xsl:otherwise>left</xsl:otherwise>
|
2395
2503
|
</xsl:choose>
|
2396
2504
|
</xsl:attribute>
|
2505
|
+
<xsl:if test="$lang = 'ar'">
|
2506
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2507
|
+
</xsl:if>
|
2508
|
+
|
2397
2509
|
|
2398
2510
|
|
2399
2511
|
|
@@ -2413,6 +2525,12 @@
|
|
2413
2525
|
|
2414
2526
|
|
2415
2527
|
|
2528
|
+
|
2529
|
+
|
2530
|
+
|
2531
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
2532
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2533
|
+
</xsl:if>
|
2416
2534
|
<xsl:if test="@colspan">
|
2417
2535
|
<xsl:attribute name="number-columns-spanned">
|
2418
2536
|
<xsl:value-of select="@colspan"/>
|
@@ -2550,13 +2668,13 @@
|
|
2550
2668
|
</xsl:choose>
|
2551
2669
|
</xsl:variable>
|
2552
2670
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2553
|
-
<xsl:element name="{$ns}:table">
|
2671
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2554
2672
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2555
2673
|
<tbody>
|
2556
2674
|
<xsl:apply-templates mode="dl"/>
|
2557
2675
|
</tbody>
|
2558
2676
|
</xsl:for-each>
|
2559
|
-
</xsl:element>
|
2677
|
+
<!-- </xsl:element> -->
|
2560
2678
|
</xsl:variable>
|
2561
2679
|
|
2562
2680
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2635,6 +2753,7 @@
|
|
2635
2753
|
|
2636
2754
|
|
2637
2755
|
|
2756
|
+
|
2638
2757
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2639
2758
|
|
2640
2759
|
|
@@ -2647,6 +2766,8 @@
|
|
2647
2766
|
<xsl:apply-templates/>
|
2648
2767
|
</fo:inline>
|
2649
2768
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2769
|
+
<xsl:variable name="isAdded" select="@added"/>
|
2770
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
2650
2771
|
<fo:block-container>
|
2651
2772
|
|
2652
2773
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -2663,6 +2784,12 @@
|
|
2663
2784
|
</xsl:attribute>
|
2664
2785
|
|
2665
2786
|
</xsl:if>
|
2787
|
+
|
2788
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2789
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2790
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2791
|
+
</xsl:call-template>
|
2792
|
+
|
2666
2793
|
<fo:block-container>
|
2667
2794
|
|
2668
2795
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -2718,6 +2845,7 @@
|
|
2718
2845
|
|
2719
2846
|
|
2720
2847
|
|
2848
|
+
|
2721
2849
|
<xsl:variable name="title-key">
|
2722
2850
|
|
2723
2851
|
|
@@ -2770,11 +2898,11 @@
|
|
2770
2898
|
</xsl:choose>
|
2771
2899
|
</xsl:variable>
|
2772
2900
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2773
|
-
<xsl:element name="{$ns}:table">
|
2901
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2774
2902
|
<tbody>
|
2775
2903
|
<xsl:apply-templates mode="dl"/>
|
2776
2904
|
</tbody>
|
2777
|
-
</xsl:element>
|
2905
|
+
<!-- </xsl:element> -->
|
2778
2906
|
</xsl:variable>
|
2779
2907
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2780
2908
|
<xsl:variable name="colwidths">
|
@@ -2928,6 +3056,7 @@
|
|
2928
3056
|
|
2929
3057
|
<fo:table-row>
|
2930
3058
|
|
3059
|
+
|
2931
3060
|
<fo:table-cell>
|
2932
3061
|
|
2933
3062
|
<fo:block margin-top="6pt">
|
@@ -2943,6 +3072,7 @@
|
|
2943
3072
|
|
2944
3073
|
|
2945
3074
|
|
3075
|
+
|
2946
3076
|
<xsl:apply-templates/>
|
2947
3077
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2948
3078
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2999,6 +3129,8 @@
|
|
2999
3129
|
|
3000
3130
|
<xsl:apply-templates/>
|
3001
3131
|
</fo:inline>
|
3132
|
+
</xsl:template><xsl:template match="*[local-name()='padding']">
|
3133
|
+
<fo:inline padding-right="{@value}"> </fo:inline>
|
3002
3134
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
3003
3135
|
<fo:inline font-size="80%" vertical-align="super">
|
3004
3136
|
<xsl:apply-templates/>
|
@@ -3024,6 +3156,7 @@
|
|
3024
3156
|
|
3025
3157
|
|
3026
3158
|
|
3159
|
+
|
3027
3160
|
|
3028
3161
|
</xsl:variable>
|
3029
3162
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -3042,9 +3175,71 @@
|
|
3042
3175
|
<xsl:apply-templates/>
|
3043
3176
|
</fo:inline>
|
3044
3177
|
</xsl:template><xsl:template match="*[local-name()='add']">
|
3045
|
-
<
|
3046
|
-
<xsl:
|
3047
|
-
|
3178
|
+
<xsl:choose>
|
3179
|
+
<xsl:when test="@amendment">
|
3180
|
+
<fo:inline>
|
3181
|
+
<xsl:call-template name="insertTag">
|
3182
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
3183
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
3184
|
+
</xsl:call-template>
|
3185
|
+
<xsl:apply-templates/>
|
3186
|
+
<xsl:call-template name="insertTag">
|
3187
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
3188
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
3189
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
3190
|
+
</xsl:call-template>
|
3191
|
+
</fo:inline>
|
3192
|
+
</xsl:when>
|
3193
|
+
<xsl:when test="@corrigenda">
|
3194
|
+
<fo:inline>
|
3195
|
+
<xsl:call-template name="insertTag">
|
3196
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
3197
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
3198
|
+
</xsl:call-template>
|
3199
|
+
<xsl:apply-templates/>
|
3200
|
+
<xsl:call-template name="insertTag">
|
3201
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
3202
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
3203
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
3204
|
+
</xsl:call-template>
|
3205
|
+
</fo:inline>
|
3206
|
+
</xsl:when>
|
3207
|
+
<xsl:otherwise>
|
3208
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
3209
|
+
<xsl:apply-templates/>
|
3210
|
+
</fo:inline>
|
3211
|
+
</xsl:otherwise>
|
3212
|
+
</xsl:choose>
|
3213
|
+
|
3214
|
+
</xsl:template><xsl:template name="insertTag">
|
3215
|
+
<xsl:param name="type"/>
|
3216
|
+
<xsl:param name="kind"/>
|
3217
|
+
<xsl:param name="value"/>
|
3218
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
3219
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
3220
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
3221
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
3222
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
3223
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
3224
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
3225
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3226
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3227
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
3228
|
+
<g>
|
3229
|
+
<xsl:if test="$type = 'closing'">
|
3230
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
3231
|
+
</xsl:if>
|
3232
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
3233
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
3234
|
+
</g>
|
3235
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
3236
|
+
<xsl:if test="$type = 'closing'">
|
3237
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
3238
|
+
</xsl:if>
|
3239
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
3240
|
+
</text>
|
3241
|
+
</svg>
|
3242
|
+
</fo:instream-foreign-object>
|
3048
3243
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
3049
3244
|
<fo:inline xsl:use-attribute-sets="del-style">
|
3050
3245
|
<xsl:apply-templates/>
|
@@ -3343,11 +3538,15 @@
|
|
3343
3538
|
</xsl:apply-templates>
|
3344
3539
|
</xsl:template><xsl:template name="getLang">
|
3345
3540
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3541
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3346
3542
|
<xsl:variable name="language">
|
3347
3543
|
<xsl:choose>
|
3348
3544
|
<xsl:when test="$language_current != ''">
|
3349
3545
|
<xsl:value-of select="$language_current"/>
|
3350
3546
|
</xsl:when>
|
3547
|
+
<xsl:when test="$language_current_2 != ''">
|
3548
|
+
<xsl:value-of select="$language_current_2"/>
|
3549
|
+
</xsl:when>
|
3351
3550
|
<xsl:otherwise>
|
3352
3551
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3353
3552
|
</xsl:otherwise>
|
@@ -3387,13 +3586,23 @@
|
|
3387
3586
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3388
3587
|
<xsl:value-of select="substring($str, 2)"/>
|
3389
3588
|
</xsl:template><xsl:template match="mathml:math">
|
3390
|
-
<
|
3589
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3590
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3591
|
+
|
3592
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
3593
|
+
|
3594
|
+
|
3595
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3596
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3597
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3598
|
+
</xsl:call-template>
|
3391
3599
|
|
3392
3600
|
<xsl:variable name="mathml">
|
3393
3601
|
<xsl:apply-templates select="." mode="mathml"/>
|
3394
3602
|
</xsl:variable>
|
3395
3603
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3396
3604
|
|
3605
|
+
|
3397
3606
|
<!-- <xsl:copy-of select="."/> -->
|
3398
3607
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3399
3608
|
</fo:instream-foreign-object>
|
@@ -3411,9 +3620,27 @@
|
|
3411
3620
|
<xsl:copy>
|
3412
3621
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3413
3622
|
</xsl:copy>
|
3414
|
-
<
|
3623
|
+
<xsl:choose>
|
3624
|
+
<!-- if in msub, then don't add space -->
|
3625
|
+
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
3626
|
+
<!-- if next char in digit, don't add space -->
|
3627
|
+
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
3628
|
+
<xsl:otherwise>
|
3629
|
+
<mathml:mspace width="0.5ex"/>
|
3630
|
+
</xsl:otherwise>
|
3631
|
+
</xsl:choose>
|
3415
3632
|
</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">
|
3416
3633
|
<xsl:variable name="target">
|
3634
|
+
<xsl:choose>
|
3635
|
+
<xsl:when test="@updatetype = 'true'">
|
3636
|
+
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
3637
|
+
</xsl:when>
|
3638
|
+
<xsl:otherwise>
|
3639
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
3640
|
+
</xsl:otherwise>
|
3641
|
+
</xsl:choose>
|
3642
|
+
</xsl:variable>
|
3643
|
+
<xsl:variable name="target_text">
|
3417
3644
|
<xsl:choose>
|
3418
3645
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
3419
3646
|
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
@@ -3425,20 +3652,21 @@
|
|
3425
3652
|
</xsl:variable>
|
3426
3653
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3427
3654
|
|
3655
|
+
|
3428
3656
|
<xsl:choose>
|
3429
|
-
<xsl:when test="$
|
3657
|
+
<xsl:when test="$target_text = ''">
|
3430
3658
|
<xsl:apply-templates/>
|
3431
3659
|
</xsl:when>
|
3432
3660
|
<xsl:otherwise>
|
3433
|
-
<fo:basic-link external-destination="{
|
3661
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
3434
3662
|
<xsl:choose>
|
3435
3663
|
<xsl:when test="normalize-space(.) = ''">
|
3436
|
-
<!-- <xsl:value-of select="$target"/> -->
|
3437
3664
|
<xsl:call-template name="add-zero-spaces-link-java">
|
3438
|
-
<xsl:with-param name="text" select="$
|
3665
|
+
<xsl:with-param name="text" select="$target_text"/>
|
3439
3666
|
</xsl:call-template>
|
3440
3667
|
</xsl:when>
|
3441
3668
|
<xsl:otherwise>
|
3669
|
+
<!-- output text from <link>text</link> -->
|
3442
3670
|
<xsl:apply-templates/>
|
3443
3671
|
</xsl:otherwise>
|
3444
3672
|
</xsl:choose>
|
@@ -3559,6 +3787,7 @@
|
|
3559
3787
|
|
3560
3788
|
|
3561
3789
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3790
|
+
|
3562
3791
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3563
3792
|
</fo:inline>
|
3564
3793
|
<xsl:apply-templates/>
|
@@ -3584,7 +3813,9 @@
|
|
3584
3813
|
</xsl:choose>
|
3585
3814
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3586
3815
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3816
|
+
|
3587
3817
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3818
|
+
|
3588
3819
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3589
3820
|
</fo:inline>
|
3590
3821
|
<xsl:apply-templates/>
|
@@ -3650,16 +3881,27 @@
|
|
3650
3881
|
</fo:inline>
|
3651
3882
|
</xsl:if>
|
3652
3883
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3884
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3885
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3653
3886
|
<fo:block-container id="{@id}">
|
3654
3887
|
|
3888
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3889
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3890
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3891
|
+
</xsl:call-template>
|
3892
|
+
|
3655
3893
|
<fo:block>
|
3894
|
+
|
3656
3895
|
<xsl:apply-templates/>
|
3657
3896
|
</fo:block>
|
3658
3897
|
<xsl:call-template name="fn_display_figure"/>
|
3659
3898
|
<xsl:for-each select="*[local-name() = 'note']">
|
3660
3899
|
<xsl:call-template name="note"/>
|
3661
3900
|
</xsl:for-each>
|
3662
|
-
|
3901
|
+
|
3902
|
+
|
3903
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3904
|
+
|
3663
3905
|
</fo:block-container>
|
3664
3906
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
3665
3907
|
<fo:block id="{@id}">
|
@@ -3671,6 +3913,8 @@
|
|
3671
3913
|
<xsl:apply-templates/>
|
3672
3914
|
</fo:block>
|
3673
3915
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
3916
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
3917
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
3674
3918
|
<xsl:choose>
|
3675
3919
|
<xsl:when test="ancestor::*[local-name() = 'title']">
|
3676
3920
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
@@ -3686,7 +3930,26 @@
|
|
3686
3930
|
<xsl:variable name="src">
|
3687
3931
|
<xsl:call-template name="image_src"/>
|
3688
3932
|
</xsl:variable>
|
3689
|
-
|
3933
|
+
|
3934
|
+
<xsl:choose>
|
3935
|
+
<xsl:when test="$isDeleted = 'true'">
|
3936
|
+
<!-- enclose in svg -->
|
3937
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
3938
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
3939
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
3940
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3941
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3942
|
+
|
3943
|
+
|
3944
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
3945
|
+
|
3946
|
+
</fo:instream-foreign-object>
|
3947
|
+
</xsl:when>
|
3948
|
+
<xsl:otherwise>
|
3949
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3950
|
+
</xsl:otherwise>
|
3951
|
+
</xsl:choose>
|
3952
|
+
|
3690
3953
|
</fo:block>
|
3691
3954
|
</xsl:otherwise>
|
3692
3955
|
</xsl:choose>
|
@@ -3702,21 +3965,70 @@
|
|
3702
3965
|
<xsl:value-of select="@src"/>
|
3703
3966
|
</xsl:otherwise>
|
3704
3967
|
</xsl:choose>
|
3968
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
3969
|
+
<xsl:choose>
|
3970
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3971
|
+
<xsl:variable name="src">
|
3972
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3973
|
+
</xsl:variable>
|
3974
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
3975
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
3976
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
3977
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3978
|
+
</svg>
|
3979
|
+
</xsl:when>
|
3980
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3981
|
+
<xsl:variable name="src">
|
3982
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3983
|
+
</xsl:variable>
|
3984
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
3985
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
3986
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3987
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3988
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
3989
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3990
|
+
</svg>
|
3991
|
+
</xsl:when>
|
3992
|
+
<xsl:otherwise>
|
3993
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
3994
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
3995
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
3996
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
3997
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
3998
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3999
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
4000
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
4001
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
4002
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
4003
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
4004
|
+
<xsl:call-template name="svg_cross">
|
4005
|
+
<xsl:with-param name="width" select="$width"/>
|
4006
|
+
<xsl:with-param name="height" select="$height"/>
|
4007
|
+
</xsl:call-template>
|
4008
|
+
</svg>
|
4009
|
+
</xsl:otherwise>
|
4010
|
+
</xsl:choose>
|
4011
|
+
|
4012
|
+
</xsl:template><xsl:template name="svg_cross">
|
4013
|
+
<xsl:param name="width"/>
|
4014
|
+
<xsl:param name="height"/>
|
4015
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="0" x2="{$width}" y2="{$height}" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
4016
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="{$height}" x2="{$width}" y2="0" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
3705
4017
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
3706
4018
|
<xsl:apply-templates mode="contents"/>
|
3707
4019
|
<xsl:text> </xsl:text>
|
3708
4020
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
3709
4021
|
<xsl:apply-templates mode="bookmarks"/>
|
3710
4022
|
<xsl:text> </xsl:text>
|
3711
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4023
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3712
4024
|
<xsl:value-of select="."/>
|
3713
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
4025
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3714
4026
|
<xsl:value-of select="."/>
|
3715
4027
|
</xsl:template><xsl:template match="node()" mode="contents">
|
3716
4028
|
<xsl:apply-templates mode="contents"/>
|
3717
4029
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3718
4030
|
<xsl:apply-templates mode="bookmarks"/>
|
3719
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
4031
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
3720
4032
|
<xsl:apply-templates select="."/>
|
3721
4033
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3722
4034
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -3864,6 +4176,7 @@
|
|
3864
4176
|
<xsl:if test="normalize-space() != ''">
|
3865
4177
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3866
4178
|
|
4179
|
+
|
3867
4180
|
<xsl:apply-templates/>
|
3868
4181
|
</fo:block>
|
3869
4182
|
</xsl:if>
|
@@ -3915,6 +4228,8 @@
|
|
3915
4228
|
</fo:list-item-body>
|
3916
4229
|
</fo:list-item>
|
3917
4230
|
</fo:list-block>
|
4231
|
+
</xsl:template><xsl:template name="extractSection">
|
4232
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3918
4233
|
</xsl:template><xsl:template name="extractTitle">
|
3919
4234
|
<xsl:choose>
|
3920
4235
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -3941,6 +4256,8 @@
|
|
3941
4256
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3942
4257
|
|
3943
4258
|
<fo:block-container margin-left="0mm">
|
4259
|
+
<xsl:copy-of select="@id"/>
|
4260
|
+
|
3944
4261
|
<xsl:if test="parent::*[local-name() = 'note']">
|
3945
4262
|
<xsl:attribute name="margin-left">
|
3946
4263
|
<xsl:choose>
|
@@ -3951,7 +4268,9 @@
|
|
3951
4268
|
|
3952
4269
|
</xsl:if>
|
3953
4270
|
<fo:block-container margin-left="0mm">
|
3954
|
-
|
4271
|
+
|
4272
|
+
|
4273
|
+
|
3955
4274
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3956
4275
|
<xsl:variable name="_font-size">
|
3957
4276
|
|
@@ -3962,6 +4281,7 @@
|
|
3962
4281
|
|
3963
4282
|
|
3964
4283
|
|
4284
|
+
|
3965
4285
|
|
3966
4286
|
|
3967
4287
|
|
@@ -3979,10 +4299,14 @@
|
|
3979
4299
|
</xsl:choose>
|
3980
4300
|
</xsl:attribute>
|
3981
4301
|
</xsl:if>
|
3982
|
-
|
3983
|
-
|
4302
|
+
|
4303
|
+
<xsl:apply-templates/>
|
4304
|
+
</fo:block>
|
4305
|
+
|
4306
|
+
|
3984
4307
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3985
4308
|
|
4309
|
+
|
3986
4310
|
</fo:block-container>
|
3987
4311
|
</fo:block-container>
|
3988
4312
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -4217,6 +4541,7 @@
|
|
4217
4541
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
4218
4542
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4219
4543
|
|
4544
|
+
|
4220
4545
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4221
4546
|
|
4222
4547
|
<xsl:variable name="element">
|
@@ -4244,6 +4569,7 @@
|
|
4244
4569
|
<xsl:variable name="element">
|
4245
4570
|
block
|
4246
4571
|
|
4572
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
4247
4573
|
</xsl:variable>
|
4248
4574
|
<xsl:choose>
|
4249
4575
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -4251,7 +4577,7 @@
|
|
4251
4577
|
<xsl:apply-templates/>
|
4252
4578
|
</fo:inline>
|
4253
4579
|
</xsl:when>
|
4254
|
-
<xsl:when test="normalize-space($element)
|
4580
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
4255
4581
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
4256
4582
|
<xsl:apply-templates/>
|
4257
4583
|
</fo:block>
|
@@ -4288,7 +4614,7 @@
|
|
4288
4614
|
</fo:inline>
|
4289
4615
|
</xsl:otherwise>
|
4290
4616
|
</xsl:choose>
|
4291
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4617
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4292
4618
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4293
4619
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4294
4620
|
<xsl:variable name="termsource_text">
|
@@ -4297,13 +4623,15 @@
|
|
4297
4623
|
|
4298
4624
|
<xsl:choose>
|
4299
4625
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4300
|
-
<xsl:apply-templates/>
|
4626
|
+
<!-- <xsl:apply-templates /> -->
|
4627
|
+
<xsl:copy-of select="$termsource_text"/>
|
4301
4628
|
</xsl:when>
|
4302
4629
|
<xsl:otherwise>
|
4303
4630
|
|
4304
4631
|
<xsl:text>[</xsl:text>
|
4305
4632
|
|
4306
|
-
<xsl:apply-templates/>
|
4633
|
+
<!-- <xsl:apply-templates /> -->
|
4634
|
+
<xsl:copy-of select="$termsource_text"/>
|
4307
4635
|
|
4308
4636
|
<xsl:text>]</xsl:text>
|
4309
4637
|
|
@@ -4314,8 +4642,15 @@
|
|
4314
4642
|
<xsl:if test="normalize-space() != ''">
|
4315
4643
|
<xsl:value-of select="."/>
|
4316
4644
|
</xsl:if>
|
4317
|
-
</xsl:template><xsl:
|
4645
|
+
</xsl:template><xsl:variable name="localized.source">
|
4646
|
+
<xsl:call-template name="getLocalizedString">
|
4647
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4648
|
+
</xsl:call-template>
|
4649
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4318
4650
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4651
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4652
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4653
|
+
</xsl:if>
|
4319
4654
|
|
4320
4655
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4321
4656
|
<xsl:apply-templates/>
|
@@ -4431,6 +4766,7 @@
|
|
4431
4766
|
|
4432
4767
|
|
4433
4768
|
|
4769
|
+
|
4434
4770
|
<xsl:choose>
|
4435
4771
|
<xsl:when test="ancestor::un:sections and $depth = 1">12</xsl:when>
|
4436
4772
|
<xsl:when test="ancestor::un:sections">8</xsl:when>
|
@@ -4464,7 +4800,8 @@
|
|
4464
4800
|
</fo:inline>
|
4465
4801
|
</xsl:when>
|
4466
4802
|
<xsl:otherwise>
|
4467
|
-
<
|
4803
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
4804
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
4468
4805
|
</xsl:otherwise>
|
4469
4806
|
</xsl:choose>
|
4470
4807
|
|
@@ -4523,7 +4860,6 @@
|
|
4523
4860
|
</xsl:if>
|
4524
4861
|
|
4525
4862
|
|
4526
|
-
|
4527
4863
|
<xsl:apply-templates/>
|
4528
4864
|
</fo:block>
|
4529
4865
|
|
@@ -4540,6 +4876,7 @@
|
|
4540
4876
|
<xsl:call-template name="setId"/>
|
4541
4877
|
|
4542
4878
|
|
4879
|
+
|
4543
4880
|
<xsl:apply-templates/>
|
4544
4881
|
</fo:block>
|
4545
4882
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -4571,7 +4908,7 @@
|
|
4571
4908
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4572
4909
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4573
4910
|
<xsl:choose>
|
4574
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
4911
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
4575
4912
|
<fo:block-container>
|
4576
4913
|
<xsl:attribute name="margin-left">
|
4577
4914
|
<xsl:choose>
|
@@ -4581,6 +4918,7 @@
|
|
4581
4918
|
</xsl:attribute>
|
4582
4919
|
|
4583
4920
|
|
4921
|
+
|
4584
4922
|
<fo:block-container margin-left="0mm">
|
4585
4923
|
<fo:block>
|
4586
4924
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -4782,21 +5120,25 @@
|
|
4782
5120
|
|
4783
5121
|
|
4784
5122
|
|
5123
|
+
|
5124
|
+
|
5125
|
+
|
5126
|
+
|
4785
5127
|
</xsl:template><xsl:template name="processBibitemDocId">
|
4786
5128
|
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
4787
5129
|
<xsl:choose>
|
4788
5130
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4789
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
5131
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
4790
5132
|
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4791
5133
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4792
|
-
</xsl:if>
|
5134
|
+
</xsl:if> -->
|
4793
5135
|
<xsl:value-of select="$_doc_ident"/>
|
4794
5136
|
</xsl:when>
|
4795
5137
|
<xsl:otherwise>
|
4796
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
5138
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4797
5139
|
<xsl:if test="$type != ''">
|
4798
5140
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4799
|
-
</xsl:if>
|
5141
|
+
</xsl:if> -->
|
4800
5142
|
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4801
5143
|
</xsl:otherwise>
|
4802
5144
|
</xsl:choose>
|
@@ -4838,6 +5180,70 @@
|
|
4838
5180
|
<xsl:value-of select="substring(.,1,1)"/>
|
4839
5181
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4840
5182
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5183
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
5184
|
+
<fo:block>
|
5185
|
+
<xsl:apply-templates/>
|
5186
|
+
</fo:block>
|
5187
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
5188
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5189
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
5190
|
+
<fo:inline>
|
5191
|
+
<xsl:call-template name="text_input"/>
|
5192
|
+
</fo:inline>
|
5193
|
+
</xsl:template><xsl:template name="text_input">
|
5194
|
+
<xsl:variable name="count">
|
5195
|
+
<xsl:choose>
|
5196
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
5197
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
5198
|
+
<xsl:otherwise>10</xsl:otherwise>
|
5199
|
+
</xsl:choose>
|
5200
|
+
</xsl:variable>
|
5201
|
+
<xsl:call-template name="repeat">
|
5202
|
+
<xsl:with-param name="char" select="'_'"/>
|
5203
|
+
<xsl:with-param name="count" select="$count"/>
|
5204
|
+
</xsl:call-template>
|
5205
|
+
<xsl:text> </xsl:text>
|
5206
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
5207
|
+
<xsl:variable name="caption">
|
5208
|
+
<xsl:choose>
|
5209
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
5210
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
5211
|
+
</xsl:choose>
|
5212
|
+
</xsl:variable>
|
5213
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
5214
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
5215
|
+
<fo:inline padding-right="1mm">
|
5216
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
5217
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
5218
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
5219
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5220
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5221
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
5222
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
5223
|
+
</svg>
|
5224
|
+
</fo:instream-foreign-object>
|
5225
|
+
</fo:inline>
|
5226
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
5227
|
+
<fo:inline padding-right="1mm">
|
5228
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
5229
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
5230
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
5231
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5232
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5233
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
5234
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
5235
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
5236
|
+
</svg>
|
5237
|
+
</fo:instream-foreign-object>
|
5238
|
+
</fo:inline>
|
5239
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
5240
|
+
<fo:inline>
|
5241
|
+
<xsl:call-template name="text_input"/>
|
5242
|
+
</fo:inline>
|
5243
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
5244
|
+
<fo:block-container border="1pt solid black" width="50%">
|
5245
|
+
<fo:block> </fo:block>
|
5246
|
+
</fo:block-container>
|
4841
5247
|
</xsl:template><xsl:template name="convertDate">
|
4842
5248
|
<xsl:param name="date"/>
|
4843
5249
|
<xsl:param name="format" select="'short'"/>
|
@@ -5045,6 +5451,9 @@
|
|
5045
5451
|
<xsl:when test="parent::*[local-name() = 'preface']">
|
5046
5452
|
<xsl:value-of select="$level_total - 1"/>
|
5047
5453
|
</xsl:when>
|
5454
|
+
<xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
|
5455
|
+
<xsl:value-of select="$level_total - 1"/>
|
5456
|
+
</xsl:when>
|
5048
5457
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
5049
5458
|
<xsl:value-of select="$level_total - 2"/>
|
5050
5459
|
</xsl:when>
|
@@ -5103,6 +5512,7 @@
|
|
5103
5512
|
|
5104
5513
|
|
5105
5514
|
|
5515
|
+
|
5106
5516
|
<xsl:value-of select="document('')//*/namespace::un"/>
|
5107
5517
|
|
5108
5518
|
|
@@ -5169,17 +5579,79 @@
|
|
5169
5579
|
</xsl:call-template>
|
5170
5580
|
</xsl:if>
|
5171
5581
|
</xsl:template><xsl:template name="getLocalizedString">
|
5172
|
-
<xsl:param name="key"/>
|
5582
|
+
<xsl:param name="key"/>
|
5173
5583
|
|
5174
5584
|
<xsl:variable name="curr_lang">
|
5175
5585
|
<xsl:call-template name="getLang"/>
|
5176
5586
|
</xsl:variable>
|
5177
5587
|
|
5588
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
5589
|
+
|
5178
5590
|
<xsl:choose>
|
5591
|
+
<xsl:when test="$data_value != ''">
|
5592
|
+
<xsl:value-of select="$data_value"/>
|
5593
|
+
</xsl:when>
|
5179
5594
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5180
5595
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5181
5596
|
</xsl:when>
|
5182
|
-
<xsl:otherwise
|
5597
|
+
<xsl:otherwise>
|
5598
|
+
<xsl:variable name="key_">
|
5599
|
+
<xsl:call-template name="capitalize">
|
5600
|
+
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
|
5601
|
+
</xsl:call-template>
|
5602
|
+
</xsl:variable>
|
5603
|
+
<xsl:value-of select="$key_"/>
|
5604
|
+
</xsl:otherwise>
|
5183
5605
|
</xsl:choose>
|
5184
5606
|
|
5607
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
5608
|
+
<xsl:param name="isAdded"/>
|
5609
|
+
<xsl:param name="isDeleted"/>
|
5610
|
+
<xsl:choose>
|
5611
|
+
<xsl:when test="local-name() = 'math'">
|
5612
|
+
<xsl:if test="$isAdded = 'true'">
|
5613
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
5614
|
+
</xsl:if>
|
5615
|
+
<xsl:if test="$isDeleted = 'true'">
|
5616
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
5617
|
+
</xsl:if>
|
5618
|
+
</xsl:when>
|
5619
|
+
<xsl:otherwise>
|
5620
|
+
<xsl:if test="$isAdded = 'true'">
|
5621
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
5622
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5623
|
+
</xsl:if>
|
5624
|
+
<xsl:if test="$isDeleted = 'true'">
|
5625
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
5626
|
+
<xsl:if test="local-name() = 'table'">
|
5627
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
5628
|
+
</xsl:if>
|
5629
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
5630
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5631
|
+
</xsl:if>
|
5632
|
+
</xsl:otherwise>
|
5633
|
+
</xsl:choose>
|
5634
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
5635
|
+
<xsl:if test="$lang = 'ar'">
|
5636
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
5637
|
+
</xsl:if>
|
5638
|
+
</xsl:template><xsl:template name="setAlignment">
|
5639
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
5640
|
+
<xsl:choose>
|
5641
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
5642
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
5643
|
+
<xsl:when test="$align != ''">
|
5644
|
+
<xsl:value-of select="$align"/>
|
5645
|
+
</xsl:when>
|
5646
|
+
</xsl:choose>
|
5647
|
+
</xsl:template><xsl:template name="setTextAlignment">
|
5648
|
+
<xsl:param name="default">left</xsl:param>
|
5649
|
+
<xsl:attribute name="text-align">
|
5650
|
+
<xsl:choose>
|
5651
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
5652
|
+
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
5653
|
+
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
5654
|
+
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
5655
|
+
</xsl:choose>
|
5656
|
+
</xsl:attribute>
|
5185
5657
|
</xsl:template></xsl:stylesheet>
|