metanorma-un 0.5.1 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +44 -0
- data/lib/asciidoctor/un/basicdoc.rng +23 -0
- data/lib/asciidoctor/un/boilerplate.xml +7 -5
- data/lib/asciidoctor/un/converter.rb +1 -1
- data/lib/asciidoctor/un/isodoc.rng +125 -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/html_convert.rb +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 +1050 -253
- data/lib/isodoc/un/un.plenary.xsl +1050 -253
- data/lib/isodoc/un/un.recommendation.xsl +969 -244
- data/lib/isodoc/un/word_convert.rb +1 -0
- data/lib/isodoc/un/xref.rb +1 -1
- 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
|
|
@@ -1074,7 +1120,12 @@
|
|
1074
1120
|
|
1075
1121
|
|
1076
1122
|
|
1077
|
-
<title-source lang="en">
|
1123
|
+
<title-source lang="en">
|
1124
|
+
|
1125
|
+
<xsl:text>SOURCE</xsl:text>
|
1126
|
+
|
1127
|
+
|
1128
|
+
</title-source>
|
1078
1129
|
|
1079
1130
|
<title-keywords lang="en">Keywords</title-keywords>
|
1080
1131
|
|
@@ -1117,12 +1168,25 @@
|
|
1117
1168
|
<title-warning lang="zh">警告</title-warning>
|
1118
1169
|
|
1119
1170
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1171
|
+
|
1172
|
+
<title-continued lang="en">(continued)</title-continued>
|
1173
|
+
<title-continued lang="fr">(continué)</title-continued>
|
1174
|
+
|
1120
1175
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1121
1176
|
<xsl:param name="name"/>
|
1122
|
-
<xsl:
|
1123
|
-
|
1177
|
+
<xsl:param name="lang"/>
|
1178
|
+
<xsl:variable name="lang_">
|
1179
|
+
<xsl:choose>
|
1180
|
+
<xsl:when test="$lang != ''">
|
1181
|
+
<xsl:value-of select="$lang"/>
|
1182
|
+
</xsl:when>
|
1183
|
+
<xsl:otherwise>
|
1184
|
+
<xsl:call-template name="getLang"/>
|
1185
|
+
</xsl:otherwise>
|
1186
|
+
</xsl:choose>
|
1124
1187
|
</xsl:variable>
|
1125
|
-
<xsl:variable name="
|
1188
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1189
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
1126
1190
|
<xsl:choose>
|
1127
1191
|
<xsl:when test="normalize-space($title_) != ''">
|
1128
1192
|
<xsl:value-of select="$title_"/>
|
@@ -1131,7 +1195,10 @@
|
|
1131
1195
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
1132
1196
|
</xsl:otherwise>
|
1133
1197
|
</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="
|
1198
|
+
</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">
|
1199
|
+
|
1200
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1201
|
+
|
1135
1202
|
|
1136
1203
|
|
1137
1204
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
@@ -1142,14 +1209,14 @@
|
|
1142
1209
|
|
1143
1210
|
|
1144
1211
|
|
1145
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1146
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1212
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1147
1213
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1148
1214
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1149
1215
|
|
1150
1216
|
|
1151
1217
|
|
1152
1218
|
|
1219
|
+
|
1153
1220
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1154
1221
|
|
1155
1222
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -1191,6 +1258,7 @@
|
|
1191
1258
|
|
1192
1259
|
|
1193
1260
|
|
1261
|
+
|
1194
1262
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1195
1263
|
|
1196
1264
|
|
@@ -1210,6 +1278,7 @@
|
|
1210
1278
|
|
1211
1279
|
|
1212
1280
|
|
1281
|
+
|
1213
1282
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1214
1283
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1215
1284
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -1262,6 +1331,7 @@
|
|
1262
1331
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
1263
1332
|
|
1264
1333
|
|
1334
|
+
|
1265
1335
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1266
1336
|
|
1267
1337
|
|
@@ -1272,11 +1342,13 @@
|
|
1272
1342
|
|
1273
1343
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1274
1344
|
|
1275
|
-
|
1345
|
+
|
1346
|
+
|
1276
1347
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1277
1348
|
|
1278
1349
|
|
1279
1350
|
|
1351
|
+
|
1280
1352
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1281
1353
|
|
1282
1354
|
|
@@ -1290,14 +1362,16 @@
|
|
1290
1362
|
|
1291
1363
|
|
1292
1364
|
|
1365
|
+
|
1293
1366
|
<xsl:attribute name="margin-top">3pt</xsl:attribute>
|
1294
1367
|
<xsl:attribute name="border-top">0.1mm solid black</xsl:attribute>
|
1295
1368
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1296
1369
|
|
1297
1370
|
|
1371
|
+
</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">
|
1372
|
+
|
1298
1373
|
|
1299
1374
|
|
1300
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1301
1375
|
|
1302
1376
|
|
1303
1377
|
|
@@ -1306,7 +1380,6 @@
|
|
1306
1380
|
|
1307
1381
|
|
1308
1382
|
|
1309
|
-
|
1310
1383
|
|
1311
1384
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1312
1385
|
|
@@ -1322,8 +1395,7 @@
|
|
1322
1395
|
|
1323
1396
|
<xsl:attribute name="margin-top">3pt</xsl:attribute>
|
1324
1397
|
<!-- <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>
|
1398
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1327
1399
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1328
1400
|
<xsl:attribute name="padding-top">1.5mm</xsl:attribute>
|
1329
1401
|
|
@@ -1337,6 +1409,8 @@
|
|
1337
1409
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1338
1410
|
|
1339
1411
|
|
1412
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1413
|
+
|
1340
1414
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1341
1415
|
|
1342
1416
|
|
@@ -1357,6 +1431,7 @@
|
|
1357
1431
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1358
1432
|
|
1359
1433
|
|
1434
|
+
|
1360
1435
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1361
1436
|
|
1362
1437
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1375,6 +1450,7 @@
|
|
1375
1450
|
|
1376
1451
|
|
1377
1452
|
|
1453
|
+
|
1378
1454
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1379
1455
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
1380
1456
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -1409,11 +1485,14 @@
|
|
1409
1485
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1410
1486
|
|
1411
1487
|
|
1488
|
+
|
1412
1489
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1413
1490
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1414
1491
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1415
1492
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1416
1493
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1494
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1495
|
+
|
1417
1496
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1418
1497
|
|
1419
1498
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -1477,6 +1556,10 @@
|
|
1477
1556
|
|
1478
1557
|
|
1479
1558
|
|
1559
|
+
|
1560
|
+
|
1561
|
+
<!-- $namespace = 'iso' or -->
|
1562
|
+
|
1480
1563
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1481
1564
|
|
1482
1565
|
|
@@ -1512,6 +1595,7 @@
|
|
1512
1595
|
<xsl:with-param name="table" select="$simple-table"/>
|
1513
1596
|
</xsl:call-template>
|
1514
1597
|
</xsl:variable>
|
1598
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1515
1599
|
|
1516
1600
|
<!-- <xsl:variable name="colwidths2">
|
1517
1601
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1533,35 +1617,59 @@
|
|
1533
1617
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1534
1618
|
|
1535
1619
|
|
1620
|
+
|
1536
1621
|
|
1537
1622
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1623
|
+
<xsl:if test="not(ancestor::*[local-name()='sections'])">
|
1624
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1625
|
+
</xsl:if>
|
1626
|
+
|
1627
|
+
|
1538
1628
|
|
1539
1629
|
|
1630
|
+
|
1540
1631
|
|
1541
1632
|
|
1542
1633
|
|
1543
1634
|
|
1544
1635
|
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1636
|
+
|
1637
|
+
|
1638
|
+
<xsl:variable name="table_attributes">
|
1639
|
+
<attribute name="table-layout">fixed</attribute>
|
1640
|
+
<attribute name="width">100%</attribute>
|
1641
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1642
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1548
1643
|
|
1549
1644
|
|
1550
1645
|
|
1551
1646
|
|
1647
|
+
|
1552
1648
|
|
1553
1649
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
1554
|
-
<
|
1555
|
-
<
|
1556
|
-
</xsl:if>
|
1557
|
-
|
1558
|
-
|
1559
|
-
</xsl:if>
|
1560
|
-
|
1650
|
+
<attribute name="border-top">1.5pt solid black</attribute>
|
1651
|
+
<attribute name="border-bottom">1.5pt solid black</attribute>
|
1652
|
+
</xsl:if>
|
1653
|
+
|
1654
|
+
|
1561
1655
|
|
1656
|
+
|
1562
1657
|
|
1658
|
+
</xsl:variable>
|
1659
|
+
|
1660
|
+
|
1661
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1563
1662
|
|
1663
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1664
|
+
<xsl:attribute name="{@name}">
|
1665
|
+
<xsl:value-of select="."/>
|
1666
|
+
</xsl:attribute>
|
1667
|
+
</xsl:for-each>
|
1564
1668
|
|
1669
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1670
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1671
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1672
|
+
</xsl:if>
|
1565
1673
|
|
1566
1674
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1567
1675
|
<xsl:choose>
|
@@ -1585,6 +1693,33 @@
|
|
1585
1693
|
|
1586
1694
|
</fo:table>
|
1587
1695
|
|
1696
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1697
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1698
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1699
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1700
|
+
</xsl:call-template>
|
1701
|
+
</xsl:for-each>
|
1702
|
+
|
1703
|
+
<!-- insert footer as table -->
|
1704
|
+
<!-- <fo:table>
|
1705
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1706
|
+
<xsl:attribute name="{@name}">
|
1707
|
+
<xsl:value-of select="."/>
|
1708
|
+
</xsl:attribute>
|
1709
|
+
</xsl:for-each>
|
1710
|
+
|
1711
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1712
|
+
<xsl:choose>
|
1713
|
+
<xsl:when test=". = 1 or . = 0">
|
1714
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1715
|
+
</xsl:when>
|
1716
|
+
<xsl:otherwise>
|
1717
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1718
|
+
</xsl:otherwise>
|
1719
|
+
</xsl:choose>
|
1720
|
+
</xsl:for-each>
|
1721
|
+
</fo:table>-->
|
1722
|
+
|
1588
1723
|
|
1589
1724
|
|
1590
1725
|
|
@@ -1593,8 +1728,9 @@
|
|
1593
1728
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1594
1729
|
<xsl:if test="normalize-space() != ''">
|
1595
1730
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1596
|
-
|
1597
|
-
|
1731
|
+
|
1732
|
+
<xsl:apply-templates/>
|
1733
|
+
</fo:block>
|
1598
1734
|
</xsl:if>
|
1599
1735
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1600
1736
|
<xsl:param name="table-row"/>
|
@@ -1648,6 +1784,13 @@
|
|
1648
1784
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1649
1785
|
<xsl:variable name="td_text">
|
1650
1786
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1787
|
+
|
1788
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1789
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1790
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1791
|
+
</xsl:for-each>
|
1792
|
+
</xsl:if> -->
|
1793
|
+
|
1651
1794
|
</xsl:variable>
|
1652
1795
|
<xsl:variable name="words">
|
1653
1796
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1707,13 +1850,31 @@
|
|
1707
1850
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1708
1851
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1709
1852
|
<xsl:value-of select="@target"/>
|
1853
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1854
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1855
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1710
1856
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1711
1857
|
<xsl:param name="cols-count"/>
|
1712
1858
|
<!-- font-weight="bold" -->
|
1713
|
-
<fo:table-header>
|
1859
|
+
<fo:table-header>
|
1714
1860
|
|
1715
1861
|
<xsl:apply-templates/>
|
1716
1862
|
</fo:table-header>
|
1863
|
+
</xsl:template><xsl:template name="table-header-title">
|
1864
|
+
<xsl:param name="cols-count"/>
|
1865
|
+
<!-- row for title -->
|
1866
|
+
<fo:table-row>
|
1867
|
+
<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">
|
1868
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1869
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1870
|
+
<xsl:call-template name="fn_name_display"/>
|
1871
|
+
</xsl:for-each>
|
1872
|
+
<fo:block text-align="right" font-style="italic">
|
1873
|
+
<xsl:text> </xsl:text>
|
1874
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1875
|
+
</fo:block>
|
1876
|
+
</fo:table-cell>
|
1877
|
+
</fo:table-row>
|
1717
1878
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1718
1879
|
<fo:table-body>
|
1719
1880
|
<xsl:apply-templates/>
|
@@ -1721,6 +1882,13 @@
|
|
1721
1882
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1722
1883
|
<xsl:apply-templates/>
|
1723
1884
|
</xsl:template><xsl:template name="insertTableFooter">
|
1885
|
+
<xsl:param name="cols-count"/>
|
1886
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1887
|
+
<fo:table-footer>
|
1888
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1889
|
+
</fo:table-footer>
|
1890
|
+
</xsl:if>
|
1891
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1724
1892
|
<xsl:param name="cols-count"/>
|
1725
1893
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1726
1894
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1742,11 +1910,29 @@
|
|
1742
1910
|
<!-- fn will be processed inside 'note' processing -->
|
1743
1911
|
|
1744
1912
|
|
1913
|
+
|
1914
|
+
|
1915
|
+
|
1916
|
+
|
1745
1917
|
<!-- except gb -->
|
1746
1918
|
|
1747
1919
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1748
1920
|
|
1749
1921
|
|
1922
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
1923
|
+
<!-- empty, because notes show at page side in main sections -->
|
1924
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1925
|
+
<xsl:choose>
|
1926
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1927
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1928
|
+
</xsl:when>
|
1929
|
+
<xsl:otherwise>
|
1930
|
+
<fo:block/>
|
1931
|
+
</xsl:otherwise>
|
1932
|
+
</xsl:choose>
|
1933
|
+
</xsl:if> -->
|
1934
|
+
|
1935
|
+
|
1750
1936
|
<!-- horizontal row separator -->
|
1751
1937
|
|
1752
1938
|
|
@@ -1760,6 +1946,88 @@
|
|
1760
1946
|
</fo:table-footer>
|
1761
1947
|
|
1762
1948
|
</xsl:if>
|
1949
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
1950
|
+
<xsl:param name="table_attributes"/>
|
1951
|
+
<xsl:param name="colwidths"/>
|
1952
|
+
|
1953
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1954
|
+
|
1955
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1956
|
+
|
1957
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
1958
|
+
|
1959
|
+
<fo:table keep-with-previous="always">
|
1960
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1961
|
+
<xsl:choose>
|
1962
|
+
<xsl:when test="@name = 'border-top'">
|
1963
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
1964
|
+
</xsl:when>
|
1965
|
+
<xsl:when test="@name = 'border'">
|
1966
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1967
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
1968
|
+
</xsl:when>
|
1969
|
+
<xsl:otherwise>
|
1970
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1971
|
+
</xsl:otherwise>
|
1972
|
+
</xsl:choose>
|
1973
|
+
</xsl:for-each>
|
1974
|
+
|
1975
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1976
|
+
<xsl:choose>
|
1977
|
+
<xsl:when test=". = 1 or . = 0">
|
1978
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1979
|
+
</xsl:when>
|
1980
|
+
<xsl:otherwise>
|
1981
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1982
|
+
</xsl:otherwise>
|
1983
|
+
</xsl:choose>
|
1984
|
+
</xsl:for-each>
|
1985
|
+
|
1986
|
+
<fo:table-body>
|
1987
|
+
<fo:table-row>
|
1988
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
1989
|
+
|
1990
|
+
|
1991
|
+
|
1992
|
+
<!-- fn will be processed inside 'note' processing -->
|
1993
|
+
|
1994
|
+
|
1995
|
+
|
1996
|
+
|
1997
|
+
|
1998
|
+
|
1999
|
+
|
2000
|
+
<!-- except gb -->
|
2001
|
+
|
2002
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2003
|
+
|
2004
|
+
|
2005
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2006
|
+
<xsl:choose>
|
2007
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2008
|
+
show Note under table in preface (ex. abstract) sections
|
2009
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2010
|
+
</xsl:when>
|
2011
|
+
<xsl:otherwise>
|
2012
|
+
empty, because notes show at page side in main sections
|
2013
|
+
<fo:block/>
|
2014
|
+
</xsl:otherwise>
|
2015
|
+
</xsl:choose>
|
2016
|
+
</xsl:if> -->
|
2017
|
+
|
2018
|
+
|
2019
|
+
<!-- horizontal row separator -->
|
2020
|
+
|
2021
|
+
|
2022
|
+
<!-- fn processing -->
|
2023
|
+
<xsl:call-template name="fn_display"/>
|
2024
|
+
|
2025
|
+
</fo:table-cell>
|
2026
|
+
</fo:table-row>
|
2027
|
+
</fo:table-body>
|
2028
|
+
|
2029
|
+
</fo:table>
|
2030
|
+
</xsl:if>
|
1763
2031
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1764
2032
|
|
1765
2033
|
<xsl:variable name="cols-count">
|
@@ -1777,6 +2045,8 @@
|
|
1777
2045
|
</xsl:choose>
|
1778
2046
|
</xsl:variable>
|
1779
2047
|
|
2048
|
+
|
2049
|
+
|
1780
2050
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1781
2051
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1782
2052
|
</xsl:apply-templates>
|
@@ -1786,6 +2056,8 @@
|
|
1786
2056
|
</xsl:call-template>
|
1787
2057
|
|
1788
2058
|
<fo:table-body>
|
2059
|
+
|
2060
|
+
|
1789
2061
|
<xsl:apply-templates/>
|
1790
2062
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1791
2063
|
|
@@ -1809,6 +2081,11 @@
|
|
1809
2081
|
</xsl:if>
|
1810
2082
|
|
1811
2083
|
|
2084
|
+
|
2085
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2086
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
2087
|
+
</xsl:if> -->
|
2088
|
+
|
1812
2089
|
<xsl:apply-templates/>
|
1813
2090
|
</fo:table-row>
|
1814
2091
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -1827,6 +2104,7 @@
|
|
1827
2104
|
|
1828
2105
|
|
1829
2106
|
|
2107
|
+
|
1830
2108
|
|
1831
2109
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
1832
2110
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
@@ -1846,6 +2124,7 @@
|
|
1846
2124
|
|
1847
2125
|
|
1848
2126
|
|
2127
|
+
|
1849
2128
|
<xsl:if test="@colspan">
|
1850
2129
|
<xsl:attribute name="number-columns-spanned">
|
1851
2130
|
<xsl:value-of select="@colspan"/>
|
@@ -1856,10 +2135,22 @@
|
|
1856
2135
|
<xsl:value-of select="@rowspan"/>
|
1857
2136
|
</xsl:attribute>
|
1858
2137
|
</xsl:if>
|
2138
|
+
<xsl:call-template name="display-align"/>
|
1859
2139
|
<fo:block>
|
1860
2140
|
<xsl:apply-templates/>
|
1861
2141
|
</fo:block>
|
1862
2142
|
</fo:table-cell>
|
2143
|
+
</xsl:template><xsl:template name="display-align">
|
2144
|
+
<xsl:if test="@valign">
|
2145
|
+
<xsl:attribute name="display-align">
|
2146
|
+
<xsl:choose>
|
2147
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2148
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2149
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2150
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2151
|
+
</xsl:choose>
|
2152
|
+
</xsl:attribute>
|
2153
|
+
</xsl:if>
|
1863
2154
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
1864
2155
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
1865
2156
|
<xsl:attribute name="text-align">
|
@@ -1873,7 +2164,8 @@
|
|
1873
2164
|
|
1874
2165
|
|
1875
2166
|
|
1876
|
-
|
2167
|
+
|
2168
|
+
|
1877
2169
|
|
1878
2170
|
|
1879
2171
|
|
@@ -1885,6 +2177,7 @@
|
|
1885
2177
|
|
1886
2178
|
|
1887
2179
|
|
2180
|
+
|
1888
2181
|
<xsl:if test="@colspan">
|
1889
2182
|
<xsl:attribute name="number-columns-spanned">
|
1890
2183
|
<xsl:value-of select="@colspan"/>
|
@@ -1895,8 +2188,8 @@
|
|
1895
2188
|
<xsl:value-of select="@rowspan"/>
|
1896
2189
|
</xsl:attribute>
|
1897
2190
|
</xsl:if>
|
1898
|
-
<
|
1899
|
-
|
2191
|
+
<xsl:call-template name="display-align"/>
|
2192
|
+
<fo:block>
|
1900
2193
|
<xsl:apply-templates/>
|
1901
2194
|
</fo:block>
|
1902
2195
|
</fo:table-cell>
|
@@ -1908,6 +2201,8 @@
|
|
1908
2201
|
|
1909
2202
|
|
1910
2203
|
|
2204
|
+
|
2205
|
+
|
1911
2206
|
<fo:inline padding-right="2mm">
|
1912
2207
|
|
1913
2208
|
|
@@ -1922,10 +2217,11 @@
|
|
1922
2217
|
</fo:inline> -->
|
1923
2218
|
</xsl:if>
|
1924
2219
|
|
1925
|
-
|
2220
|
+
|
1926
2221
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
1927
2222
|
|
1928
2223
|
</fo:inline>
|
2224
|
+
|
1929
2225
|
<xsl:apply-templates mode="process"/>
|
1930
2226
|
</fo:block>
|
1931
2227
|
|
@@ -1949,6 +2245,7 @@
|
|
1949
2245
|
|
1950
2246
|
|
1951
2247
|
|
2248
|
+
|
1952
2249
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
1953
2250
|
|
1954
2251
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -1958,12 +2255,15 @@
|
|
1958
2255
|
|
1959
2256
|
|
1960
2257
|
|
2258
|
+
|
1961
2259
|
<xsl:value-of select="@reference"/>
|
1962
2260
|
|
2261
|
+
|
1963
2262
|
</fo:inline>
|
1964
2263
|
<fo:inline>
|
1965
2264
|
|
1966
|
-
<xsl:apply-templates/>
|
2265
|
+
<!-- <xsl:apply-templates /> -->
|
2266
|
+
<xsl:copy-of select="./node()"/>
|
1967
2267
|
</fo:inline>
|
1968
2268
|
</fo:block>
|
1969
2269
|
</xsl:if>
|
@@ -2000,7 +2300,20 @@
|
|
2000
2300
|
<xsl:variable name="following_dl_colwidths">
|
2001
2301
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
2002
2302
|
<xsl:variable name="html-table">
|
2003
|
-
<xsl:variable name="
|
2303
|
+
<xsl:variable name="doc_ns">
|
2304
|
+
|
2305
|
+
</xsl:variable>
|
2306
|
+
<xsl:variable name="ns">
|
2307
|
+
<xsl:choose>
|
2308
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2309
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2310
|
+
</xsl:when>
|
2311
|
+
<xsl:otherwise>
|
2312
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2313
|
+
</xsl:otherwise>
|
2314
|
+
</xsl:choose>
|
2315
|
+
</xsl:variable>
|
2316
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2004
2317
|
<xsl:element name="{$ns}:table">
|
2005
2318
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2006
2319
|
<tbody>
|
@@ -2065,7 +2378,8 @@
|
|
2065
2378
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2066
2379
|
</xsl:if>
|
2067
2380
|
|
2068
|
-
<xsl:apply-templates/>
|
2381
|
+
<!-- <xsl:apply-templates /> -->
|
2382
|
+
<xsl:copy-of select="./node()"/>
|
2069
2383
|
</fo:block>
|
2070
2384
|
</fo:table-cell>
|
2071
2385
|
</fo:table-row>
|
@@ -2083,9 +2397,13 @@
|
|
2083
2397
|
|
2084
2398
|
|
2085
2399
|
|
2400
|
+
|
2401
|
+
|
2086
2402
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2087
2403
|
|
2404
|
+
|
2088
2405
|
<xsl:value-of select="@reference"/>
|
2406
|
+
|
2089
2407
|
</fo:basic-link>
|
2090
2408
|
</fo:inline>
|
2091
2409
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -2093,115 +2411,142 @@
|
|
2093
2411
|
<xsl:apply-templates/>
|
2094
2412
|
</fo:inline>
|
2095
2413
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2096
|
-
<
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2106
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
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>
|
2118
|
-
|
2119
|
-
</xsl:when>
|
2120
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
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>
|
2414
|
+
<fo:block-container margin-left="0mm">
|
2415
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2416
|
+
<xsl:attribute name="margin-left">
|
2417
|
+
<xsl:choose>
|
2418
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2419
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2420
|
+
</xsl:choose>
|
2421
|
+
</xsl:attribute>
|
2152
2422
|
|
2423
|
+
</xsl:if>
|
2424
|
+
<fo:block-container margin-left="0mm">
|
2425
|
+
|
2426
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
2153
2427
|
|
2428
|
+
<xsl:variable name="key_iso">
|
2429
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2430
|
+
</xsl:variable>
|
2154
2431
|
|
2432
|
+
<xsl:choose>
|
2433
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2434
|
+
|
2435
|
+
|
2436
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2437
|
+
|
2438
|
+
<xsl:variable name="title-where">
|
2439
|
+
<xsl:call-template name="getTitle">
|
2440
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2441
|
+
</xsl:call-template>
|
2442
|
+
</xsl:variable>
|
2443
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2444
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2445
|
+
<xsl:text/>
|
2446
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2447
|
+
</fo:block>
|
2448
|
+
|
2449
|
+
</xsl:when>
|
2450
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2451
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2452
|
+
|
2453
|
+
|
2454
|
+
|
2455
|
+
|
2456
|
+
<xsl:variable name="title-where">
|
2457
|
+
<xsl:call-template name="getTitle">
|
2458
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2459
|
+
</xsl:call-template>
|
2460
|
+
</xsl:variable>
|
2461
|
+
<xsl:value-of select="$title-where"/>
|
2462
|
+
</fo:block>
|
2463
|
+
</xsl:when>
|
2464
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2465
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2466
|
+
|
2467
|
+
|
2468
|
+
|
2469
|
+
<xsl:variable name="title-key">
|
2470
|
+
<xsl:call-template name="getTitle">
|
2471
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2472
|
+
</xsl:call-template>
|
2473
|
+
</xsl:variable>
|
2474
|
+
<xsl:value-of select="$title-key"/>
|
2475
|
+
</fo:block>
|
2476
|
+
</xsl:when>
|
2477
|
+
</xsl:choose>
|
2155
2478
|
|
2156
|
-
|
2157
|
-
|
2158
|
-
|
2159
|
-
|
2160
|
-
|
2161
|
-
<fo:table width="95%" table-layout="fixed">
|
2479
|
+
<!-- a few components -->
|
2480
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2481
|
+
<fo:block>
|
2162
2482
|
|
2163
|
-
|
2164
|
-
|
2165
|
-
|
2166
|
-
|
2167
|
-
|
2168
|
-
|
2483
|
+
|
2484
|
+
|
2485
|
+
|
2486
|
+
<fo:block>
|
2487
|
+
|
2488
|
+
|
2489
|
+
|
2490
|
+
|
2491
|
+
<fo:table width="95%" table-layout="fixed">
|
2169
2492
|
|
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
|
-
|
2201
|
-
|
2202
|
-
|
2203
|
-
|
2204
|
-
|
2493
|
+
<xsl:choose>
|
2494
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2495
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2496
|
+
</xsl:when>
|
2497
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2498
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2499
|
+
|
2500
|
+
</xsl:when>
|
2501
|
+
</xsl:choose>
|
2502
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2503
|
+
<xsl:variable name="html-table">
|
2504
|
+
<xsl:variable name="doc_ns">
|
2505
|
+
|
2506
|
+
</xsl:variable>
|
2507
|
+
<xsl:variable name="ns">
|
2508
|
+
<xsl:choose>
|
2509
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2510
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2511
|
+
</xsl:when>
|
2512
|
+
<xsl:otherwise>
|
2513
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2514
|
+
</xsl:otherwise>
|
2515
|
+
</xsl:choose>
|
2516
|
+
</xsl:variable>
|
2517
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2518
|
+
<xsl:element name="{$ns}:table">
|
2519
|
+
<tbody>
|
2520
|
+
<xsl:apply-templates mode="dl"/>
|
2521
|
+
</tbody>
|
2522
|
+
</xsl:element>
|
2523
|
+
</xsl:variable>
|
2524
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2525
|
+
<xsl:variable name="colwidths">
|
2526
|
+
<xsl:call-template name="calculate-column-widths">
|
2527
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2528
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2529
|
+
</xsl:call-template>
|
2530
|
+
</xsl:variable>
|
2531
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2532
|
+
<xsl:variable name="maxlength_dt">
|
2533
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2534
|
+
</xsl:variable>
|
2535
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2536
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2537
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2538
|
+
</xsl:call-template>
|
2539
|
+
<fo:table-body>
|
2540
|
+
<xsl:apply-templates>
|
2541
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2542
|
+
</xsl:apply-templates>
|
2543
|
+
</fo:table-body>
|
2544
|
+
</fo:table>
|
2545
|
+
</fo:block>
|
2546
|
+
</fo:block>
|
2547
|
+
</xsl:if>
|
2548
|
+
</fo:block-container>
|
2549
|
+
</fo:block-container>
|
2205
2550
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
2206
2551
|
<xsl:param name="colwidths"/>
|
2207
2552
|
<xsl:param name="maxlength_dt"/>
|
@@ -2298,6 +2643,7 @@
|
|
2298
2643
|
<xsl:param name="key_iso"/>
|
2299
2644
|
|
2300
2645
|
<fo:table-row>
|
2646
|
+
|
2301
2647
|
<fo:table-cell>
|
2302
2648
|
|
2303
2649
|
<fo:block margin-top="6pt">
|
@@ -2312,6 +2658,7 @@
|
|
2312
2658
|
|
2313
2659
|
|
2314
2660
|
|
2661
|
+
|
2315
2662
|
<xsl:apply-templates/>
|
2316
2663
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2317
2664
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2323,14 +2670,36 @@
|
|
2323
2670
|
<fo:table-cell>
|
2324
2671
|
<fo:block>
|
2325
2672
|
|
2326
|
-
|
2673
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2674
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
2675
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2676
|
+
</xsl:if>
|
2677
|
+
</xsl:if> -->
|
2327
2678
|
|
2328
2679
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2329
2680
|
|
2330
2681
|
</fo:block>
|
2331
2682
|
</fo:table-cell>
|
2332
2683
|
</fo:table-row>
|
2333
|
-
|
2684
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2685
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
2686
|
+
<fo:table-row>
|
2687
|
+
<fo:table-cell>
|
2688
|
+
<fo:block margin-top="6pt">
|
2689
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2690
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2691
|
+
</xsl:if>
|
2692
|
+
<xsl:text> </xsl:text>
|
2693
|
+
</fo:block>
|
2694
|
+
</fo:table-cell>
|
2695
|
+
<fo:table-cell>
|
2696
|
+
<fo:block>
|
2697
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2698
|
+
</fo:block>
|
2699
|
+
</fo:table-cell>
|
2700
|
+
</fo:table-row>
|
2701
|
+
</xsl:if>
|
2702
|
+
</xsl:if> -->
|
2334
2703
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2335
2704
|
<xsl:apply-templates/>
|
2336
2705
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -2355,6 +2724,31 @@
|
|
2355
2724
|
</fo:inline>
|
2356
2725
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2357
2726
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2727
|
+
<xsl:variable name="_font-size">
|
2728
|
+
|
2729
|
+
|
2730
|
+
|
2731
|
+
|
2732
|
+
|
2733
|
+
|
2734
|
+
|
2735
|
+
|
2736
|
+
|
2737
|
+
|
2738
|
+
|
2739
|
+
|
2740
|
+
|
2741
|
+
|
2742
|
+
</xsl:variable>
|
2743
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2744
|
+
<xsl:if test="$font-size != ''">
|
2745
|
+
<xsl:attribute name="font-size">
|
2746
|
+
<xsl:choose>
|
2747
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2748
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2749
|
+
</xsl:choose>
|
2750
|
+
</xsl:attribute>
|
2751
|
+
</xsl:if>
|
2358
2752
|
<xsl:apply-templates/>
|
2359
2753
|
</fo:inline>
|
2360
2754
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2680,11 +3074,24 @@
|
|
2680
3074
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2681
3075
|
<xsl:value-of select="substring($str, 2)"/>
|
2682
3076
|
</xsl:template><xsl:template match="mathml:math">
|
2683
|
-
<fo:inline font-family="
|
2684
|
-
<
|
2685
|
-
<xsl:
|
2686
|
-
</
|
3077
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3078
|
+
<xsl:variable name="mathml">
|
3079
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
3080
|
+
</xsl:variable>
|
3081
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
3082
|
+
<!-- <xsl:copy-of select="."/> -->
|
3083
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3084
|
+
</fo:instream-foreign-object>
|
2687
3085
|
</fo:inline>
|
3086
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3087
|
+
<xsl:copy>
|
3088
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3089
|
+
</xsl:copy>
|
3090
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
3091
|
+
<xsl:copy>
|
3092
|
+
<!-- replace start and end spaces to non-break space -->
|
3093
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3094
|
+
</xsl:copy>
|
2688
3095
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2689
3096
|
<xsl:variable name="target">
|
2690
3097
|
<xsl:choose>
|
@@ -2761,13 +3168,26 @@
|
|
2761
3168
|
<xsl:apply-templates/>
|
2762
3169
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2763
3170
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2764
|
-
|
3171
|
+
|
2765
3172
|
<xsl:apply-templates/>
|
2766
3173
|
</fo:basic-link>
|
2767
3174
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2768
|
-
<fo:block
|
2769
|
-
<xsl:
|
2770
|
-
|
3175
|
+
<fo:block-container margin-left="0mm">
|
3176
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3177
|
+
<xsl:attribute name="margin-left">
|
3178
|
+
<xsl:choose>
|
3179
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3180
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3181
|
+
</xsl:choose>
|
3182
|
+
</xsl:attribute>
|
3183
|
+
|
3184
|
+
</xsl:if>
|
3185
|
+
<fo:block-container margin-left="0mm">
|
3186
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3187
|
+
<xsl:apply-templates/>
|
3188
|
+
</fo:block>
|
3189
|
+
</fo:block-container>
|
3190
|
+
</fo:block-container>
|
2771
3191
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2772
3192
|
<fo:inline>
|
2773
3193
|
<xsl:apply-templates/>
|
@@ -2814,6 +3234,8 @@
|
|
2814
3234
|
|
2815
3235
|
|
2816
3236
|
|
3237
|
+
|
3238
|
+
|
2817
3239
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
2818
3240
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2819
3241
|
</fo:inline>
|
@@ -2840,7 +3262,9 @@
|
|
2840
3262
|
</xsl:choose>
|
2841
3263
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2842
3264
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2843
|
-
<xsl:
|
3265
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3266
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3267
|
+
</fo:inline>
|
2844
3268
|
<xsl:apply-templates/>
|
2845
3269
|
</fo:block>
|
2846
3270
|
</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">
|
@@ -2944,15 +3368,109 @@
|
|
2944
3368
|
|
2945
3369
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2946
3370
|
</fo:block>
|
2947
|
-
</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">
|
3371
|
+
</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">
|
2948
3372
|
<xsl:apply-templates mode="contents"/>
|
2949
3373
|
<xsl:text> </xsl:text>
|
2950
|
-
</xsl:template><xsl:template match="
|
3374
|
+
</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">
|
3375
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3376
|
+
<xsl:text> </xsl:text>
|
3377
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3378
|
+
<xsl:value-of select="."/>
|
3379
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
2951
3380
|
<xsl:value-of select="."/>
|
2952
|
-
</xsl:template><xsl:template match="
|
3381
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3382
|
+
<xsl:apply-templates mode="contents"/>
|
3383
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3384
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3385
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3386
|
+
<xsl:apply-templates select="."/>
|
3387
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3388
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3389
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3390
|
+
<xsl:param name="contents"/>
|
3391
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3392
|
+
<fo:bookmark-tree>
|
3393
|
+
<xsl:choose>
|
3394
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3395
|
+
<xsl:choose>
|
3396
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3397
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3398
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3399
|
+
<fo:bookmark-title>
|
3400
|
+
<xsl:variable name="bookmark-title_">
|
3401
|
+
<xsl:call-template name="getLangVersion">
|
3402
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3403
|
+
</xsl:call-template>
|
3404
|
+
</xsl:variable>
|
3405
|
+
<xsl:choose>
|
3406
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3407
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3408
|
+
</xsl:when>
|
3409
|
+
<xsl:otherwise>
|
3410
|
+
<xsl:choose>
|
3411
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3412
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3413
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3414
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3415
|
+
</xsl:choose>
|
3416
|
+
</xsl:otherwise>
|
3417
|
+
</xsl:choose>
|
3418
|
+
</fo:bookmark-title>
|
3419
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3420
|
+
</fo:bookmark>
|
3421
|
+
|
3422
|
+
</xsl:for-each>
|
3423
|
+
</xsl:when>
|
3424
|
+
<xsl:otherwise>
|
3425
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3426
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3427
|
+
</xsl:for-each>
|
3428
|
+
</xsl:otherwise>
|
3429
|
+
</xsl:choose>
|
3430
|
+
</xsl:when>
|
3431
|
+
<xsl:otherwise>
|
3432
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3433
|
+
</xsl:otherwise>
|
3434
|
+
</xsl:choose>
|
3435
|
+
|
3436
|
+
|
3437
|
+
|
3438
|
+
|
3439
|
+
|
3440
|
+
|
3441
|
+
|
3442
|
+
|
3443
|
+
</fo:bookmark-tree>
|
3444
|
+
</xsl:if>
|
3445
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3446
|
+
<xsl:param name="lang"/>
|
3447
|
+
<xsl:choose>
|
3448
|
+
<xsl:when test="$lang = 'en'">
|
3449
|
+
|
3450
|
+
|
3451
|
+
</xsl:when>
|
3452
|
+
<xsl:when test="$lang = 'fr'">
|
3453
|
+
|
3454
|
+
|
3455
|
+
</xsl:when>
|
3456
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3457
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3458
|
+
</xsl:choose>
|
3459
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3460
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3461
|
+
<fo:bookmark-title>
|
3462
|
+
<xsl:if test="@section != ''">
|
3463
|
+
<xsl:value-of select="@section"/>
|
3464
|
+
<xsl:text> </xsl:text>
|
3465
|
+
</xsl:if>
|
3466
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3467
|
+
</fo:bookmark-title>
|
3468
|
+
<xsl:apply-templates mode="bookmark"/>
|
3469
|
+
</fo:bookmark>
|
3470
|
+
</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">
|
2953
3471
|
<xsl:if test="normalize-space() != ''">
|
2954
3472
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2955
|
-
|
3473
|
+
|
2956
3474
|
<xsl:apply-templates/>
|
2957
3475
|
</fo:block>
|
2958
3476
|
</xsl:if>
|
@@ -3007,7 +3525,7 @@
|
|
3007
3525
|
<xsl:apply-templates/>
|
3008
3526
|
</xsl:otherwise>
|
3009
3527
|
</xsl:choose>
|
3010
|
-
</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">
|
3528
|
+
</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">
|
3011
3529
|
<xsl:text> </xsl:text>
|
3012
3530
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
3013
3531
|
<xsl:copy>
|
@@ -3016,21 +3534,61 @@
|
|
3016
3534
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3017
3535
|
<xsl:text> </xsl:text>
|
3018
3536
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3019
|
-
|
3020
|
-
|
3021
|
-
|
3022
|
-
|
3023
|
-
|
3537
|
+
|
3538
|
+
<fo:block-container margin-left="0mm">
|
3539
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3540
|
+
<xsl:attribute name="margin-left">
|
3541
|
+
<xsl:choose>
|
3542
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3543
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3544
|
+
</xsl:choose>
|
3545
|
+
</xsl:attribute>
|
3546
|
+
|
3547
|
+
</xsl:if>
|
3548
|
+
<fo:block-container margin-left="0mm">
|
3549
|
+
|
3550
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3551
|
+
<xsl:variable name="_font-size">
|
3552
|
+
|
3553
|
+
|
3554
|
+
|
3555
|
+
|
3556
|
+
|
3557
|
+
|
3558
|
+
|
3559
|
+
|
3560
|
+
|
3561
|
+
|
3562
|
+
|
3563
|
+
|
3564
|
+
|
3565
|
+
10
|
3566
|
+
</xsl:variable>
|
3567
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3568
|
+
<xsl:if test="$font-size != ''">
|
3569
|
+
<xsl:attribute name="font-size">
|
3570
|
+
<xsl:choose>
|
3571
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3572
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3573
|
+
</xsl:choose>
|
3574
|
+
</xsl:attribute>
|
3575
|
+
</xsl:if>
|
3576
|
+
<xsl:apply-templates/>
|
3577
|
+
</fo:block>
|
3578
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3579
|
+
|
3580
|
+
</fo:block-container>
|
3581
|
+
</fo:block-container>
|
3582
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
3024
3583
|
<xsl:variable name="text">
|
3025
3584
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
3026
3585
|
</xsl:variable>
|
3027
|
-
<xsl:call-template name="add-zero-spaces">
|
3586
|
+
<xsl:call-template name="add-zero-spaces-java">
|
3028
3587
|
<xsl:with-param name="text" select="$text"/>
|
3029
3588
|
</xsl:call-template>
|
3030
3589
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
3031
3590
|
<xsl:if test="normalize-space() != ''">
|
3032
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3033
|
-
|
3591
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3034
3592
|
<xsl:apply-templates/>
|
3035
3593
|
</fo:block>
|
3036
3594
|
</xsl:if>
|
@@ -3100,22 +3658,30 @@
|
|
3100
3658
|
</fo:block>
|
3101
3659
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3102
3660
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3661
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3662
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3663
|
+
</xsl:if>
|
3103
3664
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3104
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="
|
3665
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3666
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3667
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3668
|
+
</xsl:if>
|
3105
3669
|
<xsl:variable name="simple-table">
|
3106
3670
|
<xsl:call-template name="getSimpleTable"/>
|
3107
3671
|
</xsl:variable>
|
3108
3672
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3109
3673
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3110
|
-
<fo:table-column column-width="35mm"/>
|
3111
|
-
<fo:table-column column-width="115mm"/>
|
3674
|
+
<!-- <fo:table-column column-width="35mm"/>
|
3675
|
+
<fo:table-column column-width="115mm"/> -->
|
3676
|
+
<fo:table-column column-width="30%"/>
|
3677
|
+
<fo:table-column column-width="70%"/>
|
3112
3678
|
</xsl:if>
|
3113
3679
|
<xsl:apply-templates mode="requirement"/>
|
3114
3680
|
</fo:table>
|
3115
3681
|
<!-- fn processing -->
|
3116
3682
|
<xsl:if test=".//*[local-name() = 'fn']">
|
3117
3683
|
<xsl:for-each select="*[local-name() = 'tbody']">
|
3118
|
-
<fo:block font-size="90%" border-bottom="
|
3684
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
3119
3685
|
<xsl:call-template name="fn_display"/>
|
3120
3686
|
</fo:block>
|
3121
3687
|
</xsl:for-each>
|
@@ -3131,17 +3697,27 @@
|
|
3131
3697
|
<xsl:apply-templates mode="requirement"/>
|
3132
3698
|
</fo:table-body>
|
3133
3699
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3134
|
-
<fo:table-row>
|
3700
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3701
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3702
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3703
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3704
|
+
</xsl:if>
|
3705
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3706
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3707
|
+
</xsl:if>
|
3708
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3709
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3710
|
+
</xsl:if>
|
3135
3711
|
<xsl:apply-templates mode="requirement"/>
|
3136
3712
|
</fo:table-row>
|
3137
3713
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3138
|
-
<fo:table-cell text-align="{@align}">
|
3714
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3139
3715
|
<xsl:attribute name="text-align">
|
3140
3716
|
<xsl:choose>
|
3141
3717
|
<xsl:when test="@align">
|
3142
3718
|
<xsl:value-of select="@align"/>
|
3143
3719
|
</xsl:when>
|
3144
|
-
<xsl:otherwise>
|
3720
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3145
3721
|
</xsl:choose>
|
3146
3722
|
</xsl:attribute>
|
3147
3723
|
<xsl:if test="@colspan">
|
@@ -3154,22 +3730,27 @@
|
|
3154
3730
|
<xsl:value-of select="@rowspan"/>
|
3155
3731
|
</xsl:attribute>
|
3156
3732
|
</xsl:if>
|
3733
|
+
<xsl:call-template name="display-align"/>
|
3157
3734
|
|
3158
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3735
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3159
3736
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3160
3737
|
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
3161
3738
|
</xsl:if>
|
3162
3739
|
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
3163
3740
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3164
3741
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3165
|
-
</xsl:if>
|
3742
|
+
</xsl:if> -->
|
3166
3743
|
|
3167
3744
|
<fo:block>
|
3168
3745
|
<xsl:apply-templates/>
|
3169
3746
|
</fo:block>
|
3170
3747
|
</fo:table-cell>
|
3171
3748
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3172
|
-
<fo:table-cell text-align="{@align}">
|
3749
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3750
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3751
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3752
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
3753
|
+
</xsl:if>
|
3173
3754
|
<xsl:attribute name="text-align">
|
3174
3755
|
<xsl:choose>
|
3175
3756
|
<xsl:when test="@align">
|
@@ -3178,6 +3759,9 @@
|
|
3178
3759
|
<xsl:otherwise>left</xsl:otherwise>
|
3179
3760
|
</xsl:choose>
|
3180
3761
|
</xsl:attribute>
|
3762
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3763
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3764
|
+
</xsl:if>
|
3181
3765
|
<xsl:if test="@colspan">
|
3182
3766
|
<xsl:attribute name="number-columns-spanned">
|
3183
3767
|
<xsl:value-of select="@colspan"/>
|
@@ -3188,25 +3772,27 @@
|
|
3188
3772
|
<xsl:value-of select="@rowspan"/>
|
3189
3773
|
</xsl:attribute>
|
3190
3774
|
</xsl:if>
|
3775
|
+
<xsl:call-template name="display-align"/>
|
3191
3776
|
|
3192
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3777
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3193
3778
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
3194
|
-
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3195
|
-
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3779
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3780
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3196
3781
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3197
3782
|
</xsl:if>
|
3198
|
-
</xsl:if>
|
3783
|
+
</xsl:if> -->
|
3784
|
+
<!-- 2nd line and below -->
|
3199
3785
|
|
3200
3786
|
<fo:block>
|
3201
3787
|
<xsl:apply-templates/>
|
3202
3788
|
</fo:block>
|
3203
3789
|
</fo:table-cell>
|
3204
3790
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3205
|
-
<fo:block font-size="11pt" font-weight="bold"
|
3791
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3206
3792
|
<xsl:apply-templates/>
|
3207
3793
|
</fo:block>
|
3208
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3209
|
-
<fo:block margin-bottom="10pt"
|
3794
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3795
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
3210
3796
|
<xsl:apply-templates/>
|
3211
3797
|
</fo:block>
|
3212
3798
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
@@ -3228,12 +3814,13 @@
|
|
3228
3814
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3229
3815
|
|
3230
3816
|
<xsl:variable name="element">
|
3231
|
-
block
|
3817
|
+
block
|
3232
3818
|
|
3819
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3233
3820
|
</xsl:variable>
|
3234
3821
|
|
3235
3822
|
<xsl:choose>
|
3236
|
-
<xsl:when test="normalize-space($element)
|
3823
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3237
3824
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
3238
3825
|
<xsl:apply-templates/>
|
3239
3826
|
</fo:block>
|
@@ -3270,30 +3857,49 @@
|
|
3270
3857
|
</xsl:otherwise>
|
3271
3858
|
</xsl:choose>
|
3272
3859
|
|
3273
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3274
|
-
|
3275
|
-
|
3276
|
-
|
3277
|
-
<xsl:if test="$num = 1">
|
3278
|
-
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3279
|
-
</xsl:if>
|
3860
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3861
|
+
|
3862
|
+
<xsl:variable name="element">
|
3863
|
+
block
|
3280
3864
|
|
3281
|
-
|
3282
|
-
|
3865
|
+
</xsl:variable>
|
3866
|
+
<xsl:choose>
|
3867
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3868
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3869
|
+
|
3870
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
3871
|
+
<xsl:if test="$num = 1">
|
3872
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3873
|
+
</xsl:if>
|
3874
|
+
|
3875
|
+
<xsl:apply-templates/>
|
3876
|
+
</fo:block>
|
3877
|
+
</xsl:when>
|
3878
|
+
<xsl:otherwise>
|
3879
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3880
|
+
<xsl:apply-templates/>
|
3881
|
+
</fo:inline>
|
3882
|
+
</xsl:otherwise>
|
3883
|
+
</xsl:choose>
|
3283
3884
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3284
3885
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3285
3886
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3286
3887
|
<xsl:variable name="termsource_text">
|
3287
3888
|
<xsl:apply-templates/>
|
3288
3889
|
</xsl:variable>
|
3890
|
+
|
3289
3891
|
<xsl:choose>
|
3290
3892
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3291
3893
|
<xsl:apply-templates/>
|
3292
3894
|
</xsl:when>
|
3293
|
-
<xsl:otherwise>
|
3294
|
-
|
3295
|
-
|
3296
|
-
|
3895
|
+
<xsl:otherwise>
|
3896
|
+
|
3897
|
+
<xsl:text>[</xsl:text>
|
3898
|
+
|
3899
|
+
<xsl:apply-templates/>
|
3900
|
+
|
3901
|
+
<xsl:text>]</xsl:text>
|
3902
|
+
|
3297
3903
|
</xsl:otherwise>
|
3298
3904
|
</xsl:choose>
|
3299
3905
|
</fo:block>
|
@@ -3314,18 +3920,29 @@
|
|
3314
3920
|
<xsl:if test="normalize-space() != ''">
|
3315
3921
|
<xsl:value-of select="."/>
|
3316
3922
|
</xsl:if>
|
3317
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3923
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3924
|
+
<fo:block-container margin-left="0mm">
|
3925
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3926
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
3927
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3928
|
+
</xsl:if>
|
3929
|
+
</xsl:if>
|
3930
|
+
|
3931
|
+
<fo:block-container margin-left="0mm">
|
3318
3932
|
|
3319
|
-
|
3320
|
-
|
3321
|
-
|
3322
|
-
|
3323
|
-
|
3324
|
-
|
3325
|
-
|
3326
|
-
|
3327
|
-
|
3328
|
-
|
3933
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
3934
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3935
|
+
</fo:block>
|
3936
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3937
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
3938
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
3939
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
3940
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
3941
|
+
</fo:block>
|
3942
|
+
</xsl:if>
|
3943
|
+
|
3944
|
+
</fo:block-container>
|
3945
|
+
</fo:block-container>
|
3329
3946
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3330
3947
|
<xsl:if test="../*[local-name() = 'author']">
|
3331
3948
|
<xsl:text>, </xsl:text>
|
@@ -3353,6 +3970,7 @@
|
|
3353
3970
|
<xsl:if test="@type = 'inline'">
|
3354
3971
|
|
3355
3972
|
|
3973
|
+
|
3356
3974
|
</xsl:if>
|
3357
3975
|
|
3358
3976
|
|
@@ -3383,6 +4001,7 @@
|
|
3383
4001
|
|
3384
4002
|
|
3385
4003
|
|
4004
|
+
|
3386
4005
|
<xsl:choose>
|
3387
4006
|
<xsl:when test="ancestor::un:annex and $depth >= 2">9.5</xsl:when>
|
3388
4007
|
<xsl:when test="ancestor::un:sections">9.5</xsl:when>
|
@@ -3487,6 +4106,7 @@
|
|
3487
4106
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3488
4107
|
<fo:block>
|
3489
4108
|
<xsl:call-template name="setId"/>
|
4109
|
+
|
3490
4110
|
<xsl:apply-templates/>
|
3491
4111
|
</fo:block>
|
3492
4112
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -3516,6 +4136,31 @@
|
|
3516
4136
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3517
4137
|
<!-- 0xA0 to space replacement -->
|
3518
4138
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4139
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4140
|
+
<xsl:choose>
|
4141
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
4142
|
+
<fo:block-container>
|
4143
|
+
<xsl:attribute name="margin-left">
|
4144
|
+
<xsl:choose>
|
4145
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4146
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4147
|
+
</xsl:choose>
|
4148
|
+
</xsl:attribute>
|
4149
|
+
|
4150
|
+
|
4151
|
+
<fo:block-container margin-left="0mm">
|
4152
|
+
<fo:block>
|
4153
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4154
|
+
</fo:block>
|
4155
|
+
</fo:block-container>
|
4156
|
+
</fo:block-container>
|
4157
|
+
</xsl:when>
|
4158
|
+
<xsl:otherwise>
|
4159
|
+
<fo:block>
|
4160
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4161
|
+
</fo:block>
|
4162
|
+
</xsl:otherwise>
|
4163
|
+
</xsl:choose>
|
3519
4164
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3520
4165
|
<!-- <row>
|
3521
4166
|
<date>05-07-2013</date>
|
@@ -3547,6 +4192,65 @@
|
|
3547
4192
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3548
4193
|
<fo:block><xsl:apply-templates/></fo:block>
|
3549
4194
|
</fo:table-cell>
|
4195
|
+
</xsl:template><xsl:template name="processBibitem">
|
4196
|
+
|
4197
|
+
|
4198
|
+
|
4199
|
+
|
4200
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4201
|
+
<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')]"/>
|
4202
|
+
<xsl:choose>
|
4203
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4204
|
+
<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"/>
|
4205
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4206
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4207
|
+
</xsl:if>
|
4208
|
+
<xsl:value-of select="$_doc_ident"/>
|
4209
|
+
</xsl:when>
|
4210
|
+
<xsl:otherwise>
|
4211
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4212
|
+
<xsl:if test="$type != ''">
|
4213
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4214
|
+
</xsl:if>
|
4215
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4216
|
+
</xsl:otherwise>
|
4217
|
+
</xsl:choose>
|
4218
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
4219
|
+
<xsl:choose>
|
4220
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
4221
|
+
<author>
|
4222
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4223
|
+
</author>
|
4224
|
+
</xsl:when>
|
4225
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
4226
|
+
<author>
|
4227
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4228
|
+
<xsl:text> </xsl:text>
|
4229
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
4230
|
+
</author>
|
4231
|
+
</xsl:when>
|
4232
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
4233
|
+
<author>
|
4234
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4235
|
+
<xsl:text> </xsl:text>
|
4236
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
4237
|
+
</author>
|
4238
|
+
</xsl:when>
|
4239
|
+
<xsl:otherwise>
|
4240
|
+
<xsl:apply-templates/>
|
4241
|
+
</xsl:otherwise>
|
4242
|
+
</xsl:choose>
|
4243
|
+
</xsl:template><xsl:template name="renderDate">
|
4244
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
4245
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
4246
|
+
</xsl:if>
|
4247
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
4248
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
4249
|
+
</xsl:if>
|
4250
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
4251
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
4252
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4253
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
3550
4254
|
</xsl:template><xsl:template name="convertDate">
|
3551
4255
|
<xsl:param name="date"/>
|
3552
4256
|
<xsl:param name="format" select="'short'"/>
|
@@ -3629,6 +4333,7 @@
|
|
3629
4333
|
|
3630
4334
|
|
3631
4335
|
|
4336
|
+
|
3632
4337
|
|
3633
4338
|
</xsl:variable>
|
3634
4339
|
<xsl:choose>
|
@@ -3643,6 +4348,7 @@
|
|
3643
4348
|
<dc:creator>
|
3644
4349
|
|
3645
4350
|
|
4351
|
+
|
3646
4352
|
</dc:creator>
|
3647
4353
|
<dc:description>
|
3648
4354
|
<xsl:variable name="abstract">
|
@@ -3652,6 +4358,7 @@
|
|
3652
4358
|
<xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
3653
4359
|
|
3654
4360
|
|
4361
|
+
|
3655
4362
|
</xsl:variable>
|
3656
4363
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3657
4364
|
</dc:description>
|
@@ -3752,6 +4459,7 @@
|
|
3752
4459
|
|
3753
4460
|
|
3754
4461
|
|
4462
|
+
|
3755
4463
|
</xsl:variable>
|
3756
4464
|
<xsl:if test="$documentNS != $XSLNS">
|
3757
4465
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3777,4 +4485,21 @@
|
|
3777
4485
|
</xsl:otherwise>
|
3778
4486
|
</xsl:choose>
|
3779
4487
|
</xsl:attribute>
|
4488
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4489
|
+
<xsl:param name="text"/>
|
4490
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4491
|
+
<xsl:if test="string-length($text) > 0">
|
4492
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4493
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4494
|
+
<xsl:if test="$char = '®'">
|
4495
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4496
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4497
|
+
</xsl:if>
|
4498
|
+
<xsl:value-of select="$char"/>
|
4499
|
+
</fo:inline>
|
4500
|
+
<xsl:call-template name="add-letter-spacing">
|
4501
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4502
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4503
|
+
</xsl:call-template>
|
4504
|
+
</xsl:if>
|
3780
4505
|
</xsl:template></xsl:stylesheet>
|