metanorma-m3aawg 1.7.0 → 1.7.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/m3aawg/biblio.rng +1 -0
- data/lib/asciidoctor/m3aawg/isodoc.rng +191 -3
- data/lib/isodoc/m3aawg/m3aawg.policy.xsl +530 -66
- data/lib/isodoc/m3aawg/m3aawg.report.xsl +530 -66
- data/lib/metanorma/m3aawg/version.rb +1 -1
- data/metanorma-m3d.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: 0d95848b94791a3a1ec260709272d02fb57cf356ab5b856be428c4ba937cfe00
|
4
|
+
data.tar.gz: 4c69d81d994cf5602854c9c37e5c51fd1a91a2b4e5e7d564a351e412ad535ac6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e99643ec9118b7e52e12939cb1107faf81cd9d17e33a6982f296e1a43a2f640e23dc6b6fec462725e3d7e01a7b932ce69e7d395fbcdb7311cc6eca54e37cf5fb
|
7
|
+
data.tar.gz: f25efedcac4967fc897ac457ae4987146c6be348e5610d3943379fd07e427101399c544b09d6286a64a650f977527991078f5b450262bc4138bf8642ef8ccabb
|
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"/>
|
@@ -1021,6 +1021,9 @@
|
|
1021
1021
|
<title-continued lang="en">(continued)</title-continued>
|
1022
1022
|
<title-continued lang="fr">(continué)</title-continued>
|
1023
1023
|
|
1024
|
+
</xsl:variable><xsl:variable name="bibdata">
|
1025
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
1026
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
1024
1027
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1025
1028
|
<xsl:param name="name"/>
|
1026
1029
|
<xsl:param name="lang"/>
|
@@ -1046,13 +1049,16 @@
|
|
1046
1049
|
</xsl:choose>
|
1047
1050
|
</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">
|
1048
1051
|
|
1052
|
+
|
1049
1053
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1050
1054
|
|
1055
|
+
|
1051
1056
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1052
1057
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1053
1058
|
|
1054
1059
|
|
1055
1060
|
|
1061
|
+
|
1056
1062
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1057
1063
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1058
1064
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -1101,7 +1107,7 @@
|
|
1101
1107
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1102
1108
|
|
1103
1109
|
|
1104
|
-
|
1110
|
+
|
1105
1111
|
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
1106
1112
|
|
1107
1113
|
|
@@ -1117,6 +1123,7 @@
|
|
1117
1123
|
|
1118
1124
|
|
1119
1125
|
|
1126
|
+
|
1120
1127
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1121
1128
|
|
1122
1129
|
|
@@ -1136,9 +1143,7 @@
|
|
1136
1143
|
|
1137
1144
|
|
1138
1145
|
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1146
|
+
|
1142
1147
|
|
1143
1148
|
|
1144
1149
|
|
@@ -1169,8 +1174,10 @@
|
|
1169
1174
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1170
1175
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1171
1176
|
|
1177
|
+
|
1172
1178
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1173
1179
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1180
|
+
|
1174
1181
|
|
1175
1182
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1176
1183
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -1187,6 +1194,9 @@
|
|
1187
1194
|
|
1188
1195
|
|
1189
1196
|
|
1197
|
+
|
1198
|
+
</xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
|
1199
|
+
|
1190
1200
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1191
1201
|
|
1192
1202
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -1208,15 +1218,19 @@
|
|
1208
1218
|
|
1209
1219
|
|
1210
1220
|
|
1221
|
+
|
1222
|
+
|
1211
1223
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1212
1224
|
|
1213
1225
|
|
1214
1226
|
|
1215
1227
|
|
1228
|
+
|
1216
1229
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1217
1230
|
|
1218
1231
|
|
1219
1232
|
|
1233
|
+
|
1220
1234
|
|
1221
1235
|
|
1222
1236
|
|
@@ -1233,6 +1247,7 @@
|
|
1233
1247
|
|
1234
1248
|
|
1235
1249
|
|
1250
|
+
|
1236
1251
|
</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">
|
1237
1252
|
|
1238
1253
|
|
@@ -1242,6 +1257,7 @@
|
|
1242
1257
|
|
1243
1258
|
|
1244
1259
|
|
1260
|
+
|
1245
1261
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
1246
1262
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1247
1263
|
|
@@ -1272,9 +1288,13 @@
|
|
1272
1288
|
|
1273
1289
|
|
1274
1290
|
|
1291
|
+
|
1292
|
+
|
1275
1293
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1294
|
+
|
1276
1295
|
|
1277
1296
|
|
1297
|
+
|
1278
1298
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1279
1299
|
|
1280
1300
|
|
@@ -1299,14 +1319,18 @@
|
|
1299
1319
|
|
1300
1320
|
|
1301
1321
|
|
1322
|
+
|
1323
|
+
|
1302
1324
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1303
1325
|
|
1304
1326
|
|
1305
1327
|
|
1328
|
+
|
1306
1329
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1307
1330
|
|
1308
1331
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1309
1332
|
|
1333
|
+
|
1310
1334
|
|
1311
1335
|
|
1312
1336
|
|
@@ -1325,6 +1349,7 @@
|
|
1325
1349
|
|
1326
1350
|
|
1327
1351
|
|
1352
|
+
|
1328
1353
|
|
1329
1354
|
|
1330
1355
|
|
@@ -1338,11 +1363,13 @@
|
|
1338
1363
|
|
1339
1364
|
|
1340
1365
|
|
1366
|
+
|
1341
1367
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
1342
1368
|
|
1343
1369
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1344
1370
|
|
1345
1371
|
|
1372
|
+
|
1346
1373
|
<xsl:attribute name="width">100%</xsl:attribute>
|
1347
1374
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
1348
1375
|
<xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
@@ -1369,18 +1396,35 @@
|
|
1369
1396
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1370
1397
|
|
1371
1398
|
|
1399
|
+
|
1372
1400
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1373
1401
|
|
1402
|
+
|
1374
1403
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1375
1404
|
|
1376
1405
|
|
1377
|
-
|
1406
|
+
|
1407
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
1408
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
1409
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
1378
1410
|
<xsl:attribute name="color">red</xsl:attribute>
|
1379
1411
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1380
|
-
|
1381
|
-
<xsl:attribute name="color"
|
1412
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
1413
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
1414
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
1415
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
1416
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
1417
|
+
<xsl:text>red</xsl:text>
|
1418
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
1419
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
1382
1420
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
1383
|
-
</xsl:attribute-set><xsl:
|
1421
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
1422
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
1423
|
+
|
1424
|
+
|
1425
|
+
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1426
|
+
|
1427
|
+
</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">
|
1384
1428
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1385
1429
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1386
1430
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -1429,18 +1473,19 @@
|
|
1429
1473
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1430
1474
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1431
1475
|
|
1476
|
+
<xsl:variable name="table-preamble">
|
1477
|
+
|
1478
|
+
|
1479
|
+
</xsl:variable>
|
1480
|
+
|
1432
1481
|
<xsl:variable name="table">
|
1433
1482
|
|
1434
1483
|
<xsl:variable name="simple-table">
|
1435
|
-
<xsl:call-template name="getSimpleTable"/>
|
1484
|
+
<xsl:call-template name="getSimpleTable"/>
|
1436
1485
|
</xsl:variable>
|
1437
1486
|
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
1487
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
1443
|
-
<fo:block> </fo:block>
|
1488
|
+
<fo:block> </fo:block>
|
1444
1489
|
</xsl:if> -->
|
1445
1490
|
|
1446
1491
|
<!-- $namespace = 'iso' or -->
|
@@ -1453,7 +1498,7 @@
|
|
1453
1498
|
|
1454
1499
|
|
1455
1500
|
|
1456
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
1501
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
1457
1502
|
|
1458
1503
|
<!-- <xsl:variable name="cols-count">
|
1459
1504
|
<xsl:choose>
|
@@ -1472,8 +1517,6 @@
|
|
1472
1517
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1473
1518
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1474
1519
|
|
1475
|
-
|
1476
|
-
|
1477
1520
|
<xsl:variable name="colwidths">
|
1478
1521
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1479
1522
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1501,9 +1544,11 @@
|
|
1501
1544
|
</xsl:choose>
|
1502
1545
|
</xsl:variable>
|
1503
1546
|
|
1547
|
+
|
1504
1548
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1505
1549
|
|
1506
1550
|
|
1551
|
+
|
1507
1552
|
|
1508
1553
|
|
1509
1554
|
|
@@ -1516,6 +1561,8 @@
|
|
1516
1561
|
|
1517
1562
|
|
1518
1563
|
|
1564
|
+
|
1565
|
+
|
1519
1566
|
<xsl:variable name="table_width">
|
1520
1567
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1521
1568
|
100%
|
@@ -1532,12 +1579,15 @@
|
|
1532
1579
|
|
1533
1580
|
|
1534
1581
|
|
1582
|
+
|
1583
|
+
|
1535
1584
|
|
1536
1585
|
|
1537
1586
|
|
1538
1587
|
|
1539
1588
|
|
1540
1589
|
|
1590
|
+
|
1541
1591
|
</xsl:variable>
|
1542
1592
|
|
1543
1593
|
|
@@ -1621,7 +1671,8 @@
|
|
1621
1671
|
</fo:block-container>
|
1622
1672
|
</xsl:variable>
|
1623
1673
|
|
1624
|
-
|
1674
|
+
<xsl:variable name="isAdded" select="@added"/>
|
1675
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
1625
1676
|
|
1626
1677
|
<xsl:choose>
|
1627
1678
|
<xsl:when test="@width">
|
@@ -1635,7 +1686,14 @@
|
|
1635
1686
|
<fo:table-body>
|
1636
1687
|
<fo:table-row>
|
1637
1688
|
<fo:table-cell column-number="2">
|
1638
|
-
<
|
1689
|
+
<xsl:copy-of select="$table-preamble"/>
|
1690
|
+
<fo:block>
|
1691
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1692
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1693
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1694
|
+
</xsl:call-template>
|
1695
|
+
<xsl:copy-of select="$table"/>
|
1696
|
+
</fo:block>
|
1639
1697
|
</fo:table-cell>
|
1640
1698
|
</fo:table-row>
|
1641
1699
|
</fo:table-body>
|
@@ -1646,16 +1704,45 @@
|
|
1646
1704
|
|
1647
1705
|
</xsl:when>
|
1648
1706
|
<xsl:otherwise>
|
1649
|
-
<xsl:
|
1707
|
+
<xsl:choose>
|
1708
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
1709
|
+
<xsl:copy-of select="$table-preamble"/>
|
1710
|
+
<fo:block>
|
1711
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1712
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1713
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1714
|
+
</xsl:call-template>
|
1715
|
+
<xsl:copy-of select="$table"/>
|
1716
|
+
</fo:block>
|
1717
|
+
</xsl:when>
|
1718
|
+
<xsl:otherwise>
|
1719
|
+
<xsl:copy-of select="$table-preamble"/>
|
1720
|
+
<xsl:copy-of select="$table"/>
|
1721
|
+
</xsl:otherwise>
|
1722
|
+
</xsl:choose>
|
1650
1723
|
</xsl:otherwise>
|
1651
1724
|
</xsl:choose>
|
1652
1725
|
|
1653
1726
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1727
|
+
<xsl:param name="continued"/>
|
1654
1728
|
<xsl:if test="normalize-space() != ''">
|
1655
1729
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1656
1730
|
|
1657
1731
|
|
1658
|
-
|
1732
|
+
|
1733
|
+
|
1734
|
+
|
1735
|
+
<xsl:choose>
|
1736
|
+
<xsl:when test="$continued = 'true'">
|
1737
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
1738
|
+
|
1739
|
+
</xsl:when>
|
1740
|
+
<xsl:otherwise>
|
1741
|
+
<xsl:apply-templates/>
|
1742
|
+
</xsl:otherwise>
|
1743
|
+
</xsl:choose>
|
1744
|
+
|
1745
|
+
|
1659
1746
|
</fo:block>
|
1660
1747
|
</xsl:if>
|
1661
1748
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -1707,7 +1794,7 @@
|
|
1707
1794
|
</xsl:for-each>
|
1708
1795
|
</xsl:when>
|
1709
1796
|
<xsl:otherwise>
|
1710
|
-
<xsl:for-each select="xalan:nodeset($table)
|
1797
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
1711
1798
|
<xsl:variable name="td_text">
|
1712
1799
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1713
1800
|
|
@@ -1792,21 +1879,22 @@
|
|
1792
1879
|
<!-- font-weight="bold" -->
|
1793
1880
|
<fo:table-header>
|
1794
1881
|
|
1882
|
+
|
1795
1883
|
<xsl:apply-templates/>
|
1796
1884
|
</fo:table-header>
|
1797
1885
|
</xsl:template><xsl:template name="table-header-title">
|
1798
|
-
<xsl:param name="cols-count"/>
|
1886
|
+
<xsl:param name="cols-count"/>
|
1799
1887
|
<!-- row for title -->
|
1800
1888
|
<fo:table-row>
|
1801
1889
|
<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">
|
1802
|
-
|
1890
|
+
|
1891
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1892
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
1893
|
+
</xsl:apply-templates>
|
1803
1894
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1804
1895
|
<xsl:call-template name="fn_name_display"/>
|
1805
|
-
</xsl:for-each>
|
1806
|
-
|
1807
|
-
<xsl:text> </xsl:text>
|
1808
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1809
|
-
</fo:block>
|
1896
|
+
</xsl:for-each>
|
1897
|
+
|
1810
1898
|
</fo:table-cell>
|
1811
1899
|
</fo:table-row>
|
1812
1900
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -2027,6 +2115,7 @@
|
|
2027
2115
|
|
2028
2116
|
|
2029
2117
|
|
2118
|
+
|
2030
2119
|
</xsl:if>
|
2031
2120
|
<xsl:if test="$parent-name = 'tfoot'">
|
2032
2121
|
|
@@ -2036,6 +2125,10 @@
|
|
2036
2125
|
|
2037
2126
|
|
2038
2127
|
|
2128
|
+
|
2129
|
+
|
2130
|
+
|
2131
|
+
|
2039
2132
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
2040
2133
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
2041
2134
|
</xsl:if> -->
|
@@ -2047,7 +2140,8 @@
|
|
2047
2140
|
<xsl:attribute name="text-align">
|
2048
2141
|
<xsl:choose>
|
2049
2142
|
<xsl:when test="@align">
|
2050
|
-
<xsl:
|
2143
|
+
<xsl:call-template name="setAlignment"/>
|
2144
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2051
2145
|
</xsl:when>
|
2052
2146
|
<xsl:otherwise>center</xsl:otherwise>
|
2053
2147
|
</xsl:choose>
|
@@ -2063,6 +2157,11 @@
|
|
2063
2157
|
|
2064
2158
|
|
2065
2159
|
|
2160
|
+
|
2161
|
+
|
2162
|
+
<xsl:if test="$lang = 'ar'">
|
2163
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2164
|
+
</xsl:if>
|
2066
2165
|
<xsl:if test="@colspan">
|
2067
2166
|
<xsl:attribute name="number-columns-spanned">
|
2068
2167
|
<xsl:value-of select="@colspan"/>
|
@@ -2094,11 +2193,19 @@
|
|
2094
2193
|
<xsl:attribute name="text-align">
|
2095
2194
|
<xsl:choose>
|
2096
2195
|
<xsl:when test="@align">
|
2097
|
-
<xsl:
|
2196
|
+
<xsl:call-template name="setAlignment"/>
|
2197
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2098
2198
|
</xsl:when>
|
2099
2199
|
<xsl:otherwise>left</xsl:otherwise>
|
2100
2200
|
</xsl:choose>
|
2101
2201
|
</xsl:attribute>
|
2202
|
+
<xsl:if test="$lang = 'ar'">
|
2203
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2204
|
+
</xsl:if>
|
2205
|
+
|
2206
|
+
|
2207
|
+
|
2208
|
+
|
2102
2209
|
|
2103
2210
|
|
2104
2211
|
|
@@ -2110,6 +2217,9 @@
|
|
2110
2217
|
|
2111
2218
|
|
2112
2219
|
|
2220
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
2221
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2222
|
+
</xsl:if>
|
2113
2223
|
<xsl:if test="@colspan">
|
2114
2224
|
<xsl:attribute name="number-columns-spanned">
|
2115
2225
|
<xsl:value-of select="@colspan"/>
|
@@ -2237,13 +2347,13 @@
|
|
2237
2347
|
</xsl:choose>
|
2238
2348
|
</xsl:variable>
|
2239
2349
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2240
|
-
<xsl:element name="{$ns}:table">
|
2350
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2241
2351
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2242
2352
|
<tbody>
|
2243
2353
|
<xsl:apply-templates mode="dl"/>
|
2244
2354
|
</tbody>
|
2245
2355
|
</xsl:for-each>
|
2246
|
-
</xsl:element>
|
2356
|
+
<!-- </xsl:element> -->
|
2247
2357
|
</xsl:variable>
|
2248
2358
|
|
2249
2359
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2322,6 +2432,7 @@
|
|
2322
2432
|
|
2323
2433
|
|
2324
2434
|
|
2435
|
+
|
2325
2436
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2326
2437
|
|
2327
2438
|
|
@@ -2334,6 +2445,8 @@
|
|
2334
2445
|
<xsl:apply-templates/>
|
2335
2446
|
</fo:inline>
|
2336
2447
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2448
|
+
<xsl:variable name="isAdded" select="@added"/>
|
2449
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
2337
2450
|
<fo:block-container>
|
2338
2451
|
|
2339
2452
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -2350,6 +2463,12 @@
|
|
2350
2463
|
</xsl:attribute>
|
2351
2464
|
|
2352
2465
|
</xsl:if>
|
2466
|
+
|
2467
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2468
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2469
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2470
|
+
</xsl:call-template>
|
2471
|
+
|
2353
2472
|
<fo:block-container>
|
2354
2473
|
|
2355
2474
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -2405,6 +2524,7 @@
|
|
2405
2524
|
|
2406
2525
|
|
2407
2526
|
|
2527
|
+
|
2408
2528
|
<xsl:variable name="title-key">
|
2409
2529
|
|
2410
2530
|
|
@@ -2457,11 +2577,11 @@
|
|
2457
2577
|
</xsl:choose>
|
2458
2578
|
</xsl:variable>
|
2459
2579
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2460
|
-
<xsl:element name="{$ns}:table">
|
2580
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2461
2581
|
<tbody>
|
2462
2582
|
<xsl:apply-templates mode="dl"/>
|
2463
2583
|
</tbody>
|
2464
|
-
</xsl:element>
|
2584
|
+
<!-- </xsl:element> -->
|
2465
2585
|
</xsl:variable>
|
2466
2586
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2467
2587
|
<xsl:variable name="colwidths">
|
@@ -2615,6 +2735,7 @@
|
|
2615
2735
|
|
2616
2736
|
<fo:table-row>
|
2617
2737
|
|
2738
|
+
|
2618
2739
|
<fo:table-cell>
|
2619
2740
|
|
2620
2741
|
<fo:block margin-top="6pt">
|
@@ -2630,6 +2751,7 @@
|
|
2630
2751
|
|
2631
2752
|
|
2632
2753
|
|
2754
|
+
|
2633
2755
|
<xsl:apply-templates/>
|
2634
2756
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2635
2757
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2686,6 +2808,8 @@
|
|
2686
2808
|
|
2687
2809
|
<xsl:apply-templates/>
|
2688
2810
|
</fo:inline>
|
2811
|
+
</xsl:template><xsl:template match="*[local-name()='padding']">
|
2812
|
+
<fo:inline padding-right="{@value}"> </fo:inline>
|
2689
2813
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
2690
2814
|
<fo:inline font-size="80%" vertical-align="super">
|
2691
2815
|
<xsl:apply-templates/>
|
@@ -2706,6 +2830,7 @@
|
|
2706
2830
|
|
2707
2831
|
|
2708
2832
|
|
2833
|
+
|
2709
2834
|
<xsl:choose>
|
2710
2835
|
<xsl:when test="not(ancestor::*[local-name()='note'])">10</xsl:when>
|
2711
2836
|
<xsl:otherwise>11</xsl:otherwise>
|
@@ -2734,9 +2859,71 @@
|
|
2734
2859
|
<xsl:apply-templates/>
|
2735
2860
|
</fo:inline>
|
2736
2861
|
</xsl:template><xsl:template match="*[local-name()='add']">
|
2737
|
-
<
|
2738
|
-
<xsl:
|
2739
|
-
|
2862
|
+
<xsl:choose>
|
2863
|
+
<xsl:when test="@amendment">
|
2864
|
+
<fo:inline>
|
2865
|
+
<xsl:call-template name="insertTag">
|
2866
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2867
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2868
|
+
</xsl:call-template>
|
2869
|
+
<xsl:apply-templates/>
|
2870
|
+
<xsl:call-template name="insertTag">
|
2871
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2872
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2873
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2874
|
+
</xsl:call-template>
|
2875
|
+
</fo:inline>
|
2876
|
+
</xsl:when>
|
2877
|
+
<xsl:when test="@corrigenda">
|
2878
|
+
<fo:inline>
|
2879
|
+
<xsl:call-template name="insertTag">
|
2880
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2881
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2882
|
+
</xsl:call-template>
|
2883
|
+
<xsl:apply-templates/>
|
2884
|
+
<xsl:call-template name="insertTag">
|
2885
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2886
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2887
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2888
|
+
</xsl:call-template>
|
2889
|
+
</fo:inline>
|
2890
|
+
</xsl:when>
|
2891
|
+
<xsl:otherwise>
|
2892
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
2893
|
+
<xsl:apply-templates/>
|
2894
|
+
</fo:inline>
|
2895
|
+
</xsl:otherwise>
|
2896
|
+
</xsl:choose>
|
2897
|
+
|
2898
|
+
</xsl:template><xsl:template name="insertTag">
|
2899
|
+
<xsl:param name="type"/>
|
2900
|
+
<xsl:param name="kind"/>
|
2901
|
+
<xsl:param name="value"/>
|
2902
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
2903
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
2904
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
2905
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
2906
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
2907
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
2908
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
2909
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
2910
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2911
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
2912
|
+
<g>
|
2913
|
+
<xsl:if test="$type = 'closing'">
|
2914
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
2915
|
+
</xsl:if>
|
2916
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
2917
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
2918
|
+
</g>
|
2919
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
2920
|
+
<xsl:if test="$type = 'closing'">
|
2921
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
2922
|
+
</xsl:if>
|
2923
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
2924
|
+
</text>
|
2925
|
+
</svg>
|
2926
|
+
</fo:instream-foreign-object>
|
2740
2927
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2741
2928
|
<fo:inline xsl:use-attribute-sets="del-style">
|
2742
2929
|
<xsl:apply-templates/>
|
@@ -3035,11 +3222,15 @@
|
|
3035
3222
|
</xsl:apply-templates>
|
3036
3223
|
</xsl:template><xsl:template name="getLang">
|
3037
3224
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3225
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3038
3226
|
<xsl:variable name="language">
|
3039
3227
|
<xsl:choose>
|
3040
3228
|
<xsl:when test="$language_current != ''">
|
3041
3229
|
<xsl:value-of select="$language_current"/>
|
3042
3230
|
</xsl:when>
|
3231
|
+
<xsl:when test="$language_current_2 != ''">
|
3232
|
+
<xsl:value-of select="$language_current_2"/>
|
3233
|
+
</xsl:when>
|
3043
3234
|
<xsl:otherwise>
|
3044
3235
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3045
3236
|
</xsl:otherwise>
|
@@ -3079,13 +3270,23 @@
|
|
3079
3270
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3080
3271
|
<xsl:value-of select="substring($str, 2)"/>
|
3081
3272
|
</xsl:template><xsl:template match="mathml:math">
|
3082
|
-
<
|
3273
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3274
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3275
|
+
|
3276
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
3277
|
+
|
3278
|
+
|
3279
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3280
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3281
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3282
|
+
</xsl:call-template>
|
3083
3283
|
|
3084
3284
|
<xsl:variable name="mathml">
|
3085
3285
|
<xsl:apply-templates select="." mode="mathml"/>
|
3086
3286
|
</xsl:variable>
|
3087
3287
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3088
3288
|
|
3289
|
+
|
3089
3290
|
<!-- <xsl:copy-of select="."/> -->
|
3090
3291
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3091
3292
|
</fo:instream-foreign-object>
|
@@ -3103,9 +3304,27 @@
|
|
3103
3304
|
<xsl:copy>
|
3104
3305
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3105
3306
|
</xsl:copy>
|
3106
|
-
<
|
3307
|
+
<xsl:choose>
|
3308
|
+
<!-- if in msub, then don't add space -->
|
3309
|
+
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
3310
|
+
<!-- if next char in digit, don't add space -->
|
3311
|
+
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
3312
|
+
<xsl:otherwise>
|
3313
|
+
<mathml:mspace width="0.5ex"/>
|
3314
|
+
</xsl:otherwise>
|
3315
|
+
</xsl:choose>
|
3107
3316
|
</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">
|
3108
3317
|
<xsl:variable name="target">
|
3318
|
+
<xsl:choose>
|
3319
|
+
<xsl:when test="@updatetype = 'true'">
|
3320
|
+
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
3321
|
+
</xsl:when>
|
3322
|
+
<xsl:otherwise>
|
3323
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
3324
|
+
</xsl:otherwise>
|
3325
|
+
</xsl:choose>
|
3326
|
+
</xsl:variable>
|
3327
|
+
<xsl:variable name="target_text">
|
3109
3328
|
<xsl:choose>
|
3110
3329
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
3111
3330
|
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
@@ -3117,20 +3336,21 @@
|
|
3117
3336
|
</xsl:variable>
|
3118
3337
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3119
3338
|
|
3339
|
+
|
3120
3340
|
<xsl:choose>
|
3121
|
-
<xsl:when test="$
|
3341
|
+
<xsl:when test="$target_text = ''">
|
3122
3342
|
<xsl:apply-templates/>
|
3123
3343
|
</xsl:when>
|
3124
3344
|
<xsl:otherwise>
|
3125
|
-
<fo:basic-link external-destination="{
|
3345
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
3126
3346
|
<xsl:choose>
|
3127
3347
|
<xsl:when test="normalize-space(.) = ''">
|
3128
|
-
<!-- <xsl:value-of select="$target"/> -->
|
3129
3348
|
<xsl:call-template name="add-zero-spaces-link-java">
|
3130
|
-
<xsl:with-param name="text" select="$
|
3349
|
+
<xsl:with-param name="text" select="$target_text"/>
|
3131
3350
|
</xsl:call-template>
|
3132
3351
|
</xsl:when>
|
3133
3352
|
<xsl:otherwise>
|
3353
|
+
<!-- output text from <link>text</link> -->
|
3134
3354
|
<xsl:apply-templates/>
|
3135
3355
|
</xsl:otherwise>
|
3136
3356
|
</xsl:choose>
|
@@ -3242,6 +3462,7 @@
|
|
3242
3462
|
|
3243
3463
|
|
3244
3464
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3465
|
+
|
3245
3466
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3246
3467
|
</fo:inline>
|
3247
3468
|
<xsl:apply-templates/>
|
@@ -3267,7 +3488,9 @@
|
|
3267
3488
|
</xsl:choose>
|
3268
3489
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3269
3490
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3491
|
+
|
3270
3492
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3493
|
+
|
3271
3494
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3272
3495
|
</fo:inline>
|
3273
3496
|
<xsl:apply-templates/>
|
@@ -3335,16 +3558,27 @@
|
|
3335
3558
|
</fo:inline>
|
3336
3559
|
</xsl:if>
|
3337
3560
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3561
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3562
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3338
3563
|
<fo:block-container id="{@id}">
|
3339
3564
|
|
3565
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3566
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3567
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3568
|
+
</xsl:call-template>
|
3569
|
+
|
3340
3570
|
<fo:block>
|
3571
|
+
|
3341
3572
|
<xsl:apply-templates/>
|
3342
3573
|
</fo:block>
|
3343
3574
|
<xsl:call-template name="fn_display_figure"/>
|
3344
3575
|
<xsl:for-each select="*[local-name() = 'note']">
|
3345
3576
|
<xsl:call-template name="note"/>
|
3346
3577
|
</xsl:for-each>
|
3347
|
-
|
3578
|
+
|
3579
|
+
|
3580
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3581
|
+
|
3348
3582
|
</fo:block-container>
|
3349
3583
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
3350
3584
|
<fo:block id="{@id}">
|
@@ -3356,6 +3590,8 @@
|
|
3356
3590
|
<xsl:apply-templates/>
|
3357
3591
|
</fo:block>
|
3358
3592
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
3593
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
3594
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
3359
3595
|
<xsl:choose>
|
3360
3596
|
<xsl:when test="ancestor::*[local-name() = 'title']">
|
3361
3597
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
@@ -3371,7 +3607,26 @@
|
|
3371
3607
|
<xsl:variable name="src">
|
3372
3608
|
<xsl:call-template name="image_src"/>
|
3373
3609
|
</xsl:variable>
|
3374
|
-
|
3610
|
+
|
3611
|
+
<xsl:choose>
|
3612
|
+
<xsl:when test="$isDeleted = 'true'">
|
3613
|
+
<!-- enclose in svg -->
|
3614
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
3615
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
3616
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
3617
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3618
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3619
|
+
|
3620
|
+
|
3621
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
3622
|
+
|
3623
|
+
</fo:instream-foreign-object>
|
3624
|
+
</xsl:when>
|
3625
|
+
<xsl:otherwise>
|
3626
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3627
|
+
</xsl:otherwise>
|
3628
|
+
</xsl:choose>
|
3629
|
+
|
3375
3630
|
</fo:block>
|
3376
3631
|
</xsl:otherwise>
|
3377
3632
|
</xsl:choose>
|
@@ -3387,21 +3642,70 @@
|
|
3387
3642
|
<xsl:value-of select="@src"/>
|
3388
3643
|
</xsl:otherwise>
|
3389
3644
|
</xsl:choose>
|
3645
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
3646
|
+
<xsl:choose>
|
3647
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3648
|
+
<xsl:variable name="src">
|
3649
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3650
|
+
</xsl:variable>
|
3651
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
3652
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
3653
|
+
<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">
|
3654
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3655
|
+
</svg>
|
3656
|
+
</xsl:when>
|
3657
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3658
|
+
<xsl:variable name="src">
|
3659
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3660
|
+
</xsl:variable>
|
3661
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
3662
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
3663
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3664
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3665
|
+
<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">
|
3666
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3667
|
+
</svg>
|
3668
|
+
</xsl:when>
|
3669
|
+
<xsl:otherwise>
|
3670
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
3671
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
3672
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
3673
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
3674
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
3675
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3676
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
3677
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3678
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
3679
|
+
<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">
|
3680
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
3681
|
+
<xsl:call-template name="svg_cross">
|
3682
|
+
<xsl:with-param name="width" select="$width"/>
|
3683
|
+
<xsl:with-param name="height" select="$height"/>
|
3684
|
+
</xsl:call-template>
|
3685
|
+
</svg>
|
3686
|
+
</xsl:otherwise>
|
3687
|
+
</xsl:choose>
|
3688
|
+
|
3689
|
+
</xsl:template><xsl:template name="svg_cross">
|
3690
|
+
<xsl:param name="width"/>
|
3691
|
+
<xsl:param name="height"/>
|
3692
|
+
<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; "/>
|
3693
|
+
<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; "/>
|
3390
3694
|
</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">
|
3391
3695
|
<xsl:apply-templates mode="contents"/>
|
3392
3696
|
<xsl:text> </xsl:text>
|
3393
3697
|
</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">
|
3394
3698
|
<xsl:apply-templates mode="bookmarks"/>
|
3395
3699
|
<xsl:text> </xsl:text>
|
3396
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3700
|
+
</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">
|
3397
3701
|
<xsl:value-of select="."/>
|
3398
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3702
|
+
</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">
|
3399
3703
|
<xsl:value-of select="."/>
|
3400
3704
|
</xsl:template><xsl:template match="node()" mode="contents">
|
3401
3705
|
<xsl:apply-templates mode="contents"/>
|
3402
3706
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3403
3707
|
<xsl:apply-templates mode="bookmarks"/>
|
3404
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3708
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
3405
3709
|
<xsl:apply-templates select="."/>
|
3406
3710
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3407
3711
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -3549,6 +3853,7 @@
|
|
3549
3853
|
<xsl:if test="normalize-space() != ''">
|
3550
3854
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3551
3855
|
|
3856
|
+
|
3552
3857
|
<xsl:apply-templates/>
|
3553
3858
|
</fo:block>
|
3554
3859
|
</xsl:if>
|
@@ -3600,6 +3905,8 @@
|
|
3600
3905
|
</fo:list-item-body>
|
3601
3906
|
</fo:list-item>
|
3602
3907
|
</fo:list-block>
|
3908
|
+
</xsl:template><xsl:template name="extractSection">
|
3909
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3603
3910
|
</xsl:template><xsl:template name="extractTitle">
|
3604
3911
|
<xsl:choose>
|
3605
3912
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -3626,6 +3933,8 @@
|
|
3626
3933
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3627
3934
|
|
3628
3935
|
<fo:block-container margin-left="0mm">
|
3936
|
+
<xsl:copy-of select="@id"/>
|
3937
|
+
|
3629
3938
|
<xsl:if test="parent::*[local-name() = 'note']">
|
3630
3939
|
<xsl:attribute name="margin-left">
|
3631
3940
|
<xsl:choose>
|
@@ -3636,7 +3945,9 @@
|
|
3636
3945
|
|
3637
3946
|
</xsl:if>
|
3638
3947
|
<fo:block-container margin-left="0mm">
|
3639
|
-
|
3948
|
+
|
3949
|
+
|
3950
|
+
|
3640
3951
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3641
3952
|
<xsl:variable name="_font-size">
|
3642
3953
|
|
@@ -3647,6 +3958,7 @@
|
|
3647
3958
|
|
3648
3959
|
|
3649
3960
|
|
3961
|
+
|
3650
3962
|
|
3651
3963
|
|
3652
3964
|
|
@@ -3664,10 +3976,14 @@
|
|
3664
3976
|
</xsl:choose>
|
3665
3977
|
</xsl:attribute>
|
3666
3978
|
</xsl:if>
|
3667
|
-
|
3668
|
-
|
3979
|
+
|
3980
|
+
<xsl:apply-templates/>
|
3981
|
+
</fo:block>
|
3982
|
+
|
3983
|
+
|
3669
3984
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3670
3985
|
|
3986
|
+
|
3671
3987
|
</fo:block-container>
|
3672
3988
|
</fo:block-container>
|
3673
3989
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -3902,6 +4218,7 @@
|
|
3902
4218
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
3903
4219
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
3904
4220
|
|
4221
|
+
|
3905
4222
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3906
4223
|
|
3907
4224
|
<xsl:variable name="element">
|
@@ -3929,6 +4246,7 @@
|
|
3929
4246
|
<xsl:variable name="element">
|
3930
4247
|
|
3931
4248
|
inline
|
4249
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
3932
4250
|
</xsl:variable>
|
3933
4251
|
<xsl:choose>
|
3934
4252
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -3936,7 +4254,7 @@
|
|
3936
4254
|
<xsl:apply-templates/>
|
3937
4255
|
</fo:inline>
|
3938
4256
|
</xsl:when>
|
3939
|
-
<xsl:when test="normalize-space($element)
|
4257
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3940
4258
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
3941
4259
|
<xsl:apply-templates/>
|
3942
4260
|
</fo:block>
|
@@ -3968,7 +4286,7 @@
|
|
3968
4286
|
</fo:inline>
|
3969
4287
|
</xsl:otherwise>
|
3970
4288
|
</xsl:choose>
|
3971
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4289
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
3972
4290
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3973
4291
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3974
4292
|
<xsl:variable name="termsource_text">
|
@@ -3977,13 +4295,15 @@
|
|
3977
4295
|
|
3978
4296
|
<xsl:choose>
|
3979
4297
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3980
|
-
<xsl:apply-templates/>
|
4298
|
+
<!-- <xsl:apply-templates /> -->
|
4299
|
+
<xsl:copy-of select="$termsource_text"/>
|
3981
4300
|
</xsl:when>
|
3982
4301
|
<xsl:otherwise>
|
3983
4302
|
|
3984
4303
|
<xsl:text>[</xsl:text>
|
3985
4304
|
|
3986
|
-
<xsl:apply-templates/>
|
4305
|
+
<!-- <xsl:apply-templates /> -->
|
4306
|
+
<xsl:copy-of select="$termsource_text"/>
|
3987
4307
|
|
3988
4308
|
<xsl:text>]</xsl:text>
|
3989
4309
|
|
@@ -3994,8 +4314,15 @@
|
|
3994
4314
|
<xsl:if test="normalize-space() != ''">
|
3995
4315
|
<xsl:value-of select="."/>
|
3996
4316
|
</xsl:if>
|
3997
|
-
</xsl:template><xsl:
|
4317
|
+
</xsl:template><xsl:variable name="localized.source">
|
4318
|
+
<xsl:call-template name="getLocalizedString">
|
4319
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4320
|
+
</xsl:call-template>
|
4321
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
3998
4322
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4323
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4324
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4325
|
+
</xsl:if>
|
3999
4326
|
|
4000
4327
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4001
4328
|
<xsl:apply-templates/>
|
@@ -4101,6 +4428,7 @@
|
|
4101
4428
|
|
4102
4429
|
|
4103
4430
|
|
4431
|
+
|
4104
4432
|
|
4105
4433
|
<xsl:variable name="references_num_current">
|
4106
4434
|
<xsl:number level="any" count="m3d:references"/>
|
@@ -4145,7 +4473,8 @@
|
|
4145
4473
|
</fo:inline>
|
4146
4474
|
</xsl:when>
|
4147
4475
|
<xsl:otherwise>
|
4148
|
-
<
|
4476
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
4477
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
4149
4478
|
</xsl:otherwise>
|
4150
4479
|
</xsl:choose>
|
4151
4480
|
|
@@ -4206,7 +4535,6 @@
|
|
4206
4535
|
|
4207
4536
|
|
4208
4537
|
|
4209
|
-
|
4210
4538
|
<xsl:apply-templates/>
|
4211
4539
|
</fo:block>
|
4212
4540
|
|
@@ -4223,6 +4551,7 @@
|
|
4223
4551
|
<xsl:call-template name="setId"/>
|
4224
4552
|
|
4225
4553
|
|
4554
|
+
|
4226
4555
|
<xsl:apply-templates/>
|
4227
4556
|
</fo:block>
|
4228
4557
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -4249,7 +4578,7 @@
|
|
4249
4578
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4250
4579
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4251
4580
|
<xsl:choose>
|
4252
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
4581
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
4253
4582
|
<fo:block-container>
|
4254
4583
|
<xsl:attribute name="margin-left">
|
4255
4584
|
<xsl:choose>
|
@@ -4259,6 +4588,7 @@
|
|
4259
4588
|
</xsl:attribute>
|
4260
4589
|
|
4261
4590
|
|
4591
|
+
|
4262
4592
|
<fo:block-container margin-left="0mm">
|
4263
4593
|
<fo:block>
|
4264
4594
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -4460,21 +4790,25 @@
|
|
4460
4790
|
|
4461
4791
|
|
4462
4792
|
|
4793
|
+
|
4794
|
+
|
4795
|
+
|
4796
|
+
|
4463
4797
|
</xsl:template><xsl:template name="processBibitemDocId">
|
4464
4798
|
<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')]"/>
|
4465
4799
|
<xsl:choose>
|
4466
4800
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4467
|
-
<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"/>
|
4801
|
+
<!-- <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"/>
|
4468
4802
|
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4469
4803
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4470
|
-
</xsl:if>
|
4804
|
+
</xsl:if> -->
|
4471
4805
|
<xsl:value-of select="$_doc_ident"/>
|
4472
4806
|
</xsl:when>
|
4473
4807
|
<xsl:otherwise>
|
4474
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4808
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4475
4809
|
<xsl:if test="$type != ''">
|
4476
4810
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4477
|
-
</xsl:if>
|
4811
|
+
</xsl:if> -->
|
4478
4812
|
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4479
4813
|
</xsl:otherwise>
|
4480
4814
|
</xsl:choose>
|
@@ -4516,6 +4850,70 @@
|
|
4516
4850
|
<xsl:value-of select="substring(.,1,1)"/>
|
4517
4851
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4518
4852
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
4853
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
4854
|
+
<fo:block>
|
4855
|
+
<xsl:apply-templates/>
|
4856
|
+
</fo:block>
|
4857
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
4858
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4859
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
4860
|
+
<fo:inline>
|
4861
|
+
<xsl:call-template name="text_input"/>
|
4862
|
+
</fo:inline>
|
4863
|
+
</xsl:template><xsl:template name="text_input">
|
4864
|
+
<xsl:variable name="count">
|
4865
|
+
<xsl:choose>
|
4866
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
4867
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
4868
|
+
<xsl:otherwise>10</xsl:otherwise>
|
4869
|
+
</xsl:choose>
|
4870
|
+
</xsl:variable>
|
4871
|
+
<xsl:call-template name="repeat">
|
4872
|
+
<xsl:with-param name="char" select="'_'"/>
|
4873
|
+
<xsl:with-param name="count" select="$count"/>
|
4874
|
+
</xsl:call-template>
|
4875
|
+
<xsl:text> </xsl:text>
|
4876
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
4877
|
+
<xsl:variable name="caption">
|
4878
|
+
<xsl:choose>
|
4879
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
4880
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
4881
|
+
</xsl:choose>
|
4882
|
+
</xsl:variable>
|
4883
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
4884
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
4885
|
+
<fo:inline padding-right="1mm">
|
4886
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
4887
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
4888
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4889
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4890
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4891
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
4892
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
4893
|
+
</svg>
|
4894
|
+
</fo:instream-foreign-object>
|
4895
|
+
</fo:inline>
|
4896
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
4897
|
+
<fo:inline padding-right="1mm">
|
4898
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
4899
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
4900
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4901
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4902
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4903
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
4904
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
4905
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
4906
|
+
</svg>
|
4907
|
+
</fo:instream-foreign-object>
|
4908
|
+
</fo:inline>
|
4909
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
4910
|
+
<fo:inline>
|
4911
|
+
<xsl:call-template name="text_input"/>
|
4912
|
+
</fo:inline>
|
4913
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
4914
|
+
<fo:block-container border="1pt solid black" width="50%">
|
4915
|
+
<fo:block> </fo:block>
|
4916
|
+
</fo:block-container>
|
4519
4917
|
</xsl:template><xsl:template name="convertDate">
|
4520
4918
|
<xsl:param name="date"/>
|
4521
4919
|
<xsl:param name="format" select="'short'"/>
|
@@ -4723,6 +5121,9 @@
|
|
4723
5121
|
<xsl:when test="parent::*[local-name() = 'preface']">
|
4724
5122
|
<xsl:value-of select="$level_total - 1"/>
|
4725
5123
|
</xsl:when>
|
5124
|
+
<xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
|
5125
|
+
<xsl:value-of select="$level_total - 1"/>
|
5126
|
+
</xsl:when>
|
4726
5127
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
4727
5128
|
<xsl:value-of select="$level_total - 2"/>
|
4728
5129
|
</xsl:when>
|
@@ -4787,6 +5188,7 @@
|
|
4787
5188
|
|
4788
5189
|
|
4789
5190
|
|
5191
|
+
|
4790
5192
|
<xsl:value-of select="document('')//*/namespace::m3d"/>
|
4791
5193
|
|
4792
5194
|
|
@@ -4847,17 +5249,79 @@
|
|
4847
5249
|
</xsl:call-template>
|
4848
5250
|
</xsl:if>
|
4849
5251
|
</xsl:template><xsl:template name="getLocalizedString">
|
4850
|
-
<xsl:param name="key"/>
|
5252
|
+
<xsl:param name="key"/>
|
4851
5253
|
|
4852
5254
|
<xsl:variable name="curr_lang">
|
4853
5255
|
<xsl:call-template name="getLang"/>
|
4854
5256
|
</xsl:variable>
|
4855
5257
|
|
5258
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
5259
|
+
|
4856
5260
|
<xsl:choose>
|
5261
|
+
<xsl:when test="$data_value != ''">
|
5262
|
+
<xsl:value-of select="$data_value"/>
|
5263
|
+
</xsl:when>
|
4857
5264
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
4858
5265
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4859
5266
|
</xsl:when>
|
4860
|
-
<xsl:otherwise
|
5267
|
+
<xsl:otherwise>
|
5268
|
+
<xsl:variable name="key_">
|
5269
|
+
<xsl:call-template name="capitalize">
|
5270
|
+
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
|
5271
|
+
</xsl:call-template>
|
5272
|
+
</xsl:variable>
|
5273
|
+
<xsl:value-of select="$key_"/>
|
5274
|
+
</xsl:otherwise>
|
4861
5275
|
</xsl:choose>
|
4862
5276
|
|
5277
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
5278
|
+
<xsl:param name="isAdded"/>
|
5279
|
+
<xsl:param name="isDeleted"/>
|
5280
|
+
<xsl:choose>
|
5281
|
+
<xsl:when test="local-name() = 'math'">
|
5282
|
+
<xsl:if test="$isAdded = 'true'">
|
5283
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
5284
|
+
</xsl:if>
|
5285
|
+
<xsl:if test="$isDeleted = 'true'">
|
5286
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
5287
|
+
</xsl:if>
|
5288
|
+
</xsl:when>
|
5289
|
+
<xsl:otherwise>
|
5290
|
+
<xsl:if test="$isAdded = 'true'">
|
5291
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
5292
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5293
|
+
</xsl:if>
|
5294
|
+
<xsl:if test="$isDeleted = 'true'">
|
5295
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
5296
|
+
<xsl:if test="local-name() = 'table'">
|
5297
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
5298
|
+
</xsl:if>
|
5299
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
5300
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5301
|
+
</xsl:if>
|
5302
|
+
</xsl:otherwise>
|
5303
|
+
</xsl:choose>
|
5304
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
5305
|
+
<xsl:if test="$lang = 'ar'">
|
5306
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
5307
|
+
</xsl:if>
|
5308
|
+
</xsl:template><xsl:template name="setAlignment">
|
5309
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
5310
|
+
<xsl:choose>
|
5311
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
5312
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
5313
|
+
<xsl:when test="$align != ''">
|
5314
|
+
<xsl:value-of select="$align"/>
|
5315
|
+
</xsl:when>
|
5316
|
+
</xsl:choose>
|
5317
|
+
</xsl:template><xsl:template name="setTextAlignment">
|
5318
|
+
<xsl:param name="default">left</xsl:param>
|
5319
|
+
<xsl:attribute name="text-align">
|
5320
|
+
<xsl:choose>
|
5321
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
5322
|
+
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
5323
|
+
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
5324
|
+
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
5325
|
+
</xsl:choose>
|
5326
|
+
</xsl:attribute>
|
4863
5327
|
</xsl:template></xsl:stylesheet>
|