metanorma-cc 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/cc/biblio.rng +1 -0
- data/lib/asciidoctor/cc/cc.rng +3 -0
- data/lib/asciidoctor/cc/isodoc.rng +191 -3
- data/lib/isodoc/cc/cc.standard.xsl +533 -67
- data/lib/metanorma/cc/version.rb +1 -1
- data/metanorma-cc.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: 21d0ca9db55a0ac16cf9c7d2aa5e4d1e8d8e7d2934d067148284a2ff4e9dfb16
|
4
|
+
data.tar.gz: c6e31128a7d2dd507b87b812b1b06aa26629d16c9264e73d58fb598e7dd80da1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59e27ecbc3c0e3b878b21a22a1fbc5663c79eea90efcf73368266a12abcd085db5aec3b168212b63eeec7f2494e9cca79595c29e325f43f24a9c93ea1460ac9e
|
7
|
+
data.tar.gz: 6120464f8d63a52365519449d463fecc78140d8bc35d47eeed568c8a39abf0a35f7ceec453f13dbbf26f97946c1ca4cc918b9b120e67ba4c68d225248eb9cb84
|
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
|
data/lib/asciidoctor/cc/cc.rng
CHANGED
@@ -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"/>
|
@@ -932,6 +932,9 @@
|
|
932
932
|
<title-continued lang="en">(continued)</title-continued>
|
933
933
|
<title-continued lang="fr">(continué)</title-continued>
|
934
934
|
|
935
|
+
</xsl:variable><xsl:variable name="bibdata">
|
936
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
937
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
935
938
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
936
939
|
<xsl:param name="name"/>
|
937
940
|
<xsl:param name="lang"/>
|
@@ -957,13 +960,16 @@
|
|
957
960
|
</xsl:choose>
|
958
961
|
</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">
|
959
962
|
|
963
|
+
|
960
964
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
961
965
|
|
966
|
+
|
962
967
|
<xsl:attribute name="color">blue</xsl:attribute>
|
963
968
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
964
969
|
|
965
970
|
|
966
971
|
|
972
|
+
|
967
973
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
968
974
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
969
975
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -1012,7 +1018,7 @@
|
|
1012
1018
|
|
1013
1019
|
|
1014
1020
|
|
1015
|
-
|
1021
|
+
|
1016
1022
|
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
1017
1023
|
|
1018
1024
|
|
@@ -1027,6 +1033,7 @@
|
|
1027
1033
|
|
1028
1034
|
|
1029
1035
|
|
1036
|
+
|
1030
1037
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1031
1038
|
|
1032
1039
|
|
@@ -1049,9 +1056,7 @@
|
|
1049
1056
|
|
1050
1057
|
|
1051
1058
|
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1059
|
+
|
1055
1060
|
|
1056
1061
|
|
1057
1062
|
|
@@ -1080,8 +1085,10 @@
|
|
1080
1085
|
|
1081
1086
|
|
1082
1087
|
|
1088
|
+
|
1083
1089
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1084
1090
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1091
|
+
|
1085
1092
|
|
1086
1093
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1087
1094
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -1098,6 +1105,9 @@
|
|
1098
1105
|
|
1099
1106
|
|
1100
1107
|
|
1108
|
+
|
1109
|
+
</xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
|
1110
|
+
|
1101
1111
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1102
1112
|
|
1103
1113
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -1119,6 +1129,8 @@
|
|
1119
1129
|
|
1120
1130
|
|
1121
1131
|
|
1132
|
+
|
1133
|
+
|
1122
1134
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1123
1135
|
|
1124
1136
|
|
@@ -1127,9 +1139,11 @@
|
|
1127
1139
|
|
1128
1140
|
|
1129
1141
|
|
1142
|
+
|
1130
1143
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1131
1144
|
|
1132
1145
|
|
1146
|
+
|
1133
1147
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1134
1148
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1135
1149
|
|
@@ -1145,9 +1159,11 @@
|
|
1145
1159
|
|
1146
1160
|
|
1147
1161
|
|
1162
|
+
|
1148
1163
|
</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">
|
1149
1164
|
|
1150
1165
|
|
1166
|
+
|
1151
1167
|
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
1152
1168
|
|
1153
1169
|
|
@@ -1178,6 +1194,7 @@
|
|
1178
1194
|
|
1179
1195
|
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
|
1180
1196
|
|
1197
|
+
|
1181
1198
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1182
1199
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1183
1200
|
|
@@ -1185,9 +1202,12 @@
|
|
1185
1202
|
|
1186
1203
|
|
1187
1204
|
|
1205
|
+
|
1188
1206
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1207
|
+
|
1189
1208
|
|
1190
1209
|
|
1210
|
+
|
1191
1211
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1192
1212
|
|
1193
1213
|
|
@@ -1209,20 +1229,24 @@
|
|
1209
1229
|
</xsl:attribute-set><xsl:attribute-set name="termsource-style">
|
1210
1230
|
|
1211
1231
|
|
1232
|
+
|
1212
1233
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1213
1234
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1214
1235
|
|
1215
1236
|
|
1216
1237
|
|
1217
1238
|
|
1239
|
+
|
1218
1240
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1219
1241
|
|
1220
1242
|
|
1221
1243
|
|
1244
|
+
|
1222
1245
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1223
1246
|
|
1224
1247
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1225
1248
|
|
1249
|
+
|
1226
1250
|
|
1227
1251
|
|
1228
1252
|
|
@@ -1242,6 +1266,7 @@
|
|
1242
1266
|
|
1243
1267
|
|
1244
1268
|
|
1269
|
+
|
1245
1270
|
|
1246
1271
|
|
1247
1272
|
|
@@ -1255,10 +1280,12 @@
|
|
1255
1280
|
|
1256
1281
|
|
1257
1282
|
|
1283
|
+
|
1258
1284
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
1259
1285
|
|
1260
1286
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1261
1287
|
|
1288
|
+
|
1262
1289
|
<xsl:attribute name="width">100%</xsl:attribute>
|
1263
1290
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
1264
1291
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -1285,20 +1312,37 @@
|
|
1285
1312
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1286
1313
|
|
1287
1314
|
|
1315
|
+
|
1288
1316
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1289
1317
|
|
1318
|
+
|
1290
1319
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1291
1320
|
|
1292
1321
|
|
1293
1322
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1294
1323
|
|
1295
|
-
|
1324
|
+
|
1325
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
1326
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
1327
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
1296
1328
|
<xsl:attribute name="color">red</xsl:attribute>
|
1297
1329
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1298
|
-
|
1299
|
-
<xsl:attribute name="color"
|
1330
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
1331
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
1332
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
1333
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
1334
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
1335
|
+
<xsl:text>red</xsl:text>
|
1336
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
1337
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
1300
1338
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
1301
|
-
</xsl:attribute-set><xsl:
|
1339
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
1340
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
1341
|
+
|
1342
|
+
|
1343
|
+
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1344
|
+
|
1345
|
+
</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">
|
1302
1346
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1303
1347
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1304
1348
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -1343,18 +1387,19 @@
|
|
1343
1387
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1344
1388
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1345
1389
|
|
1390
|
+
<xsl:variable name="table-preamble">
|
1391
|
+
|
1392
|
+
|
1393
|
+
</xsl:variable>
|
1394
|
+
|
1346
1395
|
<xsl:variable name="table">
|
1347
1396
|
|
1348
1397
|
<xsl:variable name="simple-table">
|
1349
|
-
<xsl:call-template name="getSimpleTable"/>
|
1398
|
+
<xsl:call-template name="getSimpleTable"/>
|
1350
1399
|
</xsl:variable>
|
1351
1400
|
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
1401
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
1357
|
-
<fo:block> </fo:block>
|
1402
|
+
<fo:block> </fo:block>
|
1358
1403
|
</xsl:if> -->
|
1359
1404
|
|
1360
1405
|
<!-- $namespace = 'iso' or -->
|
@@ -1367,7 +1412,7 @@
|
|
1367
1412
|
|
1368
1413
|
|
1369
1414
|
|
1370
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
1415
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
1371
1416
|
|
1372
1417
|
<!-- <xsl:variable name="cols-count">
|
1373
1418
|
<xsl:choose>
|
@@ -1386,8 +1431,6 @@
|
|
1386
1431
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1387
1432
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1388
1433
|
|
1389
|
-
|
1390
|
-
|
1391
1434
|
<xsl:variable name="colwidths">
|
1392
1435
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1393
1436
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1415,8 +1458,10 @@
|
|
1415
1458
|
</xsl:choose>
|
1416
1459
|
</xsl:variable>
|
1417
1460
|
|
1461
|
+
|
1418
1462
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1419
1463
|
|
1464
|
+
|
1420
1465
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1421
1466
|
|
1422
1467
|
|
@@ -1432,6 +1477,8 @@
|
|
1432
1477
|
|
1433
1478
|
|
1434
1479
|
|
1480
|
+
|
1481
|
+
|
1435
1482
|
<xsl:variable name="table_width">
|
1436
1483
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1437
1484
|
100%
|
@@ -1448,12 +1495,15 @@
|
|
1448
1495
|
|
1449
1496
|
|
1450
1497
|
|
1498
|
+
|
1499
|
+
|
1451
1500
|
|
1452
1501
|
|
1453
1502
|
|
1454
1503
|
|
1455
1504
|
|
1456
1505
|
|
1506
|
+
|
1457
1507
|
</xsl:variable>
|
1458
1508
|
|
1459
1509
|
|
@@ -1537,7 +1587,8 @@
|
|
1537
1587
|
</fo:block-container>
|
1538
1588
|
</xsl:variable>
|
1539
1589
|
|
1540
|
-
|
1590
|
+
<xsl:variable name="isAdded" select="@added"/>
|
1591
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
1541
1592
|
|
1542
1593
|
<xsl:choose>
|
1543
1594
|
<xsl:when test="@width">
|
@@ -1551,7 +1602,14 @@
|
|
1551
1602
|
<fo:table-body>
|
1552
1603
|
<fo:table-row>
|
1553
1604
|
<fo:table-cell column-number="2">
|
1554
|
-
<
|
1605
|
+
<xsl:copy-of select="$table-preamble"/>
|
1606
|
+
<fo:block>
|
1607
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1608
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1609
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1610
|
+
</xsl:call-template>
|
1611
|
+
<xsl:copy-of select="$table"/>
|
1612
|
+
</fo:block>
|
1555
1613
|
</fo:table-cell>
|
1556
1614
|
</fo:table-row>
|
1557
1615
|
</fo:table-body>
|
@@ -1562,16 +1620,45 @@
|
|
1562
1620
|
|
1563
1621
|
</xsl:when>
|
1564
1622
|
<xsl:otherwise>
|
1565
|
-
<xsl:
|
1623
|
+
<xsl:choose>
|
1624
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
1625
|
+
<xsl:copy-of select="$table-preamble"/>
|
1626
|
+
<fo:block>
|
1627
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1628
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1629
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1630
|
+
</xsl:call-template>
|
1631
|
+
<xsl:copy-of select="$table"/>
|
1632
|
+
</fo:block>
|
1633
|
+
</xsl:when>
|
1634
|
+
<xsl:otherwise>
|
1635
|
+
<xsl:copy-of select="$table-preamble"/>
|
1636
|
+
<xsl:copy-of select="$table"/>
|
1637
|
+
</xsl:otherwise>
|
1638
|
+
</xsl:choose>
|
1566
1639
|
</xsl:otherwise>
|
1567
1640
|
</xsl:choose>
|
1568
1641
|
|
1569
1642
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1643
|
+
<xsl:param name="continued"/>
|
1570
1644
|
<xsl:if test="normalize-space() != ''">
|
1571
1645
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1572
1646
|
|
1573
1647
|
|
1574
|
-
|
1648
|
+
|
1649
|
+
|
1650
|
+
|
1651
|
+
<xsl:choose>
|
1652
|
+
<xsl:when test="$continued = 'true'">
|
1653
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
1654
|
+
|
1655
|
+
</xsl:when>
|
1656
|
+
<xsl:otherwise>
|
1657
|
+
<xsl:apply-templates/>
|
1658
|
+
</xsl:otherwise>
|
1659
|
+
</xsl:choose>
|
1660
|
+
|
1661
|
+
|
1575
1662
|
</fo:block>
|
1576
1663
|
</xsl:if>
|
1577
1664
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -1623,7 +1710,7 @@
|
|
1623
1710
|
</xsl:for-each>
|
1624
1711
|
</xsl:when>
|
1625
1712
|
<xsl:otherwise>
|
1626
|
-
<xsl:for-each select="xalan:nodeset($table)
|
1713
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
1627
1714
|
<xsl:variable name="td_text">
|
1628
1715
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1629
1716
|
|
@@ -1708,21 +1795,22 @@
|
|
1708
1795
|
<!-- font-weight="bold" -->
|
1709
1796
|
<fo:table-header>
|
1710
1797
|
|
1798
|
+
|
1711
1799
|
<xsl:apply-templates/>
|
1712
1800
|
</fo:table-header>
|
1713
1801
|
</xsl:template><xsl:template name="table-header-title">
|
1714
|
-
<xsl:param name="cols-count"/>
|
1802
|
+
<xsl:param name="cols-count"/>
|
1715
1803
|
<!-- row for title -->
|
1716
1804
|
<fo:table-row>
|
1717
1805
|
<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">
|
1718
|
-
|
1806
|
+
|
1807
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1808
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
1809
|
+
</xsl:apply-templates>
|
1719
1810
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1720
1811
|
<xsl:call-template name="fn_name_display"/>
|
1721
|
-
</xsl:for-each>
|
1722
|
-
|
1723
|
-
<xsl:text> </xsl:text>
|
1724
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1725
|
-
</fo:block>
|
1812
|
+
</xsl:for-each>
|
1813
|
+
|
1726
1814
|
</fo:table-cell>
|
1727
1815
|
</fo:table-row>
|
1728
1816
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -1943,6 +2031,7 @@
|
|
1943
2031
|
|
1944
2032
|
|
1945
2033
|
|
2034
|
+
|
1946
2035
|
</xsl:if>
|
1947
2036
|
<xsl:if test="$parent-name = 'tfoot'">
|
1948
2037
|
|
@@ -1952,6 +2041,10 @@
|
|
1952
2041
|
|
1953
2042
|
|
1954
2043
|
|
2044
|
+
|
2045
|
+
|
2046
|
+
|
2047
|
+
|
1955
2048
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
1956
2049
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
1957
2050
|
</xsl:if> -->
|
@@ -1963,7 +2056,8 @@
|
|
1963
2056
|
<xsl:attribute name="text-align">
|
1964
2057
|
<xsl:choose>
|
1965
2058
|
<xsl:when test="@align">
|
1966
|
-
<xsl:
|
2059
|
+
<xsl:call-template name="setAlignment"/>
|
2060
|
+
<!-- <xsl:value-of select="@align"/> -->
|
1967
2061
|
</xsl:when>
|
1968
2062
|
<xsl:otherwise>center</xsl:otherwise>
|
1969
2063
|
</xsl:choose>
|
@@ -1979,6 +2073,11 @@
|
|
1979
2073
|
|
1980
2074
|
|
1981
2075
|
|
2076
|
+
|
2077
|
+
|
2078
|
+
<xsl:if test="$lang = 'ar'">
|
2079
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2080
|
+
</xsl:if>
|
1982
2081
|
<xsl:if test="@colspan">
|
1983
2082
|
<xsl:attribute name="number-columns-spanned">
|
1984
2083
|
<xsl:value-of select="@colspan"/>
|
@@ -2010,11 +2109,19 @@
|
|
2010
2109
|
<xsl:attribute name="text-align">
|
2011
2110
|
<xsl:choose>
|
2012
2111
|
<xsl:when test="@align">
|
2013
|
-
<xsl:
|
2112
|
+
<xsl:call-template name="setAlignment"/>
|
2113
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2014
2114
|
</xsl:when>
|
2015
2115
|
<xsl:otherwise>left</xsl:otherwise>
|
2016
2116
|
</xsl:choose>
|
2017
2117
|
</xsl:attribute>
|
2118
|
+
<xsl:if test="$lang = 'ar'">
|
2119
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2120
|
+
</xsl:if>
|
2121
|
+
|
2122
|
+
|
2123
|
+
|
2124
|
+
|
2018
2125
|
|
2019
2126
|
|
2020
2127
|
|
@@ -2026,6 +2133,9 @@
|
|
2026
2133
|
|
2027
2134
|
|
2028
2135
|
|
2136
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
2137
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2138
|
+
</xsl:if>
|
2029
2139
|
<xsl:if test="@colspan">
|
2030
2140
|
<xsl:attribute name="number-columns-spanned">
|
2031
2141
|
<xsl:value-of select="@colspan"/>
|
@@ -2153,13 +2263,13 @@
|
|
2153
2263
|
</xsl:choose>
|
2154
2264
|
</xsl:variable>
|
2155
2265
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2156
|
-
<xsl:element name="{$ns}:table">
|
2266
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2157
2267
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2158
2268
|
<tbody>
|
2159
2269
|
<xsl:apply-templates mode="dl"/>
|
2160
2270
|
</tbody>
|
2161
2271
|
</xsl:for-each>
|
2162
|
-
</xsl:element>
|
2272
|
+
<!-- </xsl:element> -->
|
2163
2273
|
</xsl:variable>
|
2164
2274
|
|
2165
2275
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2238,6 +2348,7 @@
|
|
2238
2348
|
|
2239
2349
|
|
2240
2350
|
|
2351
|
+
|
2241
2352
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2242
2353
|
|
2243
2354
|
|
@@ -2250,6 +2361,8 @@
|
|
2250
2361
|
<xsl:apply-templates/>
|
2251
2362
|
</fo:inline>
|
2252
2363
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2364
|
+
<xsl:variable name="isAdded" select="@added"/>
|
2365
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
2253
2366
|
<fo:block-container>
|
2254
2367
|
|
2255
2368
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -2266,6 +2379,12 @@
|
|
2266
2379
|
</xsl:attribute>
|
2267
2380
|
|
2268
2381
|
</xsl:if>
|
2382
|
+
|
2383
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2384
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2385
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2386
|
+
</xsl:call-template>
|
2387
|
+
|
2269
2388
|
<fo:block-container>
|
2270
2389
|
|
2271
2390
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -2321,6 +2440,7 @@
|
|
2321
2440
|
|
2322
2441
|
|
2323
2442
|
|
2443
|
+
|
2324
2444
|
<xsl:variable name="title-key">
|
2325
2445
|
|
2326
2446
|
|
@@ -2373,11 +2493,11 @@
|
|
2373
2493
|
</xsl:choose>
|
2374
2494
|
</xsl:variable>
|
2375
2495
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2376
|
-
<xsl:element name="{$ns}:table">
|
2496
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2377
2497
|
<tbody>
|
2378
2498
|
<xsl:apply-templates mode="dl"/>
|
2379
2499
|
</tbody>
|
2380
|
-
</xsl:element>
|
2500
|
+
<!-- </xsl:element> -->
|
2381
2501
|
</xsl:variable>
|
2382
2502
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2383
2503
|
<xsl:variable name="colwidths">
|
@@ -2531,6 +2651,7 @@
|
|
2531
2651
|
|
2532
2652
|
<fo:table-row>
|
2533
2653
|
|
2654
|
+
|
2534
2655
|
<fo:table-cell>
|
2535
2656
|
|
2536
2657
|
<fo:block margin-top="6pt">
|
@@ -2548,6 +2669,7 @@
|
|
2548
2669
|
|
2549
2670
|
|
2550
2671
|
|
2672
|
+
|
2551
2673
|
<xsl:apply-templates/>
|
2552
2674
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2553
2675
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2604,6 +2726,8 @@
|
|
2604
2726
|
|
2605
2727
|
<xsl:apply-templates/>
|
2606
2728
|
</fo:inline>
|
2729
|
+
</xsl:template><xsl:template match="*[local-name()='padding']">
|
2730
|
+
<fo:inline padding-right="{@value}"> </fo:inline>
|
2607
2731
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
2608
2732
|
<fo:inline font-size="80%" vertical-align="super">
|
2609
2733
|
<xsl:apply-templates/>
|
@@ -2629,6 +2753,7 @@
|
|
2629
2753
|
|
2630
2754
|
|
2631
2755
|
|
2756
|
+
|
2632
2757
|
|
2633
2758
|
</xsl:variable>
|
2634
2759
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -2647,9 +2772,71 @@
|
|
2647
2772
|
<xsl:apply-templates/>
|
2648
2773
|
</fo:inline>
|
2649
2774
|
</xsl:template><xsl:template match="*[local-name()='add']">
|
2650
|
-
<
|
2651
|
-
<xsl:
|
2652
|
-
|
2775
|
+
<xsl:choose>
|
2776
|
+
<xsl:when test="@amendment">
|
2777
|
+
<fo:inline>
|
2778
|
+
<xsl:call-template name="insertTag">
|
2779
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2780
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2781
|
+
</xsl:call-template>
|
2782
|
+
<xsl:apply-templates/>
|
2783
|
+
<xsl:call-template name="insertTag">
|
2784
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2785
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2786
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2787
|
+
</xsl:call-template>
|
2788
|
+
</fo:inline>
|
2789
|
+
</xsl:when>
|
2790
|
+
<xsl:when test="@corrigenda">
|
2791
|
+
<fo:inline>
|
2792
|
+
<xsl:call-template name="insertTag">
|
2793
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2794
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2795
|
+
</xsl:call-template>
|
2796
|
+
<xsl:apply-templates/>
|
2797
|
+
<xsl:call-template name="insertTag">
|
2798
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2799
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2800
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2801
|
+
</xsl:call-template>
|
2802
|
+
</fo:inline>
|
2803
|
+
</xsl:when>
|
2804
|
+
<xsl:otherwise>
|
2805
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
2806
|
+
<xsl:apply-templates/>
|
2807
|
+
</fo:inline>
|
2808
|
+
</xsl:otherwise>
|
2809
|
+
</xsl:choose>
|
2810
|
+
|
2811
|
+
</xsl:template><xsl:template name="insertTag">
|
2812
|
+
<xsl:param name="type"/>
|
2813
|
+
<xsl:param name="kind"/>
|
2814
|
+
<xsl:param name="value"/>
|
2815
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
2816
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
2817
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
2818
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
2819
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
2820
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
2821
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
2822
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
2823
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2824
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
2825
|
+
<g>
|
2826
|
+
<xsl:if test="$type = 'closing'">
|
2827
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
2828
|
+
</xsl:if>
|
2829
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
2830
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
2831
|
+
</g>
|
2832
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
2833
|
+
<xsl:if test="$type = 'closing'">
|
2834
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
2835
|
+
</xsl:if>
|
2836
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
2837
|
+
</text>
|
2838
|
+
</svg>
|
2839
|
+
</fo:instream-foreign-object>
|
2653
2840
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2654
2841
|
<fo:inline xsl:use-attribute-sets="del-style">
|
2655
2842
|
<xsl:apply-templates/>
|
@@ -2948,11 +3135,15 @@
|
|
2948
3135
|
</xsl:apply-templates>
|
2949
3136
|
</xsl:template><xsl:template name="getLang">
|
2950
3137
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3138
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
2951
3139
|
<xsl:variable name="language">
|
2952
3140
|
<xsl:choose>
|
2953
3141
|
<xsl:when test="$language_current != ''">
|
2954
3142
|
<xsl:value-of select="$language_current"/>
|
2955
3143
|
</xsl:when>
|
3144
|
+
<xsl:when test="$language_current_2 != ''">
|
3145
|
+
<xsl:value-of select="$language_current_2"/>
|
3146
|
+
</xsl:when>
|
2956
3147
|
<xsl:otherwise>
|
2957
3148
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
2958
3149
|
</xsl:otherwise>
|
@@ -2992,13 +3183,23 @@
|
|
2992
3183
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2993
3184
|
<xsl:value-of select="substring($str, 2)"/>
|
2994
3185
|
</xsl:template><xsl:template match="mathml:math">
|
2995
|
-
<
|
3186
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3187
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3188
|
+
|
3189
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
3190
|
+
|
3191
|
+
|
3192
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3193
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3194
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3195
|
+
</xsl:call-template>
|
2996
3196
|
|
2997
3197
|
<xsl:variable name="mathml">
|
2998
3198
|
<xsl:apply-templates select="." mode="mathml"/>
|
2999
3199
|
</xsl:variable>
|
3000
3200
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3001
3201
|
|
3202
|
+
|
3002
3203
|
<!-- <xsl:copy-of select="."/> -->
|
3003
3204
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3004
3205
|
</fo:instream-foreign-object>
|
@@ -3016,9 +3217,27 @@
|
|
3016
3217
|
<xsl:copy>
|
3017
3218
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3018
3219
|
</xsl:copy>
|
3019
|
-
<
|
3220
|
+
<xsl:choose>
|
3221
|
+
<!-- if in msub, then don't add space -->
|
3222
|
+
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
3223
|
+
<!-- if next char in digit, don't add space -->
|
3224
|
+
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
3225
|
+
<xsl:otherwise>
|
3226
|
+
<mathml:mspace width="0.5ex"/>
|
3227
|
+
</xsl:otherwise>
|
3228
|
+
</xsl:choose>
|
3020
3229
|
</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">
|
3021
3230
|
<xsl:variable name="target">
|
3231
|
+
<xsl:choose>
|
3232
|
+
<xsl:when test="@updatetype = 'true'">
|
3233
|
+
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
3234
|
+
</xsl:when>
|
3235
|
+
<xsl:otherwise>
|
3236
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
3237
|
+
</xsl:otherwise>
|
3238
|
+
</xsl:choose>
|
3239
|
+
</xsl:variable>
|
3240
|
+
<xsl:variable name="target_text">
|
3022
3241
|
<xsl:choose>
|
3023
3242
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
3024
3243
|
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
@@ -3030,20 +3249,21 @@
|
|
3030
3249
|
</xsl:variable>
|
3031
3250
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3032
3251
|
|
3252
|
+
|
3033
3253
|
<xsl:choose>
|
3034
|
-
<xsl:when test="$
|
3254
|
+
<xsl:when test="$target_text = ''">
|
3035
3255
|
<xsl:apply-templates/>
|
3036
3256
|
</xsl:when>
|
3037
3257
|
<xsl:otherwise>
|
3038
|
-
<fo:basic-link external-destination="{
|
3258
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
3039
3259
|
<xsl:choose>
|
3040
3260
|
<xsl:when test="normalize-space(.) = ''">
|
3041
|
-
<!-- <xsl:value-of select="$target"/> -->
|
3042
3261
|
<xsl:call-template name="add-zero-spaces-link-java">
|
3043
|
-
<xsl:with-param name="text" select="$
|
3262
|
+
<xsl:with-param name="text" select="$target_text"/>
|
3044
3263
|
</xsl:call-template>
|
3045
3264
|
</xsl:when>
|
3046
3265
|
<xsl:otherwise>
|
3266
|
+
<!-- output text from <link>text</link> -->
|
3047
3267
|
<xsl:apply-templates/>
|
3048
3268
|
</xsl:otherwise>
|
3049
3269
|
</xsl:choose>
|
@@ -3155,6 +3375,7 @@
|
|
3155
3375
|
|
3156
3376
|
|
3157
3377
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3378
|
+
|
3158
3379
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3159
3380
|
</fo:inline>
|
3160
3381
|
<xsl:apply-templates/>
|
@@ -3180,7 +3401,9 @@
|
|
3180
3401
|
</xsl:choose>
|
3181
3402
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3182
3403
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3404
|
+
|
3183
3405
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3406
|
+
|
3184
3407
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3185
3408
|
</fo:inline>
|
3186
3409
|
<xsl:apply-templates/>
|
@@ -3242,16 +3465,27 @@
|
|
3242
3465
|
</fo:inline>
|
3243
3466
|
</xsl:if>
|
3244
3467
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3468
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3469
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3245
3470
|
<fo:block-container id="{@id}">
|
3246
3471
|
|
3472
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3473
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3474
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3475
|
+
</xsl:call-template>
|
3476
|
+
|
3247
3477
|
<fo:block>
|
3478
|
+
|
3248
3479
|
<xsl:apply-templates/>
|
3249
3480
|
</fo:block>
|
3250
3481
|
<xsl:call-template name="fn_display_figure"/>
|
3251
3482
|
<xsl:for-each select="*[local-name() = 'note']">
|
3252
3483
|
<xsl:call-template name="note"/>
|
3253
3484
|
</xsl:for-each>
|
3254
|
-
|
3485
|
+
|
3486
|
+
|
3487
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3488
|
+
|
3255
3489
|
</fo:block-container>
|
3256
3490
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
3257
3491
|
<fo:block id="{@id}">
|
@@ -3263,6 +3497,8 @@
|
|
3263
3497
|
<xsl:apply-templates/>
|
3264
3498
|
</fo:block>
|
3265
3499
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
3500
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
3501
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
3266
3502
|
<xsl:choose>
|
3267
3503
|
<xsl:when test="ancestor::*[local-name() = 'title']">
|
3268
3504
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
@@ -3278,7 +3514,26 @@
|
|
3278
3514
|
<xsl:variable name="src">
|
3279
3515
|
<xsl:call-template name="image_src"/>
|
3280
3516
|
</xsl:variable>
|
3281
|
-
|
3517
|
+
|
3518
|
+
<xsl:choose>
|
3519
|
+
<xsl:when test="$isDeleted = 'true'">
|
3520
|
+
<!-- enclose in svg -->
|
3521
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
3522
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
3523
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
3524
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3525
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3526
|
+
|
3527
|
+
|
3528
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
3529
|
+
|
3530
|
+
</fo:instream-foreign-object>
|
3531
|
+
</xsl:when>
|
3532
|
+
<xsl:otherwise>
|
3533
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3534
|
+
</xsl:otherwise>
|
3535
|
+
</xsl:choose>
|
3536
|
+
|
3282
3537
|
</fo:block>
|
3283
3538
|
</xsl:otherwise>
|
3284
3539
|
</xsl:choose>
|
@@ -3294,21 +3549,70 @@
|
|
3294
3549
|
<xsl:value-of select="@src"/>
|
3295
3550
|
</xsl:otherwise>
|
3296
3551
|
</xsl:choose>
|
3552
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
3553
|
+
<xsl:choose>
|
3554
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3555
|
+
<xsl:variable name="src">
|
3556
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3557
|
+
</xsl:variable>
|
3558
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
3559
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
3560
|
+
<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">
|
3561
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3562
|
+
</svg>
|
3563
|
+
</xsl:when>
|
3564
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3565
|
+
<xsl:variable name="src">
|
3566
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3567
|
+
</xsl:variable>
|
3568
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
3569
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
3570
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3571
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3572
|
+
<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">
|
3573
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3574
|
+
</svg>
|
3575
|
+
</xsl:when>
|
3576
|
+
<xsl:otherwise>
|
3577
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
3578
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
3579
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
3580
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
3581
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
3582
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3583
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
3584
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3585
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
3586
|
+
<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">
|
3587
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
3588
|
+
<xsl:call-template name="svg_cross">
|
3589
|
+
<xsl:with-param name="width" select="$width"/>
|
3590
|
+
<xsl:with-param name="height" select="$height"/>
|
3591
|
+
</xsl:call-template>
|
3592
|
+
</svg>
|
3593
|
+
</xsl:otherwise>
|
3594
|
+
</xsl:choose>
|
3595
|
+
|
3596
|
+
</xsl:template><xsl:template name="svg_cross">
|
3597
|
+
<xsl:param name="width"/>
|
3598
|
+
<xsl:param name="height"/>
|
3599
|
+
<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; "/>
|
3600
|
+
<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; "/>
|
3297
3601
|
</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">
|
3298
3602
|
<xsl:apply-templates mode="contents"/>
|
3299
3603
|
<xsl:text> </xsl:text>
|
3300
3604
|
</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">
|
3301
3605
|
<xsl:apply-templates mode="bookmarks"/>
|
3302
3606
|
<xsl:text> </xsl:text>
|
3303
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3607
|
+
</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">
|
3304
3608
|
<xsl:value-of select="."/>
|
3305
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3609
|
+
</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">
|
3306
3610
|
<xsl:value-of select="."/>
|
3307
3611
|
</xsl:template><xsl:template match="node()" mode="contents">
|
3308
3612
|
<xsl:apply-templates mode="contents"/>
|
3309
3613
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3310
3614
|
<xsl:apply-templates mode="bookmarks"/>
|
3311
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3615
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
3312
3616
|
<xsl:apply-templates select="."/>
|
3313
3617
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3314
3618
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -3456,6 +3760,7 @@
|
|
3456
3760
|
<xsl:if test="normalize-space() != ''">
|
3457
3761
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3458
3762
|
|
3763
|
+
|
3459
3764
|
<xsl:apply-templates/>
|
3460
3765
|
</fo:block>
|
3461
3766
|
</xsl:if>
|
@@ -3507,6 +3812,8 @@
|
|
3507
3812
|
</fo:list-item-body>
|
3508
3813
|
</fo:list-item>
|
3509
3814
|
</fo:list-block>
|
3815
|
+
</xsl:template><xsl:template name="extractSection">
|
3816
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3510
3817
|
</xsl:template><xsl:template name="extractTitle">
|
3511
3818
|
<xsl:choose>
|
3512
3819
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -3533,6 +3840,8 @@
|
|
3533
3840
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3534
3841
|
|
3535
3842
|
<fo:block-container margin-left="0mm">
|
3843
|
+
<xsl:copy-of select="@id"/>
|
3844
|
+
|
3536
3845
|
<xsl:if test="parent::*[local-name() = 'note']">
|
3537
3846
|
<xsl:attribute name="margin-left">
|
3538
3847
|
<xsl:choose>
|
@@ -3543,7 +3852,9 @@
|
|
3543
3852
|
|
3544
3853
|
</xsl:if>
|
3545
3854
|
<fo:block-container margin-left="0mm">
|
3546
|
-
|
3855
|
+
|
3856
|
+
|
3857
|
+
|
3547
3858
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3548
3859
|
<xsl:variable name="_font-size">
|
3549
3860
|
|
@@ -3554,6 +3865,7 @@
|
|
3554
3865
|
|
3555
3866
|
|
3556
3867
|
|
3868
|
+
|
3557
3869
|
|
3558
3870
|
|
3559
3871
|
|
@@ -3571,10 +3883,14 @@
|
|
3571
3883
|
</xsl:choose>
|
3572
3884
|
</xsl:attribute>
|
3573
3885
|
</xsl:if>
|
3574
|
-
|
3575
|
-
|
3886
|
+
|
3887
|
+
<xsl:apply-templates/>
|
3888
|
+
</fo:block>
|
3889
|
+
|
3890
|
+
|
3576
3891
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3577
3892
|
|
3893
|
+
|
3578
3894
|
</fo:block-container>
|
3579
3895
|
</fo:block-container>
|
3580
3896
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -3809,6 +4125,7 @@
|
|
3809
4125
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
3810
4126
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
3811
4127
|
|
4128
|
+
|
3812
4129
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3813
4130
|
|
3814
4131
|
<xsl:variable name="element">
|
@@ -3836,6 +4153,7 @@
|
|
3836
4153
|
<xsl:variable name="element">
|
3837
4154
|
block
|
3838
4155
|
|
4156
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
3839
4157
|
</xsl:variable>
|
3840
4158
|
<xsl:choose>
|
3841
4159
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -3843,7 +4161,7 @@
|
|
3843
4161
|
<xsl:apply-templates/>
|
3844
4162
|
</fo:inline>
|
3845
4163
|
</xsl:when>
|
3846
|
-
<xsl:when test="normalize-space($element)
|
4164
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3847
4165
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
3848
4166
|
<xsl:apply-templates/>
|
3849
4167
|
</fo:block>
|
@@ -3875,7 +4193,7 @@
|
|
3875
4193
|
</fo:inline>
|
3876
4194
|
</xsl:otherwise>
|
3877
4195
|
</xsl:choose>
|
3878
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4196
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
3879
4197
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3880
4198
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3881
4199
|
<xsl:variable name="termsource_text">
|
@@ -3884,13 +4202,15 @@
|
|
3884
4202
|
|
3885
4203
|
<xsl:choose>
|
3886
4204
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3887
|
-
<xsl:apply-templates/>
|
4205
|
+
<!-- <xsl:apply-templates /> -->
|
4206
|
+
<xsl:copy-of select="$termsource_text"/>
|
3888
4207
|
</xsl:when>
|
3889
4208
|
<xsl:otherwise>
|
3890
4209
|
|
3891
4210
|
<xsl:text>[</xsl:text>
|
3892
4211
|
|
3893
|
-
<xsl:apply-templates/>
|
4212
|
+
<!-- <xsl:apply-templates /> -->
|
4213
|
+
<xsl:copy-of select="$termsource_text"/>
|
3894
4214
|
|
3895
4215
|
<xsl:text>]</xsl:text>
|
3896
4216
|
|
@@ -3901,20 +4221,29 @@
|
|
3901
4221
|
<xsl:if test="normalize-space() != ''">
|
3902
4222
|
<xsl:value-of select="."/>
|
3903
4223
|
</xsl:if>
|
3904
|
-
</xsl:template><xsl:
|
4224
|
+
</xsl:template><xsl:variable name="localized.source">
|
4225
|
+
<xsl:call-template name="getLocalizedString">
|
4226
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4227
|
+
</xsl:call-template>
|
4228
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
3905
4229
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4230
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4231
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4232
|
+
</xsl:if>
|
3906
4233
|
|
3907
4234
|
<fo:inline>
|
3908
4235
|
|
3909
4236
|
|
3910
4237
|
|
3911
4238
|
|
4239
|
+
|
4240
|
+
|
3912
4241
|
<xsl:call-template name="getTitle">
|
3913
4242
|
<xsl:with-param name="name" select="'title-source'"/>
|
3914
4243
|
</xsl:call-template>
|
4244
|
+
<xsl:text>: </xsl:text>
|
3915
4245
|
|
3916
4246
|
|
3917
|
-
<xsl:text>: </xsl:text>
|
3918
4247
|
</fo:inline>
|
3919
4248
|
|
3920
4249
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
@@ -4041,6 +4370,7 @@
|
|
4041
4370
|
|
4042
4371
|
|
4043
4372
|
|
4373
|
+
|
4044
4374
|
</xsl:variable>
|
4045
4375
|
|
4046
4376
|
<xsl:variable name="padding-right">
|
@@ -4066,7 +4396,8 @@
|
|
4066
4396
|
</fo:inline>
|
4067
4397
|
</xsl:when>
|
4068
4398
|
<xsl:otherwise>
|
4069
|
-
<
|
4399
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
4400
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
4070
4401
|
</xsl:otherwise>
|
4071
4402
|
</xsl:choose>
|
4072
4403
|
|
@@ -4125,7 +4456,6 @@
|
|
4125
4456
|
|
4126
4457
|
|
4127
4458
|
|
4128
|
-
|
4129
4459
|
<xsl:apply-templates/>
|
4130
4460
|
</fo:block>
|
4131
4461
|
|
@@ -4142,6 +4472,7 @@
|
|
4142
4472
|
<xsl:call-template name="setId"/>
|
4143
4473
|
|
4144
4474
|
|
4475
|
+
|
4145
4476
|
<xsl:apply-templates/>
|
4146
4477
|
</fo:block>
|
4147
4478
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -4168,7 +4499,7 @@
|
|
4168
4499
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4169
4500
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4170
4501
|
<xsl:choose>
|
4171
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
4502
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
4172
4503
|
<fo:block-container>
|
4173
4504
|
<xsl:attribute name="margin-left">
|
4174
4505
|
<xsl:choose>
|
@@ -4178,6 +4509,7 @@
|
|
4178
4509
|
</xsl:attribute>
|
4179
4510
|
|
4180
4511
|
|
4512
|
+
|
4181
4513
|
<fo:block-container margin-left="0mm">
|
4182
4514
|
<fo:block>
|
4183
4515
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -4379,21 +4711,25 @@
|
|
4379
4711
|
|
4380
4712
|
|
4381
4713
|
|
4714
|
+
|
4715
|
+
|
4716
|
+
|
4717
|
+
|
4382
4718
|
</xsl:template><xsl:template name="processBibitemDocId">
|
4383
4719
|
<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')]"/>
|
4384
4720
|
<xsl:choose>
|
4385
4721
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4386
|
-
<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"/>
|
4722
|
+
<!-- <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"/>
|
4387
4723
|
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4388
4724
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4389
|
-
</xsl:if>
|
4725
|
+
</xsl:if> -->
|
4390
4726
|
<xsl:value-of select="$_doc_ident"/>
|
4391
4727
|
</xsl:when>
|
4392
4728
|
<xsl:otherwise>
|
4393
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4729
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4394
4730
|
<xsl:if test="$type != ''">
|
4395
4731
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4396
|
-
</xsl:if>
|
4732
|
+
</xsl:if> -->
|
4397
4733
|
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4398
4734
|
</xsl:otherwise>
|
4399
4735
|
</xsl:choose>
|
@@ -4435,6 +4771,70 @@
|
|
4435
4771
|
<xsl:value-of select="substring(.,1,1)"/>
|
4436
4772
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4437
4773
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
4774
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
4775
|
+
<fo:block>
|
4776
|
+
<xsl:apply-templates/>
|
4777
|
+
</fo:block>
|
4778
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
4779
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4780
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
4781
|
+
<fo:inline>
|
4782
|
+
<xsl:call-template name="text_input"/>
|
4783
|
+
</fo:inline>
|
4784
|
+
</xsl:template><xsl:template name="text_input">
|
4785
|
+
<xsl:variable name="count">
|
4786
|
+
<xsl:choose>
|
4787
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
4788
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
4789
|
+
<xsl:otherwise>10</xsl:otherwise>
|
4790
|
+
</xsl:choose>
|
4791
|
+
</xsl:variable>
|
4792
|
+
<xsl:call-template name="repeat">
|
4793
|
+
<xsl:with-param name="char" select="'_'"/>
|
4794
|
+
<xsl:with-param name="count" select="$count"/>
|
4795
|
+
</xsl:call-template>
|
4796
|
+
<xsl:text> </xsl:text>
|
4797
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
4798
|
+
<xsl:variable name="caption">
|
4799
|
+
<xsl:choose>
|
4800
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
4801
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
4802
|
+
</xsl:choose>
|
4803
|
+
</xsl:variable>
|
4804
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
4805
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
4806
|
+
<fo:inline padding-right="1mm">
|
4807
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
4808
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
4809
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4810
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4811
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4812
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
4813
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
4814
|
+
</svg>
|
4815
|
+
</fo:instream-foreign-object>
|
4816
|
+
</fo:inline>
|
4817
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
4818
|
+
<fo:inline padding-right="1mm">
|
4819
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
4820
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
4821
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4822
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4823
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4824
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
4825
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
4826
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
4827
|
+
</svg>
|
4828
|
+
</fo:instream-foreign-object>
|
4829
|
+
</fo:inline>
|
4830
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
4831
|
+
<fo:inline>
|
4832
|
+
<xsl:call-template name="text_input"/>
|
4833
|
+
</fo:inline>
|
4834
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
4835
|
+
<fo:block-container border="1pt solid black" width="50%">
|
4836
|
+
<fo:block> </fo:block>
|
4837
|
+
</fo:block-container>
|
4438
4838
|
</xsl:template><xsl:template name="convertDate">
|
4439
4839
|
<xsl:param name="date"/>
|
4440
4840
|
<xsl:param name="format" select="'short'"/>
|
@@ -4642,6 +5042,9 @@
|
|
4642
5042
|
<xsl:when test="parent::*[local-name() = 'preface']">
|
4643
5043
|
<xsl:value-of select="$level_total - 1"/>
|
4644
5044
|
</xsl:when>
|
5045
|
+
<xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
|
5046
|
+
<xsl:value-of select="$level_total - 1"/>
|
5047
|
+
</xsl:when>
|
4645
5048
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
4646
5049
|
<xsl:value-of select="$level_total - 2"/>
|
4647
5050
|
</xsl:when>
|
@@ -4705,6 +5108,7 @@
|
|
4705
5108
|
|
4706
5109
|
|
4707
5110
|
|
5111
|
+
|
4708
5112
|
<xsl:value-of select="document('')//*/namespace::csd"/>
|
4709
5113
|
|
4710
5114
|
|
@@ -4766,17 +5170,79 @@
|
|
4766
5170
|
</xsl:call-template>
|
4767
5171
|
</xsl:if>
|
4768
5172
|
</xsl:template><xsl:template name="getLocalizedString">
|
4769
|
-
<xsl:param name="key"/>
|
5173
|
+
<xsl:param name="key"/>
|
4770
5174
|
|
4771
5175
|
<xsl:variable name="curr_lang">
|
4772
5176
|
<xsl:call-template name="getLang"/>
|
4773
5177
|
</xsl:variable>
|
4774
5178
|
|
5179
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
5180
|
+
|
4775
5181
|
<xsl:choose>
|
5182
|
+
<xsl:when test="$data_value != ''">
|
5183
|
+
<xsl:value-of select="$data_value"/>
|
5184
|
+
</xsl:when>
|
4776
5185
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
4777
5186
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4778
5187
|
</xsl:when>
|
4779
|
-
<xsl:otherwise
|
5188
|
+
<xsl:otherwise>
|
5189
|
+
<xsl:variable name="key_">
|
5190
|
+
<xsl:call-template name="capitalize">
|
5191
|
+
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
|
5192
|
+
</xsl:call-template>
|
5193
|
+
</xsl:variable>
|
5194
|
+
<xsl:value-of select="$key_"/>
|
5195
|
+
</xsl:otherwise>
|
4780
5196
|
</xsl:choose>
|
4781
5197
|
|
5198
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
5199
|
+
<xsl:param name="isAdded"/>
|
5200
|
+
<xsl:param name="isDeleted"/>
|
5201
|
+
<xsl:choose>
|
5202
|
+
<xsl:when test="local-name() = 'math'">
|
5203
|
+
<xsl:if test="$isAdded = 'true'">
|
5204
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
5205
|
+
</xsl:if>
|
5206
|
+
<xsl:if test="$isDeleted = 'true'">
|
5207
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
5208
|
+
</xsl:if>
|
5209
|
+
</xsl:when>
|
5210
|
+
<xsl:otherwise>
|
5211
|
+
<xsl:if test="$isAdded = 'true'">
|
5212
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
5213
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5214
|
+
</xsl:if>
|
5215
|
+
<xsl:if test="$isDeleted = 'true'">
|
5216
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
5217
|
+
<xsl:if test="local-name() = 'table'">
|
5218
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
5219
|
+
</xsl:if>
|
5220
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
5221
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5222
|
+
</xsl:if>
|
5223
|
+
</xsl:otherwise>
|
5224
|
+
</xsl:choose>
|
5225
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
5226
|
+
<xsl:if test="$lang = 'ar'">
|
5227
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
5228
|
+
</xsl:if>
|
5229
|
+
</xsl:template><xsl:template name="setAlignment">
|
5230
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
5231
|
+
<xsl:choose>
|
5232
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
5233
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
5234
|
+
<xsl:when test="$align != ''">
|
5235
|
+
<xsl:value-of select="$align"/>
|
5236
|
+
</xsl:when>
|
5237
|
+
</xsl:choose>
|
5238
|
+
</xsl:template><xsl:template name="setTextAlignment">
|
5239
|
+
<xsl:param name="default">left</xsl:param>
|
5240
|
+
<xsl:attribute name="text-align">
|
5241
|
+
<xsl:choose>
|
5242
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
5243
|
+
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
5244
|
+
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
5245
|
+
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
5246
|
+
</xsl:choose>
|
5247
|
+
</xsl:attribute>
|
4782
5248
|
</xsl:template></xsl:stylesheet>
|