metanorma-un 0.3.11 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/asciidoctor/un/converter.rb +11 -16
- data/lib/isodoc/un.rb +1 -0
- data/lib/isodoc/un/base_convert.rb +12 -4
- data/lib/isodoc/un/html_convert.rb +2 -2
- data/lib/isodoc/un/pdf_convert.rb +0 -14
- data/lib/isodoc/un/presentation_xml_convert.rb +10 -0
- data/lib/isodoc/un/un.plenary-attachment.xsl +676 -269
- data/lib/isodoc/un/un.plenary.xsl +676 -269
- data/lib/isodoc/un/un.recommendation.xsl +668 -261
- data/lib/isodoc/un/word_convert.rb +2 -2
- data/lib/isodoc/un/xref.rb +11 -13
- data/lib/metanorma/un/processor.rb +6 -4
- data/lib/metanorma/un/version.rb +1 -1
- data/metanorma-unece.gemspec +1 -1
- metadata +9 -9
@@ -1,4 +1,4 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:un="https://www.metanorma.org/ns/un" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" version="1.0">
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:un="https://www.metanorma.org/ns/un" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java" version="1.0">
|
2
2
|
|
3
3
|
<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
@@ -25,8 +25,10 @@
|
|
25
25
|
|
26
26
|
<xsl:variable name="doctype" select="/un:un-standard/un:bibdata/un:ext/un:doctype"/>
|
27
27
|
|
28
|
-
<xsl:variable name="doctypenumber">
|
29
|
-
<xsl:
|
28
|
+
<xsl:variable name="doctypenumber">
|
29
|
+
<xsl:call-template name="capitalize">
|
30
|
+
<xsl:with-param name="str" select="$doctype"/>
|
31
|
+
</xsl:call-template>
|
30
32
|
<xsl:text> No. </xsl:text>
|
31
33
|
<xsl:value-of select="/un:un-standard/un:bibdata/un:docnumber"/>
|
32
34
|
</xsl:variable>
|
@@ -76,44 +78,8 @@
|
|
76
78
|
|
77
79
|
</fo:layout-master-set>
|
78
80
|
|
79
|
-
<
|
80
|
-
|
81
|
-
<pdf:dictionary type="normal" key="ViewerPreferences">
|
82
|
-
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
83
|
-
</pdf:dictionary>
|
84
|
-
</pdf:catalog>
|
85
|
-
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
86
|
-
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
87
|
-
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
88
|
-
<!-- Dublin Core properties go here -->
|
89
|
-
<dc:title>
|
90
|
-
<xsl:choose>
|
91
|
-
<xsl:when test="$title != ''">
|
92
|
-
<xsl:value-of select="$title"/>
|
93
|
-
</xsl:when>
|
94
|
-
<xsl:otherwise>
|
95
|
-
<xsl:text> </xsl:text>
|
96
|
-
</xsl:otherwise>
|
97
|
-
</xsl:choose>
|
98
|
-
</dc:title>
|
99
|
-
<dc:creator/>
|
100
|
-
<dc:description>
|
101
|
-
<xsl:variable name="abstract">
|
102
|
-
<xsl:copy-of select="/un:un-standard/un:preface/un:abstract//text()"/>
|
103
|
-
</xsl:variable>
|
104
|
-
<xsl:value-of select="normalize-space($abstract)"/>
|
105
|
-
</dc:description>
|
106
|
-
<pdf:Keywords>
|
107
|
-
<xsl:call-template name="insertKeywords"/>
|
108
|
-
</pdf:Keywords>
|
109
|
-
</rdf:Description>
|
110
|
-
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
111
|
-
<!-- XMP properties go here -->
|
112
|
-
<xmp:CreatorTool/>
|
113
|
-
</rdf:Description>
|
114
|
-
</rdf:RDF>
|
115
|
-
</x:xmpmeta>
|
116
|
-
</fo:declarations>
|
81
|
+
<xsl:call-template name="addPDFUAmeta"/>
|
82
|
+
|
117
83
|
|
118
84
|
<!-- Cover Page -->
|
119
85
|
<fo:page-sequence master-reference="cover-page" force-page-count="even">
|
@@ -208,8 +174,18 @@
|
|
208
174
|
<fo:page-sequence master-reference="document-preface-master" force-page-count="even" line-height="115%">
|
209
175
|
<xsl:call-template name="insertHeaderPreface"/>
|
210
176
|
<fo:flow flow-name="xsl-region-body" text-align="justify">
|
211
|
-
<
|
212
|
-
|
177
|
+
<xsl:variable name="title-toc">
|
178
|
+
<xsl:call-template name="getTitle">
|
179
|
+
<xsl:with-param name="name" select="'title-toc'"/>
|
180
|
+
</xsl:call-template>
|
181
|
+
</xsl:variable>
|
182
|
+
<fo:block font-size="14pt" margin-top="4pt" margin-bottom="8pt"><xsl:value-of select="$title-toc"/></fo:block>
|
183
|
+
<xsl:variable name="title-page">
|
184
|
+
<xsl:call-template name="getTitle">
|
185
|
+
<xsl:with-param name="name" select="'title-page'"/>
|
186
|
+
</xsl:call-template>
|
187
|
+
</xsl:variable>
|
188
|
+
<fo:block font-size="9pt" text-align="right" font-style="italic" margin-bottom="6pt"><xsl:value-of select="$title-page"/></fo:block>
|
213
189
|
<fo:block>
|
214
190
|
<xsl:for-each select="xalan:nodeset($contents)//item[not(@type = 'table') and not(@type = 'figure') and not (@type = 'annex' or @parent = 'annex')]">
|
215
191
|
<xsl:if test="@display = 'true' and @level <= 3">
|
@@ -346,14 +322,7 @@
|
|
346
322
|
<!-- Any node with title element - clause, definition, annex,... -->
|
347
323
|
<xsl:template match="un:title | un:preferred" mode="contents">
|
348
324
|
<xsl:variable name="id">
|
349
|
-
<xsl:
|
350
|
-
<xsl:when test="../@id">
|
351
|
-
<xsl:value-of select="../@id"/>
|
352
|
-
</xsl:when>
|
353
|
-
<xsl:otherwise>
|
354
|
-
<xsl:value-of select="text()"/>
|
355
|
-
</xsl:otherwise>
|
356
|
-
</xsl:choose>
|
325
|
+
<xsl:call-template name="getId"/>
|
357
326
|
</xsl:variable>
|
358
327
|
|
359
328
|
<xsl:variable name="level">
|
@@ -400,7 +369,12 @@
|
|
400
369
|
<xsl:when test="ancestor::un:annex">
|
401
370
|
<xsl:choose>
|
402
371
|
<xsl:when test="$level = 1">
|
403
|
-
<xsl:
|
372
|
+
<xsl:variable name="title-annex">
|
373
|
+
<xsl:call-template name="getTitle">
|
374
|
+
<xsl:with-param name="name" select="'title-annex'"/>
|
375
|
+
</xsl:call-template>
|
376
|
+
</xsl:variable>
|
377
|
+
<xsl:value-of select="$title-annex"/>
|
404
378
|
<xsl:number format="I" level="any" count="un:annex"/>
|
405
379
|
</xsl:when>
|
406
380
|
<xsl:otherwise>
|
@@ -433,7 +407,12 @@
|
|
433
407
|
<xsl:template match="un:figure" mode="contents">
|
434
408
|
<item level="" id="{@id}" type="figure">
|
435
409
|
<xsl:attribute name="section">
|
436
|
-
<xsl:
|
410
|
+
<xsl:variable name="title-figure">
|
411
|
+
<xsl:call-template name="getTitle">
|
412
|
+
<xsl:with-param name="name" select="'title-figure'"/>
|
413
|
+
</xsl:call-template>
|
414
|
+
</xsl:variable>
|
415
|
+
<xsl:value-of select="$title-figure"/>
|
437
416
|
<xsl:choose>
|
438
417
|
<xsl:when test="ancestor::un:annex">
|
439
418
|
<xsl:choose>
|
@@ -465,7 +444,12 @@
|
|
465
444
|
<xsl:variable name="annex-id" select="ancestor::un:annex/@id"/>
|
466
445
|
<item level="" id="{@id}" display="false" type="table">
|
467
446
|
<xsl:attribute name="section">
|
468
|
-
<xsl:
|
447
|
+
<xsl:variable name="title-table">
|
448
|
+
<xsl:call-template name="getTitle">
|
449
|
+
<xsl:with-param name="name" select="'title-table'"/>
|
450
|
+
</xsl:call-template>
|
451
|
+
</xsl:variable>
|
452
|
+
<xsl:value-of select="$title-table"/>
|
469
453
|
<xsl:choose>
|
470
454
|
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
471
455
|
<xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table']"/>
|
@@ -489,7 +473,12 @@
|
|
489
473
|
<xsl:template match="un:formula" mode="contents">
|
490
474
|
<item level="" id="{@id}" display="false">
|
491
475
|
<xsl:attribute name="section">
|
492
|
-
<xsl:
|
476
|
+
<xsl:variable name="title-formula">
|
477
|
+
<xsl:call-template name="getTitle">
|
478
|
+
<xsl:with-param name="name" select="'title-formula'"/>
|
479
|
+
</xsl:call-template>
|
480
|
+
</xsl:variable>
|
481
|
+
<xsl:value-of select="$title-formula"/><xsl:number format="(A.1)" level="multiple" count="un:annex | un:formula"/>
|
493
482
|
</xsl:attribute>
|
494
483
|
</item>
|
495
484
|
</xsl:template>
|
@@ -518,7 +507,12 @@
|
|
518
507
|
<item level="" id="{@id}" display="false" type="Terms">
|
519
508
|
<xsl:if test="ancestor::un:annex">
|
520
509
|
<xsl:attribute name="section">
|
521
|
-
<xsl:
|
510
|
+
<xsl:variable name="title-appendix">
|
511
|
+
<xsl:call-template name="getTitle">
|
512
|
+
<xsl:with-param name="name" select="'title-appendix'"/>
|
513
|
+
</xsl:call-template>
|
514
|
+
</xsl:variable>
|
515
|
+
<xsl:value-of select="$title-appendix"/><xsl:number format="A" count="un:annex"/>
|
522
516
|
</xsl:attribute>
|
523
517
|
</xsl:if>
|
524
518
|
</item>
|
@@ -528,7 +522,12 @@
|
|
528
522
|
<item level="" id="{@id}" display="false" type="References">
|
529
523
|
<xsl:if test="ancestor::un:annex">
|
530
524
|
<xsl:attribute name="section">
|
531
|
-
<xsl:
|
525
|
+
<xsl:variable name="title-appendix">
|
526
|
+
<xsl:call-template name="getTitle">
|
527
|
+
<xsl:with-param name="name" select="'title-appendix'"/>
|
528
|
+
</xsl:call-template>
|
529
|
+
</xsl:variable>
|
530
|
+
<xsl:value-of select="$title-appendix"/><xsl:number format="A" count="un:annex"/>
|
532
531
|
</xsl:attribute>
|
533
532
|
</xsl:if>
|
534
533
|
</item>
|
@@ -540,7 +539,12 @@
|
|
540
539
|
<xsl:variable name="num">
|
541
540
|
<xsl:number/>
|
542
541
|
</xsl:variable>
|
543
|
-
<xsl:
|
542
|
+
<xsl:variable name="title-box">
|
543
|
+
<xsl:call-template name="getTitle">
|
544
|
+
<xsl:with-param name="name" select="'title-box'"/>
|
545
|
+
</xsl:call-template>
|
546
|
+
</xsl:variable>
|
547
|
+
<xsl:value-of select="$title-box"/><xsl:value-of select="$num"/>
|
544
548
|
</xsl:attribute>
|
545
549
|
</item>
|
546
550
|
</xsl:template>
|
@@ -758,7 +762,12 @@
|
|
758
762
|
<xsl:template match="un:ul//un:note | un:ol//un:note"/>
|
759
763
|
<xsl:template match="un:ul//un:note/un:p | un:ol//un:note/un:p" mode="process">
|
760
764
|
<fo:block font-size="11pt" margin-top="4pt">
|
761
|
-
<xsl:
|
765
|
+
<xsl:variable name="title-note">
|
766
|
+
<xsl:call-template name="getTitle">
|
767
|
+
<xsl:with-param name="name" select="'title-note'"/>
|
768
|
+
</xsl:call-template>
|
769
|
+
</xsl:variable>
|
770
|
+
<xsl:value-of select="$title-note"/>
|
762
771
|
<xsl:if test="../following-sibling::un:note or ../preceding-sibling::un:note">
|
763
772
|
<xsl:number count="un:note"/><xsl:text> </xsl:text>
|
764
773
|
</xsl:if>
|
@@ -837,7 +846,12 @@
|
|
837
846
|
<xsl:variable name="num">
|
838
847
|
<xsl:number/>
|
839
848
|
</xsl:variable>
|
840
|
-
<xsl:
|
849
|
+
<xsl:variable name="title-box">
|
850
|
+
<xsl:call-template name="getTitle">
|
851
|
+
<xsl:with-param name="name" select="'title-box'"/>
|
852
|
+
</xsl:call-template>
|
853
|
+
</xsl:variable>
|
854
|
+
<xsl:value-of select="$title-box"/><xsl:value-of select="$num"/><xsl:text>. </xsl:text><xsl:apply-templates select="un:name" mode="process"/>
|
841
855
|
</fo:block>
|
842
856
|
<fo:block margin-left="29mm" margin-right="34mm">
|
843
857
|
<xsl:apply-templates/>
|
@@ -894,14 +908,7 @@
|
|
894
908
|
|
895
909
|
<xsl:template match="un:title">
|
896
910
|
<xsl:variable name="id">
|
897
|
-
<xsl:
|
898
|
-
<xsl:when test="../@id">
|
899
|
-
<xsl:value-of select="../@id"/>
|
900
|
-
</xsl:when>
|
901
|
-
<xsl:otherwise>
|
902
|
-
<xsl:value-of select="text()"/>
|
903
|
-
</xsl:otherwise>
|
904
|
-
</xsl:choose>
|
911
|
+
<xsl:call-template name="getId"/>
|
905
912
|
</xsl:variable>
|
906
913
|
|
907
914
|
<xsl:variable name="level">
|
@@ -988,7 +995,12 @@
|
|
988
995
|
<xsl:template match="un:recommendation">
|
989
996
|
<fo:block margin-left="20mm">
|
990
997
|
<fo:block font-weight="bold">
|
991
|
-
<xsl:
|
998
|
+
<xsl:variable name="title-recommendation">
|
999
|
+
<xsl:call-template name="getTitle">
|
1000
|
+
<xsl:with-param name="name" select="'title-recommendation'"/>
|
1001
|
+
</xsl:call-template>
|
1002
|
+
</xsl:variable>
|
1003
|
+
<xsl:value-of select="$title-recommendation"/>
|
992
1004
|
<xsl:choose>
|
993
1005
|
<xsl:when test="ancestor::un:sections">
|
994
1006
|
<xsl:number level="any" count="un:sections//un:recommendation"/>
|
@@ -1059,7 +1071,12 @@
|
|
1059
1071
|
</xsl:if>
|
1060
1072
|
<xsl:if test="un:name">
|
1061
1073
|
<fo:block text-align="center" font-size="9pt" margin-bottom="6pt" keep-with-next="always" keep-together.within-column="always">
|
1062
|
-
<xsl:
|
1074
|
+
<xsl:variable name="title-figure">
|
1075
|
+
<xsl:call-template name="getTitle">
|
1076
|
+
<xsl:with-param name="name" select="'title-figure'"/>
|
1077
|
+
</xsl:call-template>
|
1078
|
+
</xsl:variable>
|
1079
|
+
<xsl:value-of select="$title-figure"/>
|
1063
1080
|
<xsl:choose>
|
1064
1081
|
<xsl:when test="ancestor::un:annex">
|
1065
1082
|
<xsl:choose>
|
@@ -1212,12 +1229,17 @@
|
|
1212
1229
|
|
1213
1230
|
<xsl:template match="un:termnote">
|
1214
1231
|
<fo:block margin-top="4pt">
|
1215
|
-
<xsl:
|
1216
|
-
<xsl:
|
1217
|
-
<xsl:
|
1218
|
-
</xsl:
|
1219
|
-
|
1220
|
-
|
1232
|
+
<xsl:variable name="title-note">
|
1233
|
+
<xsl:call-template name="getTitle">
|
1234
|
+
<xsl:with-param name="name" select="'title-note'"/>
|
1235
|
+
</xsl:call-template>
|
1236
|
+
</xsl:variable>
|
1237
|
+
<xsl:value-of select="$title-note"/>
|
1238
|
+
<xsl:if test="following-sibling::un:termnote or preceding-sibling::un:termnote">
|
1239
|
+
<xsl:number/><xsl:text> </xsl:text>
|
1240
|
+
</xsl:if>
|
1241
|
+
<xsl:text>– </xsl:text>
|
1242
|
+
<xsl:apply-templates/>
|
1221
1243
|
</fo:block>
|
1222
1244
|
</xsl:template>
|
1223
1245
|
|
@@ -1245,7 +1267,7 @@
|
|
1245
1267
|
<fo:table-cell> <!-- display-align="center" -->
|
1246
1268
|
<fo:block text-align="right">
|
1247
1269
|
<xsl:if test="not(ancestor::un:annex)">
|
1248
|
-
<xsl:
|
1270
|
+
<xsl:number format="(1)" level="any"/>
|
1249
1271
|
</xsl:if>
|
1250
1272
|
<xsl:if test="ancestor::un:annex">
|
1251
1273
|
<xsl:variable name="annex-id" select="ancestor::un:annex/@id"/>
|
@@ -1269,7 +1291,12 @@
|
|
1269
1291
|
</xsl:template>
|
1270
1292
|
|
1271
1293
|
<xsl:template match="un:example">
|
1272
|
-
<
|
1294
|
+
<xsl:variable name="title-example">
|
1295
|
+
<xsl:call-template name="getTitle">
|
1296
|
+
<xsl:with-param name="name" select="'title-example'"/>
|
1297
|
+
</xsl:call-template>
|
1298
|
+
</xsl:variable>
|
1299
|
+
<fo:block id="{@id}" font-size="10pt" font-weight="bold" margin-bottom="12pt"><xsl:value-of select="$title-example"/></fo:block>
|
1273
1300
|
<fo:block font-size="11pt" margin-top="12pt" margin-bottom="12pt" margin-left="15mm">
|
1274
1301
|
<xsl:apply-templates/>
|
1275
1302
|
</fo:block>
|
@@ -1295,15 +1322,25 @@
|
|
1295
1322
|
<!-- <xsl:if test="@type = 'inline'">
|
1296
1323
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1297
1324
|
</xsl:if> -->
|
1298
|
-
<xsl:text>[</xsl:text><xsl:value-of select="@citeas"
|
1325
|
+
<xsl:text>[</xsl:text><xsl:value-of select="@citeas"/><xsl:text>]</xsl:text> <!-- disable-output-escaping="yes" -->
|
1299
1326
|
<xsl:apply-templates select="un:localityStack"/>
|
1300
1327
|
</fo:basic-link>
|
1301
1328
|
</xsl:template>
|
1302
1329
|
|
1303
1330
|
<xsl:template match="un:locality">
|
1331
|
+
<xsl:variable name="title-section">
|
1332
|
+
<xsl:call-template name="getTitle">
|
1333
|
+
<xsl:with-param name="name" select="'title-section'"/>
|
1334
|
+
</xsl:call-template>
|
1335
|
+
</xsl:variable>
|
1336
|
+
<xsl:variable name="title-clause">
|
1337
|
+
<xsl:call-template name="getTitle">
|
1338
|
+
<xsl:with-param name="name" select="'title-clause'"/>
|
1339
|
+
</xsl:call-template>
|
1340
|
+
</xsl:variable>
|
1304
1341
|
<xsl:choose>
|
1305
|
-
<xsl:when test="@type = 'section'"
|
1306
|
-
<xsl:when test="@type = 'clause'"
|
1342
|
+
<xsl:when test="@type = 'section'"><xsl:value-of select="$title-section"/></xsl:when>
|
1343
|
+
<xsl:when test="@type = 'clause'"><xsl:value-of select="$title-clause"/></xsl:when>
|
1307
1344
|
<xsl:otherwise/>
|
1308
1345
|
</xsl:choose>
|
1309
1346
|
<xsl:text> </xsl:text><xsl:value-of select="un:referenceFrom"/>
|
@@ -1322,7 +1359,7 @@
|
|
1322
1359
|
</fo:block>
|
1323
1360
|
</xsl:template>
|
1324
1361
|
<xsl:template match="un:term" mode="table">
|
1325
|
-
<fo:table-row>
|
1362
|
+
<fo:table-row id="{@id}">
|
1326
1363
|
<fo:table-cell padding-right="1mm">
|
1327
1364
|
<fo:block margin-bottom="12pt">
|
1328
1365
|
<xsl:apply-templates select="un:preferred"/>
|
@@ -1336,7 +1373,7 @@
|
|
1336
1373
|
</fo:table-row>
|
1337
1374
|
</xsl:template>
|
1338
1375
|
<xsl:template match="un:preferred">
|
1339
|
-
<fo:inline
|
1376
|
+
<fo:inline>
|
1340
1377
|
<xsl:apply-templates/>
|
1341
1378
|
</fo:inline>
|
1342
1379
|
</xsl:template>
|
@@ -1445,28 +1482,6 @@
|
|
1445
1482
|
</xsl:template>
|
1446
1483
|
|
1447
1484
|
|
1448
|
-
<xsl:template name="getLevel">
|
1449
|
-
<xsl:variable name="level_total" select="count(ancestor::*)"/>
|
1450
|
-
<xsl:variable name="level">
|
1451
|
-
<xsl:choose>
|
1452
|
-
<xsl:when test="ancestor::un:preface">
|
1453
|
-
<xsl:value-of select="$level_total - 2"/>
|
1454
|
-
</xsl:when>
|
1455
|
-
<xsl:when test="ancestor::un:sections">
|
1456
|
-
<xsl:value-of select="$level_total - 2"/>
|
1457
|
-
</xsl:when>
|
1458
|
-
<xsl:when test="ancestor::un:bibliography">
|
1459
|
-
<xsl:value-of select="$level_total - 2"/>
|
1460
|
-
</xsl:when>
|
1461
|
-
<xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
|
1462
|
-
<xsl:otherwise>
|
1463
|
-
<xsl:value-of select="$level_total - 1"/>
|
1464
|
-
</xsl:otherwise>
|
1465
|
-
</xsl:choose>
|
1466
|
-
</xsl:variable>
|
1467
|
-
<xsl:value-of select="$level"/>
|
1468
|
-
</xsl:template>
|
1469
|
-
|
1470
1485
|
<xsl:template name="getSection">
|
1471
1486
|
<xsl:variable name="level">
|
1472
1487
|
<xsl:call-template name="getLevel"/>
|
@@ -1494,7 +1509,12 @@
|
|
1494
1509
|
<xsl:when test="ancestor::un:annex">
|
1495
1510
|
<xsl:choose>
|
1496
1511
|
<xsl:when test="$level = 1">
|
1497
|
-
<xsl:
|
1512
|
+
<xsl:variable name="title-annex">
|
1513
|
+
<xsl:call-template name="getTitle">
|
1514
|
+
<xsl:with-param name="name" select="'title-annex'"/>
|
1515
|
+
</xsl:call-template>
|
1516
|
+
</xsl:variable>
|
1517
|
+
<xsl:value-of select="$title-annex"/>
|
1498
1518
|
<xsl:number format="I" level="any" count="un:annex"/>
|
1499
1519
|
<!-- <xsl:text>: </xsl:text> -->
|
1500
1520
|
</xsl:when>
|
@@ -11896,47 +11916,188 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
11896
11916
|
</xsl:text>
|
11897
11917
|
</xsl:variable>
|
11898
11918
|
|
11899
|
-
<xsl:variable
|
11919
|
+
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
|
11920
|
+
|
11921
|
+
<title-table lang="en">Table </title-table>
|
11922
|
+
<title-table lang="fr">Tableau </title-table>
|
11923
|
+
|
11924
|
+
<title-table lang="zh">Table </title-table>
|
11925
|
+
|
11926
|
+
|
11927
|
+
|
11928
|
+
<title-note lang="en">NOTE </title-note>
|
11929
|
+
<title-note lang="fr">NOTE </title-note>
|
11930
|
+
|
11931
|
+
<title-note lang="zh">NOTE </title-note>
|
11932
|
+
|
11933
|
+
|
11934
|
+
|
11935
|
+
<title-figure lang="en">Figure </title-figure>
|
11936
|
+
<title-figure lang="fr">Figure </title-figure>
|
11937
|
+
|
11938
|
+
<title-figure lang="zh">Figure </title-figure>
|
11939
|
+
|
11940
|
+
|
11941
|
+
|
11942
|
+
<title-example lang="en">EXAMPLE </title-example>
|
11943
|
+
<title-example lang="fr">EXEMPLE </title-example>
|
11944
|
+
|
11945
|
+
<title-example lang="zh">EXAMPLE </title-example>
|
11946
|
+
|
11947
|
+
|
11948
|
+
|
11949
|
+
<title-example-xref lang="en">Example </title-example-xref>
|
11950
|
+
<title-example-xref lang="fr">Exemple </title-example-xref>
|
11951
|
+
|
11952
|
+
<title-section lang="en">Section </title-section>
|
11953
|
+
<title-section lang="fr">Section </title-section>
|
11954
|
+
|
11955
|
+
<title-inequality lang="en">Inequality </title-inequality>
|
11956
|
+
<title-inequality lang="fr">Inequality </title-inequality>
|
11957
|
+
|
11958
|
+
<title-equation lang="en">Equation </title-equation>
|
11959
|
+
<title-equation lang="fr">Equation </title-equation>
|
11960
|
+
|
11961
|
+
<title-annex lang="en">Annex </title-annex>
|
11962
|
+
<title-annex lang="fr">Annexe </title-annex>
|
11963
|
+
|
11964
|
+
<title-annex lang="zh">Annex </title-annex>
|
11965
|
+
|
11966
|
+
|
11967
|
+
|
11968
|
+
<title-appendix lang="en">Appendix </title-appendix>
|
11969
|
+
<title-appendix lang="fr">Appendix </title-appendix>
|
11970
|
+
|
11971
|
+
<title-clause lang="en">Clause </title-clause>
|
11972
|
+
<title-clause lang="fr">Article </title-clause>
|
11973
|
+
|
11974
|
+
<title-clause lang="zh">Clause </title-clause>
|
11975
|
+
|
11976
|
+
|
11900
11977
|
|
11901
|
-
|
11978
|
+
<title-edition lang="en">
|
11979
|
+
|
11980
|
+
<xsl:text>Edition </xsl:text>
|
11981
|
+
|
11982
|
+
|
11983
|
+
</title-edition>
|
11984
|
+
|
11985
|
+
<title-formula lang="en">Formula </title-formula>
|
11986
|
+
<title-formula lang="fr">Formula </title-formula>
|
11987
|
+
|
11988
|
+
<title-toc lang="en">
|
11989
|
+
|
11990
|
+
<xsl:text>Contents</xsl:text>
|
11991
|
+
|
11992
|
+
|
11993
|
+
|
11994
|
+
</title-toc>
|
11995
|
+
<title-toc lang="fr">Sommaire</title-toc>
|
11996
|
+
|
11997
|
+
<title-toc lang="zh">Contents</title-toc>
|
11998
|
+
|
11999
|
+
|
12000
|
+
|
12001
|
+
<title-page lang="en">Page</title-page>
|
12002
|
+
<title-page lang="fr">Page</title-page>
|
12003
|
+
|
12004
|
+
<title-key lang="en">Key</title-key>
|
12005
|
+
<title-key lang="fr">Légende</title-key>
|
12006
|
+
|
12007
|
+
<title-where lang="en">where</title-where>
|
12008
|
+
<title-where lang="fr">où</title-where>
|
12009
|
+
|
12010
|
+
<title-descriptors lang="en">Descriptors</title-descriptors>
|
12011
|
+
|
12012
|
+
<title-part lang="en">
|
12013
|
+
|
12014
|
+
|
12015
|
+
</title-part>
|
12016
|
+
<title-part lang="fr">
|
12017
|
+
|
12018
|
+
|
12019
|
+
</title-part>
|
12020
|
+
<title-part lang="zh">第 # 部分:</title-part>
|
12021
|
+
|
12022
|
+
<title-note-to-entry lang="en">Note # to entry: </title-note-to-entry>
|
12023
|
+
<title-note-to-entry lang="fr">Note # à l'article: </title-note-to-entry>
|
11902
12024
|
|
12025
|
+
<title-note-to-entry lang="zh">Note # to entry: </title-note-to-entry>
|
11903
12026
|
|
11904
|
-
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-note">
|
11905
12027
|
|
11906
|
-
<xsl:text>NOTE </xsl:text>
|
11907
12028
|
|
12029
|
+
<title-modified lang="en">modified</title-modified>
|
12030
|
+
<title-modified lang="fr">modifiée</title-modified>
|
11908
12031
|
|
11909
|
-
|
12032
|
+
<title-modified lang="zh">modified</title-modified>
|
11910
12033
|
|
11911
|
-
<xsl:text>Figure </xsl:text>
|
11912
12034
|
|
11913
12035
|
|
11914
|
-
|
12036
|
+
<title-source lang="en">SOURCE</title-source>
|
11915
12037
|
|
11916
|
-
|
12038
|
+
<title-keywords lang="en">Keywords</title-keywords>
|
11917
12039
|
|
12040
|
+
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
12041
|
+
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
11918
12042
|
|
11919
|
-
|
12043
|
+
<title-submitting-organizations lang="en">Submitting Organizations</title-submitting-organizations>
|
11920
12044
|
|
11921
|
-
|
12045
|
+
<title-list-tables lang="en">List of Tables</title-list-tables>
|
11922
12046
|
|
12047
|
+
<title-list-figures lang="en">List of Figures</title-list-figures>
|
11923
12048
|
|
11924
|
-
|
11925
|
-
<xsl:text>Appendix </xsl:text>
|
11926
|
-
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-clause">
|
12049
|
+
<title-recommendation lang="en">Recommendation </title-recommendation>
|
11927
12050
|
|
11928
|
-
|
12051
|
+
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
11929
12052
|
|
12053
|
+
<title-abstract lang="en">Abstract</title-abstract>
|
11930
12054
|
|
11931
|
-
|
11932
|
-
<xsl:text>Edition </xsl:text>
|
11933
|
-
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-toc">
|
12055
|
+
<title-summary lang="en">Summary</title-summary>
|
11934
12056
|
|
12057
|
+
<title-in lang="en">in </title-in>
|
11935
12058
|
|
11936
|
-
|
12059
|
+
<title-box lang="en">Box </title-box>
|
11937
12060
|
|
12061
|
+
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
12062
|
+
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
12063
|
+
|
12064
|
+
<title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
|
12065
|
+
<title-completion-date lang="zh">本稿完成日期</title-completion-date>
|
12066
|
+
|
12067
|
+
<title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
|
12068
|
+
<title-issuance-date lang="zh"># 发布</title-issuance-date>
|
12069
|
+
|
12070
|
+
<title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
|
12071
|
+
<title-implementation-date lang="zh"># 实施</title-implementation-date>
|
12072
|
+
|
12073
|
+
<title-obligation-normative lang="en">normative</title-obligation-normative>
|
12074
|
+
<title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
|
11938
12075
|
|
11939
|
-
|
12076
|
+
<title-caution lang="en">CAUTION</title-caution>
|
12077
|
+
<title-caution lang="zh">注意</title-caution>
|
12078
|
+
|
12079
|
+
<title-warning lang="en">WARNING</title-warning>
|
12080
|
+
<title-warning lang="zh">警告</title-warning>
|
12081
|
+
|
12082
|
+
<title-amendment lang="en">AMENDMENT</title-amendment>
|
12083
|
+
</xsl:variable><xsl:template name="getTitle">
|
12084
|
+
<xsl:param name="name"/>
|
12085
|
+
<xsl:variable name="lang">
|
12086
|
+
<xsl:call-template name="getLang"/>
|
12087
|
+
</xsl:variable>
|
12088
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $lang]"/>
|
12089
|
+
<xsl:choose>
|
12090
|
+
<xsl:when test="normalize-space($title_) != ''">
|
12091
|
+
<xsl:value-of select="$title_"/>
|
12092
|
+
</xsl:when>
|
12093
|
+
<xsl:otherwise>
|
12094
|
+
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
12095
|
+
</xsl:otherwise>
|
12096
|
+
</xsl:choose>
|
12097
|
+
</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="link-style">
|
12098
|
+
|
12099
|
+
|
12100
|
+
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
11940
12101
|
|
11941
12102
|
|
11942
12103
|
|
@@ -11950,22 +12111,22 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
11950
12111
|
|
11951
12112
|
|
11952
12113
|
|
11953
|
-
</xsl:attribute-set><xsl:attribute-set
|
12114
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
11954
12115
|
|
11955
12116
|
|
11956
12117
|
|
11957
|
-
</xsl:attribute-set><xsl:attribute-set
|
12118
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
|
11958
12119
|
|
11959
12120
|
|
11960
12121
|
|
11961
|
-
</xsl:attribute-set><xsl:template
|
12122
|
+
</xsl:attribute-set><xsl:template match="text()">
|
11962
12123
|
<xsl:value-of select="."/>
|
11963
|
-
</xsl:template><xsl:template
|
12124
|
+
</xsl:template><xsl:template match="*[local-name()='br']">
|
11964
12125
|
<xsl:value-of select="$linebreak"/>
|
11965
|
-
</xsl:template><xsl:template
|
12126
|
+
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
11966
12127
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
11967
12128
|
<xsl:call-template name="add-zero-spaces-java"/>
|
11968
|
-
</xsl:template><xsl:template
|
12129
|
+
</xsl:template><xsl:template match="*[local-name()='table']">
|
11969
12130
|
|
11970
12131
|
<xsl:variable name="simple-table">
|
11971
12132
|
<!-- <xsl:copy> -->
|
@@ -11996,6 +12157,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
11996
12157
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
11997
12158
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
11998
12159
|
|
12160
|
+
<xsl:variable name="title-table">
|
12161
|
+
<xsl:call-template name="getTitle">
|
12162
|
+
<xsl:with-param name="name" select="'title-table'"/>
|
12163
|
+
</xsl:call-template>
|
12164
|
+
</xsl:variable>
|
11999
12165
|
<xsl:value-of select="$title-table"/>
|
12000
12166
|
<xsl:choose>
|
12001
12167
|
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
@@ -12117,13 +12283,22 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12117
12283
|
</xsl:otherwise>
|
12118
12284
|
</xsl:choose>
|
12119
12285
|
</xsl:for-each>
|
12120
|
-
|
12286
|
+
|
12287
|
+
<xsl:choose>
|
12288
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
12289
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
12290
|
+
</xsl:when>
|
12291
|
+
<xsl:otherwise>
|
12292
|
+
<xsl:apply-templates/>
|
12293
|
+
</xsl:otherwise>
|
12294
|
+
</xsl:choose>
|
12295
|
+
|
12121
12296
|
</fo:table>
|
12122
12297
|
|
12123
12298
|
|
12124
12299
|
|
12125
12300
|
</fo:block-container>
|
12126
|
-
</xsl:template><xsl:template
|
12301
|
+
</xsl:template><xsl:template name="getTableNumber">
|
12127
12302
|
<xsl:choose>
|
12128
12303
|
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
12129
12304
|
<xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
|
@@ -12151,15 +12326,15 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12151
12326
|
|
12152
12327
|
</xsl:otherwise>
|
12153
12328
|
</xsl:choose>
|
12154
|
-
</xsl:template><xsl:template
|
12329
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']"/><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="process">
|
12155
12330
|
<xsl:apply-templates/>
|
12156
|
-
</xsl:template><xsl:template
|
12331
|
+
</xsl:template><xsl:template name="calculate-columns-numbers">
|
12157
12332
|
<xsl:param name="table-row"/>
|
12158
12333
|
<xsl:variable name="columns-count" select="count($table-row/*)"/>
|
12159
12334
|
<xsl:variable name="sum-colspans" select="sum($table-row/*/@colspan)"/>
|
12160
12335
|
<xsl:variable name="columns-with-colspan" select="count($table-row/*[@colspan])"/>
|
12161
12336
|
<xsl:value-of select="$columns-count + $sum-colspans - $columns-with-colspan"/>
|
12162
|
-
</xsl:template><xsl:template
|
12337
|
+
</xsl:template><xsl:template name="calculate-column-widths">
|
12163
12338
|
<xsl:param name="table"/>
|
12164
12339
|
<xsl:param name="cols-count"/>
|
12165
12340
|
<xsl:param name="curr-col" select="1"/>
|
@@ -12257,23 +12432,27 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12257
12432
|
<xsl:with-param name="table" select="$table"/>
|
12258
12433
|
</xsl:call-template>
|
12259
12434
|
</xsl:if>
|
12260
|
-
</xsl:template><xsl:template
|
12435
|
+
</xsl:template><xsl:template match="text()" mode="td_text">
|
12261
12436
|
<xsl:variable name="zero-space"></xsl:variable>
|
12262
12437
|
<xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
|
12263
|
-
</xsl:template><xsl:template
|
12438
|
+
</xsl:template><xsl:template match="*[local-name()='termsource']" mode="td_text">
|
12264
12439
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
12265
|
-
</xsl:template><xsl:template
|
12440
|
+
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
12266
12441
|
<xsl:value-of select="@target"/>
|
12267
|
-
</xsl:template><xsl:template
|
12442
|
+
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
12268
12443
|
<xsl:param name="cols-count"/>
|
12269
12444
|
<!-- font-weight="bold" -->
|
12270
12445
|
<fo:table-header>
|
12271
12446
|
|
12272
12447
|
<xsl:apply-templates/>
|
12273
12448
|
</fo:table-header>
|
12274
|
-
</xsl:template><xsl:template
|
12449
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
12450
|
+
<fo:table-body>
|
12451
|
+
<xsl:apply-templates/>
|
12452
|
+
</fo:table-body>
|
12453
|
+
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
12275
12454
|
<xsl:apply-templates/>
|
12276
|
-
</xsl:template><xsl:template
|
12455
|
+
</xsl:template><xsl:template name="insertTableFooter">
|
12277
12456
|
<xsl:param name="cols-count"/>
|
12278
12457
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
12279
12458
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -12313,7 +12492,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12313
12492
|
</fo:table-footer>
|
12314
12493
|
|
12315
12494
|
</xsl:if>
|
12316
|
-
</xsl:template><xsl:template
|
12495
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
12317
12496
|
|
12318
12497
|
<xsl:variable name="cols-count">
|
12319
12498
|
<xsl:choose>
|
@@ -12344,7 +12523,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12344
12523
|
|
12345
12524
|
</fo:table-body>
|
12346
12525
|
|
12347
|
-
</xsl:template><xsl:template
|
12526
|
+
</xsl:template><xsl:template match="*[local-name()='tr']">
|
12348
12527
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
12349
12528
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
12350
12529
|
<fo:table-row min-height="4mm">
|
@@ -12364,7 +12543,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12364
12543
|
|
12365
12544
|
<xsl:apply-templates/>
|
12366
12545
|
</fo:table-row>
|
12367
|
-
</xsl:template><xsl:template
|
12546
|
+
</xsl:template><xsl:template match="*[local-name()='th']">
|
12368
12547
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
12369
12548
|
|
12370
12549
|
|
@@ -12403,7 +12582,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12403
12582
|
<xsl:apply-templates/>
|
12404
12583
|
</fo:block>
|
12405
12584
|
</fo:table-cell>
|
12406
|
-
</xsl:template><xsl:template
|
12585
|
+
</xsl:template><xsl:template match="*[local-name()='td']">
|
12407
12586
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
12408
12587
|
|
12409
12588
|
|
@@ -12446,7 +12625,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12446
12625
|
|
12447
12626
|
|
12448
12627
|
</fo:table-cell>
|
12449
|
-
</xsl:template><xsl:template
|
12628
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
|
12450
12629
|
|
12451
12630
|
|
12452
12631
|
<fo:block font-size="10pt" margin-bottom="12pt">
|
@@ -12457,6 +12636,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12457
12636
|
<fo:inline padding-right="2mm">
|
12458
12637
|
|
12459
12638
|
|
12639
|
+
<xsl:variable name="title-note">
|
12640
|
+
<xsl:call-template name="getTitle">
|
12641
|
+
<xsl:with-param name="name" select="'title-note'"/>
|
12642
|
+
</xsl:call-template>
|
12643
|
+
</xsl:variable>
|
12460
12644
|
<xsl:value-of select="$title-note"/>
|
12461
12645
|
|
12462
12646
|
|
@@ -12467,9 +12651,9 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12467
12651
|
<xsl:apply-templates mode="process"/>
|
12468
12652
|
</fo:block>
|
12469
12653
|
|
12470
|
-
</xsl:template><xsl:template
|
12654
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
12471
12655
|
<xsl:apply-templates/>
|
12472
|
-
</xsl:template><xsl:template
|
12656
|
+
</xsl:template><xsl:template name="fn_display">
|
12473
12657
|
<xsl:variable name="references">
|
12474
12658
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
12475
12659
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
@@ -12506,7 +12690,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12506
12690
|
</fo:block>
|
12507
12691
|
</xsl:if>
|
12508
12692
|
</xsl:for-each>
|
12509
|
-
</xsl:template><xsl:template
|
12693
|
+
</xsl:template><xsl:template name="fn_name_display">
|
12510
12694
|
<!-- <xsl:variable name="references">
|
12511
12695
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
12512
12696
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
@@ -12522,7 +12706,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12522
12706
|
<xsl:apply-templates/>
|
12523
12707
|
</fo:block>
|
12524
12708
|
</xsl:for-each>
|
12525
|
-
</xsl:template><xsl:template
|
12709
|
+
</xsl:template><xsl:template name="fn_display_figure">
|
12526
12710
|
<xsl:variable name="key_iso">
|
12527
12711
|
<!-- and (not(@class) or @class !='pseudocode') -->
|
12528
12712
|
</xsl:variable>
|
@@ -12533,6 +12717,36 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12533
12717
|
</fn>
|
12534
12718
|
</xsl:for-each>
|
12535
12719
|
</xsl:variable>
|
12720
|
+
|
12721
|
+
<!-- current hierarchy is 'figure' element -->
|
12722
|
+
<xsl:variable name="following_dl_colwidths">
|
12723
|
+
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
12724
|
+
<xsl:variable name="html-table">
|
12725
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
12726
|
+
<xsl:element name="{$ns}:table">
|
12727
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
12728
|
+
<tbody>
|
12729
|
+
<xsl:apply-templates mode="dl"/>
|
12730
|
+
</tbody>
|
12731
|
+
</xsl:for-each>
|
12732
|
+
</xsl:element>
|
12733
|
+
</xsl:variable>
|
12734
|
+
|
12735
|
+
<xsl:call-template name="calculate-column-widths">
|
12736
|
+
<xsl:with-param name="cols-count" select="2"/>
|
12737
|
+
<xsl:with-param name="table" select="$html-table"/>
|
12738
|
+
</xsl:call-template>
|
12739
|
+
|
12740
|
+
</xsl:if>
|
12741
|
+
</xsl:variable>
|
12742
|
+
|
12743
|
+
|
12744
|
+
<xsl:variable name="maxlength_dt">
|
12745
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
12746
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
12747
|
+
</xsl:for-each>
|
12748
|
+
</xsl:variable>
|
12749
|
+
|
12536
12750
|
<xsl:if test="xalan:nodeset($references)//fn">
|
12537
12751
|
<fo:block>
|
12538
12752
|
<fo:table width="95%" table-layout="fixed">
|
@@ -12540,8 +12754,19 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12540
12754
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
12541
12755
|
|
12542
12756
|
</xsl:if>
|
12543
|
-
<
|
12544
|
-
|
12757
|
+
<xsl:choose>
|
12758
|
+
<!-- if there 'dl', then set same columns width -->
|
12759
|
+
<xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
|
12760
|
+
<xsl:call-template name="setColumnWidth_dl">
|
12761
|
+
<xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
|
12762
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
12763
|
+
</xsl:call-template>
|
12764
|
+
</xsl:when>
|
12765
|
+
<xsl:otherwise>
|
12766
|
+
<fo:table-column column-width="15%"/>
|
12767
|
+
<fo:table-column column-width="85%"/>
|
12768
|
+
</xsl:otherwise>
|
12769
|
+
</xsl:choose>
|
12545
12770
|
<fo:table-body>
|
12546
12771
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
12547
12772
|
<xsl:variable name="reference" select="@reference"/>
|
@@ -12573,7 +12798,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12573
12798
|
</fo:block>
|
12574
12799
|
</xsl:if>
|
12575
12800
|
|
12576
|
-
</xsl:template><xsl:template
|
12801
|
+
</xsl:template><xsl:template match="*[local-name()='fn']">
|
12577
12802
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
12578
12803
|
<fo:inline font-size="80%" keep-with-previous.within-line="always">
|
12579
12804
|
|
@@ -12585,11 +12810,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12585
12810
|
<xsl:value-of select="@reference"/>
|
12586
12811
|
</fo:basic-link>
|
12587
12812
|
</fo:inline>
|
12588
|
-
</xsl:template><xsl:template
|
12813
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
12589
12814
|
<fo:inline>
|
12590
12815
|
<xsl:apply-templates/>
|
12591
12816
|
</fo:inline>
|
12592
|
-
</xsl:template><xsl:template
|
12817
|
+
</xsl:template><xsl:template match="*[local-name()='dl']">
|
12593
12818
|
<xsl:variable name="parent" select="local-name(..)"/>
|
12594
12819
|
|
12595
12820
|
<xsl:variable name="key_iso">
|
@@ -12602,6 +12827,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12602
12827
|
|
12603
12828
|
<fo:block margin-bottom="12pt" text-align="left">
|
12604
12829
|
|
12830
|
+
<xsl:variable name="title-where">
|
12831
|
+
<xsl:call-template name="getTitle">
|
12832
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
12833
|
+
</xsl:call-template>
|
12834
|
+
</xsl:variable>
|
12605
12835
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
12606
12836
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
12607
12837
|
<xsl:text/>
|
@@ -12615,14 +12845,24 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12615
12845
|
|
12616
12846
|
|
12617
12847
|
|
12848
|
+
<xsl:variable name="title-where">
|
12849
|
+
<xsl:call-template name="getTitle">
|
12850
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
12851
|
+
</xsl:call-template>
|
12852
|
+
</xsl:variable>
|
12618
12853
|
<xsl:value-of select="$title-where"/>
|
12619
12854
|
</fo:block>
|
12620
12855
|
</xsl:when>
|
12621
12856
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
12622
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt">
|
12857
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
12623
12858
|
|
12624
12859
|
|
12625
12860
|
|
12861
|
+
<xsl:variable name="title-key">
|
12862
|
+
<xsl:call-template name="getTitle">
|
12863
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
12864
|
+
</xsl:call-template>
|
12865
|
+
</xsl:variable>
|
12626
12866
|
<xsl:value-of select="$title-key"/>
|
12627
12867
|
</fo:block>
|
12628
12868
|
</xsl:when>
|
@@ -12639,23 +12879,6 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12639
12879
|
|
12640
12880
|
|
12641
12881
|
|
12642
|
-
<!-- create virtual html table for dl/[dt and dd] -->
|
12643
|
-
<xsl:variable name="html-table">
|
12644
|
-
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
12645
|
-
<xsl:element name="{$ns}:table">
|
12646
|
-
<tbody>
|
12647
|
-
<xsl:apply-templates mode="dl"/>
|
12648
|
-
</tbody>
|
12649
|
-
</xsl:element>
|
12650
|
-
</xsl:variable>
|
12651
|
-
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
12652
|
-
<xsl:variable name="colwidths">
|
12653
|
-
<xsl:call-template name="calculate-column-widths">
|
12654
|
-
<xsl:with-param name="cols-count" select="2"/>
|
12655
|
-
<xsl:with-param name="table" select="$html-table"/>
|
12656
|
-
</xsl:call-template>
|
12657
|
-
</xsl:variable>
|
12658
|
-
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
12659
12882
|
|
12660
12883
|
<fo:table width="95%" table-layout="fixed">
|
12661
12884
|
|
@@ -12668,42 +12891,30 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12668
12891
|
|
12669
12892
|
</xsl:when>
|
12670
12893
|
</xsl:choose>
|
12671
|
-
|
12672
|
-
|
12673
|
-
|
12674
|
-
|
12675
|
-
|
12676
|
-
|
12677
|
-
|
12678
|
-
|
12679
|
-
|
12680
|
-
|
12681
|
-
|
12682
|
-
|
12683
|
-
|
12684
|
-
|
12685
|
-
|
12686
|
-
|
12687
|
-
|
12688
|
-
|
12689
|
-
|
12690
|
-
|
12691
|
-
|
12692
|
-
|
12693
|
-
|
12694
|
-
|
12695
|
-
</xsl:when>
|
12696
|
-
<xsl:otherwise>
|
12697
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
12698
|
-
</xsl:otherwise>
|
12699
|
-
</xsl:choose>
|
12700
|
-
</xsl:for-each>
|
12701
|
-
</xsl:otherwise>
|
12702
|
-
</xsl:choose>
|
12703
|
-
<!-- <fo:table-column column-width="15%"/>
|
12704
|
-
<fo:table-column column-width="85%"/> -->
|
12705
|
-
</xsl:otherwise>
|
12706
|
-
</xsl:choose>
|
12894
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
12895
|
+
<xsl:variable name="html-table">
|
12896
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
12897
|
+
<xsl:element name="{$ns}:table">
|
12898
|
+
<tbody>
|
12899
|
+
<xsl:apply-templates mode="dl"/>
|
12900
|
+
</tbody>
|
12901
|
+
</xsl:element>
|
12902
|
+
</xsl:variable>
|
12903
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
12904
|
+
<xsl:variable name="colwidths">
|
12905
|
+
<xsl:call-template name="calculate-column-widths">
|
12906
|
+
<xsl:with-param name="cols-count" select="2"/>
|
12907
|
+
<xsl:with-param name="table" select="$html-table"/>
|
12908
|
+
</xsl:call-template>
|
12909
|
+
</xsl:variable>
|
12910
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
12911
|
+
<xsl:variable name="maxlength_dt">
|
12912
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
12913
|
+
</xsl:variable>
|
12914
|
+
<xsl:call-template name="setColumnWidth_dl">
|
12915
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
12916
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
12917
|
+
</xsl:call-template>
|
12707
12918
|
<fo:table-body>
|
12708
12919
|
<xsl:apply-templates>
|
12709
12920
|
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
@@ -12713,7 +12924,61 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12713
12924
|
</fo:block>
|
12714
12925
|
</fo:block>
|
12715
12926
|
</xsl:if>
|
12716
|
-
</xsl:template><xsl:template
|
12927
|
+
</xsl:template><xsl:template name="setColumnWidth_dl">
|
12928
|
+
<xsl:param name="colwidths"/>
|
12929
|
+
<xsl:param name="maxlength_dt"/>
|
12930
|
+
<xsl:choose>
|
12931
|
+
<xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
|
12932
|
+
<fo:table-column column-width="50%"/>
|
12933
|
+
<fo:table-column column-width="50%"/>
|
12934
|
+
</xsl:when>
|
12935
|
+
<xsl:otherwise>
|
12936
|
+
<xsl:choose>
|
12937
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
12938
|
+
<fo:table-column column-width="5%"/>
|
12939
|
+
<fo:table-column column-width="95%"/>
|
12940
|
+
</xsl:when>
|
12941
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like t90, a, etc -->
|
12942
|
+
<fo:table-column column-width="10%"/>
|
12943
|
+
<fo:table-column column-width="90%"/>
|
12944
|
+
</xsl:when>
|
12945
|
+
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
12946
|
+
<fo:table-column column-width="60%"/>
|
12947
|
+
<fo:table-column column-width="40%"/>
|
12948
|
+
</xsl:when> -->
|
12949
|
+
<xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.3">
|
12950
|
+
<fo:table-column column-width="50%"/>
|
12951
|
+
<fo:table-column column-width="50%"/>
|
12952
|
+
</xsl:when>
|
12953
|
+
<xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 0.5">
|
12954
|
+
<fo:table-column column-width="40%"/>
|
12955
|
+
<fo:table-column column-width="60%"/>
|
12956
|
+
</xsl:when>
|
12957
|
+
<xsl:otherwise>
|
12958
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
12959
|
+
<xsl:choose>
|
12960
|
+
<xsl:when test=". = 1 or . = 0">
|
12961
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
12962
|
+
</xsl:when>
|
12963
|
+
<xsl:otherwise>
|
12964
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
12965
|
+
</xsl:otherwise>
|
12966
|
+
</xsl:choose>
|
12967
|
+
</xsl:for-each>
|
12968
|
+
</xsl:otherwise>
|
12969
|
+
</xsl:choose>
|
12970
|
+
<!-- <fo:table-column column-width="15%"/>
|
12971
|
+
<fo:table-column column-width="85%"/> -->
|
12972
|
+
</xsl:otherwise>
|
12973
|
+
</xsl:choose>
|
12974
|
+
</xsl:template><xsl:template name="getMaxLength_dt">
|
12975
|
+
<xsl:for-each select="*[local-name()='dt']">
|
12976
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
12977
|
+
<xsl:if test="position() = 1">
|
12978
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
12979
|
+
</xsl:if>
|
12980
|
+
</xsl:for-each>
|
12981
|
+
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
|
12717
12982
|
<xsl:param name="key_iso"/>
|
12718
12983
|
|
12719
12984
|
<!-- <tr>
|
@@ -12729,6 +12994,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12729
12994
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
12730
12995
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
12731
12996
|
</xsl:if>
|
12997
|
+
<xsl:variable name="title-note">
|
12998
|
+
<xsl:call-template name="getTitle">
|
12999
|
+
<xsl:with-param name="name" select="'title-note'"/>
|
13000
|
+
</xsl:call-template>
|
13001
|
+
</xsl:variable>
|
12732
13002
|
<xsl:value-of select="$title-note"/>
|
12733
13003
|
</fo:block>
|
12734
13004
|
</fo:table-cell>
|
@@ -12738,7 +13008,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12738
13008
|
</fo:block>
|
12739
13009
|
</fo:table-cell>
|
12740
13010
|
</fo:table-row>
|
12741
|
-
</xsl:template><xsl:template
|
13011
|
+
</xsl:template><xsl:template match="*[local-name()='dt']" mode="dl">
|
12742
13012
|
<tr>
|
12743
13013
|
<td>
|
12744
13014
|
<xsl:apply-templates/>
|
@@ -12751,7 +13021,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12751
13021
|
</td>
|
12752
13022
|
</tr>
|
12753
13023
|
|
12754
|
-
</xsl:template><xsl:template
|
13024
|
+
</xsl:template><xsl:template match="*[local-name()='dt']">
|
12755
13025
|
<xsl:param name="key_iso"/>
|
12756
13026
|
|
12757
13027
|
<fo:table-row>
|
@@ -12770,7 +13040,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12770
13040
|
|
12771
13041
|
|
12772
13042
|
<xsl:apply-templates/>
|
12773
|
-
|
13043
|
+
<!-- <xsl:if test="$namespace = 'gb'">
|
13044
|
+
<xsl:if test="ancestor::*[local-name()='formula']">
|
13045
|
+
<xsl:text>—</xsl:text>
|
13046
|
+
</xsl:if>
|
13047
|
+
</xsl:if> -->
|
12774
13048
|
</fo:block>
|
12775
13049
|
</fo:table-cell>
|
12776
13050
|
<fo:table-cell>
|
@@ -12784,37 +13058,37 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12784
13058
|
</fo:table-cell>
|
12785
13059
|
</fo:table-row>
|
12786
13060
|
|
12787
|
-
</xsl:template><xsl:template
|
13061
|
+
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
12788
13062
|
<xsl:apply-templates/>
|
12789
|
-
</xsl:template><xsl:template
|
13063
|
+
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
12790
13064
|
<xsl:apply-templates/>
|
12791
|
-
</xsl:template><xsl:template
|
13065
|
+
</xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
12792
13066
|
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
12793
|
-
</xsl:template><xsl:template
|
13067
|
+
</xsl:template><xsl:template match="*[local-name()='em']">
|
12794
13068
|
<fo:inline font-style="italic">
|
12795
13069
|
<xsl:apply-templates/>
|
12796
13070
|
</fo:inline>
|
12797
|
-
</xsl:template><xsl:template
|
13071
|
+
</xsl:template><xsl:template match="*[local-name()='strong']">
|
12798
13072
|
<fo:inline font-weight="bold">
|
12799
13073
|
<xsl:apply-templates/>
|
12800
13074
|
</fo:inline>
|
12801
|
-
</xsl:template><xsl:template
|
13075
|
+
</xsl:template><xsl:template match="*[local-name()='sup']">
|
12802
13076
|
<fo:inline font-size="80%" vertical-align="super">
|
12803
13077
|
<xsl:apply-templates/>
|
12804
13078
|
</fo:inline>
|
12805
|
-
</xsl:template><xsl:template
|
13079
|
+
</xsl:template><xsl:template match="*[local-name()='sub']">
|
12806
13080
|
<fo:inline font-size="80%" vertical-align="sub">
|
12807
13081
|
<xsl:apply-templates/>
|
12808
13082
|
</fo:inline>
|
12809
|
-
</xsl:template><xsl:template
|
13083
|
+
</xsl:template><xsl:template match="*[local-name()='tt']">
|
12810
13084
|
<fo:inline font-family="Courier" font-size="10pt">
|
12811
13085
|
<xsl:apply-templates/>
|
12812
13086
|
</fo:inline>
|
12813
|
-
</xsl:template><xsl:template
|
13087
|
+
</xsl:template><xsl:template match="*[local-name()='del']">
|
12814
13088
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
12815
13089
|
<xsl:apply-templates/>
|
12816
13090
|
</fo:inline>
|
12817
|
-
</xsl:template><xsl:template
|
13091
|
+
</xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
12818
13092
|
<xsl:variable name="text" select="normalize-space(.)"/>
|
12819
13093
|
<fo:inline font-size="75%">
|
12820
13094
|
<xsl:if test="string-length($text) > 0">
|
@@ -12823,10 +13097,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12823
13097
|
</xsl:call-template>
|
12824
13098
|
</xsl:if>
|
12825
13099
|
</fo:inline>
|
12826
|
-
</xsl:template><xsl:template
|
13100
|
+
</xsl:template><xsl:template name="recursiveSmallCaps">
|
12827
13101
|
<xsl:param name="text"/>
|
12828
13102
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
12829
|
-
<xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/>
|
13103
|
+
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
13104
|
+
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
12830
13105
|
<xsl:choose>
|
12831
13106
|
<xsl:when test="$char=$upperCase">
|
12832
13107
|
<fo:inline font-size="{100 div 0.75}%">
|
@@ -12842,7 +13117,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12842
13117
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
12843
13118
|
</xsl:call-template>
|
12844
13119
|
</xsl:if>
|
12845
|
-
</xsl:template><xsl:template
|
13120
|
+
</xsl:template><xsl:template name="tokenize">
|
12846
13121
|
<xsl:param name="text"/>
|
12847
13122
|
<xsl:param name="separator" select="' '"/>
|
12848
13123
|
<xsl:choose>
|
@@ -12890,7 +13165,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12890
13165
|
</xsl:call-template>
|
12891
13166
|
</xsl:otherwise>
|
12892
13167
|
</xsl:choose>
|
12893
|
-
</xsl:template><xsl:template
|
13168
|
+
</xsl:template><xsl:template name="max_length">
|
12894
13169
|
<xsl:param name="words"/>
|
12895
13170
|
<xsl:for-each select="$words//word">
|
12896
13171
|
<xsl:sort select="." data-type="number" order="descending"/>
|
@@ -12898,11 +13173,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12898
13173
|
<xsl:value-of select="."/>
|
12899
13174
|
</xsl:if>
|
12900
13175
|
</xsl:for-each>
|
12901
|
-
</xsl:template><xsl:template
|
13176
|
+
</xsl:template><xsl:template name="add-zero-spaces-java">
|
12902
13177
|
<xsl:param name="text" select="."/>
|
12903
13178
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
12904
13179
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
12905
|
-
</xsl:template><xsl:template
|
13180
|
+
</xsl:template><xsl:template name="add-zero-spaces">
|
12906
13181
|
<xsl:param name="text" select="."/>
|
12907
13182
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
12908
13183
|
<xsl:variable name="zero-space-after-dot">.</xsl:variable>
|
@@ -12955,7 +13230,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12955
13230
|
<xsl:value-of select="$text"/>
|
12956
13231
|
</xsl:otherwise>
|
12957
13232
|
</xsl:choose>
|
12958
|
-
</xsl:template><xsl:template
|
13233
|
+
</xsl:template><xsl:template name="add-zero-spaces-equal">
|
12959
13234
|
<xsl:param name="text" select="."/>
|
12960
13235
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
12961
13236
|
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
@@ -12981,7 +13256,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12981
13256
|
<xsl:value-of select="$text"/>
|
12982
13257
|
</xsl:otherwise>
|
12983
13258
|
</xsl:choose>
|
12984
|
-
</xsl:template><xsl:template
|
13259
|
+
</xsl:template><xsl:template name="getSimpleTable">
|
12985
13260
|
<xsl:variable name="simple-table">
|
12986
13261
|
|
12987
13262
|
<!-- Step 1. colspan processing -->
|
@@ -13008,9 +13283,9 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13008
13283
|
</xsl:choose> -->
|
13009
13284
|
</xsl:variable>
|
13010
13285
|
<xsl:copy-of select="$simple-table"/>
|
13011
|
-
</xsl:template><xsl:template
|
13286
|
+
</xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
|
13012
13287
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
13013
|
-
</xsl:template><xsl:template
|
13288
|
+
</xsl:template><xsl:template match="*[local-name()='fn']" mode="simple-table-colspan"/><xsl:template match="*[local-name()='th'] | *[local-name()='td']" mode="simple-table-colspan">
|
13014
13289
|
<xsl:choose>
|
13015
13290
|
<xsl:when test="@colspan">
|
13016
13291
|
<xsl:variable name="td">
|
@@ -13032,16 +13307,16 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13032
13307
|
</xsl:element>
|
13033
13308
|
</xsl:otherwise>
|
13034
13309
|
</xsl:choose>
|
13035
|
-
</xsl:template><xsl:template
|
13310
|
+
</xsl:template><xsl:template match="@colspan" mode="simple-table-colspan"/><xsl:template match="*[local-name()='tr']" mode="simple-table-colspan">
|
13036
13311
|
<xsl:element name="tr">
|
13037
13312
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
13038
13313
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
13039
13314
|
</xsl:element>
|
13040
|
-
</xsl:template><xsl:template
|
13315
|
+
</xsl:template><xsl:template match="@*|node()" mode="simple-table-colspan">
|
13041
13316
|
<xsl:copy>
|
13042
13317
|
<xsl:apply-templates select="@*|node()" mode="simple-table-colspan"/>
|
13043
13318
|
</xsl:copy>
|
13044
|
-
</xsl:template><xsl:template
|
13319
|
+
</xsl:template><xsl:template name="repeatNode">
|
13045
13320
|
<xsl:param name="count"/>
|
13046
13321
|
<xsl:param name="node"/>
|
13047
13322
|
|
@@ -13052,18 +13327,18 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13052
13327
|
</xsl:call-template>
|
13053
13328
|
<xsl:copy-of select="$node"/>
|
13054
13329
|
</xsl:if>
|
13055
|
-
</xsl:template><xsl:template
|
13330
|
+
</xsl:template><xsl:template match="@*|node()" mode="simple-table-rowspan">
|
13056
13331
|
<xsl:copy>
|
13057
13332
|
<xsl:apply-templates select="@*|node()" mode="simple-table-rowspan"/>
|
13058
13333
|
</xsl:copy>
|
13059
|
-
</xsl:template><xsl:template
|
13334
|
+
</xsl:template><xsl:template match="tbody" mode="simple-table-rowspan">
|
13060
13335
|
<xsl:copy>
|
13061
13336
|
<xsl:copy-of select="tr[1]"/>
|
13062
13337
|
<xsl:apply-templates select="tr[2]" mode="simple-table-rowspan">
|
13063
13338
|
<xsl:with-param name="previousRow" select="tr[1]"/>
|
13064
13339
|
</xsl:apply-templates>
|
13065
13340
|
</xsl:copy>
|
13066
|
-
</xsl:template><xsl:template
|
13341
|
+
</xsl:template><xsl:template match="tr" mode="simple-table-rowspan">
|
13067
13342
|
<xsl:param name="previousRow"/>
|
13068
13343
|
<xsl:variable name="currentRow" select="."/>
|
13069
13344
|
|
@@ -13097,43 +13372,53 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13097
13372
|
<xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
|
13098
13373
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
13099
13374
|
</xsl:apply-templates>
|
13100
|
-
</xsl:template><xsl:template
|
13375
|
+
</xsl:template><xsl:template name="getLang">
|
13101
13376
|
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
13102
13377
|
<xsl:choose>
|
13103
13378
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
13104
13379
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
13105
13380
|
</xsl:choose>
|
13106
|
-
</xsl:template><xsl:template
|
13381
|
+
</xsl:template><xsl:template name="capitalizeWords">
|
13107
13382
|
<xsl:param name="str"/>
|
13108
13383
|
<xsl:variable name="str2" select="translate($str, '-', ' ')"/>
|
13109
13384
|
<xsl:choose>
|
13110
13385
|
<xsl:when test="contains($str2, ' ')">
|
13111
13386
|
<xsl:variable name="substr" select="substring-before($str2, ' ')"/>
|
13112
|
-
<xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
|
13113
|
-
<xsl:value-of select="substring($substr, 2)"/>
|
13387
|
+
<!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
|
13388
|
+
<xsl:value-of select="substring($substr, 2)"/> -->
|
13389
|
+
<xsl:call-template name="capitalize">
|
13390
|
+
<xsl:with-param name="str" select="$substr"/>
|
13391
|
+
</xsl:call-template>
|
13114
13392
|
<xsl:text> </xsl:text>
|
13115
13393
|
<xsl:call-template name="capitalizeWords">
|
13116
13394
|
<xsl:with-param name="str" select="substring-after($str2, ' ')"/>
|
13117
13395
|
</xsl:call-template>
|
13118
13396
|
</xsl:when>
|
13119
13397
|
<xsl:otherwise>
|
13120
|
-
<xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
|
13121
|
-
<xsl:value-of select="substring($str2, 2)"/>
|
13398
|
+
<!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
|
13399
|
+
<xsl:value-of select="substring($str2, 2)"/> -->
|
13400
|
+
<xsl:call-template name="capitalize">
|
13401
|
+
<xsl:with-param name="str" select="$str2"/>
|
13402
|
+
</xsl:call-template>
|
13122
13403
|
</xsl:otherwise>
|
13123
13404
|
</xsl:choose>
|
13124
|
-
</xsl:template><xsl:template
|
13405
|
+
</xsl:template><xsl:template name="capitalize">
|
13406
|
+
<xsl:param name="str"/>
|
13407
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
13408
|
+
<xsl:value-of select="substring($str, 2)"/>
|
13409
|
+
</xsl:template><xsl:template match="mathml:math">
|
13125
13410
|
<fo:inline font-family="STIX2Math">
|
13126
13411
|
<fo:instream-foreign-object fox:alt-text="Math">
|
13127
13412
|
<xsl:copy-of select="."/>
|
13128
13413
|
</fo:instream-foreign-object>
|
13129
13414
|
</fo:inline>
|
13130
|
-
</xsl:template><xsl:template
|
13415
|
+
</xsl:template><xsl:template match="*[local-name()='localityStack']">
|
13131
13416
|
<xsl:for-each select="*[local-name()='locality']">
|
13132
13417
|
<xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
|
13133
13418
|
<xsl:apply-templates select="."/>
|
13134
13419
|
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
13135
13420
|
</xsl:for-each>
|
13136
|
-
</xsl:template><xsl:template
|
13421
|
+
</xsl:template><xsl:template match="*[local-name()='link']" name="link">
|
13137
13422
|
<xsl:variable name="target">
|
13138
13423
|
<xsl:choose>
|
13139
13424
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
@@ -13163,7 +13448,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13163
13448
|
</xsl:otherwise>
|
13164
13449
|
</xsl:choose>
|
13165
13450
|
</fo:inline>
|
13166
|
-
</xsl:template><xsl:template
|
13451
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
13167
13452
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
13168
13453
|
<!-- <xsl:choose>
|
13169
13454
|
<xsl:when test="@lang = 'en'"></xsl:when>
|
@@ -13174,19 +13459,29 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13174
13459
|
</xsl:choose> -->
|
13175
13460
|
<xsl:apply-templates/>
|
13176
13461
|
</fo:block>
|
13177
|
-
</xsl:template><xsl:template
|
13462
|
+
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
13178
13463
|
<fo:inline id="{@id}"/>
|
13179
|
-
</xsl:template><xsl:template
|
13464
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
13180
13465
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
13466
|
+
<xsl:variable name="title-appendix">
|
13467
|
+
<xsl:call-template name="getTitle">
|
13468
|
+
<xsl:with-param name="name" select="'title-appendix'"/>
|
13469
|
+
</xsl:call-template>
|
13470
|
+
</xsl:variable>
|
13181
13471
|
<fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
|
13182
13472
|
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
13183
13473
|
</fo:block>
|
13184
13474
|
<xsl:apply-templates/>
|
13185
|
-
</xsl:template><xsl:template
|
13475
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
13186
13476
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
13187
|
-
</xsl:template><xsl:template
|
13477
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']">
|
13188
13478
|
<fo:block xsl:use-attribute-sets="appendix-example-style">
|
13189
13479
|
<xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
|
13480
|
+
<xsl:variable name="title-example">
|
13481
|
+
<xsl:call-template name="getTitle">
|
13482
|
+
<xsl:with-param name="name" select="'title-example'"/>
|
13483
|
+
</xsl:call-template>
|
13484
|
+
</xsl:variable>
|
13190
13485
|
<xsl:value-of select="$title-example"/>
|
13191
13486
|
<xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) > 1">
|
13192
13487
|
<xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
|
@@ -13196,11 +13491,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13196
13491
|
</xsl:if>
|
13197
13492
|
</fo:block>
|
13198
13493
|
<xsl:apply-templates/>
|
13199
|
-
</xsl:template><xsl:template
|
13494
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']"/><xsl:template match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']" mode="process">
|
13200
13495
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
13201
|
-
</xsl:template><xsl:template
|
13496
|
+
</xsl:template><xsl:template match="*[local-name() = 'callout']">
|
13202
13497
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
13203
|
-
</xsl:template><xsl:template
|
13498
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']">
|
13204
13499
|
<xsl:variable name="annotation-id" select="@id"/>
|
13205
13500
|
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
13206
13501
|
<fo:block id="{$annotation-id}" white-space="nowrap">
|
@@ -13210,14 +13505,25 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13210
13505
|
</xsl:apply-templates>
|
13211
13506
|
</fo:inline>
|
13212
13507
|
</fo:block>
|
13213
|
-
</xsl:template><xsl:template
|
13508
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
13214
13509
|
<xsl:param name="callout"/>
|
13215
13510
|
<fo:inline id="{@id}">
|
13216
13511
|
<!-- for first p in annotation, put <x> -->
|
13217
13512
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
13218
13513
|
<xsl:apply-templates/>
|
13219
13514
|
</fo:inline>
|
13220
|
-
</xsl:template><xsl:template
|
13515
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
13516
|
+
<xsl:variable name="title-modified">
|
13517
|
+
<xsl:call-template name="getTitle">
|
13518
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
13519
|
+
</xsl:call-template>
|
13520
|
+
</xsl:variable>
|
13521
|
+
<xsl:choose>
|
13522
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
13523
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
13524
|
+
</xsl:choose>
|
13525
|
+
<xsl:apply-templates/>
|
13526
|
+
</xsl:template><xsl:template name="convertDate">
|
13221
13527
|
<xsl:param name="date"/>
|
13222
13528
|
<xsl:param name="format" select="'short'"/>
|
13223
13529
|
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
@@ -13250,7 +13556,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13250
13556
|
</xsl:choose>
|
13251
13557
|
</xsl:variable>
|
13252
13558
|
<xsl:value-of select="$result"/>
|
13253
|
-
</xsl:template><xsl:template
|
13559
|
+
</xsl:template><xsl:template name="insertKeywords">
|
13254
13560
|
<xsl:param name="sorting" select="'true'"/>
|
13255
13561
|
<xsl:param name="charAtEnd" select="'.'"/>
|
13256
13562
|
<xsl:param name="charDelim" select="', '"/>
|
@@ -13273,7 +13579,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13273
13579
|
</xsl:for-each>
|
13274
13580
|
</xsl:otherwise>
|
13275
13581
|
</xsl:choose>
|
13276
|
-
</xsl:template><xsl:template
|
13582
|
+
</xsl:template><xsl:template name="insertKeyword">
|
13277
13583
|
<xsl:param name="charAtEnd"/>
|
13278
13584
|
<xsl:param name="charDelim"/>
|
13279
13585
|
<xsl:apply-templates/>
|
@@ -13281,4 +13587,105 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13281
13587
|
<xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
|
13282
13588
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
13283
13589
|
</xsl:choose>
|
13590
|
+
</xsl:template><xsl:template name="addPDFUAmeta">
|
13591
|
+
<fo:declarations>
|
13592
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
13593
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
13594
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
13595
|
+
</pdf:dictionary>
|
13596
|
+
</pdf:catalog>
|
13597
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
13598
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
13599
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
13600
|
+
<!-- Dublin Core properties go here -->
|
13601
|
+
<dc:title>
|
13602
|
+
<xsl:variable name="title">
|
13603
|
+
|
13604
|
+
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en' and @type = 'main']"/>
|
13605
|
+
|
13606
|
+
|
13607
|
+
|
13608
|
+
|
13609
|
+
</xsl:variable>
|
13610
|
+
<xsl:choose>
|
13611
|
+
<xsl:when test="normalize-space($title) != ''">
|
13612
|
+
<xsl:value-of select="$title"/>
|
13613
|
+
</xsl:when>
|
13614
|
+
<xsl:otherwise>
|
13615
|
+
<xsl:text> </xsl:text>
|
13616
|
+
</xsl:otherwise>
|
13617
|
+
</xsl:choose>
|
13618
|
+
</dc:title>
|
13619
|
+
<dc:creator>
|
13620
|
+
|
13621
|
+
|
13622
|
+
</dc:creator>
|
13623
|
+
<dc:description>
|
13624
|
+
<xsl:variable name="abstract">
|
13625
|
+
|
13626
|
+
|
13627
|
+
|
13628
|
+
<xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
13629
|
+
|
13630
|
+
|
13631
|
+
</xsl:variable>
|
13632
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
13633
|
+
</dc:description>
|
13634
|
+
<pdf:Keywords>
|
13635
|
+
<xsl:call-template name="insertKeywords"/>
|
13636
|
+
</pdf:Keywords>
|
13637
|
+
</rdf:Description>
|
13638
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
13639
|
+
<!-- XMP properties go here -->
|
13640
|
+
<xmp:CreatorTool/>
|
13641
|
+
</rdf:Description>
|
13642
|
+
</rdf:RDF>
|
13643
|
+
</x:xmpmeta>
|
13644
|
+
</fo:declarations>
|
13645
|
+
</xsl:template><xsl:template name="getId">
|
13646
|
+
<xsl:choose>
|
13647
|
+
<xsl:when test="../@id">
|
13648
|
+
<xsl:value-of select="../@id"/>
|
13649
|
+
</xsl:when>
|
13650
|
+
<xsl:otherwise>
|
13651
|
+
<!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
|
13652
|
+
<xsl:value-of select="concat(generate-id(..), '_', text())"/>
|
13653
|
+
</xsl:otherwise>
|
13654
|
+
</xsl:choose>
|
13655
|
+
</xsl:template><xsl:template name="getLevel">
|
13656
|
+
<xsl:variable name="level_total" select="count(ancestor::*)"/>
|
13657
|
+
<xsl:variable name="level">
|
13658
|
+
<xsl:choose>
|
13659
|
+
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
13660
|
+
<xsl:value-of select="$level_total - 2"/>
|
13661
|
+
</xsl:when>
|
13662
|
+
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
13663
|
+
<xsl:value-of select="$level_total - 2"/>
|
13664
|
+
</xsl:when>
|
13665
|
+
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
13666
|
+
<xsl:value-of select="$level_total - 2"/>
|
13667
|
+
</xsl:when>
|
13668
|
+
<xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
|
13669
|
+
<xsl:otherwise>
|
13670
|
+
<xsl:value-of select="$level_total - 1"/>
|
13671
|
+
</xsl:otherwise>
|
13672
|
+
</xsl:choose>
|
13673
|
+
</xsl:variable>
|
13674
|
+
<xsl:value-of select="$level"/>
|
13675
|
+
</xsl:template><xsl:template name="getSubSection">
|
13676
|
+
<xsl:number format=".1" level="multiple" count="*[local-name() = 'clause']/*[local-name() = 'clause'] | *[local-name() = 'clause']/*[local-name() = 'terms'] | *[local-name() = 'terms']/*[local-name() = 'term'] | *[local-name() = 'clause']/*[local-name() = 'term'] | *[local-name() = 'terms']/*[local-name() = 'clause'] | *[local-name() = 'terms']/*[local-name() = 'definitions'] | *[local-name() = 'definitions']/*[local-name() = 'clause'] | *[local-name() = 'clause']/*[local-name() = 'definitions'] | *[local-name() = 'definitions']/*[local-name() = 'definitions'] | *[local-name() = 'clause']/*[local-name() = 'references']"/>
|
13677
|
+
</xsl:template><xsl:template name="split">
|
13678
|
+
<xsl:param name="pText" select="."/>
|
13679
|
+
<xsl:param name="sep" select="','"/>
|
13680
|
+
<xsl:if test="string-length($pText) >0">
|
13681
|
+
<item>
|
13682
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, ','), $sep))"/>
|
13683
|
+
</item>
|
13684
|
+
<xsl:call-template name="split">
|
13685
|
+
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
13686
|
+
<xsl:with-param name="sep" select="$sep"/>
|
13687
|
+
</xsl:call-template>
|
13688
|
+
</xsl:if>
|
13689
|
+
</xsl:template><xsl:template name="getDocumentId">
|
13690
|
+
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
13284
13691
|
</xsl:template></xsl:stylesheet>
|