metanorma-un 0.5.0 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/un/basicdoc.rng +23 -0
- data/lib/asciidoctor/un/boilerplate.xml +7 -5
- data/lib/asciidoctor/un/converter.rb +6 -35
- data/lib/asciidoctor/un/isodoc.rng +124 -15
- 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 +4 -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/presentation_xml_convert.rb +1 -0
- data/lib/isodoc/un/un.plenary-attachment.xsl +1200 -244
- data/lib/isodoc/un/un.plenary.xsl +1200 -244
- data/lib/isodoc/un/un.recommendation.xsl +1109 -233
- 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 +4 -4
@@ -17,6 +17,7 @@
|
|
17
17
|
<contents>
|
18
18
|
<xsl:apply-templates select="/un:un-standard/un:sections/*" mode="contents"/>
|
19
19
|
<xsl:apply-templates select="/un:un-standard/un:annex" mode="contents"/>
|
20
|
+
<xsl:apply-templates select="/un:un-standard/un:bibliography/un:references" mode="contents"/>
|
20
21
|
</contents>
|
21
22
|
</xsl:variable>
|
22
23
|
|
@@ -38,7 +39,7 @@
|
|
38
39
|
|
39
40
|
<xsl:template match="/">
|
40
41
|
<xsl:call-template name="namespaceCheck"/>
|
41
|
-
<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}">
|
42
43
|
<fo:layout-master-set>
|
43
44
|
<!-- Cover page -->
|
44
45
|
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
@@ -84,6 +85,9 @@
|
|
84
85
|
|
85
86
|
<xsl:call-template name="addPDFUAmeta"/>
|
86
87
|
|
88
|
+
<xsl:call-template name="addBookmarks">
|
89
|
+
<xsl:with-param name="contents" select="$contents"/>
|
90
|
+
</xsl:call-template>
|
87
91
|
|
88
92
|
<!-- Cover Page -->
|
89
93
|
<fo:page-sequence master-reference="cover-page" force-page-count="even">
|
@@ -174,8 +178,8 @@
|
|
174
178
|
<xsl:call-template name="insertHeaderPreface"/>
|
175
179
|
<xsl:call-template name="insertFooter"/>
|
176
180
|
<fo:flow flow-name="xsl-region-body" text-align="justify">
|
177
|
-
<fo:block>
|
178
|
-
<xsl:
|
181
|
+
<fo:block>
|
182
|
+
<xsl:call-template name="processPrefaceSectionsDefault"/>
|
179
183
|
</fo:block>
|
180
184
|
</fo:flow>
|
181
185
|
</fo:page-sequence>
|
@@ -196,7 +200,7 @@
|
|
196
200
|
</xsl:variable>
|
197
201
|
<fo:block font-size="9pt" text-align="right" font-style="italic" margin-bottom="6pt"><xsl:value-of select="$title-page"/></fo:block>
|
198
202
|
<fo:block>
|
199
|
-
<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']">
|
200
204
|
|
201
205
|
<fo:block>
|
202
206
|
|
@@ -207,7 +211,7 @@
|
|
207
211
|
<xsl:if test="@level >= 3 and @section != ''">
|
208
212
|
<xsl:attribute name="margin-left">28mm</xsl:attribute>
|
209
213
|
</xsl:if>
|
210
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
214
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
211
215
|
<xsl:if test="@section != ''">
|
212
216
|
<fo:inline>
|
213
217
|
<xsl:attribute name="padding-right">
|
@@ -221,7 +225,7 @@
|
|
221
225
|
</fo:inline>
|
222
226
|
</xsl:if>
|
223
227
|
|
224
|
-
<xsl:apply-templates/>
|
228
|
+
<xsl:apply-templates select="title"/>
|
225
229
|
<xsl:text> </xsl:text>
|
226
230
|
|
227
231
|
<fo:inline keep-together.within-line="always">
|
@@ -234,12 +238,12 @@
|
|
234
238
|
|
235
239
|
</xsl:for-each>
|
236
240
|
|
237
|
-
<xsl:if test="xalan:nodeset($contents)//item[@type = 'annex']">
|
241
|
+
<xsl:if test="xalan:nodeset($contents)//item[@type = 'annex' and @display = 'true']">
|
238
242
|
<fo:block text-align="center" margin-top="12pt" margin-bottom="12pt">ANNEXES</fo:block>
|
239
|
-
<xsl:for-each select="xalan:nodeset($contents)//item[@type = 'annex']">
|
243
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@type = 'annex' and @display = 'true']">
|
240
244
|
<fo:block>
|
241
245
|
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
242
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
246
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{@section}">
|
243
247
|
<xsl:if test="@section != ''">
|
244
248
|
<fo:inline padding-right="3mm">
|
245
249
|
<xsl:choose>
|
@@ -294,6 +298,7 @@
|
|
294
298
|
<fo:block>
|
295
299
|
<xsl:apply-templates select="/un:un-standard/un:sections/*"/>
|
296
300
|
<xsl:apply-templates select="/un:un-standard/un:annex"/>
|
301
|
+
<xsl:apply-templates select="/un:un-standard/un:bibliography/un:references"/>
|
297
302
|
</fo:block>
|
298
303
|
|
299
304
|
|
@@ -316,7 +321,9 @@
|
|
316
321
|
</fo:block>
|
317
322
|
</fo:block-container>
|
318
323
|
<fo:block-container absolute-position="fixed" font-family="Arial" font-size="10pt" top="240mm" left="20mm" line-height="110%">
|
319
|
-
<
|
324
|
+
<fo:block>
|
325
|
+
<xsl:apply-templates select="/un:un-standard/un:boilerplate/un:feedback-statement"/>
|
326
|
+
</fo:block>
|
320
327
|
</fo:block-container>
|
321
328
|
</fo:flow>
|
322
329
|
</fo:page-sequence>
|
@@ -345,9 +352,7 @@
|
|
345
352
|
|
346
353
|
|
347
354
|
<xsl:variable name="display">
|
348
|
-
<xsl:choose>
|
349
|
-
<xsl:when test="ancestor-or-self::un:bibitem">false</xsl:when>
|
350
|
-
<xsl:when test="ancestor-or-self::un:term">false</xsl:when>
|
355
|
+
<xsl:choose>
|
351
356
|
<xsl:when test="ancestor-or-self::un:annex and $level >= 2">false</xsl:when>
|
352
357
|
<xsl:when test="$level > 3">false</xsl:when>
|
353
358
|
<xsl:when test="@inline-header='true'">false</xsl:when>
|
@@ -355,6 +360,14 @@
|
|
355
360
|
</xsl:choose>
|
356
361
|
</xsl:variable>
|
357
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>
|
358
371
|
|
359
372
|
<xsl:if test="$display = 'true'">
|
360
373
|
|
@@ -370,10 +383,13 @@
|
|
370
383
|
<xsl:value-of select="local-name()"/>
|
371
384
|
</xsl:variable>
|
372
385
|
|
373
|
-
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
|
374
|
-
<
|
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"/>
|
375
391
|
</item>
|
376
|
-
|
392
|
+
|
377
393
|
</xsl:if>
|
378
394
|
|
379
395
|
</xsl:template>
|
@@ -594,7 +610,7 @@
|
|
594
610
|
</fo:block>
|
595
611
|
</xsl:template>
|
596
612
|
|
597
|
-
<xsl:template match="un:ul | un:ol">
|
613
|
+
<xsl:template match="un:ul | un:ol" mode="ul_ol">
|
598
614
|
<fo:list-block provisional-distance-between-starts="3mm" margin-left="7mm" text-indent="0mm">
|
599
615
|
<xsl:apply-templates/>
|
600
616
|
</fo:list-block>
|
@@ -602,13 +618,19 @@
|
|
602
618
|
</xsl:template>
|
603
619
|
|
604
620
|
<xsl:template match="un:ul//un:note | un:ol//un:note" priority="2"/>
|
605
|
-
<xsl:template match="un:ul//un:note/un:
|
606
|
-
|
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">
|
607
625
|
<xsl:apply-templates select="../un:name" mode="presentation"/>
|
608
626
|
<xsl:apply-templates/>
|
609
627
|
</fo:block>
|
610
628
|
</xsl:template>
|
611
629
|
|
630
|
+
<xsl:template match="un:ul//un:note/* | un:ol//un:note/*" mode="process">
|
631
|
+
<xsl:apply-templates select="."/>
|
632
|
+
</xsl:template>
|
633
|
+
|
612
634
|
<xsl:template match="un:li">
|
613
635
|
<xsl:variable name="level">
|
614
636
|
<xsl:call-template name="getLevel"/>
|
@@ -927,30 +949,45 @@
|
|
927
949
|
|
928
950
|
|
929
951
|
<xsl:template match="un:formula" name="formula-un" priority="2">
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
<
|
934
|
-
|
935
|
-
|
936
|
-
<
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
<fo:table-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
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>
|
954
991
|
</xsl:template>
|
955
992
|
|
956
993
|
|
@@ -1030,6 +1067,12 @@
|
|
1030
1067
|
|
1031
1068
|
</title-edition>
|
1032
1069
|
|
1070
|
+
<title-edition lang="fr">
|
1071
|
+
|
1072
|
+
<xsl:text>Édition </xsl:text>
|
1073
|
+
|
1074
|
+
</title-edition>
|
1075
|
+
|
1033
1076
|
|
1034
1077
|
<title-toc lang="en">
|
1035
1078
|
|
@@ -1038,7 +1081,12 @@
|
|
1038
1081
|
|
1039
1082
|
|
1040
1083
|
</title-toc>
|
1041
|
-
<title-toc lang="fr">
|
1084
|
+
<title-toc lang="fr">
|
1085
|
+
|
1086
|
+
<xsl:text>Sommaire</xsl:text>
|
1087
|
+
|
1088
|
+
|
1089
|
+
</title-toc>
|
1042
1090
|
|
1043
1091
|
<title-toc lang="zh">Contents</title-toc>
|
1044
1092
|
|
@@ -1072,7 +1120,12 @@
|
|
1072
1120
|
|
1073
1121
|
|
1074
1122
|
|
1075
|
-
<title-source lang="en">
|
1123
|
+
<title-source lang="en">
|
1124
|
+
|
1125
|
+
<xsl:text>SOURCE</xsl:text>
|
1126
|
+
|
1127
|
+
|
1128
|
+
</title-source>
|
1076
1129
|
|
1077
1130
|
<title-keywords lang="en">Keywords</title-keywords>
|
1078
1131
|
|
@@ -1115,12 +1168,25 @@
|
|
1115
1168
|
<title-warning lang="zh">警告</title-warning>
|
1116
1169
|
|
1117
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
|
+
|
1118
1175
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1119
1176
|
<xsl:param name="name"/>
|
1120
|
-
<xsl:
|
1121
|
-
|
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>
|
1122
1187
|
</xsl:variable>
|
1123
|
-
<xsl:variable name="
|
1188
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1189
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
1124
1190
|
<xsl:choose>
|
1125
1191
|
<xsl:when test="normalize-space($title_) != ''">
|
1126
1192
|
<xsl:value-of select="$title_"/>
|
@@ -1129,7 +1195,10 @@
|
|
1129
1195
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
1130
1196
|
</xsl:otherwise>
|
1131
1197
|
</xsl:choose>
|
1132
|
-
</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
|
+
|
1133
1202
|
|
1134
1203
|
|
1135
1204
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
@@ -1140,14 +1209,14 @@
|
|
1140
1209
|
|
1141
1210
|
|
1142
1211
|
|
1143
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1144
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1212
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1145
1213
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1146
1214
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1147
1215
|
|
1148
1216
|
|
1149
1217
|
|
1150
1218
|
|
1219
|
+
|
1151
1220
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1152
1221
|
|
1153
1222
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -1189,9 +1258,11 @@
|
|
1189
1258
|
|
1190
1259
|
|
1191
1260
|
|
1261
|
+
|
1192
1262
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1193
1263
|
|
1194
1264
|
|
1265
|
+
|
1195
1266
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1196
1267
|
|
1197
1268
|
|
@@ -1207,10 +1278,13 @@
|
|
1207
1278
|
|
1208
1279
|
|
1209
1280
|
|
1281
|
+
|
1210
1282
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1211
1283
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1212
1284
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1213
1285
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1286
|
+
|
1287
|
+
|
1214
1288
|
|
1215
1289
|
|
1216
1290
|
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
@@ -1230,6 +1304,8 @@
|
|
1230
1304
|
<xsl:attribute name="margin-left">15mm</xsl:attribute>
|
1231
1305
|
|
1232
1306
|
|
1307
|
+
|
1308
|
+
|
1233
1309
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
1234
1310
|
|
1235
1311
|
|
@@ -1254,6 +1330,8 @@
|
|
1254
1330
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1255
1331
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
1256
1332
|
|
1333
|
+
|
1334
|
+
|
1257
1335
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1258
1336
|
|
1259
1337
|
|
@@ -1264,11 +1342,13 @@
|
|
1264
1342
|
|
1265
1343
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1266
1344
|
|
1267
|
-
|
1345
|
+
|
1346
|
+
|
1268
1347
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1269
1348
|
|
1270
1349
|
|
1271
1350
|
|
1351
|
+
|
1272
1352
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1273
1353
|
|
1274
1354
|
|
@@ -1282,14 +1362,15 @@
|
|
1282
1362
|
|
1283
1363
|
|
1284
1364
|
|
1365
|
+
|
1285
1366
|
<xsl:attribute name="margin-top">3pt</xsl:attribute>
|
1286
1367
|
<xsl:attribute name="border-top">0.1mm solid black</xsl:attribute>
|
1287
1368
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1288
1369
|
|
1370
|
+
</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">
|
1289
1371
|
|
1290
1372
|
|
1291
1373
|
|
1292
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1293
1374
|
|
1294
1375
|
|
1295
1376
|
|
@@ -1298,7 +1379,6 @@
|
|
1298
1379
|
|
1299
1380
|
|
1300
1381
|
|
1301
|
-
|
1302
1382
|
|
1303
1383
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1304
1384
|
|
@@ -1314,8 +1394,7 @@
|
|
1314
1394
|
|
1315
1395
|
<xsl:attribute name="margin-top">3pt</xsl:attribute>
|
1316
1396
|
<!-- <xsl:attribute name="border-top">0.1mm solid black</xsl:attribute> -->
|
1317
|
-
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1318
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1397
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1319
1398
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1320
1399
|
<xsl:attribute name="padding-top">1.5mm</xsl:attribute>
|
1321
1400
|
|
@@ -1329,6 +1408,8 @@
|
|
1329
1408
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1330
1409
|
|
1331
1410
|
|
1411
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1412
|
+
|
1332
1413
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1333
1414
|
|
1334
1415
|
|
@@ -1349,6 +1430,7 @@
|
|
1349
1430
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1350
1431
|
|
1351
1432
|
|
1433
|
+
|
1352
1434
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1353
1435
|
|
1354
1436
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1367,13 +1449,14 @@
|
|
1367
1449
|
|
1368
1450
|
|
1369
1451
|
|
1452
|
+
|
1370
1453
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1371
1454
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
1372
1455
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1373
1456
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1374
1457
|
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
1375
1458
|
|
1376
|
-
|
1459
|
+
|
1377
1460
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
1378
1461
|
|
1379
1462
|
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
@@ -1401,11 +1484,14 @@
|
|
1401
1484
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1402
1485
|
|
1403
1486
|
|
1487
|
+
|
1404
1488
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1405
1489
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1406
1490
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1407
1491
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1408
1492
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1493
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1494
|
+
|
1409
1495
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1410
1496
|
|
1411
1497
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -1416,7 +1502,43 @@
|
|
1416
1502
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1417
1503
|
|
1418
1504
|
|
1419
|
-
</xsl:attribute-set><xsl:template
|
1505
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1506
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1507
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1508
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1509
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1510
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1511
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1512
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1513
|
+
|
1514
|
+
<!-- Normative references -->
|
1515
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
1516
|
+
<!-- Terms and definitions -->
|
1517
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
1518
|
+
<!-- Another main sections -->
|
1519
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
1520
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
1521
|
+
<!-- Bibliography -->
|
1522
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
1523
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1524
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1525
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1526
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1527
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1528
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1529
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1530
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1531
|
+
|
1532
|
+
<!-- Normative references -->
|
1533
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
1534
|
+
<!-- Terms and definitions -->
|
1535
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
|
1536
|
+
<!-- Another main sections -->
|
1537
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
|
1538
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1539
|
+
<!-- Bibliography -->
|
1540
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1541
|
+
</xsl:template><xsl:template match="text()">
|
1420
1542
|
<xsl:value-of select="."/>
|
1421
1543
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
1422
1544
|
<xsl:value-of select="$linebreak"/>
|
@@ -1433,6 +1555,10 @@
|
|
1433
1555
|
|
1434
1556
|
|
1435
1557
|
|
1558
|
+
|
1559
|
+
|
1560
|
+
<!-- $namespace = 'iso' or -->
|
1561
|
+
|
1436
1562
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1437
1563
|
|
1438
1564
|
|
@@ -1468,6 +1594,7 @@
|
|
1468
1594
|
<xsl:with-param name="table" select="$simple-table"/>
|
1469
1595
|
</xsl:call-template>
|
1470
1596
|
</xsl:variable>
|
1597
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1471
1598
|
|
1472
1599
|
<!-- <xsl:variable name="colwidths2">
|
1473
1600
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1489,33 +1616,59 @@
|
|
1489
1616
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1490
1617
|
|
1491
1618
|
|
1619
|
+
|
1492
1620
|
|
1493
1621
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1622
|
+
<xsl:if test="not(ancestor::*[local-name()='sections'])">
|
1623
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1624
|
+
</xsl:if>
|
1625
|
+
|
1626
|
+
|
1494
1627
|
|
1495
1628
|
|
1629
|
+
|
1496
1630
|
|
1497
1631
|
|
1498
1632
|
|
1499
1633
|
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1634
|
+
|
1635
|
+
|
1636
|
+
|
1637
|
+
<xsl:variable name="table_attributes">
|
1638
|
+
<attribute name="table-layout">fixed</attribute>
|
1639
|
+
<attribute name="width">100%</attribute>
|
1640
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1641
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1503
1642
|
|
1504
1643
|
|
1505
1644
|
|
1506
1645
|
|
1646
|
+
|
1507
1647
|
|
1508
1648
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
1509
|
-
<
|
1510
|
-
<
|
1511
|
-
</xsl:if>
|
1512
|
-
|
1513
|
-
|
1514
|
-
</xsl:if>
|
1649
|
+
<attribute name="border-top">1.5pt solid black</attribute>
|
1650
|
+
<attribute name="border-bottom">1.5pt solid black</attribute>
|
1651
|
+
</xsl:if>
|
1652
|
+
|
1653
|
+
|
1515
1654
|
|
1655
|
+
|
1516
1656
|
|
1657
|
+
</xsl:variable>
|
1658
|
+
|
1659
|
+
|
1660
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1517
1661
|
|
1662
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1663
|
+
<xsl:attribute name="{@name}">
|
1664
|
+
<xsl:value-of select="."/>
|
1665
|
+
</xsl:attribute>
|
1666
|
+
</xsl:for-each>
|
1518
1667
|
|
1668
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1669
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1670
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1671
|
+
</xsl:if>
|
1519
1672
|
|
1520
1673
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1521
1674
|
<xsl:choose>
|
@@ -1539,6 +1692,33 @@
|
|
1539
1692
|
|
1540
1693
|
</fo:table>
|
1541
1694
|
|
1695
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1696
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1697
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1698
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1699
|
+
</xsl:call-template>
|
1700
|
+
</xsl:for-each>
|
1701
|
+
|
1702
|
+
<!-- insert footer as table -->
|
1703
|
+
<!-- <fo:table>
|
1704
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1705
|
+
<xsl:attribute name="{@name}">
|
1706
|
+
<xsl:value-of select="."/>
|
1707
|
+
</xsl:attribute>
|
1708
|
+
</xsl:for-each>
|
1709
|
+
|
1710
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1711
|
+
<xsl:choose>
|
1712
|
+
<xsl:when test=". = 1 or . = 0">
|
1713
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1714
|
+
</xsl:when>
|
1715
|
+
<xsl:otherwise>
|
1716
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1717
|
+
</xsl:otherwise>
|
1718
|
+
</xsl:choose>
|
1719
|
+
</xsl:for-each>
|
1720
|
+
</fo:table>-->
|
1721
|
+
|
1542
1722
|
|
1543
1723
|
|
1544
1724
|
|
@@ -1547,8 +1727,9 @@
|
|
1547
1727
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1548
1728
|
<xsl:if test="normalize-space() != ''">
|
1549
1729
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1550
|
-
|
1551
|
-
|
1730
|
+
|
1731
|
+
<xsl:apply-templates/>
|
1732
|
+
</fo:block>
|
1552
1733
|
</xsl:if>
|
1553
1734
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1554
1735
|
<xsl:param name="table-row"/>
|
@@ -1602,6 +1783,13 @@
|
|
1602
1783
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1603
1784
|
<xsl:variable name="td_text">
|
1604
1785
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1786
|
+
|
1787
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1788
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1789
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1790
|
+
</xsl:for-each>
|
1791
|
+
</xsl:if> -->
|
1792
|
+
|
1605
1793
|
</xsl:variable>
|
1606
1794
|
<xsl:variable name="words">
|
1607
1795
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1661,13 +1849,31 @@
|
|
1661
1849
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1662
1850
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1663
1851
|
<xsl:value-of select="@target"/>
|
1852
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1853
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1854
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1664
1855
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1665
1856
|
<xsl:param name="cols-count"/>
|
1666
1857
|
<!-- font-weight="bold" -->
|
1667
|
-
<fo:table-header>
|
1858
|
+
<fo:table-header>
|
1668
1859
|
|
1669
1860
|
<xsl:apply-templates/>
|
1670
1861
|
</fo:table-header>
|
1862
|
+
</xsl:template><xsl:template name="table-header-title">
|
1863
|
+
<xsl:param name="cols-count"/>
|
1864
|
+
<!-- row for title -->
|
1865
|
+
<fo:table-row>
|
1866
|
+
<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">
|
1867
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1868
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1869
|
+
<xsl:call-template name="fn_name_display"/>
|
1870
|
+
</xsl:for-each>
|
1871
|
+
<fo:block text-align="right" font-style="italic">
|
1872
|
+
<xsl:text> </xsl:text>
|
1873
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1874
|
+
</fo:block>
|
1875
|
+
</fo:table-cell>
|
1876
|
+
</fo:table-row>
|
1671
1877
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1672
1878
|
<fo:table-body>
|
1673
1879
|
<xsl:apply-templates/>
|
@@ -1675,6 +1881,13 @@
|
|
1675
1881
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1676
1882
|
<xsl:apply-templates/>
|
1677
1883
|
</xsl:template><xsl:template name="insertTableFooter">
|
1884
|
+
<xsl:param name="cols-count"/>
|
1885
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1886
|
+
<fo:table-footer>
|
1887
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1888
|
+
</fo:table-footer>
|
1889
|
+
</xsl:if>
|
1890
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1678
1891
|
<xsl:param name="cols-count"/>
|
1679
1892
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1680
1893
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1696,11 +1909,15 @@
|
|
1696
1909
|
<!-- fn will be processed inside 'note' processing -->
|
1697
1910
|
|
1698
1911
|
|
1699
|
-
|
1912
|
+
|
1913
|
+
<!-- except gb and bipm -->
|
1700
1914
|
|
1701
1915
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1702
1916
|
|
1703
1917
|
|
1918
|
+
|
1919
|
+
|
1920
|
+
|
1704
1921
|
<!-- horizontal row separator -->
|
1705
1922
|
|
1706
1923
|
|
@@ -1714,6 +1931,84 @@
|
|
1714
1931
|
</fo:table-footer>
|
1715
1932
|
|
1716
1933
|
</xsl:if>
|
1934
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
1935
|
+
<xsl:param name="table_attributes"/>
|
1936
|
+
<xsl:param name="colwidths"/>
|
1937
|
+
|
1938
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1939
|
+
|
1940
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1941
|
+
|
1942
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
1943
|
+
|
1944
|
+
<fo:table keep-with-previous="always">
|
1945
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1946
|
+
<xsl:choose>
|
1947
|
+
<xsl:when test="@name = 'border-top'">
|
1948
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
1949
|
+
</xsl:when>
|
1950
|
+
<xsl:when test="@name = 'border'">
|
1951
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1952
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
1953
|
+
</xsl:when>
|
1954
|
+
<xsl:otherwise>
|
1955
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1956
|
+
</xsl:otherwise>
|
1957
|
+
</xsl:choose>
|
1958
|
+
</xsl:for-each>
|
1959
|
+
|
1960
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1961
|
+
<xsl:choose>
|
1962
|
+
<xsl:when test=". = 1 or . = 0">
|
1963
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1964
|
+
</xsl:when>
|
1965
|
+
<xsl:otherwise>
|
1966
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1967
|
+
</xsl:otherwise>
|
1968
|
+
</xsl:choose>
|
1969
|
+
</xsl:for-each>
|
1970
|
+
|
1971
|
+
<fo:table-body>
|
1972
|
+
<fo:table-row>
|
1973
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
1974
|
+
|
1975
|
+
|
1976
|
+
|
1977
|
+
<!-- fn will be processed inside 'note' processing -->
|
1978
|
+
|
1979
|
+
|
1980
|
+
|
1981
|
+
<!-- except gb and bipm -->
|
1982
|
+
|
1983
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1984
|
+
|
1985
|
+
|
1986
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1987
|
+
<xsl:choose>
|
1988
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1989
|
+
show Note under table in preface (ex. abstract) sections
|
1990
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1991
|
+
</xsl:when>
|
1992
|
+
<xsl:otherwise>
|
1993
|
+
empty, because notes show at page side in main sections
|
1994
|
+
<fo:block/>
|
1995
|
+
</xsl:otherwise>
|
1996
|
+
</xsl:choose>
|
1997
|
+
</xsl:if> -->
|
1998
|
+
|
1999
|
+
|
2000
|
+
<!-- horizontal row separator -->
|
2001
|
+
|
2002
|
+
|
2003
|
+
<!-- fn processing -->
|
2004
|
+
<xsl:call-template name="fn_display"/>
|
2005
|
+
|
2006
|
+
</fo:table-cell>
|
2007
|
+
</fo:table-row>
|
2008
|
+
</fo:table-body>
|
2009
|
+
|
2010
|
+
</fo:table>
|
2011
|
+
</xsl:if>
|
1717
2012
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1718
2013
|
|
1719
2014
|
<xsl:variable name="cols-count">
|
@@ -1731,6 +2026,8 @@
|
|
1731
2026
|
</xsl:choose>
|
1732
2027
|
</xsl:variable>
|
1733
2028
|
|
2029
|
+
|
2030
|
+
|
1734
2031
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1735
2032
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1736
2033
|
</xsl:apply-templates>
|
@@ -1740,6 +2037,8 @@
|
|
1740
2037
|
</xsl:call-template>
|
1741
2038
|
|
1742
2039
|
<fo:table-body>
|
2040
|
+
|
2041
|
+
|
1743
2042
|
<xsl:apply-templates/>
|
1744
2043
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1745
2044
|
|
@@ -1763,10 +2062,21 @@
|
|
1763
2062
|
</xsl:if>
|
1764
2063
|
|
1765
2064
|
|
2065
|
+
|
2066
|
+
|
1766
2067
|
<xsl:apply-templates/>
|
1767
2068
|
</fo:table-row>
|
1768
2069
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
1769
2070
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
2071
|
+
<xsl:attribute name="text-align">
|
2072
|
+
<xsl:choose>
|
2073
|
+
<xsl:when test="@align">
|
2074
|
+
<xsl:value-of select="@align"/>
|
2075
|
+
</xsl:when>
|
2076
|
+
<xsl:otherwise>center</xsl:otherwise>
|
2077
|
+
</xsl:choose>
|
2078
|
+
</xsl:attribute>
|
2079
|
+
|
1770
2080
|
|
1771
2081
|
|
1772
2082
|
|
@@ -1791,6 +2101,8 @@
|
|
1791
2101
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
1792
2102
|
|
1793
2103
|
|
2104
|
+
|
2105
|
+
|
1794
2106
|
<xsl:if test="@colspan">
|
1795
2107
|
<xsl:attribute name="number-columns-spanned">
|
1796
2108
|
<xsl:value-of select="@colspan"/>
|
@@ -1801,16 +2113,37 @@
|
|
1801
2113
|
<xsl:value-of select="@rowspan"/>
|
1802
2114
|
</xsl:attribute>
|
1803
2115
|
</xsl:if>
|
2116
|
+
<xsl:call-template name="display-align"/>
|
1804
2117
|
<fo:block>
|
1805
2118
|
<xsl:apply-templates/>
|
1806
2119
|
</fo:block>
|
1807
2120
|
</fo:table-cell>
|
2121
|
+
</xsl:template><xsl:template name="display-align">
|
2122
|
+
<xsl:if test="@valign">
|
2123
|
+
<xsl:attribute name="display-align">
|
2124
|
+
<xsl:choose>
|
2125
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2126
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2127
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2128
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2129
|
+
</xsl:choose>
|
2130
|
+
</xsl:attribute>
|
2131
|
+
</xsl:if>
|
1808
2132
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
1809
2133
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2134
|
+
<xsl:attribute name="text-align">
|
2135
|
+
<xsl:choose>
|
2136
|
+
<xsl:when test="@align">
|
2137
|
+
<xsl:value-of select="@align"/>
|
2138
|
+
</xsl:when>
|
2139
|
+
<xsl:otherwise>left</xsl:otherwise>
|
2140
|
+
</xsl:choose>
|
2141
|
+
</xsl:attribute>
|
2142
|
+
|
2143
|
+
|
1810
2144
|
|
1811
2145
|
|
1812
2146
|
|
1813
|
-
|
1814
2147
|
|
1815
2148
|
|
1816
2149
|
|
@@ -1822,6 +2155,7 @@
|
|
1822
2155
|
|
1823
2156
|
|
1824
2157
|
|
2158
|
+
|
1825
2159
|
<xsl:if test="@colspan">
|
1826
2160
|
<xsl:attribute name="number-columns-spanned">
|
1827
2161
|
<xsl:value-of select="@colspan"/>
|
@@ -1832,8 +2166,8 @@
|
|
1832
2166
|
<xsl:value-of select="@rowspan"/>
|
1833
2167
|
</xsl:attribute>
|
1834
2168
|
</xsl:if>
|
1835
|
-
<
|
1836
|
-
|
2169
|
+
<xsl:call-template name="display-align"/>
|
2170
|
+
<fo:block>
|
1837
2171
|
<xsl:apply-templates/>
|
1838
2172
|
</fo:block>
|
1839
2173
|
</fo:table-cell>
|
@@ -1845,6 +2179,8 @@
|
|
1845
2179
|
|
1846
2180
|
|
1847
2181
|
|
2182
|
+
|
2183
|
+
|
1848
2184
|
<fo:inline padding-right="2mm">
|
1849
2185
|
|
1850
2186
|
|
@@ -1859,10 +2195,11 @@
|
|
1859
2195
|
</fo:inline> -->
|
1860
2196
|
</xsl:if>
|
1861
2197
|
|
1862
|
-
|
2198
|
+
|
1863
2199
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
1864
2200
|
|
1865
2201
|
</fo:inline>
|
2202
|
+
|
1866
2203
|
<xsl:apply-templates mode="process"/>
|
1867
2204
|
</fo:block>
|
1868
2205
|
|
@@ -1886,6 +2223,7 @@
|
|
1886
2223
|
|
1887
2224
|
|
1888
2225
|
|
2226
|
+
|
1889
2227
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
1890
2228
|
|
1891
2229
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -1895,12 +2233,15 @@
|
|
1895
2233
|
|
1896
2234
|
|
1897
2235
|
|
2236
|
+
|
1898
2237
|
<xsl:value-of select="@reference"/>
|
1899
2238
|
|
2239
|
+
|
1900
2240
|
</fo:inline>
|
1901
2241
|
<fo:inline>
|
1902
2242
|
|
1903
|
-
<xsl:apply-templates/>
|
2243
|
+
<!-- <xsl:apply-templates /> -->
|
2244
|
+
<xsl:copy-of select="./node()"/>
|
1904
2245
|
</fo:inline>
|
1905
2246
|
</fo:block>
|
1906
2247
|
</xsl:if>
|
@@ -1937,7 +2278,20 @@
|
|
1937
2278
|
<xsl:variable name="following_dl_colwidths">
|
1938
2279
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
1939
2280
|
<xsl:variable name="html-table">
|
1940
|
-
<xsl:variable name="
|
2281
|
+
<xsl:variable name="doc_ns">
|
2282
|
+
|
2283
|
+
</xsl:variable>
|
2284
|
+
<xsl:variable name="ns">
|
2285
|
+
<xsl:choose>
|
2286
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2287
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2288
|
+
</xsl:when>
|
2289
|
+
<xsl:otherwise>
|
2290
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2291
|
+
</xsl:otherwise>
|
2292
|
+
</xsl:choose>
|
2293
|
+
</xsl:variable>
|
2294
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
1941
2295
|
<xsl:element name="{$ns}:table">
|
1942
2296
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
1943
2297
|
<tbody>
|
@@ -2002,7 +2356,8 @@
|
|
2002
2356
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2003
2357
|
</xsl:if>
|
2004
2358
|
|
2005
|
-
<xsl:apply-templates/>
|
2359
|
+
<!-- <xsl:apply-templates /> -->
|
2360
|
+
<xsl:copy-of select="./node()"/>
|
2006
2361
|
</fo:block>
|
2007
2362
|
</fo:table-cell>
|
2008
2363
|
</fo:table-row>
|
@@ -2020,9 +2375,13 @@
|
|
2020
2375
|
|
2021
2376
|
|
2022
2377
|
|
2378
|
+
|
2379
|
+
|
2023
2380
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2024
2381
|
|
2382
|
+
|
2025
2383
|
<xsl:value-of select="@reference"/>
|
2384
|
+
|
2026
2385
|
</fo:basic-link>
|
2027
2386
|
</fo:inline>
|
2028
2387
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -2030,115 +2389,142 @@
|
|
2030
2389
|
<xsl:apply-templates/>
|
2031
2390
|
</fo:inline>
|
2032
2391
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2033
|
-
<
|
2034
|
-
|
2035
|
-
|
2036
|
-
|
2037
|
-
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2041
|
-
|
2042
|
-
|
2043
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
2044
|
-
|
2045
|
-
<xsl:variable name="title-where">
|
2046
|
-
<xsl:call-template name="getTitle">
|
2047
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2048
|
-
</xsl:call-template>
|
2049
|
-
</xsl:variable>
|
2050
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2051
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2052
|
-
<xsl:text/>
|
2053
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2054
|
-
</fo:block>
|
2055
|
-
|
2056
|
-
</xsl:when>
|
2057
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2058
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
2059
|
-
|
2060
|
-
|
2061
|
-
|
2062
|
-
|
2063
|
-
<xsl:variable name="title-where">
|
2064
|
-
<xsl:call-template name="getTitle">
|
2065
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2066
|
-
</xsl:call-template>
|
2067
|
-
</xsl:variable>
|
2068
|
-
<xsl:value-of select="$title-where"/>
|
2069
|
-
</fo:block>
|
2070
|
-
</xsl:when>
|
2071
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2072
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2073
|
-
|
2074
|
-
|
2075
|
-
|
2076
|
-
<xsl:variable name="title-key">
|
2077
|
-
<xsl:call-template name="getTitle">
|
2078
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
2079
|
-
</xsl:call-template>
|
2080
|
-
</xsl:variable>
|
2081
|
-
<xsl:value-of select="$title-key"/>
|
2082
|
-
</fo:block>
|
2083
|
-
</xsl:when>
|
2084
|
-
</xsl:choose>
|
2085
|
-
|
2086
|
-
<!-- a few components -->
|
2087
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2088
|
-
<fo:block>
|
2392
|
+
<fo:block-container margin-left="0mm">
|
2393
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2394
|
+
<xsl:attribute name="margin-left">
|
2395
|
+
<xsl:choose>
|
2396
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2397
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2398
|
+
</xsl:choose>
|
2399
|
+
</xsl:attribute>
|
2089
2400
|
|
2401
|
+
</xsl:if>
|
2402
|
+
<fo:block-container margin-left="0mm">
|
2403
|
+
|
2404
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
2090
2405
|
|
2406
|
+
<xsl:variable name="key_iso">
|
2407
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2408
|
+
</xsl:variable>
|
2091
2409
|
|
2410
|
+
<xsl:choose>
|
2411
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2412
|
+
|
2413
|
+
|
2414
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2415
|
+
|
2416
|
+
<xsl:variable name="title-where">
|
2417
|
+
<xsl:call-template name="getTitle">
|
2418
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2419
|
+
</xsl:call-template>
|
2420
|
+
</xsl:variable>
|
2421
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2422
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2423
|
+
<xsl:text/>
|
2424
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2425
|
+
</fo:block>
|
2426
|
+
|
2427
|
+
</xsl:when>
|
2428
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2429
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2430
|
+
|
2431
|
+
|
2432
|
+
|
2433
|
+
|
2434
|
+
<xsl:variable name="title-where">
|
2435
|
+
<xsl:call-template name="getTitle">
|
2436
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2437
|
+
</xsl:call-template>
|
2438
|
+
</xsl:variable>
|
2439
|
+
<xsl:value-of select="$title-where"/>
|
2440
|
+
</fo:block>
|
2441
|
+
</xsl:when>
|
2442
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2443
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2444
|
+
|
2445
|
+
|
2446
|
+
|
2447
|
+
<xsl:variable name="title-key">
|
2448
|
+
<xsl:call-template name="getTitle">
|
2449
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2450
|
+
</xsl:call-template>
|
2451
|
+
</xsl:variable>
|
2452
|
+
<xsl:value-of select="$title-key"/>
|
2453
|
+
</fo:block>
|
2454
|
+
</xsl:when>
|
2455
|
+
</xsl:choose>
|
2092
2456
|
|
2093
|
-
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
<fo:table width="95%" table-layout="fixed">
|
2457
|
+
<!-- a few components -->
|
2458
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2459
|
+
<fo:block>
|
2099
2460
|
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2461
|
+
|
2462
|
+
|
2463
|
+
|
2464
|
+
<fo:block>
|
2465
|
+
|
2466
|
+
|
2467
|
+
|
2468
|
+
|
2469
|
+
<fo:table width="95%" table-layout="fixed">
|
2106
2470
|
|
2107
|
-
|
2108
|
-
|
2109
|
-
|
2110
|
-
|
2111
|
-
|
2112
|
-
|
2113
|
-
|
2114
|
-
|
2115
|
-
</
|
2116
|
-
|
2117
|
-
|
2118
|
-
|
2119
|
-
|
2120
|
-
|
2121
|
-
|
2122
|
-
|
2123
|
-
|
2124
|
-
|
2125
|
-
|
2126
|
-
|
2127
|
-
|
2128
|
-
|
2129
|
-
|
2130
|
-
|
2131
|
-
|
2132
|
-
|
2133
|
-
|
2134
|
-
|
2135
|
-
|
2136
|
-
|
2137
|
-
|
2138
|
-
|
2139
|
-
|
2140
|
-
|
2141
|
-
|
2471
|
+
<xsl:choose>
|
2472
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2473
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2474
|
+
</xsl:when>
|
2475
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2476
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2477
|
+
|
2478
|
+
</xsl:when>
|
2479
|
+
</xsl:choose>
|
2480
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2481
|
+
<xsl:variable name="html-table">
|
2482
|
+
<xsl:variable name="doc_ns">
|
2483
|
+
|
2484
|
+
</xsl:variable>
|
2485
|
+
<xsl:variable name="ns">
|
2486
|
+
<xsl:choose>
|
2487
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2488
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2489
|
+
</xsl:when>
|
2490
|
+
<xsl:otherwise>
|
2491
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2492
|
+
</xsl:otherwise>
|
2493
|
+
</xsl:choose>
|
2494
|
+
</xsl:variable>
|
2495
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2496
|
+
<xsl:element name="{$ns}:table">
|
2497
|
+
<tbody>
|
2498
|
+
<xsl:apply-templates mode="dl"/>
|
2499
|
+
</tbody>
|
2500
|
+
</xsl:element>
|
2501
|
+
</xsl:variable>
|
2502
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2503
|
+
<xsl:variable name="colwidths">
|
2504
|
+
<xsl:call-template name="calculate-column-widths">
|
2505
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2506
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2507
|
+
</xsl:call-template>
|
2508
|
+
</xsl:variable>
|
2509
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2510
|
+
<xsl:variable name="maxlength_dt">
|
2511
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2512
|
+
</xsl:variable>
|
2513
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2514
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2515
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2516
|
+
</xsl:call-template>
|
2517
|
+
<fo:table-body>
|
2518
|
+
<xsl:apply-templates>
|
2519
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2520
|
+
</xsl:apply-templates>
|
2521
|
+
</fo:table-body>
|
2522
|
+
</fo:table>
|
2523
|
+
</fo:block>
|
2524
|
+
</fo:block>
|
2525
|
+
</xsl:if>
|
2526
|
+
</fo:block-container>
|
2527
|
+
</fo:block-container>
|
2142
2528
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
2143
2529
|
<xsl:param name="colwidths"/>
|
2144
2530
|
<xsl:param name="maxlength_dt"/>
|
@@ -2235,6 +2621,7 @@
|
|
2235
2621
|
<xsl:param name="key_iso"/>
|
2236
2622
|
|
2237
2623
|
<fo:table-row>
|
2624
|
+
|
2238
2625
|
<fo:table-cell>
|
2239
2626
|
|
2240
2627
|
<fo:block margin-top="6pt">
|
@@ -2249,6 +2636,7 @@
|
|
2249
2636
|
|
2250
2637
|
|
2251
2638
|
|
2639
|
+
|
2252
2640
|
<xsl:apply-templates/>
|
2253
2641
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2254
2642
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2260,14 +2648,36 @@
|
|
2260
2648
|
<fo:table-cell>
|
2261
2649
|
<fo:block>
|
2262
2650
|
|
2263
|
-
|
2651
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2652
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
2653
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2654
|
+
</xsl:if>
|
2655
|
+
</xsl:if> -->
|
2264
2656
|
|
2265
2657
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2266
2658
|
|
2267
2659
|
</fo:block>
|
2268
2660
|
</fo:table-cell>
|
2269
2661
|
</fo:table-row>
|
2270
|
-
|
2662
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2663
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
2664
|
+
<fo:table-row>
|
2665
|
+
<fo:table-cell>
|
2666
|
+
<fo:block margin-top="6pt">
|
2667
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2668
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2669
|
+
</xsl:if>
|
2670
|
+
<xsl:text> </xsl:text>
|
2671
|
+
</fo:block>
|
2672
|
+
</fo:table-cell>
|
2673
|
+
<fo:table-cell>
|
2674
|
+
<fo:block>
|
2675
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2676
|
+
</fo:block>
|
2677
|
+
</fo:table-cell>
|
2678
|
+
</fo:table-row>
|
2679
|
+
</xsl:if>
|
2680
|
+
</xsl:if> -->
|
2271
2681
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2272
2682
|
<xsl:apply-templates/>
|
2273
2683
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -2292,6 +2702,31 @@
|
|
2292
2702
|
</fo:inline>
|
2293
2703
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2294
2704
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2705
|
+
<xsl:variable name="_font-size">
|
2706
|
+
|
2707
|
+
|
2708
|
+
|
2709
|
+
|
2710
|
+
|
2711
|
+
|
2712
|
+
|
2713
|
+
|
2714
|
+
|
2715
|
+
|
2716
|
+
|
2717
|
+
|
2718
|
+
|
2719
|
+
|
2720
|
+
</xsl:variable>
|
2721
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2722
|
+
<xsl:if test="$font-size != ''">
|
2723
|
+
<xsl:attribute name="font-size">
|
2724
|
+
<xsl:choose>
|
2725
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2726
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2727
|
+
</xsl:choose>
|
2728
|
+
</xsl:attribute>
|
2729
|
+
</xsl:if>
|
2295
2730
|
<xsl:apply-templates/>
|
2296
2731
|
</fo:inline>
|
2297
2732
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2617,11 +3052,24 @@
|
|
2617
3052
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2618
3053
|
<xsl:value-of select="substring($str, 2)"/>
|
2619
3054
|
</xsl:template><xsl:template match="mathml:math">
|
2620
|
-
<fo:inline font-family="
|
2621
|
-
<
|
2622
|
-
<xsl:
|
2623
|
-
</
|
3055
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3056
|
+
<xsl:variable name="mathml">
|
3057
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
3058
|
+
</xsl:variable>
|
3059
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
3060
|
+
<!-- <xsl:copy-of select="."/> -->
|
3061
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3062
|
+
</fo:instream-foreign-object>
|
2624
3063
|
</fo:inline>
|
3064
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3065
|
+
<xsl:copy>
|
3066
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3067
|
+
</xsl:copy>
|
3068
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
3069
|
+
<xsl:copy>
|
3070
|
+
<!-- replace start and end spaces to non-break space -->
|
3071
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3072
|
+
</xsl:copy>
|
2625
3073
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2626
3074
|
<xsl:variable name="target">
|
2627
3075
|
<xsl:choose>
|
@@ -2698,13 +3146,26 @@
|
|
2698
3146
|
<xsl:apply-templates/>
|
2699
3147
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2700
3148
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2701
|
-
|
3149
|
+
|
2702
3150
|
<xsl:apply-templates/>
|
2703
3151
|
</fo:basic-link>
|
2704
3152
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2705
|
-
<fo:block
|
2706
|
-
<xsl:
|
2707
|
-
|
3153
|
+
<fo:block-container margin-left="0mm">
|
3154
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3155
|
+
<xsl:attribute name="margin-left">
|
3156
|
+
<xsl:choose>
|
3157
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3158
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3159
|
+
</xsl:choose>
|
3160
|
+
</xsl:attribute>
|
3161
|
+
|
3162
|
+
</xsl:if>
|
3163
|
+
<fo:block-container margin-left="0mm">
|
3164
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3165
|
+
<xsl:apply-templates/>
|
3166
|
+
</fo:block>
|
3167
|
+
</fo:block-container>
|
3168
|
+
</fo:block-container>
|
2708
3169
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2709
3170
|
<fo:inline>
|
2710
3171
|
<xsl:apply-templates/>
|
@@ -2777,7 +3238,9 @@
|
|
2777
3238
|
</xsl:choose>
|
2778
3239
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2779
3240
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2780
|
-
<xsl:
|
3241
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3242
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3243
|
+
</fo:inline>
|
2781
3244
|
<xsl:apply-templates/>
|
2782
3245
|
</fo:block>
|
2783
3246
|
</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">
|
@@ -2881,15 +3344,109 @@
|
|
2881
3344
|
|
2882
3345
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2883
3346
|
</fo:block>
|
2884
|
-
</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">
|
3347
|
+
</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">
|
2885
3348
|
<xsl:apply-templates mode="contents"/>
|
2886
3349
|
<xsl:text> </xsl:text>
|
2887
|
-
</xsl:template><xsl:template match="
|
3350
|
+
</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">
|
3351
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3352
|
+
<xsl:text> </xsl:text>
|
3353
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
2888
3354
|
<xsl:value-of select="."/>
|
2889
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3355
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3356
|
+
<xsl:value-of select="."/>
|
3357
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3358
|
+
<xsl:apply-templates mode="contents"/>
|
3359
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3360
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3361
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3362
|
+
<xsl:apply-templates select="."/>
|
3363
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3364
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3365
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3366
|
+
<xsl:param name="contents"/>
|
3367
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3368
|
+
<fo:bookmark-tree>
|
3369
|
+
<xsl:choose>
|
3370
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3371
|
+
<xsl:choose>
|
3372
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3373
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3374
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3375
|
+
<fo:bookmark-title>
|
3376
|
+
<xsl:variable name="bookmark-title_">
|
3377
|
+
<xsl:call-template name="getLangVersion">
|
3378
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3379
|
+
</xsl:call-template>
|
3380
|
+
</xsl:variable>
|
3381
|
+
<xsl:choose>
|
3382
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3383
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3384
|
+
</xsl:when>
|
3385
|
+
<xsl:otherwise>
|
3386
|
+
<xsl:choose>
|
3387
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3388
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3389
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3390
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3391
|
+
</xsl:choose>
|
3392
|
+
</xsl:otherwise>
|
3393
|
+
</xsl:choose>
|
3394
|
+
</fo:bookmark-title>
|
3395
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3396
|
+
</fo:bookmark>
|
3397
|
+
|
3398
|
+
</xsl:for-each>
|
3399
|
+
</xsl:when>
|
3400
|
+
<xsl:otherwise>
|
3401
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3402
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3403
|
+
</xsl:for-each>
|
3404
|
+
</xsl:otherwise>
|
3405
|
+
</xsl:choose>
|
3406
|
+
</xsl:when>
|
3407
|
+
<xsl:otherwise>
|
3408
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3409
|
+
</xsl:otherwise>
|
3410
|
+
</xsl:choose>
|
3411
|
+
|
3412
|
+
|
3413
|
+
|
3414
|
+
|
3415
|
+
|
3416
|
+
|
3417
|
+
|
3418
|
+
|
3419
|
+
</fo:bookmark-tree>
|
3420
|
+
</xsl:if>
|
3421
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3422
|
+
<xsl:param name="lang"/>
|
3423
|
+
<xsl:choose>
|
3424
|
+
<xsl:when test="$lang = 'en'">
|
3425
|
+
|
3426
|
+
|
3427
|
+
</xsl:when>
|
3428
|
+
<xsl:when test="$lang = 'fr'">
|
3429
|
+
|
3430
|
+
|
3431
|
+
</xsl:when>
|
3432
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3433
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3434
|
+
</xsl:choose>
|
3435
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3436
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3437
|
+
<fo:bookmark-title>
|
3438
|
+
<xsl:if test="@section != ''">
|
3439
|
+
<xsl:value-of select="@section"/>
|
3440
|
+
<xsl:text> </xsl:text>
|
3441
|
+
</xsl:if>
|
3442
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3443
|
+
</fo:bookmark-title>
|
3444
|
+
<xsl:apply-templates mode="bookmark"/>
|
3445
|
+
</fo:bookmark>
|
3446
|
+
</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">
|
2890
3447
|
<xsl:if test="normalize-space() != ''">
|
2891
3448
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2892
|
-
|
3449
|
+
|
2893
3450
|
<xsl:apply-templates/>
|
2894
3451
|
</fo:block>
|
2895
3452
|
</xsl:if>
|
@@ -2944,7 +3501,7 @@
|
|
2944
3501
|
<xsl:apply-templates/>
|
2945
3502
|
</xsl:otherwise>
|
2946
3503
|
</xsl:choose>
|
2947
|
-
</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">
|
3504
|
+
</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">
|
2948
3505
|
<xsl:text> </xsl:text>
|
2949
3506
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
2950
3507
|
<xsl:copy>
|
@@ -2953,21 +3510,61 @@
|
|
2953
3510
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
2954
3511
|
<xsl:text> </xsl:text>
|
2955
3512
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
2956
|
-
|
2957
|
-
|
2958
|
-
|
2959
|
-
|
2960
|
-
|
3513
|
+
|
3514
|
+
<fo:block-container margin-left="0mm">
|
3515
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3516
|
+
<xsl:attribute name="margin-left">
|
3517
|
+
<xsl:choose>
|
3518
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3519
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3520
|
+
</xsl:choose>
|
3521
|
+
</xsl:attribute>
|
3522
|
+
|
3523
|
+
</xsl:if>
|
3524
|
+
<fo:block-container margin-left="0mm">
|
3525
|
+
|
3526
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3527
|
+
<xsl:variable name="_font-size">
|
3528
|
+
|
3529
|
+
|
3530
|
+
|
3531
|
+
|
3532
|
+
|
3533
|
+
|
3534
|
+
|
3535
|
+
|
3536
|
+
|
3537
|
+
|
3538
|
+
|
3539
|
+
|
3540
|
+
|
3541
|
+
10
|
3542
|
+
</xsl:variable>
|
3543
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3544
|
+
<xsl:if test="$font-size != ''">
|
3545
|
+
<xsl:attribute name="font-size">
|
3546
|
+
<xsl:choose>
|
3547
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3548
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3549
|
+
</xsl:choose>
|
3550
|
+
</xsl:attribute>
|
3551
|
+
</xsl:if>
|
3552
|
+
<xsl:apply-templates/>
|
3553
|
+
</fo:block>
|
3554
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3555
|
+
|
3556
|
+
</fo:block-container>
|
3557
|
+
</fo:block-container>
|
3558
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
2961
3559
|
<xsl:variable name="text">
|
2962
3560
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
2963
3561
|
</xsl:variable>
|
2964
|
-
<xsl:call-template name="add-zero-spaces">
|
3562
|
+
<xsl:call-template name="add-zero-spaces-java">
|
2965
3563
|
<xsl:with-param name="text" select="$text"/>
|
2966
3564
|
</xsl:call-template>
|
2967
3565
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
2968
3566
|
<xsl:if test="normalize-space() != ''">
|
2969
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2970
|
-
|
3567
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2971
3568
|
<xsl:apply-templates/>
|
2972
3569
|
</fo:block>
|
2973
3570
|
</xsl:if>
|
@@ -3035,6 +3632,145 @@
|
|
3035
3632
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
3036
3633
|
<xsl:apply-templates/>
|
3037
3634
|
</fo:block>
|
3635
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3636
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3637
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3638
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3639
|
+
</xsl:if>
|
3640
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3641
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3642
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3643
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3644
|
+
</xsl:if>
|
3645
|
+
<xsl:variable name="simple-table">
|
3646
|
+
<xsl:call-template name="getSimpleTable"/>
|
3647
|
+
</xsl:variable>
|
3648
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3649
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3650
|
+
<!-- <fo:table-column column-width="35mm"/>
|
3651
|
+
<fo:table-column column-width="115mm"/> -->
|
3652
|
+
<fo:table-column column-width="30%"/>
|
3653
|
+
<fo:table-column column-width="70%"/>
|
3654
|
+
</xsl:if>
|
3655
|
+
<xsl:apply-templates mode="requirement"/>
|
3656
|
+
</fo:table>
|
3657
|
+
<!-- fn processing -->
|
3658
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
3659
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
3660
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
3661
|
+
<xsl:call-template name="fn_display"/>
|
3662
|
+
</fo:block>
|
3663
|
+
</xsl:for-each>
|
3664
|
+
</xsl:if>
|
3665
|
+
</fo:block-container>
|
3666
|
+
</fo:block-container>
|
3667
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
3668
|
+
<fo:table-header>
|
3669
|
+
<xsl:apply-templates mode="requirement"/>
|
3670
|
+
</fo:table-header>
|
3671
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
3672
|
+
<fo:table-body>
|
3673
|
+
<xsl:apply-templates mode="requirement"/>
|
3674
|
+
</fo:table-body>
|
3675
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3676
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3677
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3678
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3679
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3680
|
+
</xsl:if>
|
3681
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3682
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3683
|
+
</xsl:if>
|
3684
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3685
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3686
|
+
</xsl:if>
|
3687
|
+
<xsl:apply-templates mode="requirement"/>
|
3688
|
+
</fo:table-row>
|
3689
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3690
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3691
|
+
<xsl:attribute name="text-align">
|
3692
|
+
<xsl:choose>
|
3693
|
+
<xsl:when test="@align">
|
3694
|
+
<xsl:value-of select="@align"/>
|
3695
|
+
</xsl:when>
|
3696
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3697
|
+
</xsl:choose>
|
3698
|
+
</xsl:attribute>
|
3699
|
+
<xsl:if test="@colspan">
|
3700
|
+
<xsl:attribute name="number-columns-spanned">
|
3701
|
+
<xsl:value-of select="@colspan"/>
|
3702
|
+
</xsl:attribute>
|
3703
|
+
</xsl:if>
|
3704
|
+
<xsl:if test="@rowspan">
|
3705
|
+
<xsl:attribute name="number-rows-spanned">
|
3706
|
+
<xsl:value-of select="@rowspan"/>
|
3707
|
+
</xsl:attribute>
|
3708
|
+
</xsl:if>
|
3709
|
+
<xsl:call-template name="display-align"/>
|
3710
|
+
|
3711
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3712
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3713
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
3714
|
+
</xsl:if>
|
3715
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
3716
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3717
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3718
|
+
</xsl:if> -->
|
3719
|
+
|
3720
|
+
<fo:block>
|
3721
|
+
<xsl:apply-templates/>
|
3722
|
+
</fo:block>
|
3723
|
+
</fo:table-cell>
|
3724
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3725
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3726
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3727
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3728
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
3729
|
+
</xsl:if>
|
3730
|
+
<xsl:attribute name="text-align">
|
3731
|
+
<xsl:choose>
|
3732
|
+
<xsl:when test="@align">
|
3733
|
+
<xsl:value-of select="@align"/>
|
3734
|
+
</xsl:when>
|
3735
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3736
|
+
</xsl:choose>
|
3737
|
+
</xsl:attribute>
|
3738
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3739
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3740
|
+
</xsl:if>
|
3741
|
+
<xsl:if test="@colspan">
|
3742
|
+
<xsl:attribute name="number-columns-spanned">
|
3743
|
+
<xsl:value-of select="@colspan"/>
|
3744
|
+
</xsl:attribute>
|
3745
|
+
</xsl:if>
|
3746
|
+
<xsl:if test="@rowspan">
|
3747
|
+
<xsl:attribute name="number-rows-spanned">
|
3748
|
+
<xsl:value-of select="@rowspan"/>
|
3749
|
+
</xsl:attribute>
|
3750
|
+
</xsl:if>
|
3751
|
+
<xsl:call-template name="display-align"/>
|
3752
|
+
|
3753
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3754
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
3755
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3756
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3757
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3758
|
+
</xsl:if>
|
3759
|
+
</xsl:if> -->
|
3760
|
+
<!-- 2nd line and below -->
|
3761
|
+
|
3762
|
+
<fo:block>
|
3763
|
+
<xsl:apply-templates/>
|
3764
|
+
</fo:block>
|
3765
|
+
</fo:table-cell>
|
3766
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3767
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3768
|
+
<xsl:apply-templates/>
|
3769
|
+
</fo:block>
|
3770
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3771
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
3772
|
+
<xsl:apply-templates/>
|
3773
|
+
</fo:block>
|
3038
3774
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
3039
3775
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
3040
3776
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -3054,12 +3790,13 @@
|
|
3054
3790
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3055
3791
|
|
3056
3792
|
<xsl:variable name="element">
|
3057
|
-
block
|
3793
|
+
block
|
3058
3794
|
|
3795
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3059
3796
|
</xsl:variable>
|
3060
3797
|
|
3061
3798
|
<xsl:choose>
|
3062
|
-
<xsl:when test="normalize-space($element)
|
3799
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3063
3800
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
3064
3801
|
<xsl:apply-templates/>
|
3065
3802
|
</fo:block>
|
@@ -3096,30 +3833,49 @@
|
|
3096
3833
|
</xsl:otherwise>
|
3097
3834
|
</xsl:choose>
|
3098
3835
|
|
3099
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3100
|
-
|
3101
|
-
|
3102
|
-
|
3103
|
-
<xsl:if test="$num = 1">
|
3104
|
-
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3105
|
-
</xsl:if>
|
3836
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3837
|
+
|
3838
|
+
<xsl:variable name="element">
|
3839
|
+
block
|
3106
3840
|
|
3107
|
-
|
3108
|
-
|
3841
|
+
</xsl:variable>
|
3842
|
+
<xsl:choose>
|
3843
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3844
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3845
|
+
|
3846
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
3847
|
+
<xsl:if test="$num = 1">
|
3848
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3849
|
+
</xsl:if>
|
3850
|
+
|
3851
|
+
<xsl:apply-templates/>
|
3852
|
+
</fo:block>
|
3853
|
+
</xsl:when>
|
3854
|
+
<xsl:otherwise>
|
3855
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3856
|
+
<xsl:apply-templates/>
|
3857
|
+
</fo:inline>
|
3858
|
+
</xsl:otherwise>
|
3859
|
+
</xsl:choose>
|
3109
3860
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3110
3861
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3111
3862
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3112
3863
|
<xsl:variable name="termsource_text">
|
3113
3864
|
<xsl:apply-templates/>
|
3114
3865
|
</xsl:variable>
|
3866
|
+
|
3115
3867
|
<xsl:choose>
|
3116
3868
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3117
3869
|
<xsl:apply-templates/>
|
3118
3870
|
</xsl:when>
|
3119
|
-
<xsl:otherwise>
|
3120
|
-
|
3121
|
-
|
3122
|
-
|
3871
|
+
<xsl:otherwise>
|
3872
|
+
|
3873
|
+
<xsl:text>[</xsl:text>
|
3874
|
+
|
3875
|
+
<xsl:apply-templates/>
|
3876
|
+
|
3877
|
+
<xsl:text>]</xsl:text>
|
3878
|
+
|
3123
3879
|
</xsl:otherwise>
|
3124
3880
|
</xsl:choose>
|
3125
3881
|
</fo:block>
|
@@ -3140,18 +3896,29 @@
|
|
3140
3896
|
<xsl:if test="normalize-space() != ''">
|
3141
3897
|
<xsl:value-of select="."/>
|
3142
3898
|
</xsl:if>
|
3143
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3899
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3900
|
+
<fo:block-container margin-left="0mm">
|
3901
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3902
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
3903
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3904
|
+
</xsl:if>
|
3905
|
+
</xsl:if>
|
3906
|
+
|
3907
|
+
<fo:block-container margin-left="0mm">
|
3144
3908
|
|
3145
|
-
|
3146
|
-
|
3147
|
-
|
3148
|
-
|
3149
|
-
|
3150
|
-
|
3151
|
-
|
3152
|
-
|
3153
|
-
|
3154
|
-
|
3909
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
3910
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3911
|
+
</fo:block>
|
3912
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3913
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
3914
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
3915
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
3916
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
3917
|
+
</fo:block>
|
3918
|
+
</xsl:if>
|
3919
|
+
|
3920
|
+
</fo:block-container>
|
3921
|
+
</fo:block-container>
|
3155
3922
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3156
3923
|
<xsl:if test="../*[local-name() = 'author']">
|
3157
3924
|
<xsl:text>, </xsl:text>
|
@@ -3179,6 +3946,7 @@
|
|
3179
3946
|
<xsl:if test="@type = 'inline'">
|
3180
3947
|
|
3181
3948
|
|
3949
|
+
|
3182
3950
|
</xsl:if>
|
3183
3951
|
|
3184
3952
|
|
@@ -3209,6 +3977,7 @@
|
|
3209
3977
|
|
3210
3978
|
|
3211
3979
|
|
3980
|
+
|
3212
3981
|
<xsl:choose>
|
3213
3982
|
<xsl:when test="ancestor::un:annex and $depth >= 2">9.5</xsl:when>
|
3214
3983
|
<xsl:when test="ancestor::un:sections">9.5</xsl:when>
|
@@ -3313,13 +4082,14 @@
|
|
3313
4082
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3314
4083
|
<fo:block>
|
3315
4084
|
<xsl:call-template name="setId"/>
|
4085
|
+
|
3316
4086
|
<xsl:apply-templates/>
|
3317
4087
|
</fo:block>
|
3318
4088
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
3319
4089
|
<fo:block id="{@id}">
|
3320
4090
|
<xsl:apply-templates/>
|
3321
4091
|
</fo:block>
|
3322
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@
|
4092
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3323
4093
|
|
3324
4094
|
<fo:block id="{@id}">
|
3325
4095
|
<xsl:apply-templates/>
|
@@ -3342,6 +4112,31 @@
|
|
3342
4112
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3343
4113
|
<!-- 0xA0 to space replacement -->
|
3344
4114
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4115
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4116
|
+
<xsl:choose>
|
4117
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
4118
|
+
<fo:block-container>
|
4119
|
+
<xsl:attribute name="margin-left">
|
4120
|
+
<xsl:choose>
|
4121
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4122
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4123
|
+
</xsl:choose>
|
4124
|
+
</xsl:attribute>
|
4125
|
+
|
4126
|
+
|
4127
|
+
<fo:block-container margin-left="0mm">
|
4128
|
+
<fo:block>
|
4129
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4130
|
+
</fo:block>
|
4131
|
+
</fo:block-container>
|
4132
|
+
</fo:block-container>
|
4133
|
+
</xsl:when>
|
4134
|
+
<xsl:otherwise>
|
4135
|
+
<fo:block>
|
4136
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4137
|
+
</fo:block>
|
4138
|
+
</xsl:otherwise>
|
4139
|
+
</xsl:choose>
|
3345
4140
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3346
4141
|
<!-- <row>
|
3347
4142
|
<date>05-07-2013</date>
|
@@ -3373,6 +4168,65 @@
|
|
3373
4168
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3374
4169
|
<fo:block><xsl:apply-templates/></fo:block>
|
3375
4170
|
</fo:table-cell>
|
4171
|
+
</xsl:template><xsl:template name="processBibitem">
|
4172
|
+
|
4173
|
+
|
4174
|
+
|
4175
|
+
|
4176
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4177
|
+
<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')]"/>
|
4178
|
+
<xsl:choose>
|
4179
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4180
|
+
<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"/>
|
4181
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4182
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4183
|
+
</xsl:if>
|
4184
|
+
<xsl:value-of select="$_doc_ident"/>
|
4185
|
+
</xsl:when>
|
4186
|
+
<xsl:otherwise>
|
4187
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4188
|
+
<xsl:if test="$type != ''">
|
4189
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4190
|
+
</xsl:if>
|
4191
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4192
|
+
</xsl:otherwise>
|
4193
|
+
</xsl:choose>
|
4194
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
4195
|
+
<xsl:choose>
|
4196
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
4197
|
+
<author>
|
4198
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4199
|
+
</author>
|
4200
|
+
</xsl:when>
|
4201
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
4202
|
+
<author>
|
4203
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4204
|
+
<xsl:text> </xsl:text>
|
4205
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
4206
|
+
</author>
|
4207
|
+
</xsl:when>
|
4208
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
4209
|
+
<author>
|
4210
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4211
|
+
<xsl:text> </xsl:text>
|
4212
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
4213
|
+
</author>
|
4214
|
+
</xsl:when>
|
4215
|
+
<xsl:otherwise>
|
4216
|
+
<xsl:apply-templates/>
|
4217
|
+
</xsl:otherwise>
|
4218
|
+
</xsl:choose>
|
4219
|
+
</xsl:template><xsl:template name="renderDate">
|
4220
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
4221
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
4222
|
+
</xsl:if>
|
4223
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
4224
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
4225
|
+
</xsl:if>
|
4226
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
4227
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
4228
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4229
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
3376
4230
|
</xsl:template><xsl:template name="convertDate">
|
3377
4231
|
<xsl:param name="date"/>
|
3378
4232
|
<xsl:param name="format" select="'short'"/>
|
@@ -3455,6 +4309,7 @@
|
|
3455
4309
|
|
3456
4310
|
|
3457
4311
|
|
4312
|
+
|
3458
4313
|
|
3459
4314
|
</xsl:variable>
|
3460
4315
|
<xsl:choose>
|
@@ -3469,6 +4324,7 @@
|
|
3469
4324
|
<dc:creator>
|
3470
4325
|
|
3471
4326
|
|
4327
|
+
|
3472
4328
|
</dc:creator>
|
3473
4329
|
<dc:description>
|
3474
4330
|
<xsl:variable name="abstract">
|
@@ -3478,6 +4334,7 @@
|
|
3478
4334
|
<xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
3479
4335
|
|
3480
4336
|
|
4337
|
+
|
3481
4338
|
</xsl:variable>
|
3482
4339
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3483
4340
|
</dc:description>
|
@@ -3576,7 +4433,9 @@
|
|
3576
4433
|
|
3577
4434
|
|
3578
4435
|
|
3579
|
-
|
4436
|
+
|
4437
|
+
|
4438
|
+
|
3580
4439
|
</xsl:variable>
|
3581
4440
|
<xsl:if test="$documentNS != $XSLNS">
|
3582
4441
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3602,4 +4461,21 @@
|
|
3602
4461
|
</xsl:otherwise>
|
3603
4462
|
</xsl:choose>
|
3604
4463
|
</xsl:attribute>
|
4464
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4465
|
+
<xsl:param name="text"/>
|
4466
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4467
|
+
<xsl:if test="string-length($text) > 0">
|
4468
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4469
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4470
|
+
<xsl:if test="$char = '®'">
|
4471
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4472
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4473
|
+
</xsl:if>
|
4474
|
+
<xsl:value-of select="$char"/>
|
4475
|
+
</fo:inline>
|
4476
|
+
<xsl:call-template name="add-letter-spacing">
|
4477
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4478
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4479
|
+
</xsl:call-template>
|
4480
|
+
</xsl:if>
|
3605
4481
|
</xsl:template></xsl:stylesheet>
|