metanorma-un 0.5.2 → 0.5.7
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 +63 -0
- data/README.adoc +2 -4
- data/lib/asciidoctor/un/basicdoc.rng +23 -0
- data/lib/asciidoctor/un/boilerplate.xml +7 -5
- data/lib/asciidoctor/un/isodoc.rng +135 -58
- data/lib/asciidoctor/un/un.rng +7 -0
- data/lib/isodoc/un/html/html_unece_plenary_titlepage.html +17 -1
- data/lib/isodoc/un/html/html_unece_titlepage.html +20 -1
- data/lib/isodoc/un/html/htmlstyle.css +8 -1
- data/lib/isodoc/un/html/htmlstyle.scss +4 -0
- data/lib/isodoc/un/html/unece.css +16 -4
- data/lib/isodoc/un/html/unece.scss +18 -4
- data/lib/isodoc/un/html/word_unece_plenary_titlepage.html +17 -1
- data/lib/isodoc/un/html/word_unece_titlepage.html +17 -1
- data/lib/isodoc/un/i18n-en.yaml +1 -0
- data/lib/isodoc/un/pdf_convert.rb +2 -2
- data/lib/isodoc/un/presentation_xml_convert.rb +1 -0
- data/lib/isodoc/un/un.plenary-attachment.xsl +1080 -249
- data/lib/isodoc/un/un.plenary.xsl +1080 -249
- data/lib/isodoc/un/un.recommendation.xsl +966 -240
- data/lib/isodoc/un/xref.rb +5 -5
- data/lib/metanorma/un/version.rb +1 -1
- data/metanorma-unece.gemspec +1 -1
- metadata +5 -7
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
@@ -39,7 +39,7 @@
|
|
39
39
|
|
40
40
|
<xsl:template match="/">
|
41
41
|
<xsl:call-template name="namespaceCheck"/>
|
42
|
-
<fo:root font-family="Times New Roman,
|
42
|
+
<fo:root font-family="Times New Roman, STIX Two Math, HanSans" font-size="10pt" xml:lang="{$lang}">
|
43
43
|
<fo:layout-master-set>
|
44
44
|
<!-- Cover page -->
|
45
45
|
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
@@ -85,6 +85,9 @@
|
|
85
85
|
|
86
86
|
<xsl:call-template name="addPDFUAmeta"/>
|
87
87
|
|
88
|
+
<xsl:call-template name="addBookmarks">
|
89
|
+
<xsl:with-param name="contents" select="$contents"/>
|
90
|
+
</xsl:call-template>
|
88
91
|
|
89
92
|
<!-- Cover Page -->
|
90
93
|
<fo:page-sequence master-reference="cover-page" force-page-count="even">
|
@@ -197,7 +200,7 @@
|
|
197
200
|
</xsl:variable>
|
198
201
|
<fo:block font-size="9pt" text-align="right" font-style="italic" margin-bottom="6pt"><xsl:value-of select="$title-page"/></fo:block>
|
199
202
|
<fo:block>
|
200
|
-
<xsl:for-each select="xalan:nodeset($contents)//item[not (@type = 'annex' or @parent = 'annex')]">
|
203
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[not (@type = 'annex' or @parent = 'annex') and @display = 'true']">
|
201
204
|
|
202
205
|
<fo:block>
|
203
206
|
|
@@ -208,7 +211,7 @@
|
|
208
211
|
<xsl:if test="@level >= 3 and @section != ''">
|
209
212
|
<xsl:attribute name="margin-left">28mm</xsl:attribute>
|
210
213
|
</xsl:if>
|
211
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
214
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
212
215
|
<xsl:if test="@section != ''">
|
213
216
|
<fo:inline>
|
214
217
|
<xsl:attribute name="padding-right">
|
@@ -222,7 +225,7 @@
|
|
222
225
|
</fo:inline>
|
223
226
|
</xsl:if>
|
224
227
|
|
225
|
-
<xsl:apply-templates/>
|
228
|
+
<xsl:apply-templates select="title"/>
|
226
229
|
<xsl:text> </xsl:text>
|
227
230
|
|
228
231
|
<fo:inline keep-together.within-line="always">
|
@@ -235,12 +238,12 @@
|
|
235
238
|
|
236
239
|
</xsl:for-each>
|
237
240
|
|
238
|
-
<xsl:if test="xalan:nodeset($contents)//item[@type = 'annex']">
|
241
|
+
<xsl:if test="xalan:nodeset($contents)//item[@type = 'annex' and @display = 'true']">
|
239
242
|
<fo:block text-align="center" margin-top="12pt" margin-bottom="12pt">ANNEXES</fo:block>
|
240
|
-
<xsl:for-each select="xalan:nodeset($contents)//item[@type = 'annex']">
|
243
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@type = 'annex' and @display = 'true']">
|
241
244
|
<fo:block>
|
242
245
|
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
243
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
246
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{@section}">
|
244
247
|
<xsl:if test="@section != ''">
|
245
248
|
<fo:inline padding-right="3mm">
|
246
249
|
<xsl:choose>
|
@@ -318,7 +321,9 @@
|
|
318
321
|
</fo:block>
|
319
322
|
</fo:block-container>
|
320
323
|
<fo:block-container absolute-position="fixed" font-family="Arial" font-size="10pt" top="240mm" left="20mm" line-height="110%">
|
321
|
-
<
|
324
|
+
<fo:block>
|
325
|
+
<xsl:apply-templates select="/un:un-standard/un:boilerplate/un:feedback-statement"/>
|
326
|
+
</fo:block>
|
322
327
|
</fo:block-container>
|
323
328
|
</fo:flow>
|
324
329
|
</fo:page-sequence>
|
@@ -347,9 +352,7 @@
|
|
347
352
|
|
348
353
|
|
349
354
|
<xsl:variable name="display">
|
350
|
-
<xsl:choose>
|
351
|
-
<xsl:when test="ancestor-or-self::un:bibitem">false</xsl:when>
|
352
|
-
<xsl:when test="ancestor-or-self::un:term">false</xsl:when>
|
355
|
+
<xsl:choose>
|
353
356
|
<xsl:when test="ancestor-or-self::un:annex and $level >= 2">false</xsl:when>
|
354
357
|
<xsl:when test="$level > 3">false</xsl:when>
|
355
358
|
<xsl:when test="@inline-header='true'">false</xsl:when>
|
@@ -357,6 +360,14 @@
|
|
357
360
|
</xsl:choose>
|
358
361
|
</xsl:variable>
|
359
362
|
|
363
|
+
<xsl:variable name="skip">
|
364
|
+
<xsl:choose>
|
365
|
+
<xsl:when test="ancestor-or-self::un:bibitem">true</xsl:when>
|
366
|
+
<xsl:when test="ancestor-or-self::un:term">true</xsl:when>
|
367
|
+
<xsl:when test="@inline-header='true'">true</xsl:when>
|
368
|
+
<xsl:otherwise>false</xsl:otherwise>
|
369
|
+
</xsl:choose>
|
370
|
+
</xsl:variable>
|
360
371
|
|
361
372
|
<xsl:if test="$display = 'true'">
|
362
373
|
|
@@ -372,10 +383,13 @@
|
|
372
383
|
<xsl:value-of select="local-name()"/>
|
373
384
|
</xsl:variable>
|
374
385
|
|
375
|
-
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
|
376
|
-
<
|
386
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
387
|
+
<title>
|
388
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
389
|
+
</title>
|
390
|
+
<xsl:apply-templates mode="contents"/>
|
377
391
|
</item>
|
378
|
-
|
392
|
+
|
379
393
|
</xsl:if>
|
380
394
|
|
381
395
|
</xsl:template>
|
@@ -596,7 +610,7 @@
|
|
596
610
|
</fo:block>
|
597
611
|
</xsl:template>
|
598
612
|
|
599
|
-
<xsl:template match="un:ul | un:ol">
|
613
|
+
<xsl:template match="un:ul | un:ol" mode="ul_ol">
|
600
614
|
<fo:list-block provisional-distance-between-starts="3mm" margin-left="7mm" text-indent="0mm">
|
601
615
|
<xsl:apply-templates/>
|
602
616
|
</fo:list-block>
|
@@ -604,13 +618,19 @@
|
|
604
618
|
</xsl:template>
|
605
619
|
|
606
620
|
<xsl:template match="un:ul//un:note | un:ol//un:note" priority="2"/>
|
607
|
-
<xsl:template match="un:ul//un:note/un:
|
608
|
-
|
621
|
+
<xsl:template match="un:ul//un:note/un:name | un:ol//un:note/un:name" mode="process" priority="2"/>
|
622
|
+
|
623
|
+
<xsl:template match="un:ul//un:note/un:p | un:ol//un:note/un:p" mode="process" priority="2">
|
624
|
+
<fo:block margin-top="4pt">
|
609
625
|
<xsl:apply-templates select="../un:name" mode="presentation"/>
|
610
626
|
<xsl:apply-templates/>
|
611
627
|
</fo:block>
|
612
628
|
</xsl:template>
|
613
629
|
|
630
|
+
<xsl:template match="un:ul//un:note/* | un:ol//un:note/*" mode="process">
|
631
|
+
<xsl:apply-templates select="."/>
|
632
|
+
</xsl:template>
|
633
|
+
|
614
634
|
<xsl:template match="un:li">
|
615
635
|
<xsl:variable name="level">
|
616
636
|
<xsl:call-template name="getLevel"/>
|
@@ -929,30 +949,45 @@
|
|
929
949
|
|
930
950
|
|
931
951
|
<xsl:template match="un:formula" name="formula-un" priority="2">
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
<
|
936
|
-
|
937
|
-
|
938
|
-
<
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
<fo:table-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
952
|
+
|
953
|
+
<fo:block-container margin-left="0mm">
|
954
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
955
|
+
<xsl:attribute name="margin-left">
|
956
|
+
<xsl:choose>
|
957
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
958
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
959
|
+
</xsl:choose>
|
960
|
+
</xsl:attribute>
|
961
|
+
</xsl:if>
|
962
|
+
<fo:block-container margin-left="0mm">
|
963
|
+
|
964
|
+
<fo:block id="{@id}" margin-top="6pt">
|
965
|
+
<fo:table table-layout="fixed" width="100%">
|
966
|
+
<fo:table-column column-width="95%"/>
|
967
|
+
<fo:table-column column-width="5%"/>
|
968
|
+
<fo:table-body>
|
969
|
+
<fo:table-row>
|
970
|
+
<fo:table-cell>
|
971
|
+
<fo:block text-align="center">
|
972
|
+
<xsl:if test="ancestor::un:annex">
|
973
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
974
|
+
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
975
|
+
</xsl:if>
|
976
|
+
<xsl:apply-templates/>
|
977
|
+
</fo:block>
|
978
|
+
</fo:table-cell>
|
979
|
+
<fo:table-cell> <!-- display-align="center" -->
|
980
|
+
<fo:block text-align="right">
|
981
|
+
<xsl:apply-templates select="un:name" mode="presentation"/>
|
982
|
+
</fo:block>
|
983
|
+
</fo:table-cell>
|
984
|
+
</fo:table-row>
|
985
|
+
</fo:table-body>
|
986
|
+
</fo:table>
|
987
|
+
</fo:block>
|
988
|
+
|
989
|
+
</fo:block-container>
|
990
|
+
</fo:block-container>
|
956
991
|
</xsl:template>
|
957
992
|
|
958
993
|
|
@@ -1032,6 +1067,12 @@
|
|
1032
1067
|
|
1033
1068
|
</title-edition>
|
1034
1069
|
|
1070
|
+
<title-edition lang="fr">
|
1071
|
+
|
1072
|
+
<xsl:text>Édition </xsl:text>
|
1073
|
+
|
1074
|
+
</title-edition>
|
1075
|
+
|
1035
1076
|
|
1036
1077
|
<title-toc lang="en">
|
1037
1078
|
|
@@ -1040,7 +1081,12 @@
|
|
1040
1081
|
|
1041
1082
|
|
1042
1083
|
</title-toc>
|
1043
|
-
<title-toc lang="fr">
|
1084
|
+
<title-toc lang="fr">
|
1085
|
+
|
1086
|
+
<xsl:text>Sommaire</xsl:text>
|
1087
|
+
|
1088
|
+
|
1089
|
+
</title-toc>
|
1044
1090
|
|
1045
1091
|
<title-toc lang="zh">Contents</title-toc>
|
1046
1092
|
|
@@ -1060,13 +1106,22 @@
|
|
1060
1106
|
<title-part lang="en">
|
1061
1107
|
|
1062
1108
|
|
1109
|
+
|
1063
1110
|
</title-part>
|
1064
1111
|
<title-part lang="fr">
|
1065
1112
|
|
1066
1113
|
|
1114
|
+
|
1067
1115
|
</title-part>
|
1068
1116
|
<title-part lang="zh">第 # 部分:</title-part>
|
1069
1117
|
|
1118
|
+
<title-subpart lang="en">
|
1119
|
+
|
1120
|
+
</title-subpart>
|
1121
|
+
<title-subpart lang="fr">
|
1122
|
+
|
1123
|
+
</title-subpart>
|
1124
|
+
|
1070
1125
|
<title-modified lang="en">modified</title-modified>
|
1071
1126
|
<title-modified lang="fr">modifiée</title-modified>
|
1072
1127
|
|
@@ -1074,7 +1129,12 @@
|
|
1074
1129
|
|
1075
1130
|
|
1076
1131
|
|
1077
|
-
<title-source lang="en">
|
1132
|
+
<title-source lang="en">
|
1133
|
+
|
1134
|
+
<xsl:text>SOURCE</xsl:text>
|
1135
|
+
|
1136
|
+
|
1137
|
+
</title-source>
|
1078
1138
|
|
1079
1139
|
<title-keywords lang="en">Keywords</title-keywords>
|
1080
1140
|
|
@@ -1117,12 +1177,25 @@
|
|
1117
1177
|
<title-warning lang="zh">警告</title-warning>
|
1118
1178
|
|
1119
1179
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1180
|
+
|
1181
|
+
<title-continued lang="en">(continued)</title-continued>
|
1182
|
+
<title-continued lang="fr">(continué)</title-continued>
|
1183
|
+
|
1120
1184
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1121
1185
|
<xsl:param name="name"/>
|
1122
|
-
<xsl:
|
1123
|
-
|
1186
|
+
<xsl:param name="lang"/>
|
1187
|
+
<xsl:variable name="lang_">
|
1188
|
+
<xsl:choose>
|
1189
|
+
<xsl:when test="$lang != ''">
|
1190
|
+
<xsl:value-of select="$lang"/>
|
1191
|
+
</xsl:when>
|
1192
|
+
<xsl:otherwise>
|
1193
|
+
<xsl:call-template name="getLang"/>
|
1194
|
+
</xsl:otherwise>
|
1195
|
+
</xsl:choose>
|
1124
1196
|
</xsl:variable>
|
1125
|
-
<xsl:variable name="
|
1197
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1198
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
1126
1199
|
<xsl:choose>
|
1127
1200
|
<xsl:when test="normalize-space($title_) != ''">
|
1128
1201
|
<xsl:value-of select="$title_"/>
|
@@ -1131,7 +1204,10 @@
|
|
1131
1204
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
1132
1205
|
</xsl:otherwise>
|
1133
1206
|
</xsl:choose>
|
1134
|
-
</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="
|
1207
|
+
</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">
|
1208
|
+
|
1209
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1210
|
+
|
1135
1211
|
|
1136
1212
|
|
1137
1213
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
@@ -1142,14 +1218,14 @@
|
|
1142
1218
|
|
1143
1219
|
|
1144
1220
|
|
1145
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1146
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1221
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1147
1222
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1148
1223
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1149
1224
|
|
1150
1225
|
|
1151
1226
|
|
1152
1227
|
|
1228
|
+
|
1153
1229
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1154
1230
|
|
1155
1231
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -1191,6 +1267,7 @@
|
|
1191
1267
|
|
1192
1268
|
|
1193
1269
|
|
1270
|
+
|
1194
1271
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1195
1272
|
|
1196
1273
|
|
@@ -1210,6 +1287,7 @@
|
|
1210
1287
|
|
1211
1288
|
|
1212
1289
|
|
1290
|
+
|
1213
1291
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1214
1292
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1215
1293
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -1262,6 +1340,7 @@
|
|
1262
1340
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
1263
1341
|
|
1264
1342
|
|
1343
|
+
|
1265
1344
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1266
1345
|
|
1267
1346
|
|
@@ -1272,11 +1351,13 @@
|
|
1272
1351
|
|
1273
1352
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1274
1353
|
|
1275
|
-
|
1354
|
+
|
1355
|
+
|
1276
1356
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1277
1357
|
|
1278
1358
|
|
1279
1359
|
|
1360
|
+
|
1280
1361
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1281
1362
|
|
1282
1363
|
|
@@ -1290,14 +1371,16 @@
|
|
1290
1371
|
|
1291
1372
|
|
1292
1373
|
|
1374
|
+
|
1293
1375
|
<xsl:attribute name="margin-top">3pt</xsl:attribute>
|
1294
1376
|
<xsl:attribute name="border-top">0.1mm solid black</xsl:attribute>
|
1295
1377
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1296
1378
|
|
1297
1379
|
|
1380
|
+
</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">
|
1381
|
+
|
1298
1382
|
|
1299
1383
|
|
1300
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1301
1384
|
|
1302
1385
|
|
1303
1386
|
|
@@ -1306,7 +1389,6 @@
|
|
1306
1389
|
|
1307
1390
|
|
1308
1391
|
|
1309
|
-
|
1310
1392
|
|
1311
1393
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1312
1394
|
|
@@ -1322,8 +1404,7 @@
|
|
1322
1404
|
|
1323
1405
|
<xsl:attribute name="margin-top">3pt</xsl:attribute>
|
1324
1406
|
<!-- <xsl:attribute name="border-top">0.1mm solid black</xsl:attribute> -->
|
1325
|
-
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1326
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1407
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1327
1408
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1328
1409
|
<xsl:attribute name="padding-top">1.5mm</xsl:attribute>
|
1329
1410
|
|
@@ -1337,6 +1418,8 @@
|
|
1337
1418
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1338
1419
|
|
1339
1420
|
|
1421
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1422
|
+
|
1340
1423
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1341
1424
|
|
1342
1425
|
|
@@ -1357,6 +1440,7 @@
|
|
1357
1440
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1358
1441
|
|
1359
1442
|
|
1443
|
+
|
1360
1444
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1361
1445
|
|
1362
1446
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1375,6 +1459,7 @@
|
|
1375
1459
|
|
1376
1460
|
|
1377
1461
|
|
1462
|
+
|
1378
1463
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1379
1464
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
1380
1465
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -1409,11 +1494,14 @@
|
|
1409
1494
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1410
1495
|
|
1411
1496
|
|
1497
|
+
|
1412
1498
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1413
1499
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1414
1500
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1415
1501
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1416
1502
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1503
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1504
|
+
|
1417
1505
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1418
1506
|
|
1419
1507
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -1477,6 +1565,12 @@
|
|
1477
1565
|
|
1478
1566
|
|
1479
1567
|
|
1568
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1569
|
+
<fo:block> </fo:block>
|
1570
|
+
</xsl:if> -->
|
1571
|
+
|
1572
|
+
<!-- $namespace = 'iso' or -->
|
1573
|
+
|
1480
1574
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1481
1575
|
|
1482
1576
|
|
@@ -1512,6 +1606,7 @@
|
|
1512
1606
|
<xsl:with-param name="table" select="$simple-table"/>
|
1513
1607
|
</xsl:call-template>
|
1514
1608
|
</xsl:variable>
|
1609
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1515
1610
|
|
1516
1611
|
<!-- <xsl:variable name="colwidths2">
|
1517
1612
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1533,35 +1628,59 @@
|
|
1533
1628
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1534
1629
|
|
1535
1630
|
|
1631
|
+
|
1536
1632
|
|
1537
1633
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1634
|
+
<xsl:if test="not(ancestor::*[local-name()='sections'])">
|
1635
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1636
|
+
</xsl:if>
|
1637
|
+
|
1638
|
+
|
1639
|
+
|
1538
1640
|
|
1641
|
+
|
1539
1642
|
|
1540
1643
|
|
1541
1644
|
|
1542
1645
|
|
1543
1646
|
|
1544
1647
|
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1648
|
+
|
1649
|
+
<xsl:variable name="table_attributes">
|
1650
|
+
<attribute name="table-layout">fixed</attribute>
|
1651
|
+
<attribute name="width">100%</attribute>
|
1652
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1653
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1548
1654
|
|
1549
1655
|
|
1550
1656
|
|
1551
1657
|
|
1658
|
+
|
1552
1659
|
|
1553
1660
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
1554
|
-
<
|
1555
|
-
<
|
1556
|
-
</xsl:if>
|
1557
|
-
|
1558
|
-
|
1559
|
-
</xsl:if>
|
1560
|
-
|
1661
|
+
<attribute name="border-top">1.5pt solid black</attribute>
|
1662
|
+
<attribute name="border-bottom">1.5pt solid black</attribute>
|
1663
|
+
</xsl:if>
|
1664
|
+
|
1665
|
+
|
1561
1666
|
|
1667
|
+
|
1562
1668
|
|
1669
|
+
</xsl:variable>
|
1670
|
+
|
1671
|
+
|
1672
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1563
1673
|
|
1674
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1675
|
+
<xsl:attribute name="{@name}">
|
1676
|
+
<xsl:value-of select="."/>
|
1677
|
+
</xsl:attribute>
|
1678
|
+
</xsl:for-each>
|
1564
1679
|
|
1680
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1681
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1682
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1683
|
+
</xsl:if>
|
1565
1684
|
|
1566
1685
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1567
1686
|
<xsl:choose>
|
@@ -1585,6 +1704,33 @@
|
|
1585
1704
|
|
1586
1705
|
</fo:table>
|
1587
1706
|
|
1707
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1708
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1709
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1710
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1711
|
+
</xsl:call-template>
|
1712
|
+
</xsl:for-each>
|
1713
|
+
|
1714
|
+
<!-- insert footer as table -->
|
1715
|
+
<!-- <fo:table>
|
1716
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1717
|
+
<xsl:attribute name="{@name}">
|
1718
|
+
<xsl:value-of select="."/>
|
1719
|
+
</xsl:attribute>
|
1720
|
+
</xsl:for-each>
|
1721
|
+
|
1722
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1723
|
+
<xsl:choose>
|
1724
|
+
<xsl:when test=". = 1 or . = 0">
|
1725
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1726
|
+
</xsl:when>
|
1727
|
+
<xsl:otherwise>
|
1728
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1729
|
+
</xsl:otherwise>
|
1730
|
+
</xsl:choose>
|
1731
|
+
</xsl:for-each>
|
1732
|
+
</fo:table>-->
|
1733
|
+
|
1588
1734
|
|
1589
1735
|
|
1590
1736
|
|
@@ -1593,8 +1739,10 @@
|
|
1593
1739
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1594
1740
|
<xsl:if test="normalize-space() != ''">
|
1595
1741
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1596
|
-
|
1597
|
-
|
1742
|
+
|
1743
|
+
|
1744
|
+
<xsl:apply-templates/>
|
1745
|
+
</fo:block>
|
1598
1746
|
</xsl:if>
|
1599
1747
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1600
1748
|
<xsl:param name="table-row"/>
|
@@ -1648,6 +1796,13 @@
|
|
1648
1796
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1649
1797
|
<xsl:variable name="td_text">
|
1650
1798
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1799
|
+
|
1800
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1801
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1802
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1803
|
+
</xsl:for-each>
|
1804
|
+
</xsl:if> -->
|
1805
|
+
|
1651
1806
|
</xsl:variable>
|
1652
1807
|
<xsl:variable name="words">
|
1653
1808
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1707,13 +1862,31 @@
|
|
1707
1862
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1708
1863
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1709
1864
|
<xsl:value-of select="@target"/>
|
1865
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1866
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1867
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1710
1868
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1711
1869
|
<xsl:param name="cols-count"/>
|
1712
1870
|
<!-- font-weight="bold" -->
|
1713
|
-
<fo:table-header>
|
1871
|
+
<fo:table-header>
|
1714
1872
|
|
1715
1873
|
<xsl:apply-templates/>
|
1716
1874
|
</fo:table-header>
|
1875
|
+
</xsl:template><xsl:template name="table-header-title">
|
1876
|
+
<xsl:param name="cols-count"/>
|
1877
|
+
<!-- row for title -->
|
1878
|
+
<fo:table-row>
|
1879
|
+
<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">
|
1880
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1881
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1882
|
+
<xsl:call-template name="fn_name_display"/>
|
1883
|
+
</xsl:for-each>
|
1884
|
+
<fo:block text-align="right" font-style="italic">
|
1885
|
+
<xsl:text> </xsl:text>
|
1886
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1887
|
+
</fo:block>
|
1888
|
+
</fo:table-cell>
|
1889
|
+
</fo:table-row>
|
1717
1890
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1718
1891
|
<fo:table-body>
|
1719
1892
|
<xsl:apply-templates/>
|
@@ -1721,6 +1894,13 @@
|
|
1721
1894
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1722
1895
|
<xsl:apply-templates/>
|
1723
1896
|
</xsl:template><xsl:template name="insertTableFooter">
|
1897
|
+
<xsl:param name="cols-count"/>
|
1898
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1899
|
+
<fo:table-footer>
|
1900
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1901
|
+
</fo:table-footer>
|
1902
|
+
</xsl:if>
|
1903
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1724
1904
|
<xsl:param name="cols-count"/>
|
1725
1905
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1726
1906
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1742,11 +1922,29 @@
|
|
1742
1922
|
<!-- fn will be processed inside 'note' processing -->
|
1743
1923
|
|
1744
1924
|
|
1925
|
+
|
1926
|
+
|
1927
|
+
|
1928
|
+
|
1745
1929
|
<!-- except gb -->
|
1746
1930
|
|
1747
1931
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1748
1932
|
|
1749
1933
|
|
1934
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
1935
|
+
<!-- empty, because notes show at page side in main sections -->
|
1936
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1937
|
+
<xsl:choose>
|
1938
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1939
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1940
|
+
</xsl:when>
|
1941
|
+
<xsl:otherwise>
|
1942
|
+
<fo:block/>
|
1943
|
+
</xsl:otherwise>
|
1944
|
+
</xsl:choose>
|
1945
|
+
</xsl:if> -->
|
1946
|
+
|
1947
|
+
|
1750
1948
|
<!-- horizontal row separator -->
|
1751
1949
|
|
1752
1950
|
|
@@ -1760,6 +1958,88 @@
|
|
1760
1958
|
</fo:table-footer>
|
1761
1959
|
|
1762
1960
|
</xsl:if>
|
1961
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
1962
|
+
<xsl:param name="table_attributes"/>
|
1963
|
+
<xsl:param name="colwidths"/>
|
1964
|
+
|
1965
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1966
|
+
|
1967
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1968
|
+
|
1969
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
1970
|
+
|
1971
|
+
<fo:table keep-with-previous="always">
|
1972
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1973
|
+
<xsl:choose>
|
1974
|
+
<xsl:when test="@name = 'border-top'">
|
1975
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
1976
|
+
</xsl:when>
|
1977
|
+
<xsl:when test="@name = 'border'">
|
1978
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1979
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
1980
|
+
</xsl:when>
|
1981
|
+
<xsl:otherwise>
|
1982
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1983
|
+
</xsl:otherwise>
|
1984
|
+
</xsl:choose>
|
1985
|
+
</xsl:for-each>
|
1986
|
+
|
1987
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1988
|
+
<xsl:choose>
|
1989
|
+
<xsl:when test=". = 1 or . = 0">
|
1990
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1991
|
+
</xsl:when>
|
1992
|
+
<xsl:otherwise>
|
1993
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1994
|
+
</xsl:otherwise>
|
1995
|
+
</xsl:choose>
|
1996
|
+
</xsl:for-each>
|
1997
|
+
|
1998
|
+
<fo:table-body>
|
1999
|
+
<fo:table-row>
|
2000
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
2001
|
+
|
2002
|
+
|
2003
|
+
|
2004
|
+
<!-- fn will be processed inside 'note' processing -->
|
2005
|
+
|
2006
|
+
|
2007
|
+
|
2008
|
+
|
2009
|
+
|
2010
|
+
|
2011
|
+
|
2012
|
+
<!-- except gb -->
|
2013
|
+
|
2014
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2015
|
+
|
2016
|
+
|
2017
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2018
|
+
<xsl:choose>
|
2019
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2020
|
+
show Note under table in preface (ex. abstract) sections
|
2021
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2022
|
+
</xsl:when>
|
2023
|
+
<xsl:otherwise>
|
2024
|
+
empty, because notes show at page side in main sections
|
2025
|
+
<fo:block/>
|
2026
|
+
</xsl:otherwise>
|
2027
|
+
</xsl:choose>
|
2028
|
+
</xsl:if> -->
|
2029
|
+
|
2030
|
+
|
2031
|
+
<!-- horizontal row separator -->
|
2032
|
+
|
2033
|
+
|
2034
|
+
<!-- fn processing -->
|
2035
|
+
<xsl:call-template name="fn_display"/>
|
2036
|
+
|
2037
|
+
</fo:table-cell>
|
2038
|
+
</fo:table-row>
|
2039
|
+
</fo:table-body>
|
2040
|
+
|
2041
|
+
</fo:table>
|
2042
|
+
</xsl:if>
|
1763
2043
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1764
2044
|
|
1765
2045
|
<xsl:variable name="cols-count">
|
@@ -1777,6 +2057,8 @@
|
|
1777
2057
|
</xsl:choose>
|
1778
2058
|
</xsl:variable>
|
1779
2059
|
|
2060
|
+
|
2061
|
+
|
1780
2062
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1781
2063
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1782
2064
|
</xsl:apply-templates>
|
@@ -1786,6 +2068,8 @@
|
|
1786
2068
|
</xsl:call-template>
|
1787
2069
|
|
1788
2070
|
<fo:table-body>
|
2071
|
+
|
2072
|
+
|
1789
2073
|
<xsl:apply-templates/>
|
1790
2074
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1791
2075
|
|
@@ -1809,6 +2093,12 @@
|
|
1809
2093
|
</xsl:if>
|
1810
2094
|
|
1811
2095
|
|
2096
|
+
|
2097
|
+
|
2098
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2099
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
2100
|
+
</xsl:if> -->
|
2101
|
+
|
1812
2102
|
<xsl:apply-templates/>
|
1813
2103
|
</fo:table-row>
|
1814
2104
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -1827,6 +2117,7 @@
|
|
1827
2117
|
|
1828
2118
|
|
1829
2119
|
|
2120
|
+
|
1830
2121
|
|
1831
2122
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
1832
2123
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
@@ -1846,6 +2137,7 @@
|
|
1846
2137
|
|
1847
2138
|
|
1848
2139
|
|
2140
|
+
|
1849
2141
|
<xsl:if test="@colspan">
|
1850
2142
|
<xsl:attribute name="number-columns-spanned">
|
1851
2143
|
<xsl:value-of select="@colspan"/>
|
@@ -1856,10 +2148,22 @@
|
|
1856
2148
|
<xsl:value-of select="@rowspan"/>
|
1857
2149
|
</xsl:attribute>
|
1858
2150
|
</xsl:if>
|
2151
|
+
<xsl:call-template name="display-align"/>
|
1859
2152
|
<fo:block>
|
1860
2153
|
<xsl:apply-templates/>
|
1861
2154
|
</fo:block>
|
1862
2155
|
</fo:table-cell>
|
2156
|
+
</xsl:template><xsl:template name="display-align">
|
2157
|
+
<xsl:if test="@valign">
|
2158
|
+
<xsl:attribute name="display-align">
|
2159
|
+
<xsl:choose>
|
2160
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2161
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2162
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2163
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2164
|
+
</xsl:choose>
|
2165
|
+
</xsl:attribute>
|
2166
|
+
</xsl:if>
|
1863
2167
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
1864
2168
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
1865
2169
|
<xsl:attribute name="text-align">
|
@@ -1873,7 +2177,8 @@
|
|
1873
2177
|
|
1874
2178
|
|
1875
2179
|
|
1876
|
-
|
2180
|
+
|
2181
|
+
|
1877
2182
|
|
1878
2183
|
|
1879
2184
|
|
@@ -1885,6 +2190,7 @@
|
|
1885
2190
|
|
1886
2191
|
|
1887
2192
|
|
2193
|
+
|
1888
2194
|
<xsl:if test="@colspan">
|
1889
2195
|
<xsl:attribute name="number-columns-spanned">
|
1890
2196
|
<xsl:value-of select="@colspan"/>
|
@@ -1895,6 +2201,7 @@
|
|
1895
2201
|
<xsl:value-of select="@rowspan"/>
|
1896
2202
|
</xsl:attribute>
|
1897
2203
|
</xsl:if>
|
2204
|
+
<xsl:call-template name="display-align"/>
|
1898
2205
|
<fo:block>
|
1899
2206
|
|
1900
2207
|
<xsl:apply-templates/>
|
@@ -1908,6 +2215,8 @@
|
|
1908
2215
|
|
1909
2216
|
|
1910
2217
|
|
2218
|
+
|
2219
|
+
|
1911
2220
|
<fo:inline padding-right="2mm">
|
1912
2221
|
|
1913
2222
|
|
@@ -1922,10 +2231,11 @@
|
|
1922
2231
|
</fo:inline> -->
|
1923
2232
|
</xsl:if>
|
1924
2233
|
|
1925
|
-
|
2234
|
+
|
1926
2235
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
1927
2236
|
|
1928
2237
|
</fo:inline>
|
2238
|
+
|
1929
2239
|
<xsl:apply-templates mode="process"/>
|
1930
2240
|
</fo:block>
|
1931
2241
|
|
@@ -1949,6 +2259,7 @@
|
|
1949
2259
|
|
1950
2260
|
|
1951
2261
|
|
2262
|
+
|
1952
2263
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
1953
2264
|
|
1954
2265
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -1958,12 +2269,15 @@
|
|
1958
2269
|
|
1959
2270
|
|
1960
2271
|
|
2272
|
+
|
1961
2273
|
<xsl:value-of select="@reference"/>
|
1962
2274
|
|
2275
|
+
|
1963
2276
|
</fo:inline>
|
1964
2277
|
<fo:inline>
|
1965
2278
|
|
1966
|
-
<xsl:apply-templates/>
|
2279
|
+
<!-- <xsl:apply-templates /> -->
|
2280
|
+
<xsl:copy-of select="./node()"/>
|
1967
2281
|
</fo:inline>
|
1968
2282
|
</fo:block>
|
1969
2283
|
</xsl:if>
|
@@ -2000,7 +2314,20 @@
|
|
2000
2314
|
<xsl:variable name="following_dl_colwidths">
|
2001
2315
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
2002
2316
|
<xsl:variable name="html-table">
|
2003
|
-
<xsl:variable name="
|
2317
|
+
<xsl:variable name="doc_ns">
|
2318
|
+
|
2319
|
+
</xsl:variable>
|
2320
|
+
<xsl:variable name="ns">
|
2321
|
+
<xsl:choose>
|
2322
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2323
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2324
|
+
</xsl:when>
|
2325
|
+
<xsl:otherwise>
|
2326
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2327
|
+
</xsl:otherwise>
|
2328
|
+
</xsl:choose>
|
2329
|
+
</xsl:variable>
|
2330
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2004
2331
|
<xsl:element name="{$ns}:table">
|
2005
2332
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2006
2333
|
<tbody>
|
@@ -2065,7 +2392,8 @@
|
|
2065
2392
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2066
2393
|
</xsl:if>
|
2067
2394
|
|
2068
|
-
<xsl:apply-templates/>
|
2395
|
+
<!-- <xsl:apply-templates /> -->
|
2396
|
+
<xsl:copy-of select="./node()"/>
|
2069
2397
|
</fo:block>
|
2070
2398
|
</fo:table-cell>
|
2071
2399
|
</fo:table-row>
|
@@ -2083,9 +2411,13 @@
|
|
2083
2411
|
|
2084
2412
|
|
2085
2413
|
|
2414
|
+
|
2415
|
+
|
2086
2416
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2087
2417
|
|
2418
|
+
|
2088
2419
|
<xsl:value-of select="@reference"/>
|
2420
|
+
|
2089
2421
|
</fo:basic-link>
|
2090
2422
|
</fo:inline>
|
2091
2423
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -2093,115 +2425,158 @@
|
|
2093
2425
|
<xsl:apply-templates/>
|
2094
2426
|
</fo:inline>
|
2095
2427
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2096
|
-
<
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
<xsl:variable name="title-where">
|
2109
|
-
<xsl:call-template name="getTitle">
|
2110
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2111
|
-
</xsl:call-template>
|
2112
|
-
</xsl:variable>
|
2113
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2114
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2115
|
-
<xsl:text/>
|
2116
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2117
|
-
</fo:block>
|
2428
|
+
<fo:block-container>
|
2429
|
+
|
2430
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2431
|
+
|
2432
|
+
|
2433
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2434
|
+
<xsl:attribute name="margin-left">
|
2435
|
+
<xsl:choose>
|
2436
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2437
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2438
|
+
</xsl:choose>
|
2439
|
+
</xsl:attribute>
|
2118
2440
|
|
2119
|
-
</xsl:
|
2120
|
-
<
|
2121
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
2122
|
-
|
2123
|
-
|
2124
|
-
|
2125
|
-
|
2126
|
-
<xsl:variable name="title-where">
|
2127
|
-
<xsl:call-template name="getTitle">
|
2128
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2129
|
-
</xsl:call-template>
|
2130
|
-
</xsl:variable>
|
2131
|
-
<xsl:value-of select="$title-where"/>
|
2132
|
-
</fo:block>
|
2133
|
-
</xsl:when>
|
2134
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2135
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2136
|
-
|
2137
|
-
|
2138
|
-
|
2139
|
-
<xsl:variable name="title-key">
|
2140
|
-
<xsl:call-template name="getTitle">
|
2141
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
2142
|
-
</xsl:call-template>
|
2143
|
-
</xsl:variable>
|
2144
|
-
<xsl:value-of select="$title-key"/>
|
2145
|
-
</fo:block>
|
2146
|
-
</xsl:when>
|
2147
|
-
</xsl:choose>
|
2148
|
-
|
2149
|
-
<!-- a few components -->
|
2150
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2151
|
-
<fo:block>
|
2441
|
+
</xsl:if>
|
2442
|
+
<fo:block-container>
|
2152
2443
|
|
2444
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2153
2445
|
|
2154
2446
|
|
2447
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
2155
2448
|
|
2156
|
-
<
|
2157
|
-
|
2158
|
-
|
2159
|
-
|
2160
|
-
|
2161
|
-
<
|
2449
|
+
<xsl:variable name="key_iso">
|
2450
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2451
|
+
</xsl:variable>
|
2452
|
+
|
2453
|
+
<xsl:choose>
|
2454
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2162
2455
|
|
2163
|
-
|
2164
|
-
<
|
2165
|
-
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2166
|
-
</xsl:when>
|
2167
|
-
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2168
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2456
|
+
|
2457
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2169
2458
|
|
2170
|
-
|
2171
|
-
|
2172
|
-
|
2173
|
-
|
2174
|
-
|
2175
|
-
|
2176
|
-
|
2177
|
-
|
2178
|
-
</
|
2179
|
-
|
2180
|
-
|
2181
|
-
|
2182
|
-
|
2183
|
-
|
2184
|
-
|
2185
|
-
|
2186
|
-
|
2187
|
-
|
2188
|
-
|
2189
|
-
|
2190
|
-
|
2191
|
-
|
2192
|
-
|
2193
|
-
|
2194
|
-
|
2195
|
-
|
2196
|
-
|
2197
|
-
|
2198
|
-
|
2199
|
-
|
2200
|
-
</fo:
|
2201
|
-
</
|
2202
|
-
|
2203
|
-
|
2204
|
-
|
2459
|
+
<xsl:variable name="title-where">
|
2460
|
+
|
2461
|
+
|
2462
|
+
<xsl:call-template name="getTitle">
|
2463
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2464
|
+
</xsl:call-template>
|
2465
|
+
|
2466
|
+
</xsl:variable>
|
2467
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2468
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2469
|
+
<xsl:text/>
|
2470
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2471
|
+
</fo:block>
|
2472
|
+
|
2473
|
+
</xsl:when>
|
2474
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2475
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2476
|
+
|
2477
|
+
|
2478
|
+
|
2479
|
+
|
2480
|
+
<xsl:variable name="title-where">
|
2481
|
+
|
2482
|
+
|
2483
|
+
<xsl:call-template name="getTitle">
|
2484
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2485
|
+
</xsl:call-template>
|
2486
|
+
|
2487
|
+
</xsl:variable>
|
2488
|
+
<xsl:value-of select="$title-where"/>
|
2489
|
+
</fo:block>
|
2490
|
+
</xsl:when>
|
2491
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2492
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2493
|
+
|
2494
|
+
|
2495
|
+
|
2496
|
+
<xsl:variable name="title-key">
|
2497
|
+
|
2498
|
+
|
2499
|
+
<xsl:call-template name="getTitle">
|
2500
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2501
|
+
</xsl:call-template>
|
2502
|
+
|
2503
|
+
</xsl:variable>
|
2504
|
+
<xsl:value-of select="$title-key"/>
|
2505
|
+
</fo:block>
|
2506
|
+
</xsl:when>
|
2507
|
+
</xsl:choose>
|
2508
|
+
|
2509
|
+
<!-- a few components -->
|
2510
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2511
|
+
<fo:block>
|
2512
|
+
|
2513
|
+
|
2514
|
+
|
2515
|
+
|
2516
|
+
<fo:block>
|
2517
|
+
|
2518
|
+
|
2519
|
+
|
2520
|
+
|
2521
|
+
<fo:table width="95%" table-layout="fixed">
|
2522
|
+
|
2523
|
+
<xsl:choose>
|
2524
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2525
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2526
|
+
</xsl:when>
|
2527
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2528
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2529
|
+
|
2530
|
+
</xsl:when>
|
2531
|
+
</xsl:choose>
|
2532
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2533
|
+
<xsl:variable name="html-table">
|
2534
|
+
<xsl:variable name="doc_ns">
|
2535
|
+
|
2536
|
+
</xsl:variable>
|
2537
|
+
<xsl:variable name="ns">
|
2538
|
+
<xsl:choose>
|
2539
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2540
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2541
|
+
</xsl:when>
|
2542
|
+
<xsl:otherwise>
|
2543
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2544
|
+
</xsl:otherwise>
|
2545
|
+
</xsl:choose>
|
2546
|
+
</xsl:variable>
|
2547
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2548
|
+
<xsl:element name="{$ns}:table">
|
2549
|
+
<tbody>
|
2550
|
+
<xsl:apply-templates mode="dl"/>
|
2551
|
+
</tbody>
|
2552
|
+
</xsl:element>
|
2553
|
+
</xsl:variable>
|
2554
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2555
|
+
<xsl:variable name="colwidths">
|
2556
|
+
<xsl:call-template name="calculate-column-widths">
|
2557
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2558
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2559
|
+
</xsl:call-template>
|
2560
|
+
</xsl:variable>
|
2561
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2562
|
+
<xsl:variable name="maxlength_dt">
|
2563
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2564
|
+
</xsl:variable>
|
2565
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2566
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2567
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2568
|
+
</xsl:call-template>
|
2569
|
+
<fo:table-body>
|
2570
|
+
<xsl:apply-templates>
|
2571
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2572
|
+
</xsl:apply-templates>
|
2573
|
+
</fo:table-body>
|
2574
|
+
</fo:table>
|
2575
|
+
</fo:block>
|
2576
|
+
</fo:block>
|
2577
|
+
</xsl:if>
|
2578
|
+
</fo:block-container>
|
2579
|
+
</fo:block-container>
|
2205
2580
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
2206
2581
|
<xsl:param name="colwidths"/>
|
2207
2582
|
<xsl:param name="maxlength_dt"/>
|
@@ -2298,6 +2673,7 @@
|
|
2298
2673
|
<xsl:param name="key_iso"/>
|
2299
2674
|
|
2300
2675
|
<fo:table-row>
|
2676
|
+
|
2301
2677
|
<fo:table-cell>
|
2302
2678
|
|
2303
2679
|
<fo:block margin-top="6pt">
|
@@ -2312,6 +2688,7 @@
|
|
2312
2688
|
|
2313
2689
|
|
2314
2690
|
|
2691
|
+
|
2315
2692
|
<xsl:apply-templates/>
|
2316
2693
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2317
2694
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2377,6 +2754,31 @@
|
|
2377
2754
|
</fo:inline>
|
2378
2755
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2379
2756
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2757
|
+
<xsl:variable name="_font-size">
|
2758
|
+
|
2759
|
+
|
2760
|
+
|
2761
|
+
|
2762
|
+
|
2763
|
+
|
2764
|
+
|
2765
|
+
|
2766
|
+
|
2767
|
+
|
2768
|
+
|
2769
|
+
|
2770
|
+
|
2771
|
+
|
2772
|
+
</xsl:variable>
|
2773
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2774
|
+
<xsl:if test="$font-size != ''">
|
2775
|
+
<xsl:attribute name="font-size">
|
2776
|
+
<xsl:choose>
|
2777
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2778
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2779
|
+
</xsl:choose>
|
2780
|
+
</xsl:attribute>
|
2781
|
+
</xsl:if>
|
2380
2782
|
<xsl:apply-templates/>
|
2381
2783
|
</fo:inline>
|
2382
2784
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2668,7 +3070,18 @@
|
|
2668
3070
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
2669
3071
|
</xsl:apply-templates>
|
2670
3072
|
</xsl:template><xsl:template name="getLang">
|
2671
|
-
<xsl:variable name="
|
3073
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3074
|
+
<xsl:variable name="language">
|
3075
|
+
<xsl:choose>
|
3076
|
+
<xsl:when test="$language_current != ''">
|
3077
|
+
<xsl:value-of select="$language_current"/>
|
3078
|
+
</xsl:when>
|
3079
|
+
<xsl:otherwise>
|
3080
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3081
|
+
</xsl:otherwise>
|
3082
|
+
</xsl:choose>
|
3083
|
+
</xsl:variable>
|
3084
|
+
|
2672
3085
|
<xsl:choose>
|
2673
3086
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
2674
3087
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -2702,11 +3115,25 @@
|
|
2702
3115
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2703
3116
|
<xsl:value-of select="substring($str, 2)"/>
|
2704
3117
|
</xsl:template><xsl:template match="mathml:math">
|
2705
|
-
<fo:inline font-family="
|
2706
|
-
|
2707
|
-
|
2708
|
-
|
3118
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3119
|
+
|
3120
|
+
<xsl:variable name="mathml">
|
3121
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
3122
|
+
</xsl:variable>
|
3123
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
3124
|
+
<!-- <xsl:copy-of select="."/> -->
|
3125
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3126
|
+
</fo:instream-foreign-object>
|
2709
3127
|
</fo:inline>
|
3128
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3129
|
+
<xsl:copy>
|
3130
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3131
|
+
</xsl:copy>
|
3132
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
3133
|
+
<xsl:copy>
|
3134
|
+
<!-- replace start and end spaces to non-break space -->
|
3135
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3136
|
+
</xsl:copy>
|
2710
3137
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2711
3138
|
<xsl:variable name="target">
|
2712
3139
|
<xsl:choose>
|
@@ -2772,10 +3199,14 @@
|
|
2772
3199
|
</fo:inline>
|
2773
3200
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
2774
3201
|
<xsl:variable name="title-modified">
|
2775
|
-
|
2776
|
-
|
2777
|
-
|
3202
|
+
|
3203
|
+
|
3204
|
+
<xsl:call-template name="getTitle">
|
3205
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
3206
|
+
</xsl:call-template>
|
3207
|
+
|
2778
3208
|
</xsl:variable>
|
3209
|
+
|
2779
3210
|
<xsl:choose>
|
2780
3211
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
2781
3212
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -2783,13 +3214,26 @@
|
|
2783
3214
|
<xsl:apply-templates/>
|
2784
3215
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2785
3216
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2786
|
-
|
3217
|
+
|
2787
3218
|
<xsl:apply-templates/>
|
2788
3219
|
</fo:basic-link>
|
2789
3220
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2790
|
-
<fo:block
|
2791
|
-
<xsl:
|
2792
|
-
|
3221
|
+
<fo:block-container margin-left="0mm">
|
3222
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3223
|
+
<xsl:attribute name="margin-left">
|
3224
|
+
<xsl:choose>
|
3225
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3226
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3227
|
+
</xsl:choose>
|
3228
|
+
</xsl:attribute>
|
3229
|
+
|
3230
|
+
</xsl:if>
|
3231
|
+
<fo:block-container margin-left="0mm">
|
3232
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3233
|
+
<xsl:apply-templates/>
|
3234
|
+
</fo:block>
|
3235
|
+
</fo:block-container>
|
3236
|
+
</fo:block-container>
|
2793
3237
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2794
3238
|
<fo:inline>
|
2795
3239
|
<xsl:apply-templates/>
|
@@ -2836,6 +3280,8 @@
|
|
2836
3280
|
|
2837
3281
|
|
2838
3282
|
|
3283
|
+
|
3284
|
+
|
2839
3285
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
2840
3286
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2841
3287
|
</fo:inline>
|
@@ -2862,7 +3308,9 @@
|
|
2862
3308
|
</xsl:choose>
|
2863
3309
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2864
3310
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2865
|
-
<xsl:
|
3311
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3312
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3313
|
+
</fo:inline>
|
2866
3314
|
<xsl:apply-templates/>
|
2867
3315
|
</fo:block>
|
2868
3316
|
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
|
@@ -2966,15 +3414,109 @@
|
|
2966
3414
|
|
2967
3415
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2968
3416
|
</fo:block>
|
2969
|
-
</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">
|
3417
|
+
</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">
|
2970
3418
|
<xsl:apply-templates mode="contents"/>
|
2971
3419
|
<xsl:text> </xsl:text>
|
2972
|
-
</xsl:template><xsl:template match="
|
3420
|
+
</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">
|
3421
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3422
|
+
<xsl:text> </xsl:text>
|
3423
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3424
|
+
<xsl:value-of select="."/>
|
3425
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
2973
3426
|
<xsl:value-of select="."/>
|
2974
|
-
</xsl:template><xsl:template match="
|
3427
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3428
|
+
<xsl:apply-templates mode="contents"/>
|
3429
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3430
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3431
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3432
|
+
<xsl:apply-templates select="."/>
|
3433
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3434
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3435
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3436
|
+
<xsl:param name="contents"/>
|
3437
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3438
|
+
<fo:bookmark-tree>
|
3439
|
+
<xsl:choose>
|
3440
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3441
|
+
<xsl:choose>
|
3442
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3443
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3444
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3445
|
+
<fo:bookmark-title>
|
3446
|
+
<xsl:variable name="bookmark-title_">
|
3447
|
+
<xsl:call-template name="getLangVersion">
|
3448
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3449
|
+
</xsl:call-template>
|
3450
|
+
</xsl:variable>
|
3451
|
+
<xsl:choose>
|
3452
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3453
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3454
|
+
</xsl:when>
|
3455
|
+
<xsl:otherwise>
|
3456
|
+
<xsl:choose>
|
3457
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3458
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3459
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3460
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3461
|
+
</xsl:choose>
|
3462
|
+
</xsl:otherwise>
|
3463
|
+
</xsl:choose>
|
3464
|
+
</fo:bookmark-title>
|
3465
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3466
|
+
</fo:bookmark>
|
3467
|
+
|
3468
|
+
</xsl:for-each>
|
3469
|
+
</xsl:when>
|
3470
|
+
<xsl:otherwise>
|
3471
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3472
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3473
|
+
</xsl:for-each>
|
3474
|
+
</xsl:otherwise>
|
3475
|
+
</xsl:choose>
|
3476
|
+
</xsl:when>
|
3477
|
+
<xsl:otherwise>
|
3478
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3479
|
+
</xsl:otherwise>
|
3480
|
+
</xsl:choose>
|
3481
|
+
|
3482
|
+
|
3483
|
+
|
3484
|
+
|
3485
|
+
|
3486
|
+
|
3487
|
+
|
3488
|
+
|
3489
|
+
</fo:bookmark-tree>
|
3490
|
+
</xsl:if>
|
3491
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3492
|
+
<xsl:param name="lang"/>
|
3493
|
+
<xsl:choose>
|
3494
|
+
<xsl:when test="$lang = 'en'">
|
3495
|
+
|
3496
|
+
|
3497
|
+
</xsl:when>
|
3498
|
+
<xsl:when test="$lang = 'fr'">
|
3499
|
+
|
3500
|
+
|
3501
|
+
</xsl:when>
|
3502
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3503
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3504
|
+
</xsl:choose>
|
3505
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3506
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3507
|
+
<fo:bookmark-title>
|
3508
|
+
<xsl:if test="@section != ''">
|
3509
|
+
<xsl:value-of select="@section"/>
|
3510
|
+
<xsl:text> </xsl:text>
|
3511
|
+
</xsl:if>
|
3512
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3513
|
+
</fo:bookmark-title>
|
3514
|
+
<xsl:apply-templates mode="bookmark"/>
|
3515
|
+
</fo:bookmark>
|
3516
|
+
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
2975
3517
|
<xsl:if test="normalize-space() != ''">
|
2976
3518
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2977
|
-
|
3519
|
+
|
2978
3520
|
<xsl:apply-templates/>
|
2979
3521
|
</fo:block>
|
2980
3522
|
</xsl:if>
|
@@ -3029,7 +3571,7 @@
|
|
3029
3571
|
<xsl:apply-templates/>
|
3030
3572
|
</xsl:otherwise>
|
3031
3573
|
</xsl:choose>
|
3032
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3574
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3033
3575
|
<xsl:text> </xsl:text>
|
3034
3576
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
3035
3577
|
<xsl:copy>
|
@@ -3038,21 +3580,61 @@
|
|
3038
3580
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3039
3581
|
<xsl:text> </xsl:text>
|
3040
3582
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3041
|
-
|
3042
|
-
|
3043
|
-
|
3044
|
-
|
3045
|
-
|
3583
|
+
|
3584
|
+
<fo:block-container margin-left="0mm">
|
3585
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3586
|
+
<xsl:attribute name="margin-left">
|
3587
|
+
<xsl:choose>
|
3588
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3589
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3590
|
+
</xsl:choose>
|
3591
|
+
</xsl:attribute>
|
3592
|
+
|
3593
|
+
</xsl:if>
|
3594
|
+
<fo:block-container margin-left="0mm">
|
3595
|
+
|
3596
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3597
|
+
<xsl:variable name="_font-size">
|
3598
|
+
|
3599
|
+
|
3600
|
+
|
3601
|
+
|
3602
|
+
|
3603
|
+
|
3604
|
+
|
3605
|
+
|
3606
|
+
|
3607
|
+
|
3608
|
+
|
3609
|
+
|
3610
|
+
|
3611
|
+
10
|
3612
|
+
</xsl:variable>
|
3613
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3614
|
+
<xsl:if test="$font-size != ''">
|
3615
|
+
<xsl:attribute name="font-size">
|
3616
|
+
<xsl:choose>
|
3617
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3618
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3619
|
+
</xsl:choose>
|
3620
|
+
</xsl:attribute>
|
3621
|
+
</xsl:if>
|
3622
|
+
<xsl:apply-templates/>
|
3623
|
+
</fo:block>
|
3624
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3625
|
+
|
3626
|
+
</fo:block-container>
|
3627
|
+
</fo:block-container>
|
3628
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
3046
3629
|
<xsl:variable name="text">
|
3047
3630
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
3048
3631
|
</xsl:variable>
|
3049
|
-
<xsl:call-template name="add-zero-spaces">
|
3632
|
+
<xsl:call-template name="add-zero-spaces-java">
|
3050
3633
|
<xsl:with-param name="text" select="$text"/>
|
3051
3634
|
</xsl:call-template>
|
3052
3635
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
3053
3636
|
<xsl:if test="normalize-space() != ''">
|
3054
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3055
|
-
|
3637
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3056
3638
|
<xsl:apply-templates/>
|
3057
3639
|
</fo:block>
|
3058
3640
|
</xsl:if>
|
@@ -3126,9 +3708,9 @@
|
|
3126
3708
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3127
3709
|
</xsl:if>
|
3128
3710
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3129
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black"
|
3711
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3130
3712
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3131
|
-
<xsl:attribute name="border">0.5pt solid black</xsl:attribute>
|
3713
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3132
3714
|
</xsl:if>
|
3133
3715
|
<xsl:variable name="simple-table">
|
3134
3716
|
<xsl:call-template name="getSimpleTable"/>
|
@@ -3137,8 +3719,8 @@
|
|
3137
3719
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3138
3720
|
<!-- <fo:table-column column-width="35mm"/>
|
3139
3721
|
<fo:table-column column-width="115mm"/> -->
|
3140
|
-
<fo:table-column column-width="
|
3141
|
-
<fo:table-column column-width="
|
3722
|
+
<fo:table-column column-width="30%"/>
|
3723
|
+
<fo:table-column column-width="70%"/>
|
3142
3724
|
</xsl:if>
|
3143
3725
|
<xsl:apply-templates mode="requirement"/>
|
3144
3726
|
</fo:table>
|
@@ -3161,14 +3743,21 @@
|
|
3161
3743
|
<xsl:apply-templates mode="requirement"/>
|
3162
3744
|
</fo:table-body>
|
3163
3745
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3164
|
-
<fo:table-row height="7mm">
|
3165
|
-
<xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])
|
3166
|
-
<xsl:attribute name="border">1pt solid black</xsl:attribute>
|
3746
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3747
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3748
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3749
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3750
|
+
</xsl:if>
|
3751
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3752
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3753
|
+
</xsl:if>
|
3754
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3755
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3167
3756
|
</xsl:if>
|
3168
3757
|
<xsl:apply-templates mode="requirement"/>
|
3169
3758
|
</fo:table-row>
|
3170
3759
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3171
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
3760
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3172
3761
|
<xsl:attribute name="text-align">
|
3173
3762
|
<xsl:choose>
|
3174
3763
|
<xsl:when test="@align">
|
@@ -3187,6 +3776,7 @@
|
|
3187
3776
|
<xsl:value-of select="@rowspan"/>
|
3188
3777
|
</xsl:attribute>
|
3189
3778
|
</xsl:if>
|
3779
|
+
<xsl:call-template name="display-align"/>
|
3190
3780
|
|
3191
3781
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3192
3782
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
@@ -3202,7 +3792,7 @@
|
|
3202
3792
|
</fo:block>
|
3203
3793
|
</fo:table-cell>
|
3204
3794
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3205
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
3795
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3206
3796
|
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3207
3797
|
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3208
3798
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -3215,6 +3805,9 @@
|
|
3215
3805
|
<xsl:otherwise>left</xsl:otherwise>
|
3216
3806
|
</xsl:choose>
|
3217
3807
|
</xsl:attribute>
|
3808
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3809
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3810
|
+
</xsl:if>
|
3218
3811
|
<xsl:if test="@colspan">
|
3219
3812
|
<xsl:attribute name="number-columns-spanned">
|
3220
3813
|
<xsl:value-of select="@colspan"/>
|
@@ -3225,6 +3818,7 @@
|
|
3225
3818
|
<xsl:value-of select="@rowspan"/>
|
3226
3819
|
</xsl:attribute>
|
3227
3820
|
</xsl:if>
|
3821
|
+
<xsl:call-template name="display-align"/>
|
3228
3822
|
|
3229
3823
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3230
3824
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
@@ -3240,7 +3834,7 @@
|
|
3240
3834
|
</fo:block>
|
3241
3835
|
</fo:table-cell>
|
3242
3836
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3243
|
-
<fo:block font-size="11pt" font-weight="bold"
|
3837
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3244
3838
|
<xsl:apply-templates/>
|
3245
3839
|
</fo:block>
|
3246
3840
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
@@ -3266,12 +3860,13 @@
|
|
3266
3860
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3267
3861
|
|
3268
3862
|
<xsl:variable name="element">
|
3269
|
-
block
|
3863
|
+
block
|
3270
3864
|
|
3865
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3271
3866
|
</xsl:variable>
|
3272
3867
|
|
3273
3868
|
<xsl:choose>
|
3274
|
-
<xsl:when test="normalize-space($element)
|
3869
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3275
3870
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
3276
3871
|
<xsl:apply-templates/>
|
3277
3872
|
</fo:block>
|
@@ -3308,30 +3903,49 @@
|
|
3308
3903
|
</xsl:otherwise>
|
3309
3904
|
</xsl:choose>
|
3310
3905
|
|
3311
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3312
|
-
|
3313
|
-
|
3314
|
-
|
3315
|
-
<xsl:if test="$num = 1">
|
3316
|
-
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3317
|
-
</xsl:if>
|
3906
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3907
|
+
|
3908
|
+
<xsl:variable name="element">
|
3909
|
+
block
|
3318
3910
|
|
3319
|
-
|
3320
|
-
|
3911
|
+
</xsl:variable>
|
3912
|
+
<xsl:choose>
|
3913
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3914
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3915
|
+
|
3916
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
3917
|
+
<xsl:if test="$num = 1">
|
3918
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3919
|
+
</xsl:if>
|
3920
|
+
|
3921
|
+
<xsl:apply-templates/>
|
3922
|
+
</fo:block>
|
3923
|
+
</xsl:when>
|
3924
|
+
<xsl:otherwise>
|
3925
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3926
|
+
<xsl:apply-templates/>
|
3927
|
+
</fo:inline>
|
3928
|
+
</xsl:otherwise>
|
3929
|
+
</xsl:choose>
|
3321
3930
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3322
3931
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3323
3932
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3324
3933
|
<xsl:variable name="termsource_text">
|
3325
3934
|
<xsl:apply-templates/>
|
3326
3935
|
</xsl:variable>
|
3936
|
+
|
3327
3937
|
<xsl:choose>
|
3328
3938
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3329
3939
|
<xsl:apply-templates/>
|
3330
3940
|
</xsl:when>
|
3331
|
-
<xsl:otherwise>
|
3332
|
-
|
3333
|
-
|
3334
|
-
|
3941
|
+
<xsl:otherwise>
|
3942
|
+
|
3943
|
+
<xsl:text>[</xsl:text>
|
3944
|
+
|
3945
|
+
<xsl:apply-templates/>
|
3946
|
+
|
3947
|
+
<xsl:text>]</xsl:text>
|
3948
|
+
|
3335
3949
|
</xsl:otherwise>
|
3336
3950
|
</xsl:choose>
|
3337
3951
|
</fo:block>
|
@@ -3352,18 +3966,29 @@
|
|
3352
3966
|
<xsl:if test="normalize-space() != ''">
|
3353
3967
|
<xsl:value-of select="."/>
|
3354
3968
|
</xsl:if>
|
3355
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3969
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3970
|
+
<fo:block-container margin-left="0mm">
|
3971
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3972
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
3973
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3974
|
+
</xsl:if>
|
3975
|
+
</xsl:if>
|
3976
|
+
|
3977
|
+
<fo:block-container margin-left="0mm">
|
3356
3978
|
|
3357
|
-
|
3358
|
-
|
3359
|
-
|
3360
|
-
|
3361
|
-
|
3362
|
-
|
3363
|
-
|
3364
|
-
|
3365
|
-
|
3366
|
-
|
3979
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
3980
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3981
|
+
</fo:block>
|
3982
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3983
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
3984
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
3985
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
3986
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
3987
|
+
</fo:block>
|
3988
|
+
</xsl:if>
|
3989
|
+
|
3990
|
+
</fo:block-container>
|
3991
|
+
</fo:block-container>
|
3367
3992
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3368
3993
|
<xsl:if test="../*[local-name() = 'author']">
|
3369
3994
|
<xsl:text>, </xsl:text>
|
@@ -3391,6 +4016,7 @@
|
|
3391
4016
|
<xsl:if test="@type = 'inline'">
|
3392
4017
|
|
3393
4018
|
|
4019
|
+
|
3394
4020
|
</xsl:if>
|
3395
4021
|
|
3396
4022
|
|
@@ -3421,6 +4047,7 @@
|
|
3421
4047
|
|
3422
4048
|
|
3423
4049
|
|
4050
|
+
|
3424
4051
|
<xsl:choose>
|
3425
4052
|
<xsl:when test="ancestor::un:annex and $depth >= 2">9.5</xsl:when>
|
3426
4053
|
<xsl:when test="ancestor::un:sections">9.5</xsl:when>
|
@@ -3474,9 +4101,12 @@
|
|
3474
4101
|
</fo:block>
|
3475
4102
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
3476
4103
|
<xsl:variable name="title-deprecated">
|
3477
|
-
|
3478
|
-
|
3479
|
-
|
4104
|
+
|
4105
|
+
|
4106
|
+
<xsl:call-template name="getTitle">
|
4107
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
4108
|
+
</xsl:call-template>
|
4109
|
+
|
3480
4110
|
</xsl:variable>
|
3481
4111
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
3482
4112
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -3525,6 +4155,7 @@
|
|
3525
4155
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3526
4156
|
<fo:block>
|
3527
4157
|
<xsl:call-template name="setId"/>
|
4158
|
+
|
3528
4159
|
<xsl:apply-templates/>
|
3529
4160
|
</fo:block>
|
3530
4161
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -3554,6 +4185,31 @@
|
|
3554
4185
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3555
4186
|
<!-- 0xA0 to space replacement -->
|
3556
4187
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4188
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4189
|
+
<xsl:choose>
|
4190
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
4191
|
+
<fo:block-container>
|
4192
|
+
<xsl:attribute name="margin-left">
|
4193
|
+
<xsl:choose>
|
4194
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4195
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4196
|
+
</xsl:choose>
|
4197
|
+
</xsl:attribute>
|
4198
|
+
|
4199
|
+
|
4200
|
+
<fo:block-container margin-left="0mm">
|
4201
|
+
<fo:block>
|
4202
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4203
|
+
</fo:block>
|
4204
|
+
</fo:block-container>
|
4205
|
+
</fo:block-container>
|
4206
|
+
</xsl:when>
|
4207
|
+
<xsl:otherwise>
|
4208
|
+
<fo:block>
|
4209
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4210
|
+
</fo:block>
|
4211
|
+
</xsl:otherwise>
|
4212
|
+
</xsl:choose>
|
3557
4213
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3558
4214
|
<!-- <row>
|
3559
4215
|
<date>05-07-2013</date>
|
@@ -3586,7 +4242,28 @@
|
|
3586
4242
|
<fo:block><xsl:apply-templates/></fo:block>
|
3587
4243
|
</fo:table-cell>
|
3588
4244
|
</xsl:template><xsl:template name="processBibitem">
|
4245
|
+
|
4246
|
+
|
3589
4247
|
|
4248
|
+
|
4249
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4250
|
+
<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')]"/>
|
4251
|
+
<xsl:choose>
|
4252
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4253
|
+
<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"/>
|
4254
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4255
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4256
|
+
</xsl:if>
|
4257
|
+
<xsl:value-of select="$_doc_ident"/>
|
4258
|
+
</xsl:when>
|
4259
|
+
<xsl:otherwise>
|
4260
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4261
|
+
<xsl:if test="$type != ''">
|
4262
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4263
|
+
</xsl:if>
|
4264
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4265
|
+
</xsl:otherwise>
|
4266
|
+
</xsl:choose>
|
3590
4267
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
3591
4268
|
<xsl:choose>
|
3592
4269
|
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
@@ -3705,6 +4382,7 @@
|
|
3705
4382
|
|
3706
4383
|
|
3707
4384
|
|
4385
|
+
|
3708
4386
|
|
3709
4387
|
</xsl:variable>
|
3710
4388
|
<xsl:choose>
|
@@ -3719,6 +4397,7 @@
|
|
3719
4397
|
<dc:creator>
|
3720
4398
|
|
3721
4399
|
|
4400
|
+
|
3722
4401
|
</dc:creator>
|
3723
4402
|
<dc:description>
|
3724
4403
|
<xsl:variable name="abstract">
|
@@ -3728,6 +4407,7 @@
|
|
3728
4407
|
<xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
3729
4408
|
|
3730
4409
|
|
4410
|
+
|
3731
4411
|
</xsl:variable>
|
3732
4412
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3733
4413
|
</dc:description>
|
@@ -3799,13 +4479,22 @@
|
|
3799
4479
|
</xsl:template><xsl:template name="split">
|
3800
4480
|
<xsl:param name="pText" select="."/>
|
3801
4481
|
<xsl:param name="sep" select="','"/>
|
4482
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
3802
4483
|
<xsl:if test="string-length($pText) >0">
|
3803
4484
|
<item>
|
3804
|
-
<xsl:
|
4485
|
+
<xsl:choose>
|
4486
|
+
<xsl:when test="$normalize-space = 'true'">
|
4487
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
4488
|
+
</xsl:when>
|
4489
|
+
<xsl:otherwise>
|
4490
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
4491
|
+
</xsl:otherwise>
|
4492
|
+
</xsl:choose>
|
3805
4493
|
</item>
|
3806
4494
|
<xsl:call-template name="split">
|
3807
4495
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
3808
4496
|
<xsl:with-param name="sep" select="$sep"/>
|
4497
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
3809
4498
|
</xsl:call-template>
|
3810
4499
|
</xsl:if>
|
3811
4500
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -3828,6 +4517,7 @@
|
|
3828
4517
|
|
3829
4518
|
|
3830
4519
|
|
4520
|
+
|
3831
4521
|
</xsl:variable>
|
3832
4522
|
<xsl:if test="$documentNS != $XSLNS">
|
3833
4523
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3853,4 +4543,40 @@
|
|
3853
4543
|
</xsl:otherwise>
|
3854
4544
|
</xsl:choose>
|
3855
4545
|
</xsl:attribute>
|
4546
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4547
|
+
<xsl:param name="text"/>
|
4548
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4549
|
+
<xsl:if test="string-length($text) > 0">
|
4550
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4551
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4552
|
+
<xsl:if test="$char = '®'">
|
4553
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4554
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4555
|
+
</xsl:if>
|
4556
|
+
<xsl:value-of select="$char"/>
|
4557
|
+
</fo:inline>
|
4558
|
+
<xsl:call-template name="add-letter-spacing">
|
4559
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4560
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4561
|
+
</xsl:call-template>
|
4562
|
+
</xsl:if>
|
4563
|
+
</xsl:template><xsl:template name="repeat">
|
4564
|
+
<xsl:param name="char" select="'*'"/>
|
4565
|
+
<xsl:param name="count"/>
|
4566
|
+
<xsl:if test="$count > 0">
|
4567
|
+
<xsl:value-of select="$char"/>
|
4568
|
+
<xsl:call-template name="repeat">
|
4569
|
+
<xsl:with-param name="char" select="$char"/>
|
4570
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
4571
|
+
</xsl:call-template>
|
4572
|
+
</xsl:if>
|
4573
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
4574
|
+
<xsl:param name="key"/>
|
4575
|
+
|
4576
|
+
<xsl:variable name="curr_lang">
|
4577
|
+
<xsl:call-template name="getLang"/>
|
4578
|
+
</xsl:variable>
|
4579
|
+
|
4580
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4581
|
+
|
3856
4582
|
</xsl:template></xsl:stylesheet>
|