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
@@ -16,6 +16,14 @@
|
|
16
16
|
|
17
17
|
<xsl:variable name="contents">
|
18
18
|
<contents>
|
19
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
20
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
21
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
22
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
23
|
+
|
24
|
+
<xsl:apply-templates select="/un:un-standard/un:sections/*" mode="contents"/>
|
25
|
+
<xsl:apply-templates select="/un:un-standard/un:annex" mode="contents"/>
|
26
|
+
<xsl:apply-templates select="/un:un-standard/un:bibliography/un:references" mode="contents"/>
|
19
27
|
</contents>
|
20
28
|
</xsl:variable>
|
21
29
|
|
@@ -29,7 +37,7 @@
|
|
29
37
|
|
30
38
|
<xsl:template match="/">
|
31
39
|
<xsl:call-template name="namespaceCheck"/>
|
32
|
-
<fo:root font-family="Times New Roman,
|
40
|
+
<fo:root font-family="Times New Roman, STIX Two Math, HanSans" font-size="10pt" xml:lang="{$lang}">
|
33
41
|
<fo:layout-master-set>
|
34
42
|
<!-- Cover page -->
|
35
43
|
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
@@ -66,6 +74,10 @@
|
|
66
74
|
|
67
75
|
<xsl:call-template name="addPDFUAmeta"/>
|
68
76
|
|
77
|
+
<xsl:call-template name="addBookmarks">
|
78
|
+
<xsl:with-param name="contents" select="$contents"/>
|
79
|
+
</xsl:call-template>
|
80
|
+
|
69
81
|
<!-- Cover Page -->
|
70
82
|
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
71
83
|
<fo:flow flow-name="xsl-region-body">
|
@@ -164,7 +176,7 @@
|
|
164
176
|
|
165
177
|
<xsl:apply-templates select="/un:un-standard/un:preface/un:abstract"/>
|
166
178
|
|
167
|
-
<xsl:variable name="charsToRemove" select="concat($upper, $lower, '.()
|
179
|
+
<xsl:variable name="charsToRemove" select="concat($upper, $lower, '.()~!@#$%^*-+:')"/>
|
168
180
|
<xsl:variable name="code" select="translate(/un:un-standard/un:bibdata/un:docidentifier, $charsToRemove,'')"/>
|
169
181
|
|
170
182
|
<fo:block-container absolute-position="fixed" left="20mm" top="258mm" width="30mm" text-align="center">
|
@@ -173,20 +185,22 @@
|
|
173
185
|
</fo:block>
|
174
186
|
|
175
187
|
<fo:block padding-top="1mm">
|
176
|
-
<
|
177
|
-
<
|
178
|
-
<barcode:
|
179
|
-
<barcode:
|
180
|
-
|
181
|
-
|
182
|
-
<barcode:
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
188
|
+
<xsl:if test="normalize-space($code) != ''">
|
189
|
+
<fo:instream-foreign-object fox:alt-text="Barcode">
|
190
|
+
<barcode:barcode message="{$code}">
|
191
|
+
<barcode:code39>
|
192
|
+
<barcode:height>8.5mm</barcode:height>
|
193
|
+
<barcode:module-width>0.24mm</barcode:module-width>
|
194
|
+
<barcode:human-readable>
|
195
|
+
<barcode:placement>none</barcode:placement>
|
196
|
+
<!--<barcode:pattern>* _ _ _ _ _ _ _ _ _ *</barcode:pattern>
|
197
|
+
<barcode:font-name>Arial</barcode:font-name>
|
198
|
+
<barcode:font-size>9.7pt</barcode:font-size> -->
|
199
|
+
</barcode:human-readable>
|
200
|
+
</barcode:code39>
|
201
|
+
</barcode:barcode>
|
202
|
+
</fo:instream-foreign-object>
|
203
|
+
</xsl:if>
|
190
204
|
</fo:block>
|
191
205
|
<fo:block padding-top="-0.8mm" text-align="left" font-family="Arial" font-size="8pt" letter-spacing="1.8mm">
|
192
206
|
<xsl:value-of select="concat('*', $code, '*')"/>
|
@@ -200,14 +214,16 @@
|
|
200
214
|
</fo:block-container>
|
201
215
|
<fo:block-container absolute-position="fixed" left="170mm" top="253mm">
|
202
216
|
<fo:block>
|
203
|
-
<
|
204
|
-
<
|
205
|
-
<barcode:
|
206
|
-
<barcode:
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
217
|
+
<xsl:if test="normalize-space(/un:un-standard/un:bibdata/un:ext/un:session/un:id) != ''">
|
218
|
+
<fo:instream-foreign-object fox:alt-text="Barcode">
|
219
|
+
<barcode:barcode message="{concat('http://undocs.org/', /un:un-standard/un:bibdata/un:ext/un:session/un:id)}">
|
220
|
+
<barcode:qr>
|
221
|
+
<barcode:module-width>0.55mm</barcode:module-width>
|
222
|
+
<barcode:ec-level>M</barcode:ec-level>
|
223
|
+
</barcode:qr>
|
224
|
+
</barcode:barcode>
|
225
|
+
</fo:instream-foreign-object>
|
226
|
+
</xsl:if>
|
211
227
|
</fo:block>
|
212
228
|
</fo:block-container>
|
213
229
|
|
@@ -235,9 +251,19 @@
|
|
235
251
|
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
236
252
|
</xsl:if>
|
237
253
|
|
254
|
+
<!-- Preface Pages (except Abstract, that showed in Summary on cover page`) -->
|
255
|
+
<xsl:if test="/un:un-standard/un:preface/*[not(local-name() = 'abstract')]">
|
256
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
257
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
258
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
259
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
260
|
+
<fo:block break-after="page"/>
|
261
|
+
</xsl:if>
|
262
|
+
|
238
263
|
<fo:block>
|
239
264
|
<xsl:apply-templates select="/un:un-standard/un:sections/*"/>
|
240
265
|
<xsl:apply-templates select="/un:un-standard/un:annex"/>
|
266
|
+
<xsl:apply-templates select="/un:un-standard/un:bibliography/un:references"/>
|
241
267
|
</fo:block>
|
242
268
|
|
243
269
|
<fo:block-container margin-left="50mm" width="30mm" border-bottom="0.5pt solid black" margin-top="12pt" keep-with-previous="always">
|
@@ -252,6 +278,65 @@
|
|
252
278
|
</xsl:template>
|
253
279
|
|
254
280
|
|
281
|
+
|
282
|
+
<!-- ============================= -->
|
283
|
+
<!-- CONTENTS -->
|
284
|
+
<!-- ============================= -->
|
285
|
+
<xsl:template match="node()" mode="contents">
|
286
|
+
<xsl:apply-templates mode="contents"/>
|
287
|
+
</xsl:template>
|
288
|
+
|
289
|
+
<!-- element with title -->
|
290
|
+
<xsl:template match="*[un:title]" mode="contents">
|
291
|
+
<xsl:variable name="level">
|
292
|
+
<xsl:call-template name="getLevel">
|
293
|
+
<xsl:with-param name="depth" select="un:title/@depth"/>
|
294
|
+
</xsl:call-template>
|
295
|
+
</xsl:variable>
|
296
|
+
|
297
|
+
<xsl:variable name="display">
|
298
|
+
<xsl:choose>
|
299
|
+
<xsl:when test="$level > 3">false</xsl:when>
|
300
|
+
<xsl:otherwise>true</xsl:otherwise>
|
301
|
+
</xsl:choose>
|
302
|
+
</xsl:variable>
|
303
|
+
|
304
|
+
<xsl:variable name="skip">
|
305
|
+
<xsl:choose>
|
306
|
+
<xsl:when test="ancestor-or-self::un:bibitem">true</xsl:when>
|
307
|
+
<xsl:when test="ancestor-or-self::un:term">true</xsl:when>
|
308
|
+
<xsl:when test="@inline-header = 'true'">true</xsl:when>
|
309
|
+
<xsl:otherwise>false</xsl:otherwise>
|
310
|
+
</xsl:choose>
|
311
|
+
</xsl:variable>
|
312
|
+
|
313
|
+
<xsl:if test="$skip = 'false'">
|
314
|
+
|
315
|
+
<xsl:variable name="section">
|
316
|
+
<xsl:call-template name="getSection"/>
|
317
|
+
</xsl:variable>
|
318
|
+
|
319
|
+
<xsl:variable name="title">
|
320
|
+
<xsl:call-template name="getName"/>
|
321
|
+
</xsl:variable>
|
322
|
+
|
323
|
+
<xsl:variable name="type">
|
324
|
+
<xsl:value-of select="local-name()"/>
|
325
|
+
</xsl:variable>
|
326
|
+
|
327
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
328
|
+
<title>
|
329
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
330
|
+
</title>
|
331
|
+
<xsl:apply-templates mode="contents"/>
|
332
|
+
</item>
|
333
|
+
</xsl:if>
|
334
|
+
|
335
|
+
</xsl:template>
|
336
|
+
<xsl:template match="un:references[not(@normative='true')]/un:bibitem" mode="contents"/>
|
337
|
+
<!-- ============================= -->
|
338
|
+
<!-- ============================= -->
|
339
|
+
|
255
340
|
|
256
341
|
<!-- ============================= -->
|
257
342
|
<!-- PARAGRAPHS -->
|
@@ -455,7 +540,7 @@
|
|
455
540
|
</fo:block>
|
456
541
|
</xsl:template>
|
457
542
|
|
458
|
-
<xsl:template match="un:ul | un:ol">
|
543
|
+
<xsl:template match="un:ul | un:ol" mode="ul_ol">
|
459
544
|
<fo:block-container margin-left="8mm" text-indent="0mm">
|
460
545
|
<fo:list-block provisional-distance-between-starts="4mm" margin-left="-8mm">
|
461
546
|
<xsl:apply-templates/>
|
@@ -465,13 +550,18 @@
|
|
465
550
|
</xsl:template>
|
466
551
|
|
467
552
|
<xsl:template match="un:ul//un:note | un:ol//un:note" priority="2"/>
|
468
|
-
<xsl:template match="un:ul//un:note/un:
|
469
|
-
|
553
|
+
<xsl:template match="un:ul//un:note/un:name | un:ol//un:note/un:name" mode="process" priority="2"/>
|
554
|
+
<xsl:template match="un:ul//un:note/un:p | un:ol//un:note/un:p" mode="process" priority="2">
|
555
|
+
<fo:block margin-top="4pt">
|
470
556
|
<xsl:apply-templates select="../un:name" mode="presentation"/>
|
471
557
|
<xsl:apply-templates/>
|
472
558
|
</fo:block>
|
473
559
|
</xsl:template>
|
474
560
|
|
561
|
+
<xsl:template match="un:ul//un:note/* | un:ol//un:note/*" mode="process">
|
562
|
+
<xsl:apply-templates select="."/>
|
563
|
+
</xsl:template>
|
564
|
+
|
475
565
|
<xsl:template match="un:li">
|
476
566
|
<xsl:variable name="level">
|
477
567
|
<xsl:call-template name="getLevel"/>
|
@@ -819,31 +909,45 @@
|
|
819
909
|
<xsl:template match="un:docidentifier"/>
|
820
910
|
|
821
911
|
|
822
|
-
<xsl:template match="un:formula" name="formula-un" priority="2">
|
823
|
-
<fo:block
|
824
|
-
<
|
825
|
-
<
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
<fo:table-
|
839
|
-
<fo:
|
840
|
-
<
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
912
|
+
<xsl:template match="un:formula" name="formula-un" priority="2">
|
913
|
+
<fo:block-container margin-left="0mm">
|
914
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
915
|
+
<xsl:attribute name="margin-left">
|
916
|
+
<xsl:choose>
|
917
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
918
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
919
|
+
</xsl:choose>
|
920
|
+
</xsl:attribute>
|
921
|
+
</xsl:if>
|
922
|
+
<fo:block-container margin-left="0mm">
|
923
|
+
|
924
|
+
<fo:block id="{@id}" margin-top="6pt">
|
925
|
+
<fo:table table-layout="fixed" width="100%">
|
926
|
+
<fo:table-column column-width="95%"/>
|
927
|
+
<fo:table-column column-width="5%"/>
|
928
|
+
<fo:table-body>
|
929
|
+
<fo:table-row>
|
930
|
+
<fo:table-cell>
|
931
|
+
<fo:block text-align="center">
|
932
|
+
<xsl:if test="ancestor::un:annex">
|
933
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
934
|
+
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
935
|
+
</xsl:if>
|
936
|
+
<xsl:apply-templates/>
|
937
|
+
</fo:block>
|
938
|
+
</fo:table-cell>
|
939
|
+
<fo:table-cell> <!-- display-align="center" -->
|
940
|
+
<fo:block text-align="right">
|
941
|
+
<xsl:apply-templates select="un:name" mode="presentation"/>
|
942
|
+
</fo:block>
|
943
|
+
</fo:table-cell>
|
944
|
+
</fo:table-row>
|
945
|
+
</fo:table-body>
|
946
|
+
</fo:table>
|
947
|
+
</fo:block>
|
948
|
+
|
949
|
+
</fo:block-container>
|
950
|
+
</fo:block-container>
|
847
951
|
</xsl:template>
|
848
952
|
|
849
953
|
|
@@ -863,9 +967,23 @@
|
|
863
967
|
</xsl:template>
|
864
968
|
|
865
969
|
<xsl:template match="un:dl" priority="2">
|
866
|
-
<fo:block
|
867
|
-
<xsl:
|
868
|
-
|
970
|
+
<fo:block-container margin-left="0mm">
|
971
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
972
|
+
<xsl:attribute name="margin-left">
|
973
|
+
<xsl:choose>
|
974
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
975
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
976
|
+
</xsl:choose>
|
977
|
+
</xsl:attribute>
|
978
|
+
</xsl:if>
|
979
|
+
<fo:block-container margin-left="0mm">
|
980
|
+
|
981
|
+
<fo:block line-height="122%" margin-bottom="6pt" text-indent="0mm" text-align="justify">
|
982
|
+
<xsl:apply-templates/>
|
983
|
+
</fo:block>
|
984
|
+
|
985
|
+
</fo:block-container>
|
986
|
+
</fo:block-container>
|
869
987
|
</xsl:template>
|
870
988
|
|
871
989
|
<xsl:template match="un:dt" priority="2">
|
@@ -1061,13 +1179,22 @@
|
|
1061
1179
|
|
1062
1180
|
</title-edition>
|
1063
1181
|
|
1182
|
+
<title-edition lang="fr">
|
1183
|
+
|
1184
|
+
<xsl:text>Édition </xsl:text>
|
1185
|
+
|
1186
|
+
</title-edition>
|
1187
|
+
|
1064
1188
|
|
1065
1189
|
<title-toc lang="en">
|
1066
1190
|
|
1067
1191
|
|
1068
1192
|
|
1069
1193
|
</title-toc>
|
1070
|
-
<title-toc lang="fr">
|
1194
|
+
<title-toc lang="fr">
|
1195
|
+
|
1196
|
+
|
1197
|
+
</title-toc>
|
1071
1198
|
|
1072
1199
|
<title-toc lang="zh">Contents</title-toc>
|
1073
1200
|
|
@@ -1101,7 +1228,12 @@
|
|
1101
1228
|
|
1102
1229
|
|
1103
1230
|
|
1104
|
-
<title-source lang="en">
|
1231
|
+
<title-source lang="en">
|
1232
|
+
|
1233
|
+
<xsl:text>SOURCE</xsl:text>
|
1234
|
+
|
1235
|
+
|
1236
|
+
</title-source>
|
1105
1237
|
|
1106
1238
|
<title-keywords lang="en">Keywords</title-keywords>
|
1107
1239
|
|
@@ -1144,12 +1276,25 @@
|
|
1144
1276
|
<title-warning lang="zh">警告</title-warning>
|
1145
1277
|
|
1146
1278
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1279
|
+
|
1280
|
+
<title-continued lang="en">(continued)</title-continued>
|
1281
|
+
<title-continued lang="fr">(continué)</title-continued>
|
1282
|
+
|
1147
1283
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1148
1284
|
<xsl:param name="name"/>
|
1149
|
-
<xsl:
|
1150
|
-
|
1285
|
+
<xsl:param name="lang"/>
|
1286
|
+
<xsl:variable name="lang_">
|
1287
|
+
<xsl:choose>
|
1288
|
+
<xsl:when test="$lang != ''">
|
1289
|
+
<xsl:value-of select="$lang"/>
|
1290
|
+
</xsl:when>
|
1291
|
+
<xsl:otherwise>
|
1292
|
+
<xsl:call-template name="getLang"/>
|
1293
|
+
</xsl:otherwise>
|
1294
|
+
</xsl:choose>
|
1151
1295
|
</xsl:variable>
|
1152
|
-
<xsl:variable name="
|
1296
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1297
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
1153
1298
|
<xsl:choose>
|
1154
1299
|
<xsl:when test="normalize-space($title_) != ''">
|
1155
1300
|
<xsl:value-of select="$title_"/>
|
@@ -1158,7 +1303,10 @@
|
|
1158
1303
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
1159
1304
|
</xsl:otherwise>
|
1160
1305
|
</xsl:choose>
|
1161
|
-
</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="
|
1306
|
+
</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">
|
1307
|
+
|
1308
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1309
|
+
|
1162
1310
|
|
1163
1311
|
|
1164
1312
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
@@ -1169,14 +1317,14 @@
|
|
1169
1317
|
|
1170
1318
|
|
1171
1319
|
|
1172
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1173
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1320
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1174
1321
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1175
1322
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1176
1323
|
|
1177
1324
|
|
1178
1325
|
|
1179
1326
|
|
1327
|
+
|
1180
1328
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1181
1329
|
|
1182
1330
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -1218,9 +1366,11 @@
|
|
1218
1366
|
|
1219
1367
|
|
1220
1368
|
|
1369
|
+
|
1221
1370
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1222
1371
|
|
1223
1372
|
|
1373
|
+
|
1224
1374
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1225
1375
|
|
1226
1376
|
|
@@ -1236,10 +1386,13 @@
|
|
1236
1386
|
|
1237
1387
|
|
1238
1388
|
|
1389
|
+
|
1239
1390
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1240
1391
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1241
1392
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1242
1393
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1394
|
+
|
1395
|
+
|
1243
1396
|
|
1244
1397
|
|
1245
1398
|
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
@@ -1259,6 +1412,8 @@
|
|
1259
1412
|
<xsl:attribute name="margin-left">15mm</xsl:attribute>
|
1260
1413
|
|
1261
1414
|
|
1415
|
+
|
1416
|
+
|
1262
1417
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
1263
1418
|
|
1264
1419
|
|
@@ -1283,6 +1438,8 @@
|
|
1283
1438
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
1284
1439
|
|
1285
1440
|
|
1441
|
+
|
1442
|
+
|
1286
1443
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1287
1444
|
|
1288
1445
|
|
@@ -1293,11 +1450,13 @@
|
|
1293
1450
|
|
1294
1451
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1295
1452
|
|
1296
|
-
|
1453
|
+
|
1454
|
+
|
1297
1455
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1298
1456
|
|
1299
1457
|
|
1300
1458
|
|
1459
|
+
|
1301
1460
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1302
1461
|
|
1303
1462
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
@@ -1311,15 +1470,15 @@
|
|
1311
1470
|
|
1312
1471
|
|
1313
1472
|
|
1473
|
+
|
1314
1474
|
|
1315
1475
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1316
1476
|
|
1317
1477
|
|
1478
|
+
</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">
|
1318
1479
|
|
1319
1480
|
|
1320
1481
|
|
1321
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1322
|
-
|
1323
1482
|
|
1324
1483
|
|
1325
1484
|
|
@@ -1327,10 +1486,10 @@
|
|
1327
1486
|
|
1328
1487
|
|
1329
1488
|
|
1330
|
-
|
1331
1489
|
|
1332
1490
|
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
1333
1491
|
|
1492
|
+
|
1334
1493
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1335
1494
|
|
1336
1495
|
|
@@ -1356,6 +1515,8 @@
|
|
1356
1515
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1357
1516
|
|
1358
1517
|
|
1518
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1519
|
+
|
1359
1520
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1360
1521
|
|
1361
1522
|
|
@@ -1376,6 +1537,7 @@
|
|
1376
1537
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1377
1538
|
|
1378
1539
|
|
1540
|
+
|
1379
1541
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1380
1542
|
|
1381
1543
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1392,13 +1554,14 @@
|
|
1392
1554
|
|
1393
1555
|
|
1394
1556
|
|
1557
|
+
|
1395
1558
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1396
1559
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1397
1560
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1398
1561
|
|
1399
1562
|
|
1400
1563
|
|
1401
|
-
|
1564
|
+
|
1402
1565
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
1403
1566
|
|
1404
1567
|
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
@@ -1428,11 +1591,14 @@
|
|
1428
1591
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1429
1592
|
|
1430
1593
|
|
1594
|
+
|
1431
1595
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1432
1596
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1433
1597
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1434
1598
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1435
1599
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1600
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1601
|
+
|
1436
1602
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1437
1603
|
|
1438
1604
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -1443,7 +1609,43 @@
|
|
1443
1609
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1444
1610
|
|
1445
1611
|
|
1446
|
-
</xsl:attribute-set><xsl:template
|
1612
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1613
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1614
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1615
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1616
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1617
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1618
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1619
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1620
|
+
|
1621
|
+
<!-- Normative references -->
|
1622
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
1623
|
+
<!-- Terms and definitions -->
|
1624
|
+
<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"/>
|
1625
|
+
<!-- Another main sections -->
|
1626
|
+
<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"/>
|
1627
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
1628
|
+
<!-- Bibliography -->
|
1629
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
1630
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1631
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1632
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1633
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1634
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1635
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1636
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1637
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1638
|
+
|
1639
|
+
<!-- Normative references -->
|
1640
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
1641
|
+
<!-- Terms and definitions -->
|
1642
|
+
<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']]"/>
|
1643
|
+
<!-- Another main sections -->
|
1644
|
+
<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'])]"/>
|
1645
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1646
|
+
<!-- Bibliography -->
|
1647
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1648
|
+
</xsl:template><xsl:template match="text()">
|
1447
1649
|
<xsl:value-of select="."/>
|
1448
1650
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
1449
1651
|
<xsl:value-of select="$linebreak"/>
|
@@ -1460,6 +1662,10 @@
|
|
1460
1662
|
|
1461
1663
|
|
1462
1664
|
|
1665
|
+
|
1666
|
+
|
1667
|
+
<!-- $namespace = 'iso' or -->
|
1668
|
+
|
1463
1669
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1464
1670
|
|
1465
1671
|
|
@@ -1495,6 +1701,7 @@
|
|
1495
1701
|
<xsl:with-param name="table" select="$simple-table"/>
|
1496
1702
|
</xsl:call-template>
|
1497
1703
|
</xsl:variable>
|
1704
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1498
1705
|
|
1499
1706
|
<!-- <xsl:variable name="colwidths2">
|
1500
1707
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1516,28 +1723,54 @@
|
|
1516
1723
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1517
1724
|
|
1518
1725
|
|
1519
|
-
|
1726
|
+
|
1727
|
+
|
1520
1728
|
|
1521
1729
|
<xsl:attribute name="margin-bottom">18pt</xsl:attribute>
|
1730
|
+
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
1731
|
+
|
1522
1732
|
|
1523
1733
|
|
1734
|
+
|
1524
1735
|
|
1525
1736
|
|
1526
1737
|
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1738
|
+
|
1739
|
+
|
1740
|
+
|
1741
|
+
|
1742
|
+
<xsl:variable name="table_attributes">
|
1743
|
+
<attribute name="table-layout">fixed</attribute>
|
1744
|
+
<attribute name="width">100%</attribute>
|
1745
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1746
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1530
1747
|
|
1531
1748
|
|
1532
1749
|
|
1533
1750
|
|
1751
|
+
|
1752
|
+
|
1534
1753
|
|
1754
|
+
<attribute name="border-top">0.5pt solid black</attribute>
|
1755
|
+
|
1535
1756
|
|
1536
|
-
|
1537
|
-
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
1757
|
+
|
1538
1758
|
|
1759
|
+
</xsl:variable>
|
1760
|
+
|
1761
|
+
|
1762
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1539
1763
|
|
1764
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1765
|
+
<xsl:attribute name="{@name}">
|
1766
|
+
<xsl:value-of select="."/>
|
1767
|
+
</xsl:attribute>
|
1768
|
+
</xsl:for-each>
|
1540
1769
|
|
1770
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1771
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1772
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1773
|
+
</xsl:if>
|
1541
1774
|
|
1542
1775
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1543
1776
|
<xsl:choose>
|
@@ -1561,6 +1794,33 @@
|
|
1561
1794
|
|
1562
1795
|
</fo:table>
|
1563
1796
|
|
1797
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1798
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1799
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1800
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1801
|
+
</xsl:call-template>
|
1802
|
+
</xsl:for-each>
|
1803
|
+
|
1804
|
+
<!-- insert footer as table -->
|
1805
|
+
<!-- <fo:table>
|
1806
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1807
|
+
<xsl:attribute name="{@name}">
|
1808
|
+
<xsl:value-of select="."/>
|
1809
|
+
</xsl:attribute>
|
1810
|
+
</xsl:for-each>
|
1811
|
+
|
1812
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1813
|
+
<xsl:choose>
|
1814
|
+
<xsl:when test=". = 1 or . = 0">
|
1815
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1816
|
+
</xsl:when>
|
1817
|
+
<xsl:otherwise>
|
1818
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1819
|
+
</xsl:otherwise>
|
1820
|
+
</xsl:choose>
|
1821
|
+
</xsl:for-each>
|
1822
|
+
</fo:table>-->
|
1823
|
+
|
1564
1824
|
|
1565
1825
|
|
1566
1826
|
|
@@ -1569,8 +1829,9 @@
|
|
1569
1829
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1570
1830
|
<xsl:if test="normalize-space() != ''">
|
1571
1831
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1572
|
-
|
1573
|
-
|
1832
|
+
|
1833
|
+
<xsl:apply-templates/>
|
1834
|
+
</fo:block>
|
1574
1835
|
</xsl:if>
|
1575
1836
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1576
1837
|
<xsl:param name="table-row"/>
|
@@ -1624,6 +1885,13 @@
|
|
1624
1885
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1625
1886
|
<xsl:variable name="td_text">
|
1626
1887
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1888
|
+
|
1889
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1890
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1891
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1892
|
+
</xsl:for-each>
|
1893
|
+
</xsl:if> -->
|
1894
|
+
|
1627
1895
|
</xsl:variable>
|
1628
1896
|
<xsl:variable name="words">
|
1629
1897
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1683,13 +1951,31 @@
|
|
1683
1951
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1684
1952
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1685
1953
|
<xsl:value-of select="@target"/>
|
1954
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1955
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1956
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1686
1957
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1687
1958
|
<xsl:param name="cols-count"/>
|
1688
1959
|
<!-- font-weight="bold" -->
|
1689
|
-
<fo:table-header>
|
1960
|
+
<fo:table-header>
|
1690
1961
|
|
1691
1962
|
<xsl:apply-templates/>
|
1692
1963
|
</fo:table-header>
|
1964
|
+
</xsl:template><xsl:template name="table-header-title">
|
1965
|
+
<xsl:param name="cols-count"/>
|
1966
|
+
<!-- row for title -->
|
1967
|
+
<fo:table-row>
|
1968
|
+
<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">
|
1969
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1970
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1971
|
+
<xsl:call-template name="fn_name_display"/>
|
1972
|
+
</xsl:for-each>
|
1973
|
+
<fo:block text-align="right" font-style="italic">
|
1974
|
+
<xsl:text> </xsl:text>
|
1975
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1976
|
+
</fo:block>
|
1977
|
+
</fo:table-cell>
|
1978
|
+
</fo:table-row>
|
1693
1979
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1694
1980
|
<fo:table-body>
|
1695
1981
|
<xsl:apply-templates/>
|
@@ -1697,6 +1983,13 @@
|
|
1697
1983
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1698
1984
|
<xsl:apply-templates/>
|
1699
1985
|
</xsl:template><xsl:template name="insertTableFooter">
|
1986
|
+
<xsl:param name="cols-count"/>
|
1987
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1988
|
+
<fo:table-footer>
|
1989
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1990
|
+
</fo:table-footer>
|
1991
|
+
</xsl:if>
|
1992
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1700
1993
|
<xsl:param name="cols-count"/>
|
1701
1994
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1702
1995
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1718,11 +2011,15 @@
|
|
1718
2011
|
<!-- fn will be processed inside 'note' processing -->
|
1719
2012
|
|
1720
2013
|
|
1721
|
-
|
2014
|
+
|
2015
|
+
<!-- except gb and bipm -->
|
1722
2016
|
|
1723
2017
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1724
2018
|
|
1725
2019
|
|
2020
|
+
|
2021
|
+
|
2022
|
+
|
1726
2023
|
<!-- horizontal row separator -->
|
1727
2024
|
|
1728
2025
|
|
@@ -1736,6 +2033,84 @@
|
|
1736
2033
|
</fo:table-footer>
|
1737
2034
|
|
1738
2035
|
</xsl:if>
|
2036
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2037
|
+
<xsl:param name="table_attributes"/>
|
2038
|
+
<xsl:param name="colwidths"/>
|
2039
|
+
|
2040
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2041
|
+
|
2042
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2043
|
+
|
2044
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
2045
|
+
|
2046
|
+
<fo:table keep-with-previous="always">
|
2047
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2048
|
+
<xsl:choose>
|
2049
|
+
<xsl:when test="@name = 'border-top'">
|
2050
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
2051
|
+
</xsl:when>
|
2052
|
+
<xsl:when test="@name = 'border'">
|
2053
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2054
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
2055
|
+
</xsl:when>
|
2056
|
+
<xsl:otherwise>
|
2057
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2058
|
+
</xsl:otherwise>
|
2059
|
+
</xsl:choose>
|
2060
|
+
</xsl:for-each>
|
2061
|
+
|
2062
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2063
|
+
<xsl:choose>
|
2064
|
+
<xsl:when test=". = 1 or . = 0">
|
2065
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2066
|
+
</xsl:when>
|
2067
|
+
<xsl:otherwise>
|
2068
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2069
|
+
</xsl:otherwise>
|
2070
|
+
</xsl:choose>
|
2071
|
+
</xsl:for-each>
|
2072
|
+
|
2073
|
+
<fo:table-body>
|
2074
|
+
<fo:table-row>
|
2075
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
2076
|
+
|
2077
|
+
|
2078
|
+
|
2079
|
+
<!-- fn will be processed inside 'note' processing -->
|
2080
|
+
|
2081
|
+
|
2082
|
+
|
2083
|
+
<!-- except gb and bipm -->
|
2084
|
+
|
2085
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2086
|
+
|
2087
|
+
|
2088
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2089
|
+
<xsl:choose>
|
2090
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2091
|
+
show Note under table in preface (ex. abstract) sections
|
2092
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2093
|
+
</xsl:when>
|
2094
|
+
<xsl:otherwise>
|
2095
|
+
empty, because notes show at page side in main sections
|
2096
|
+
<fo:block/>
|
2097
|
+
</xsl:otherwise>
|
2098
|
+
</xsl:choose>
|
2099
|
+
</xsl:if> -->
|
2100
|
+
|
2101
|
+
|
2102
|
+
<!-- horizontal row separator -->
|
2103
|
+
|
2104
|
+
|
2105
|
+
<!-- fn processing -->
|
2106
|
+
<xsl:call-template name="fn_display"/>
|
2107
|
+
|
2108
|
+
</fo:table-cell>
|
2109
|
+
</fo:table-row>
|
2110
|
+
</fo:table-body>
|
2111
|
+
|
2112
|
+
</fo:table>
|
2113
|
+
</xsl:if>
|
1739
2114
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1740
2115
|
|
1741
2116
|
<xsl:variable name="cols-count">
|
@@ -1753,6 +2128,8 @@
|
|
1753
2128
|
</xsl:choose>
|
1754
2129
|
</xsl:variable>
|
1755
2130
|
|
2131
|
+
|
2132
|
+
|
1756
2133
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1757
2134
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1758
2135
|
</xsl:apply-templates>
|
@@ -1762,6 +2139,8 @@
|
|
1762
2139
|
</xsl:call-template>
|
1763
2140
|
|
1764
2141
|
<fo:table-body>
|
2142
|
+
|
2143
|
+
|
1765
2144
|
<xsl:apply-templates/>
|
1766
2145
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1767
2146
|
|
@@ -1789,10 +2168,21 @@
|
|
1789
2168
|
<xsl:attribute name="min-height">8mm</xsl:attribute>
|
1790
2169
|
</xsl:if>
|
1791
2170
|
|
2171
|
+
|
2172
|
+
|
1792
2173
|
<xsl:apply-templates/>
|
1793
2174
|
</fo:table-row>
|
1794
2175
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
1795
2176
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
2177
|
+
<xsl:attribute name="text-align">
|
2178
|
+
<xsl:choose>
|
2179
|
+
<xsl:when test="@align">
|
2180
|
+
<xsl:value-of select="@align"/>
|
2181
|
+
</xsl:when>
|
2182
|
+
<xsl:otherwise>center</xsl:otherwise>
|
2183
|
+
</xsl:choose>
|
2184
|
+
</xsl:attribute>
|
2185
|
+
|
1796
2186
|
|
1797
2187
|
|
1798
2188
|
|
@@ -1811,6 +2201,8 @@
|
|
1811
2201
|
<xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
|
1812
2202
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
1813
2203
|
|
2204
|
+
|
2205
|
+
|
1814
2206
|
<xsl:if test="@colspan">
|
1815
2207
|
<xsl:attribute name="number-columns-spanned">
|
1816
2208
|
<xsl:value-of select="@colspan"/>
|
@@ -1821,16 +2213,37 @@
|
|
1821
2213
|
<xsl:value-of select="@rowspan"/>
|
1822
2214
|
</xsl:attribute>
|
1823
2215
|
</xsl:if>
|
2216
|
+
<xsl:call-template name="display-align"/>
|
1824
2217
|
<fo:block>
|
1825
2218
|
<xsl:apply-templates/>
|
1826
2219
|
</fo:block>
|
1827
2220
|
</fo:table-cell>
|
2221
|
+
</xsl:template><xsl:template name="display-align">
|
2222
|
+
<xsl:if test="@valign">
|
2223
|
+
<xsl:attribute name="display-align">
|
2224
|
+
<xsl:choose>
|
2225
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2226
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2227
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2228
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2229
|
+
</xsl:choose>
|
2230
|
+
</xsl:attribute>
|
2231
|
+
</xsl:if>
|
1828
2232
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
1829
2233
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
2234
|
+
<xsl:attribute name="text-align">
|
2235
|
+
<xsl:choose>
|
2236
|
+
<xsl:when test="@align">
|
2237
|
+
<xsl:value-of select="@align"/>
|
2238
|
+
</xsl:when>
|
2239
|
+
<xsl:otherwise>left</xsl:otherwise>
|
2240
|
+
</xsl:choose>
|
2241
|
+
</xsl:attribute>
|
2242
|
+
|
2243
|
+
|
2244
|
+
|
2245
|
+
|
2246
|
+
|
1834
2247
|
|
1835
2248
|
|
1836
2249
|
|
@@ -1844,6 +2257,7 @@
|
|
1844
2257
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
1845
2258
|
|
1846
2259
|
|
2260
|
+
|
1847
2261
|
<xsl:if test="@colspan">
|
1848
2262
|
<xsl:attribute name="number-columns-spanned">
|
1849
2263
|
<xsl:value-of select="@colspan"/>
|
@@ -1854,8 +2268,8 @@
|
|
1854
2268
|
<xsl:value-of select="@rowspan"/>
|
1855
2269
|
</xsl:attribute>
|
1856
2270
|
</xsl:if>
|
1857
|
-
<
|
1858
|
-
|
2271
|
+
<xsl:call-template name="display-align"/>
|
2272
|
+
<fo:block>
|
1859
2273
|
<xsl:apply-templates/>
|
1860
2274
|
</fo:block>
|
1861
2275
|
</fo:table-cell>
|
@@ -1867,6 +2281,8 @@
|
|
1867
2281
|
|
1868
2282
|
|
1869
2283
|
|
2284
|
+
|
2285
|
+
|
1870
2286
|
<fo:inline padding-right="2mm">
|
1871
2287
|
|
1872
2288
|
|
@@ -1881,10 +2297,11 @@
|
|
1881
2297
|
</fo:inline> -->
|
1882
2298
|
</xsl:if>
|
1883
2299
|
|
1884
|
-
|
2300
|
+
|
1885
2301
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
1886
2302
|
|
1887
2303
|
</fo:inline>
|
2304
|
+
|
1888
2305
|
<xsl:apply-templates mode="process"/>
|
1889
2306
|
</fo:block>
|
1890
2307
|
|
@@ -1908,6 +2325,7 @@
|
|
1908
2325
|
|
1909
2326
|
|
1910
2327
|
|
2328
|
+
|
1911
2329
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
1912
2330
|
|
1913
2331
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -1917,12 +2335,15 @@
|
|
1917
2335
|
|
1918
2336
|
|
1919
2337
|
|
2338
|
+
|
1920
2339
|
<xsl:value-of select="@reference"/>
|
1921
2340
|
|
2341
|
+
|
1922
2342
|
</fo:inline>
|
1923
2343
|
<fo:inline>
|
1924
2344
|
|
1925
|
-
<xsl:apply-templates/>
|
2345
|
+
<!-- <xsl:apply-templates /> -->
|
2346
|
+
<xsl:copy-of select="./node()"/>
|
1926
2347
|
</fo:inline>
|
1927
2348
|
</fo:block>
|
1928
2349
|
</xsl:if>
|
@@ -1959,7 +2380,20 @@
|
|
1959
2380
|
<xsl:variable name="following_dl_colwidths">
|
1960
2381
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
1961
2382
|
<xsl:variable name="html-table">
|
1962
|
-
<xsl:variable name="
|
2383
|
+
<xsl:variable name="doc_ns">
|
2384
|
+
|
2385
|
+
</xsl:variable>
|
2386
|
+
<xsl:variable name="ns">
|
2387
|
+
<xsl:choose>
|
2388
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2389
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2390
|
+
</xsl:when>
|
2391
|
+
<xsl:otherwise>
|
2392
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2393
|
+
</xsl:otherwise>
|
2394
|
+
</xsl:choose>
|
2395
|
+
</xsl:variable>
|
2396
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
1963
2397
|
<xsl:element name="{$ns}:table">
|
1964
2398
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
1965
2399
|
<tbody>
|
@@ -2024,7 +2458,8 @@
|
|
2024
2458
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2025
2459
|
</xsl:if>
|
2026
2460
|
|
2027
|
-
<xsl:apply-templates/>
|
2461
|
+
<!-- <xsl:apply-templates /> -->
|
2462
|
+
<xsl:copy-of select="./node()"/>
|
2028
2463
|
</fo:block>
|
2029
2464
|
</fo:table-cell>
|
2030
2465
|
</fo:table-row>
|
@@ -2042,9 +2477,13 @@
|
|
2042
2477
|
|
2043
2478
|
|
2044
2479
|
|
2480
|
+
|
2481
|
+
|
2045
2482
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2046
2483
|
|
2484
|
+
|
2047
2485
|
<xsl:value-of select="@reference"/>
|
2486
|
+
|
2048
2487
|
</fo:basic-link>
|
2049
2488
|
</fo:inline>
|
2050
2489
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -2052,115 +2491,142 @@
|
|
2052
2491
|
<xsl:apply-templates/>
|
2053
2492
|
</fo:inline>
|
2054
2493
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2055
|
-
<
|
2056
|
-
|
2057
|
-
|
2058
|
-
|
2059
|
-
|
2060
|
-
|
2061
|
-
|
2062
|
-
|
2063
|
-
|
2064
|
-
|
2065
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
2066
|
-
|
2067
|
-
<xsl:variable name="title-where">
|
2068
|
-
<xsl:call-template name="getTitle">
|
2069
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2070
|
-
</xsl:call-template>
|
2071
|
-
</xsl:variable>
|
2072
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2073
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2074
|
-
<xsl:text/>
|
2075
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2076
|
-
</fo:block>
|
2077
|
-
|
2078
|
-
</xsl:when>
|
2079
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2080
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2084
|
-
|
2085
|
-
<xsl:variable name="title-where">
|
2086
|
-
<xsl:call-template name="getTitle">
|
2087
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2088
|
-
</xsl:call-template>
|
2089
|
-
</xsl:variable>
|
2090
|
-
<xsl:value-of select="$title-where"/>
|
2091
|
-
</fo:block>
|
2092
|
-
</xsl:when>
|
2093
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2094
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
<xsl:variable name="title-key">
|
2099
|
-
<xsl:call-template name="getTitle">
|
2100
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
2101
|
-
</xsl:call-template>
|
2102
|
-
</xsl:variable>
|
2103
|
-
<xsl:value-of select="$title-key"/>
|
2104
|
-
</fo:block>
|
2105
|
-
</xsl:when>
|
2106
|
-
</xsl:choose>
|
2107
|
-
|
2108
|
-
<!-- a few components -->
|
2109
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2110
|
-
<fo:block>
|
2494
|
+
<fo:block-container margin-left="0mm">
|
2495
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2496
|
+
<xsl:attribute name="margin-left">
|
2497
|
+
<xsl:choose>
|
2498
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2499
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2500
|
+
</xsl:choose>
|
2501
|
+
</xsl:attribute>
|
2111
2502
|
|
2503
|
+
</xsl:if>
|
2504
|
+
<fo:block-container margin-left="0mm">
|
2505
|
+
|
2506
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
2112
2507
|
|
2508
|
+
<xsl:variable name="key_iso">
|
2509
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2510
|
+
</xsl:variable>
|
2113
2511
|
|
2512
|
+
<xsl:choose>
|
2513
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2514
|
+
|
2515
|
+
|
2516
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2517
|
+
|
2518
|
+
<xsl:variable name="title-where">
|
2519
|
+
<xsl:call-template name="getTitle">
|
2520
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2521
|
+
</xsl:call-template>
|
2522
|
+
</xsl:variable>
|
2523
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2524
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2525
|
+
<xsl:text/>
|
2526
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2527
|
+
</fo:block>
|
2528
|
+
|
2529
|
+
</xsl:when>
|
2530
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2531
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2532
|
+
|
2533
|
+
|
2534
|
+
|
2535
|
+
|
2536
|
+
<xsl:variable name="title-where">
|
2537
|
+
<xsl:call-template name="getTitle">
|
2538
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2539
|
+
</xsl:call-template>
|
2540
|
+
</xsl:variable>
|
2541
|
+
<xsl:value-of select="$title-where"/>
|
2542
|
+
</fo:block>
|
2543
|
+
</xsl:when>
|
2544
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2545
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2546
|
+
|
2547
|
+
|
2548
|
+
|
2549
|
+
<xsl:variable name="title-key">
|
2550
|
+
<xsl:call-template name="getTitle">
|
2551
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2552
|
+
</xsl:call-template>
|
2553
|
+
</xsl:variable>
|
2554
|
+
<xsl:value-of select="$title-key"/>
|
2555
|
+
</fo:block>
|
2556
|
+
</xsl:when>
|
2557
|
+
</xsl:choose>
|
2114
2558
|
|
2115
|
-
|
2116
|
-
|
2117
|
-
|
2118
|
-
|
2119
|
-
|
2120
|
-
<fo:table width="95%" table-layout="fixed">
|
2559
|
+
<!-- a few components -->
|
2560
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2561
|
+
<fo:block>
|
2121
2562
|
|
2122
|
-
|
2123
|
-
|
2124
|
-
|
2125
|
-
|
2126
|
-
|
2127
|
-
|
2563
|
+
|
2564
|
+
|
2565
|
+
|
2566
|
+
<fo:block>
|
2567
|
+
|
2568
|
+
|
2569
|
+
|
2570
|
+
|
2571
|
+
<fo:table width="95%" table-layout="fixed">
|
2128
2572
|
|
2129
|
-
|
2130
|
-
|
2131
|
-
|
2132
|
-
|
2133
|
-
|
2134
|
-
|
2135
|
-
|
2136
|
-
|
2137
|
-
</
|
2138
|
-
|
2139
|
-
|
2140
|
-
|
2141
|
-
|
2142
|
-
|
2143
|
-
|
2144
|
-
|
2145
|
-
|
2146
|
-
|
2147
|
-
|
2148
|
-
|
2149
|
-
|
2150
|
-
|
2151
|
-
|
2152
|
-
|
2153
|
-
|
2154
|
-
|
2155
|
-
|
2156
|
-
|
2157
|
-
|
2158
|
-
|
2159
|
-
|
2160
|
-
|
2161
|
-
|
2162
|
-
|
2163
|
-
|
2573
|
+
<xsl:choose>
|
2574
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2575
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2576
|
+
</xsl:when>
|
2577
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2578
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2579
|
+
|
2580
|
+
</xsl:when>
|
2581
|
+
</xsl:choose>
|
2582
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2583
|
+
<xsl:variable name="html-table">
|
2584
|
+
<xsl:variable name="doc_ns">
|
2585
|
+
|
2586
|
+
</xsl:variable>
|
2587
|
+
<xsl:variable name="ns">
|
2588
|
+
<xsl:choose>
|
2589
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2590
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2591
|
+
</xsl:when>
|
2592
|
+
<xsl:otherwise>
|
2593
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2594
|
+
</xsl:otherwise>
|
2595
|
+
</xsl:choose>
|
2596
|
+
</xsl:variable>
|
2597
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2598
|
+
<xsl:element name="{$ns}:table">
|
2599
|
+
<tbody>
|
2600
|
+
<xsl:apply-templates mode="dl"/>
|
2601
|
+
</tbody>
|
2602
|
+
</xsl:element>
|
2603
|
+
</xsl:variable>
|
2604
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2605
|
+
<xsl:variable name="colwidths">
|
2606
|
+
<xsl:call-template name="calculate-column-widths">
|
2607
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2608
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2609
|
+
</xsl:call-template>
|
2610
|
+
</xsl:variable>
|
2611
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2612
|
+
<xsl:variable name="maxlength_dt">
|
2613
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2614
|
+
</xsl:variable>
|
2615
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2616
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2617
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2618
|
+
</xsl:call-template>
|
2619
|
+
<fo:table-body>
|
2620
|
+
<xsl:apply-templates>
|
2621
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2622
|
+
</xsl:apply-templates>
|
2623
|
+
</fo:table-body>
|
2624
|
+
</fo:table>
|
2625
|
+
</fo:block>
|
2626
|
+
</fo:block>
|
2627
|
+
</xsl:if>
|
2628
|
+
</fo:block-container>
|
2629
|
+
</fo:block-container>
|
2164
2630
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
2165
2631
|
<xsl:param name="colwidths"/>
|
2166
2632
|
<xsl:param name="maxlength_dt"/>
|
@@ -2257,6 +2723,7 @@
|
|
2257
2723
|
<xsl:param name="key_iso"/>
|
2258
2724
|
|
2259
2725
|
<fo:table-row>
|
2726
|
+
|
2260
2727
|
<fo:table-cell>
|
2261
2728
|
|
2262
2729
|
<fo:block margin-top="6pt">
|
@@ -2271,6 +2738,7 @@
|
|
2271
2738
|
|
2272
2739
|
|
2273
2740
|
|
2741
|
+
|
2274
2742
|
<xsl:apply-templates/>
|
2275
2743
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2276
2744
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2282,14 +2750,36 @@
|
|
2282
2750
|
<fo:table-cell>
|
2283
2751
|
<fo:block>
|
2284
2752
|
|
2285
|
-
|
2753
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2754
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
2755
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2756
|
+
</xsl:if>
|
2757
|
+
</xsl:if> -->
|
2286
2758
|
|
2287
2759
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2288
2760
|
|
2289
2761
|
</fo:block>
|
2290
2762
|
</fo:table-cell>
|
2291
2763
|
</fo:table-row>
|
2292
|
-
|
2764
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2765
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
2766
|
+
<fo:table-row>
|
2767
|
+
<fo:table-cell>
|
2768
|
+
<fo:block margin-top="6pt">
|
2769
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2770
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2771
|
+
</xsl:if>
|
2772
|
+
<xsl:text> </xsl:text>
|
2773
|
+
</fo:block>
|
2774
|
+
</fo:table-cell>
|
2775
|
+
<fo:table-cell>
|
2776
|
+
<fo:block>
|
2777
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2778
|
+
</fo:block>
|
2779
|
+
</fo:table-cell>
|
2780
|
+
</fo:table-row>
|
2781
|
+
</xsl:if>
|
2782
|
+
</xsl:if> -->
|
2293
2783
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2294
2784
|
<xsl:apply-templates/>
|
2295
2785
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -2314,6 +2804,31 @@
|
|
2314
2804
|
</fo:inline>
|
2315
2805
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2316
2806
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2807
|
+
<xsl:variable name="_font-size">
|
2808
|
+
|
2809
|
+
|
2810
|
+
|
2811
|
+
|
2812
|
+
|
2813
|
+
|
2814
|
+
|
2815
|
+
|
2816
|
+
|
2817
|
+
|
2818
|
+
|
2819
|
+
|
2820
|
+
|
2821
|
+
|
2822
|
+
</xsl:variable>
|
2823
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2824
|
+
<xsl:if test="$font-size != ''">
|
2825
|
+
<xsl:attribute name="font-size">
|
2826
|
+
<xsl:choose>
|
2827
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2828
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2829
|
+
</xsl:choose>
|
2830
|
+
</xsl:attribute>
|
2831
|
+
</xsl:if>
|
2317
2832
|
<xsl:apply-templates/>
|
2318
2833
|
</fo:inline>
|
2319
2834
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2639,11 +3154,24 @@
|
|
2639
3154
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2640
3155
|
<xsl:value-of select="substring($str, 2)"/>
|
2641
3156
|
</xsl:template><xsl:template match="mathml:math">
|
2642
|
-
<fo:inline font-family="
|
2643
|
-
<
|
2644
|
-
<xsl:
|
2645
|
-
</
|
3157
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3158
|
+
<xsl:variable name="mathml">
|
3159
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
3160
|
+
</xsl:variable>
|
3161
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
3162
|
+
<!-- <xsl:copy-of select="."/> -->
|
3163
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3164
|
+
</fo:instream-foreign-object>
|
2646
3165
|
</fo:inline>
|
3166
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3167
|
+
<xsl:copy>
|
3168
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3169
|
+
</xsl:copy>
|
3170
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
3171
|
+
<xsl:copy>
|
3172
|
+
<!-- replace start and end spaces to non-break space -->
|
3173
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3174
|
+
</xsl:copy>
|
2647
3175
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2648
3176
|
<xsl:variable name="target">
|
2649
3177
|
<xsl:choose>
|
@@ -2720,13 +3248,26 @@
|
|
2720
3248
|
<xsl:apply-templates/>
|
2721
3249
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2722
3250
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2723
|
-
|
3251
|
+
|
2724
3252
|
<xsl:apply-templates/>
|
2725
3253
|
</fo:basic-link>
|
2726
3254
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2727
|
-
<fo:block
|
2728
|
-
<xsl:
|
2729
|
-
|
3255
|
+
<fo:block-container margin-left="0mm">
|
3256
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3257
|
+
<xsl:attribute name="margin-left">
|
3258
|
+
<xsl:choose>
|
3259
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3260
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3261
|
+
</xsl:choose>
|
3262
|
+
</xsl:attribute>
|
3263
|
+
|
3264
|
+
</xsl:if>
|
3265
|
+
<fo:block-container margin-left="0mm">
|
3266
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3267
|
+
<xsl:apply-templates/>
|
3268
|
+
</fo:block>
|
3269
|
+
</fo:block-container>
|
3270
|
+
</fo:block-container>
|
2730
3271
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2731
3272
|
<fo:inline>
|
2732
3273
|
<xsl:apply-templates/>
|
@@ -2795,7 +3336,9 @@
|
|
2795
3336
|
</xsl:choose>
|
2796
3337
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2797
3338
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2798
|
-
<xsl:
|
3339
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3340
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3341
|
+
</fo:inline>
|
2799
3342
|
<xsl:apply-templates/>
|
2800
3343
|
</fo:block>
|
2801
3344
|
</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">
|
@@ -2894,15 +3437,109 @@
|
|
2894
3437
|
|
2895
3438
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2896
3439
|
</fo:block>
|
2897
|
-
</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">
|
3440
|
+
</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">
|
2898
3441
|
<xsl:apply-templates mode="contents"/>
|
2899
3442
|
<xsl:text> </xsl:text>
|
2900
|
-
</xsl:template><xsl:template match="
|
3443
|
+
</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">
|
3444
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3445
|
+
<xsl:text> </xsl:text>
|
3446
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
2901
3447
|
<xsl:value-of select="."/>
|
2902
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3448
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3449
|
+
<xsl:value-of select="."/>
|
3450
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3451
|
+
<xsl:apply-templates mode="contents"/>
|
3452
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3453
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3454
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3455
|
+
<xsl:apply-templates select="."/>
|
3456
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3457
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3458
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3459
|
+
<xsl:param name="contents"/>
|
3460
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3461
|
+
<fo:bookmark-tree>
|
3462
|
+
<xsl:choose>
|
3463
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3464
|
+
<xsl:choose>
|
3465
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3466
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3467
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3468
|
+
<fo:bookmark-title>
|
3469
|
+
<xsl:variable name="bookmark-title_">
|
3470
|
+
<xsl:call-template name="getLangVersion">
|
3471
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3472
|
+
</xsl:call-template>
|
3473
|
+
</xsl:variable>
|
3474
|
+
<xsl:choose>
|
3475
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3476
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3477
|
+
</xsl:when>
|
3478
|
+
<xsl:otherwise>
|
3479
|
+
<xsl:choose>
|
3480
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3481
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3482
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3483
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3484
|
+
</xsl:choose>
|
3485
|
+
</xsl:otherwise>
|
3486
|
+
</xsl:choose>
|
3487
|
+
</fo:bookmark-title>
|
3488
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3489
|
+
</fo:bookmark>
|
3490
|
+
|
3491
|
+
</xsl:for-each>
|
3492
|
+
</xsl:when>
|
3493
|
+
<xsl:otherwise>
|
3494
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3495
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3496
|
+
</xsl:for-each>
|
3497
|
+
</xsl:otherwise>
|
3498
|
+
</xsl:choose>
|
3499
|
+
</xsl:when>
|
3500
|
+
<xsl:otherwise>
|
3501
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3502
|
+
</xsl:otherwise>
|
3503
|
+
</xsl:choose>
|
3504
|
+
|
3505
|
+
|
3506
|
+
|
3507
|
+
|
3508
|
+
|
3509
|
+
|
3510
|
+
|
3511
|
+
|
3512
|
+
</fo:bookmark-tree>
|
3513
|
+
</xsl:if>
|
3514
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3515
|
+
<xsl:param name="lang"/>
|
3516
|
+
<xsl:choose>
|
3517
|
+
<xsl:when test="$lang = 'en'">
|
3518
|
+
|
3519
|
+
|
3520
|
+
</xsl:when>
|
3521
|
+
<xsl:when test="$lang = 'fr'">
|
3522
|
+
|
3523
|
+
|
3524
|
+
</xsl:when>
|
3525
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3526
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3527
|
+
</xsl:choose>
|
3528
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3529
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3530
|
+
<fo:bookmark-title>
|
3531
|
+
<xsl:if test="@section != ''">
|
3532
|
+
<xsl:value-of select="@section"/>
|
3533
|
+
<xsl:text> </xsl:text>
|
3534
|
+
</xsl:if>
|
3535
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3536
|
+
</fo:bookmark-title>
|
3537
|
+
<xsl:apply-templates mode="bookmark"/>
|
3538
|
+
</fo:bookmark>
|
3539
|
+
</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">
|
2903
3540
|
<xsl:if test="normalize-space() != ''">
|
2904
3541
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2905
|
-
|
3542
|
+
|
2906
3543
|
<xsl:apply-templates/>
|
2907
3544
|
</fo:block>
|
2908
3545
|
</xsl:if>
|
@@ -2957,7 +3594,7 @@
|
|
2957
3594
|
<xsl:apply-templates/>
|
2958
3595
|
</xsl:otherwise>
|
2959
3596
|
</xsl:choose>
|
2960
|
-
</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">
|
3597
|
+
</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">
|
2961
3598
|
<xsl:text> </xsl:text>
|
2962
3599
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
2963
3600
|
<xsl:copy>
|
@@ -2966,21 +3603,61 @@
|
|
2966
3603
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
2967
3604
|
<xsl:text> </xsl:text>
|
2968
3605
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
2969
|
-
|
2970
|
-
|
2971
|
-
|
2972
|
-
|
2973
|
-
|
3606
|
+
|
3607
|
+
<fo:block-container margin-left="0mm">
|
3608
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3609
|
+
<xsl:attribute name="margin-left">
|
3610
|
+
<xsl:choose>
|
3611
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3612
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3613
|
+
</xsl:choose>
|
3614
|
+
</xsl:attribute>
|
3615
|
+
|
3616
|
+
</xsl:if>
|
3617
|
+
<fo:block-container margin-left="0mm">
|
3618
|
+
|
3619
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3620
|
+
<xsl:variable name="_font-size">
|
3621
|
+
|
3622
|
+
|
3623
|
+
|
3624
|
+
|
3625
|
+
|
3626
|
+
|
3627
|
+
|
3628
|
+
|
3629
|
+
|
3630
|
+
|
3631
|
+
|
3632
|
+
|
3633
|
+
|
3634
|
+
10
|
3635
|
+
</xsl:variable>
|
3636
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3637
|
+
<xsl:if test="$font-size != ''">
|
3638
|
+
<xsl:attribute name="font-size">
|
3639
|
+
<xsl:choose>
|
3640
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3641
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3642
|
+
</xsl:choose>
|
3643
|
+
</xsl:attribute>
|
3644
|
+
</xsl:if>
|
3645
|
+
<xsl:apply-templates/>
|
3646
|
+
</fo:block>
|
3647
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3648
|
+
|
3649
|
+
</fo:block-container>
|
3650
|
+
</fo:block-container>
|
3651
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
2974
3652
|
<xsl:variable name="text">
|
2975
3653
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
2976
3654
|
</xsl:variable>
|
2977
|
-
<xsl:call-template name="add-zero-spaces">
|
3655
|
+
<xsl:call-template name="add-zero-spaces-java">
|
2978
3656
|
<xsl:with-param name="text" select="$text"/>
|
2979
3657
|
</xsl:call-template>
|
2980
3658
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
2981
3659
|
<xsl:if test="normalize-space() != ''">
|
2982
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2983
|
-
|
3660
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2984
3661
|
<xsl:apply-templates/>
|
2985
3662
|
</fo:block>
|
2986
3663
|
</xsl:if>
|
@@ -3048,6 +3725,145 @@
|
|
3048
3725
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
3049
3726
|
<xsl:apply-templates/>
|
3050
3727
|
</fo:block>
|
3728
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3729
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3730
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3731
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3732
|
+
</xsl:if>
|
3733
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3734
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3735
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3736
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3737
|
+
</xsl:if>
|
3738
|
+
<xsl:variable name="simple-table">
|
3739
|
+
<xsl:call-template name="getSimpleTable"/>
|
3740
|
+
</xsl:variable>
|
3741
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3742
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3743
|
+
<!-- <fo:table-column column-width="35mm"/>
|
3744
|
+
<fo:table-column column-width="115mm"/> -->
|
3745
|
+
<fo:table-column column-width="30%"/>
|
3746
|
+
<fo:table-column column-width="70%"/>
|
3747
|
+
</xsl:if>
|
3748
|
+
<xsl:apply-templates mode="requirement"/>
|
3749
|
+
</fo:table>
|
3750
|
+
<!-- fn processing -->
|
3751
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
3752
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
3753
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
3754
|
+
<xsl:call-template name="fn_display"/>
|
3755
|
+
</fo:block>
|
3756
|
+
</xsl:for-each>
|
3757
|
+
</xsl:if>
|
3758
|
+
</fo:block-container>
|
3759
|
+
</fo:block-container>
|
3760
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
3761
|
+
<fo:table-header>
|
3762
|
+
<xsl:apply-templates mode="requirement"/>
|
3763
|
+
</fo:table-header>
|
3764
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
3765
|
+
<fo:table-body>
|
3766
|
+
<xsl:apply-templates mode="requirement"/>
|
3767
|
+
</fo:table-body>
|
3768
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3769
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3770
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3771
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3772
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3773
|
+
</xsl:if>
|
3774
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3775
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3776
|
+
</xsl:if>
|
3777
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3778
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3779
|
+
</xsl:if>
|
3780
|
+
<xsl:apply-templates mode="requirement"/>
|
3781
|
+
</fo:table-row>
|
3782
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3783
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3784
|
+
<xsl:attribute name="text-align">
|
3785
|
+
<xsl:choose>
|
3786
|
+
<xsl:when test="@align">
|
3787
|
+
<xsl:value-of select="@align"/>
|
3788
|
+
</xsl:when>
|
3789
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3790
|
+
</xsl:choose>
|
3791
|
+
</xsl:attribute>
|
3792
|
+
<xsl:if test="@colspan">
|
3793
|
+
<xsl:attribute name="number-columns-spanned">
|
3794
|
+
<xsl:value-of select="@colspan"/>
|
3795
|
+
</xsl:attribute>
|
3796
|
+
</xsl:if>
|
3797
|
+
<xsl:if test="@rowspan">
|
3798
|
+
<xsl:attribute name="number-rows-spanned">
|
3799
|
+
<xsl:value-of select="@rowspan"/>
|
3800
|
+
</xsl:attribute>
|
3801
|
+
</xsl:if>
|
3802
|
+
<xsl:call-template name="display-align"/>
|
3803
|
+
|
3804
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3805
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3806
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
3807
|
+
</xsl:if>
|
3808
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
3809
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3810
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3811
|
+
</xsl:if> -->
|
3812
|
+
|
3813
|
+
<fo:block>
|
3814
|
+
<xsl:apply-templates/>
|
3815
|
+
</fo:block>
|
3816
|
+
</fo:table-cell>
|
3817
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3818
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3819
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3820
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3821
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
3822
|
+
</xsl:if>
|
3823
|
+
<xsl:attribute name="text-align">
|
3824
|
+
<xsl:choose>
|
3825
|
+
<xsl:when test="@align">
|
3826
|
+
<xsl:value-of select="@align"/>
|
3827
|
+
</xsl:when>
|
3828
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3829
|
+
</xsl:choose>
|
3830
|
+
</xsl:attribute>
|
3831
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3832
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3833
|
+
</xsl:if>
|
3834
|
+
<xsl:if test="@colspan">
|
3835
|
+
<xsl:attribute name="number-columns-spanned">
|
3836
|
+
<xsl:value-of select="@colspan"/>
|
3837
|
+
</xsl:attribute>
|
3838
|
+
</xsl:if>
|
3839
|
+
<xsl:if test="@rowspan">
|
3840
|
+
<xsl:attribute name="number-rows-spanned">
|
3841
|
+
<xsl:value-of select="@rowspan"/>
|
3842
|
+
</xsl:attribute>
|
3843
|
+
</xsl:if>
|
3844
|
+
<xsl:call-template name="display-align"/>
|
3845
|
+
|
3846
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3847
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
3848
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3849
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3850
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3851
|
+
</xsl:if>
|
3852
|
+
</xsl:if> -->
|
3853
|
+
<!-- 2nd line and below -->
|
3854
|
+
|
3855
|
+
<fo:block>
|
3856
|
+
<xsl:apply-templates/>
|
3857
|
+
</fo:block>
|
3858
|
+
</fo:table-cell>
|
3859
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3860
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3861
|
+
<xsl:apply-templates/>
|
3862
|
+
</fo:block>
|
3863
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3864
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
3865
|
+
<xsl:apply-templates/>
|
3866
|
+
</fo:block>
|
3051
3867
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
3052
3868
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
3053
3869
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -3067,12 +3883,13 @@
|
|
3067
3883
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3068
3884
|
|
3069
3885
|
<xsl:variable name="element">
|
3070
|
-
block
|
3886
|
+
block
|
3071
3887
|
|
3888
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3072
3889
|
</xsl:variable>
|
3073
3890
|
|
3074
3891
|
<xsl:choose>
|
3075
|
-
<xsl:when test="normalize-space($element)
|
3892
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3076
3893
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
3077
3894
|
<xsl:apply-templates/>
|
3078
3895
|
</fo:block>
|
@@ -3109,30 +3926,49 @@
|
|
3109
3926
|
</xsl:otherwise>
|
3110
3927
|
</xsl:choose>
|
3111
3928
|
|
3112
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3113
|
-
|
3114
|
-
|
3115
|
-
|
3116
|
-
<xsl:if test="$num = 1">
|
3117
|
-
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3118
|
-
</xsl:if>
|
3929
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3930
|
+
|
3931
|
+
<xsl:variable name="element">
|
3932
|
+
block
|
3119
3933
|
|
3120
|
-
|
3121
|
-
|
3934
|
+
</xsl:variable>
|
3935
|
+
<xsl:choose>
|
3936
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3937
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3938
|
+
|
3939
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
3940
|
+
<xsl:if test="$num = 1">
|
3941
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3942
|
+
</xsl:if>
|
3943
|
+
|
3944
|
+
<xsl:apply-templates/>
|
3945
|
+
</fo:block>
|
3946
|
+
</xsl:when>
|
3947
|
+
<xsl:otherwise>
|
3948
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3949
|
+
<xsl:apply-templates/>
|
3950
|
+
</fo:inline>
|
3951
|
+
</xsl:otherwise>
|
3952
|
+
</xsl:choose>
|
3122
3953
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3123
3954
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3124
3955
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3125
3956
|
<xsl:variable name="termsource_text">
|
3126
3957
|
<xsl:apply-templates/>
|
3127
3958
|
</xsl:variable>
|
3959
|
+
|
3128
3960
|
<xsl:choose>
|
3129
3961
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3130
3962
|
<xsl:apply-templates/>
|
3131
3963
|
</xsl:when>
|
3132
|
-
<xsl:otherwise>
|
3133
|
-
|
3134
|
-
|
3135
|
-
|
3964
|
+
<xsl:otherwise>
|
3965
|
+
|
3966
|
+
<xsl:text>[</xsl:text>
|
3967
|
+
|
3968
|
+
<xsl:apply-templates/>
|
3969
|
+
|
3970
|
+
<xsl:text>]</xsl:text>
|
3971
|
+
|
3136
3972
|
</xsl:otherwise>
|
3137
3973
|
</xsl:choose>
|
3138
3974
|
</fo:block>
|
@@ -3153,18 +3989,29 @@
|
|
3153
3989
|
<xsl:if test="normalize-space() != ''">
|
3154
3990
|
<xsl:value-of select="."/>
|
3155
3991
|
</xsl:if>
|
3156
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3992
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3993
|
+
<fo:block-container margin-left="0mm">
|
3994
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3995
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
3996
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3997
|
+
</xsl:if>
|
3998
|
+
</xsl:if>
|
3999
|
+
|
4000
|
+
<fo:block-container margin-left="0mm">
|
3157
4001
|
|
3158
|
-
|
3159
|
-
|
3160
|
-
|
3161
|
-
|
3162
|
-
|
3163
|
-
|
3164
|
-
|
3165
|
-
|
3166
|
-
|
3167
|
-
|
4002
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
4003
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
4004
|
+
</fo:block>
|
4005
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4006
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
4007
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
4008
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
4009
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
4010
|
+
</fo:block>
|
4011
|
+
</xsl:if>
|
4012
|
+
|
4013
|
+
</fo:block-container>
|
4014
|
+
</fo:block-container>
|
3168
4015
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3169
4016
|
<xsl:if test="../*[local-name() = 'author']">
|
3170
4017
|
<xsl:text>, </xsl:text>
|
@@ -3192,6 +4039,7 @@
|
|
3192
4039
|
<xsl:if test="@type = 'inline'">
|
3193
4040
|
|
3194
4041
|
|
4042
|
+
|
3195
4043
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3196
4044
|
|
3197
4045
|
</xsl:if>
|
@@ -3223,6 +4071,7 @@
|
|
3223
4071
|
|
3224
4072
|
|
3225
4073
|
|
4074
|
+
|
3226
4075
|
<xsl:choose>
|
3227
4076
|
<xsl:when test="ancestor::un:sections and $depth = 1">12</xsl:when>
|
3228
4077
|
<xsl:when test="ancestor::un:sections">8</xsl:when>
|
@@ -3326,13 +4175,14 @@
|
|
3326
4175
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3327
4176
|
<fo:block>
|
3328
4177
|
<xsl:call-template name="setId"/>
|
4178
|
+
|
3329
4179
|
<xsl:apply-templates/>
|
3330
4180
|
</fo:block>
|
3331
4181
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
3332
4182
|
<fo:block id="{@id}">
|
3333
4183
|
<xsl:apply-templates/>
|
3334
4184
|
</fo:block>
|
3335
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@
|
4185
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3336
4186
|
|
3337
4187
|
<fo:block id="{@id}">
|
3338
4188
|
<xsl:apply-templates/>
|
@@ -3355,6 +4205,31 @@
|
|
3355
4205
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3356
4206
|
<!-- 0xA0 to space replacement -->
|
3357
4207
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4208
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4209
|
+
<xsl:choose>
|
4210
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
4211
|
+
<fo:block-container>
|
4212
|
+
<xsl:attribute name="margin-left">
|
4213
|
+
<xsl:choose>
|
4214
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4215
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4216
|
+
</xsl:choose>
|
4217
|
+
</xsl:attribute>
|
4218
|
+
|
4219
|
+
|
4220
|
+
<fo:block-container margin-left="0mm">
|
4221
|
+
<fo:block>
|
4222
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4223
|
+
</fo:block>
|
4224
|
+
</fo:block-container>
|
4225
|
+
</fo:block-container>
|
4226
|
+
</xsl:when>
|
4227
|
+
<xsl:otherwise>
|
4228
|
+
<fo:block>
|
4229
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4230
|
+
</fo:block>
|
4231
|
+
</xsl:otherwise>
|
4232
|
+
</xsl:choose>
|
3358
4233
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3359
4234
|
<!-- <row>
|
3360
4235
|
<date>05-07-2013</date>
|
@@ -3386,6 +4261,65 @@
|
|
3386
4261
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3387
4262
|
<fo:block><xsl:apply-templates/></fo:block>
|
3388
4263
|
</fo:table-cell>
|
4264
|
+
</xsl:template><xsl:template name="processBibitem">
|
4265
|
+
|
4266
|
+
|
4267
|
+
|
4268
|
+
|
4269
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4270
|
+
<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')]"/>
|
4271
|
+
<xsl:choose>
|
4272
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4273
|
+
<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"/>
|
4274
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4275
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4276
|
+
</xsl:if>
|
4277
|
+
<xsl:value-of select="$_doc_ident"/>
|
4278
|
+
</xsl:when>
|
4279
|
+
<xsl:otherwise>
|
4280
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4281
|
+
<xsl:if test="$type != ''">
|
4282
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4283
|
+
</xsl:if>
|
4284
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4285
|
+
</xsl:otherwise>
|
4286
|
+
</xsl:choose>
|
4287
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
4288
|
+
<xsl:choose>
|
4289
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
4290
|
+
<author>
|
4291
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4292
|
+
</author>
|
4293
|
+
</xsl:when>
|
4294
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
4295
|
+
<author>
|
4296
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4297
|
+
<xsl:text> </xsl:text>
|
4298
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
4299
|
+
</author>
|
4300
|
+
</xsl:when>
|
4301
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
4302
|
+
<author>
|
4303
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4304
|
+
<xsl:text> </xsl:text>
|
4305
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
4306
|
+
</author>
|
4307
|
+
</xsl:when>
|
4308
|
+
<xsl:otherwise>
|
4309
|
+
<xsl:apply-templates/>
|
4310
|
+
</xsl:otherwise>
|
4311
|
+
</xsl:choose>
|
4312
|
+
</xsl:template><xsl:template name="renderDate">
|
4313
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
4314
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
4315
|
+
</xsl:if>
|
4316
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
4317
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
4318
|
+
</xsl:if>
|
4319
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
4320
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
4321
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4322
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
3389
4323
|
</xsl:template><xsl:template name="convertDate">
|
3390
4324
|
<xsl:param name="date"/>
|
3391
4325
|
<xsl:param name="format" select="'short'"/>
|
@@ -3468,6 +4402,7 @@
|
|
3468
4402
|
|
3469
4403
|
|
3470
4404
|
|
4405
|
+
|
3471
4406
|
|
3472
4407
|
</xsl:variable>
|
3473
4408
|
<xsl:choose>
|
@@ -3482,6 +4417,7 @@
|
|
3482
4417
|
<dc:creator>
|
3483
4418
|
|
3484
4419
|
|
4420
|
+
|
3485
4421
|
</dc:creator>
|
3486
4422
|
<dc:description>
|
3487
4423
|
<xsl:variable name="abstract">
|
@@ -3491,6 +4427,7 @@
|
|
3491
4427
|
<xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
3492
4428
|
|
3493
4429
|
|
4430
|
+
|
3494
4431
|
</xsl:variable>
|
3495
4432
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3496
4433
|
</dc:description>
|
@@ -3589,7 +4526,9 @@
|
|
3589
4526
|
|
3590
4527
|
|
3591
4528
|
|
3592
|
-
|
4529
|
+
|
4530
|
+
|
4531
|
+
|
3593
4532
|
</xsl:variable>
|
3594
4533
|
<xsl:if test="$documentNS != $XSLNS">
|
3595
4534
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3615,4 +4554,21 @@
|
|
3615
4554
|
</xsl:otherwise>
|
3616
4555
|
</xsl:choose>
|
3617
4556
|
</xsl:attribute>
|
4557
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4558
|
+
<xsl:param name="text"/>
|
4559
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4560
|
+
<xsl:if test="string-length($text) > 0">
|
4561
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4562
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4563
|
+
<xsl:if test="$char = '®'">
|
4564
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4565
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4566
|
+
</xsl:if>
|
4567
|
+
<xsl:value-of select="$char"/>
|
4568
|
+
</fo:inline>
|
4569
|
+
<xsl:call-template name="add-letter-spacing">
|
4570
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4571
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4572
|
+
</xsl:call-template>
|
4573
|
+
</xsl:if>
|
3618
4574
|
</xsl:template></xsl:stylesheet>
|