metanorma-un 0.3.10 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +0 -1
- data/.github/workflows/ubuntu.yml +10 -7
- data/.github/workflows/windows.yml +0 -1
- data/Rakefile +2 -0
- data/lib/asciidoctor/un/biblio.rng +1 -1
- data/lib/asciidoctor/un/converter.rb +11 -16
- data/lib/asciidoctor/un/isodoc.rng +427 -0
- data/lib/asciidoctor/un/reqt.rng +23 -0
- data/lib/asciidoctor/un/un.rng +8 -0
- data/lib/isodoc/un.rb +1 -0
- data/lib/isodoc/un/base_convert.rb +24 -4
- data/lib/isodoc/un/html/htmlstyle.css +1096 -0
- data/lib/isodoc/un/html/unece.css +818 -0
- data/lib/isodoc/un/html/wordstyle.css +1237 -0
- data/lib/isodoc/un/html/wordstyle.scss +0 -1
- 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 +733 -281
- data/lib/isodoc/un/un.plenary.xsl +733 -281
- data/lib/isodoc/un/un.recommendation.xsl +732 -266
- data/lib/isodoc/un/word_convert.rb +2 -2
- data/lib/isodoc/un/xref.rb +11 -13
- data/lib/metanorma/un/processor.rb +6 -8
- data/lib/metanorma/un/version.rb +1 -1
- data/metanorma-unece.gemspec +2 -1
- metadata +26 -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,11 +846,19 @@
|
|
837
846
|
<xsl:variable name="num">
|
838
847
|
<xsl:number/>
|
839
848
|
</xsl:variable>
|
840
|
-
<xsl:
|
841
|
-
|
842
|
-
|
843
|
-
|
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"/>
|
844
855
|
</fo:block>
|
856
|
+
<!-- <fo:block margin-left="29mm" margin-right="34mm"> -->
|
857
|
+
<fo:block-container margin-left="20mm" margin-right="20mm">
|
858
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
859
|
+
<xsl:apply-templates/>
|
860
|
+
</fo:block-container>
|
861
|
+
</fo:block-container>
|
845
862
|
</fo:block-container>
|
846
863
|
<fo:block margin-bottom="6pt"> </fo:block>
|
847
864
|
</xsl:template>
|
@@ -894,14 +911,7 @@
|
|
894
911
|
|
895
912
|
<xsl:template match="un:title">
|
896
913
|
<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>
|
914
|
+
<xsl:call-template name="getId"/>
|
905
915
|
</xsl:variable>
|
906
916
|
|
907
917
|
<xsl:variable name="level">
|
@@ -988,7 +998,12 @@
|
|
988
998
|
<xsl:template match="un:recommendation">
|
989
999
|
<fo:block margin-left="20mm">
|
990
1000
|
<fo:block font-weight="bold">
|
991
|
-
<xsl:
|
1001
|
+
<xsl:variable name="title-recommendation">
|
1002
|
+
<xsl:call-template name="getTitle">
|
1003
|
+
<xsl:with-param name="name" select="'title-recommendation'"/>
|
1004
|
+
</xsl:call-template>
|
1005
|
+
</xsl:variable>
|
1006
|
+
<xsl:value-of select="$title-recommendation"/>
|
992
1007
|
<xsl:choose>
|
993
1008
|
<xsl:when test="ancestor::un:sections">
|
994
1009
|
<xsl:number level="any" count="un:sections//un:recommendation"/>
|
@@ -1054,12 +1069,17 @@
|
|
1054
1069
|
<xsl:template match="un:figure">
|
1055
1070
|
<fo:block-container id="{@id}">
|
1056
1071
|
<xsl:if test="ancestor::un:admonition">
|
1057
|
-
<xsl:attribute name="margin-left"
|
1058
|
-
<xsl:attribute name="margin-right"
|
1072
|
+
<xsl:attribute name="margin-left">-5mm</xsl:attribute>
|
1073
|
+
<xsl:attribute name="margin-right">-5mm</xsl:attribute>
|
1059
1074
|
</xsl:if>
|
1060
1075
|
<xsl:if test="un:name">
|
1061
1076
|
<fo:block text-align="center" font-size="9pt" margin-bottom="6pt" keep-with-next="always" keep-together.within-column="always">
|
1062
|
-
<xsl:
|
1077
|
+
<xsl:variable name="title-figure">
|
1078
|
+
<xsl:call-template name="getTitle">
|
1079
|
+
<xsl:with-param name="name" select="'title-figure'"/>
|
1080
|
+
</xsl:call-template>
|
1081
|
+
</xsl:variable>
|
1082
|
+
<xsl:value-of select="$title-figure"/>
|
1063
1083
|
<xsl:choose>
|
1064
1084
|
<xsl:when test="ancestor::un:annex">
|
1065
1085
|
<xsl:choose>
|
@@ -1199,7 +1219,21 @@
|
|
1199
1219
|
|
1200
1220
|
<xsl:template match="un:note/un:p | un:annex//un:note/un:p" name="note">
|
1201
1221
|
<fo:block-container margin-top="3pt" border-top="0.1mm solid black" space-after="12pt">
|
1222
|
+
<xsl:if test="../@type = 'source' or ../@type = 'abbreviation'">
|
1223
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
1224
|
+
</xsl:if>
|
1202
1225
|
<fo:block font-size="10pt" text-indent="0" padding-top="1.5mm">
|
1226
|
+
<xsl:if test="../@type = 'source' or ../@type = 'abbreviation'">
|
1227
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
1228
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1229
|
+
<xsl:attribute name="padding-top">0mm</xsl:attribute>
|
1230
|
+
<fo:inline>
|
1231
|
+
<xsl:call-template name="capitalize">
|
1232
|
+
<xsl:with-param name="str" select="../@type"/>
|
1233
|
+
</xsl:call-template>
|
1234
|
+
<xsl:text>: </xsl:text>
|
1235
|
+
</fo:inline>
|
1236
|
+
</xsl:if>
|
1203
1237
|
<!-- <fo:inline padding-right="4mm"><xsl:text>NOTE </xsl:text>
|
1204
1238
|
<xsl:if test="../following-sibling::un:note or ../preceding-sibling::un:note">
|
1205
1239
|
<xsl:number count="un:note"/><xsl:text> </xsl:text>
|
@@ -1212,12 +1246,17 @@
|
|
1212
1246
|
|
1213
1247
|
<xsl:template match="un:termnote">
|
1214
1248
|
<fo:block margin-top="4pt">
|
1215
|
-
<xsl:
|
1216
|
-
<xsl:
|
1217
|
-
<xsl:
|
1218
|
-
</xsl:
|
1219
|
-
|
1220
|
-
|
1249
|
+
<xsl:variable name="title-note">
|
1250
|
+
<xsl:call-template name="getTitle">
|
1251
|
+
<xsl:with-param name="name" select="'title-note'"/>
|
1252
|
+
</xsl:call-template>
|
1253
|
+
</xsl:variable>
|
1254
|
+
<xsl:value-of select="$title-note"/>
|
1255
|
+
<xsl:if test="following-sibling::un:termnote or preceding-sibling::un:termnote">
|
1256
|
+
<xsl:number/><xsl:text> </xsl:text>
|
1257
|
+
</xsl:if>
|
1258
|
+
<xsl:text>– </xsl:text>
|
1259
|
+
<xsl:apply-templates/>
|
1221
1260
|
</fo:block>
|
1222
1261
|
</xsl:template>
|
1223
1262
|
|
@@ -1245,7 +1284,7 @@
|
|
1245
1284
|
<fo:table-cell> <!-- display-align="center" -->
|
1246
1285
|
<fo:block text-align="right">
|
1247
1286
|
<xsl:if test="not(ancestor::un:annex)">
|
1248
|
-
<xsl:
|
1287
|
+
<xsl:number format="(1)" level="any"/>
|
1249
1288
|
</xsl:if>
|
1250
1289
|
<xsl:if test="ancestor::un:annex">
|
1251
1290
|
<xsl:variable name="annex-id" select="ancestor::un:annex/@id"/>
|
@@ -1269,7 +1308,12 @@
|
|
1269
1308
|
</xsl:template>
|
1270
1309
|
|
1271
1310
|
<xsl:template match="un:example">
|
1272
|
-
<
|
1311
|
+
<xsl:variable name="title-example">
|
1312
|
+
<xsl:call-template name="getTitle">
|
1313
|
+
<xsl:with-param name="name" select="'title-example'"/>
|
1314
|
+
</xsl:call-template>
|
1315
|
+
</xsl:variable>
|
1316
|
+
<fo:block id="{@id}" font-size="10pt" font-weight="bold" margin-bottom="12pt"><xsl:value-of select="$title-example"/></fo:block>
|
1273
1317
|
<fo:block font-size="11pt" margin-top="12pt" margin-bottom="12pt" margin-left="15mm">
|
1274
1318
|
<xsl:apply-templates/>
|
1275
1319
|
</fo:block>
|
@@ -1295,15 +1339,25 @@
|
|
1295
1339
|
<!-- <xsl:if test="@type = 'inline'">
|
1296
1340
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1297
1341
|
</xsl:if> -->
|
1298
|
-
<xsl:text>[</xsl:text><xsl:value-of select="@citeas"
|
1342
|
+
<xsl:text>[</xsl:text><xsl:value-of select="@citeas"/><xsl:text>]</xsl:text> <!-- disable-output-escaping="yes" -->
|
1299
1343
|
<xsl:apply-templates select="un:localityStack"/>
|
1300
1344
|
</fo:basic-link>
|
1301
1345
|
</xsl:template>
|
1302
1346
|
|
1303
1347
|
<xsl:template match="un:locality">
|
1348
|
+
<xsl:variable name="title-section">
|
1349
|
+
<xsl:call-template name="getTitle">
|
1350
|
+
<xsl:with-param name="name" select="'title-section'"/>
|
1351
|
+
</xsl:call-template>
|
1352
|
+
</xsl:variable>
|
1353
|
+
<xsl:variable name="title-clause">
|
1354
|
+
<xsl:call-template name="getTitle">
|
1355
|
+
<xsl:with-param name="name" select="'title-clause'"/>
|
1356
|
+
</xsl:call-template>
|
1357
|
+
</xsl:variable>
|
1304
1358
|
<xsl:choose>
|
1305
|
-
<xsl:when test="@type = 'section'"
|
1306
|
-
<xsl:when test="@type = 'clause'"
|
1359
|
+
<xsl:when test="@type = 'section'"><xsl:value-of select="$title-section"/></xsl:when>
|
1360
|
+
<xsl:when test="@type = 'clause'"><xsl:value-of select="$title-clause"/></xsl:when>
|
1307
1361
|
<xsl:otherwise/>
|
1308
1362
|
</xsl:choose>
|
1309
1363
|
<xsl:text> </xsl:text><xsl:value-of select="un:referenceFrom"/>
|
@@ -1322,7 +1376,7 @@
|
|
1322
1376
|
</fo:block>
|
1323
1377
|
</xsl:template>
|
1324
1378
|
<xsl:template match="un:term" mode="table">
|
1325
|
-
<fo:table-row>
|
1379
|
+
<fo:table-row id="{@id}">
|
1326
1380
|
<fo:table-cell padding-right="1mm">
|
1327
1381
|
<fo:block margin-bottom="12pt">
|
1328
1382
|
<xsl:apply-templates select="un:preferred"/>
|
@@ -1336,7 +1390,7 @@
|
|
1336
1390
|
</fo:table-row>
|
1337
1391
|
</xsl:template>
|
1338
1392
|
<xsl:template match="un:preferred">
|
1339
|
-
<fo:inline
|
1393
|
+
<fo:inline>
|
1340
1394
|
<xsl:apply-templates/>
|
1341
1395
|
</fo:inline>
|
1342
1396
|
</xsl:template>
|
@@ -1445,28 +1499,6 @@
|
|
1445
1499
|
</xsl:template>
|
1446
1500
|
|
1447
1501
|
|
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
1502
|
<xsl:template name="getSection">
|
1471
1503
|
<xsl:variable name="level">
|
1472
1504
|
<xsl:call-template name="getLevel"/>
|
@@ -1494,7 +1526,12 @@
|
|
1494
1526
|
<xsl:when test="ancestor::un:annex">
|
1495
1527
|
<xsl:choose>
|
1496
1528
|
<xsl:when test="$level = 1">
|
1497
|
-
<xsl:
|
1529
|
+
<xsl:variable name="title-annex">
|
1530
|
+
<xsl:call-template name="getTitle">
|
1531
|
+
<xsl:with-param name="name" select="'title-annex'"/>
|
1532
|
+
</xsl:call-template>
|
1533
|
+
</xsl:variable>
|
1534
|
+
<xsl:value-of select="$title-annex"/>
|
1498
1535
|
<xsl:number format="I" level="any" count="un:annex"/>
|
1499
1536
|
<!-- <xsl:text>: </xsl:text> -->
|
1500
1537
|
</xsl:when>
|
@@ -11896,47 +11933,188 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
11896
11933
|
</xsl:text>
|
11897
11934
|
</xsl:variable>
|
11898
11935
|
|
11899
|
-
<xsl:variable
|
11936
|
+
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
|
11937
|
+
|
11938
|
+
<title-table lang="en">Table </title-table>
|
11939
|
+
<title-table lang="fr">Tableau </title-table>
|
11940
|
+
|
11941
|
+
<title-table lang="zh">Table </title-table>
|
11942
|
+
|
11943
|
+
|
11944
|
+
|
11945
|
+
<title-note lang="en">NOTE </title-note>
|
11946
|
+
<title-note lang="fr">NOTE </title-note>
|
11947
|
+
|
11948
|
+
<title-note lang="zh">NOTE </title-note>
|
11949
|
+
|
11950
|
+
|
11951
|
+
|
11952
|
+
<title-figure lang="en">Figure </title-figure>
|
11953
|
+
<title-figure lang="fr">Figure </title-figure>
|
11954
|
+
|
11955
|
+
<title-figure lang="zh">Figure </title-figure>
|
11956
|
+
|
11957
|
+
|
11958
|
+
|
11959
|
+
<title-example lang="en">EXAMPLE </title-example>
|
11960
|
+
<title-example lang="fr">EXEMPLE </title-example>
|
11961
|
+
|
11962
|
+
<title-example lang="zh">EXAMPLE </title-example>
|
11963
|
+
|
11964
|
+
|
11965
|
+
|
11966
|
+
<title-example-xref lang="en">Example </title-example-xref>
|
11967
|
+
<title-example-xref lang="fr">Exemple </title-example-xref>
|
11968
|
+
|
11969
|
+
<title-section lang="en">Section </title-section>
|
11970
|
+
<title-section lang="fr">Section </title-section>
|
11971
|
+
|
11972
|
+
<title-inequality lang="en">Inequality </title-inequality>
|
11973
|
+
<title-inequality lang="fr">Inequality </title-inequality>
|
11974
|
+
|
11975
|
+
<title-equation lang="en">Equation </title-equation>
|
11976
|
+
<title-equation lang="fr">Equation </title-equation>
|
11977
|
+
|
11978
|
+
<title-annex lang="en">Annex </title-annex>
|
11979
|
+
<title-annex lang="fr">Annexe </title-annex>
|
11980
|
+
|
11981
|
+
<title-annex lang="zh">Annex </title-annex>
|
11982
|
+
|
11983
|
+
|
11984
|
+
|
11985
|
+
<title-appendix lang="en">Appendix </title-appendix>
|
11986
|
+
<title-appendix lang="fr">Appendix </title-appendix>
|
11987
|
+
|
11988
|
+
<title-clause lang="en">Clause </title-clause>
|
11989
|
+
<title-clause lang="fr">Article </title-clause>
|
11990
|
+
|
11991
|
+
<title-clause lang="zh">Clause </title-clause>
|
11992
|
+
|
11993
|
+
|
11994
|
+
|
11995
|
+
<title-edition lang="en">
|
11996
|
+
|
11997
|
+
<xsl:text>Edition </xsl:text>
|
11998
|
+
|
11999
|
+
|
12000
|
+
</title-edition>
|
12001
|
+
|
12002
|
+
<title-formula lang="en">Formula </title-formula>
|
12003
|
+
<title-formula lang="fr">Formula </title-formula>
|
12004
|
+
|
12005
|
+
<title-toc lang="en">
|
12006
|
+
|
12007
|
+
<xsl:text>Contents</xsl:text>
|
12008
|
+
|
12009
|
+
|
12010
|
+
|
12011
|
+
</title-toc>
|
12012
|
+
<title-toc lang="fr">Sommaire</title-toc>
|
12013
|
+
|
12014
|
+
<title-toc lang="zh">Contents</title-toc>
|
12015
|
+
|
12016
|
+
|
12017
|
+
|
12018
|
+
<title-page lang="en">Page</title-page>
|
12019
|
+
<title-page lang="fr">Page</title-page>
|
12020
|
+
|
12021
|
+
<title-key lang="en">Key</title-key>
|
12022
|
+
<title-key lang="fr">Légende</title-key>
|
12023
|
+
|
12024
|
+
<title-where lang="en">where</title-where>
|
12025
|
+
<title-where lang="fr">où</title-where>
|
12026
|
+
|
12027
|
+
<title-descriptors lang="en">Descriptors</title-descriptors>
|
12028
|
+
|
12029
|
+
<title-part lang="en">
|
12030
|
+
|
12031
|
+
|
12032
|
+
</title-part>
|
12033
|
+
<title-part lang="fr">
|
12034
|
+
|
12035
|
+
|
12036
|
+
</title-part>
|
12037
|
+
<title-part lang="zh">第 # 部分:</title-part>
|
11900
12038
|
|
11901
|
-
|
12039
|
+
<title-note-to-entry lang="en">Note # to entry: </title-note-to-entry>
|
12040
|
+
<title-note-to-entry lang="fr">Note # à l'article: </title-note-to-entry>
|
11902
12041
|
|
12042
|
+
<title-note-to-entry lang="zh">Note # to entry: </title-note-to-entry>
|
11903
12043
|
|
11904
|
-
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-note">
|
11905
12044
|
|
11906
|
-
<xsl:text>NOTE </xsl:text>
|
11907
12045
|
|
12046
|
+
<title-modified lang="en">modified</title-modified>
|
12047
|
+
<title-modified lang="fr">modifiée</title-modified>
|
11908
12048
|
|
11909
|
-
|
12049
|
+
<title-modified lang="zh">modified</title-modified>
|
11910
12050
|
|
11911
|
-
<xsl:text>Figure </xsl:text>
|
11912
12051
|
|
11913
12052
|
|
11914
|
-
|
12053
|
+
<title-source lang="en">SOURCE</title-source>
|
11915
12054
|
|
11916
|
-
|
12055
|
+
<title-keywords lang="en">Keywords</title-keywords>
|
11917
12056
|
|
12057
|
+
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
12058
|
+
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
11918
12059
|
|
11919
|
-
|
12060
|
+
<title-submitting-organizations lang="en">Submitting Organizations</title-submitting-organizations>
|
11920
12061
|
|
11921
|
-
|
12062
|
+
<title-list-tables lang="en">List of Tables</title-list-tables>
|
11922
12063
|
|
12064
|
+
<title-list-figures lang="en">List of Figures</title-list-figures>
|
11923
12065
|
|
11924
|
-
|
11925
|
-
<xsl:text>Appendix </xsl:text>
|
11926
|
-
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-clause">
|
12066
|
+
<title-recommendation lang="en">Recommendation </title-recommendation>
|
11927
12067
|
|
11928
|
-
|
12068
|
+
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
11929
12069
|
|
12070
|
+
<title-abstract lang="en">Abstract</title-abstract>
|
11930
12071
|
|
11931
|
-
|
11932
|
-
<xsl:text>Edition </xsl:text>
|
11933
|
-
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-toc">
|
12072
|
+
<title-summary lang="en">Summary</title-summary>
|
11934
12073
|
|
12074
|
+
<title-in lang="en">in </title-in>
|
11935
12075
|
|
11936
|
-
|
12076
|
+
<title-box lang="en">Box </title-box>
|
11937
12077
|
|
12078
|
+
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
12079
|
+
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
11938
12080
|
|
11939
|
-
|
12081
|
+
<title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
|
12082
|
+
<title-completion-date lang="zh">本稿完成日期</title-completion-date>
|
12083
|
+
|
12084
|
+
<title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
|
12085
|
+
<title-issuance-date lang="zh"># 发布</title-issuance-date>
|
12086
|
+
|
12087
|
+
<title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
|
12088
|
+
<title-implementation-date lang="zh"># 实施</title-implementation-date>
|
12089
|
+
|
12090
|
+
<title-obligation-normative lang="en">normative</title-obligation-normative>
|
12091
|
+
<title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
|
12092
|
+
|
12093
|
+
<title-caution lang="en">CAUTION</title-caution>
|
12094
|
+
<title-caution lang="zh">注意</title-caution>
|
12095
|
+
|
12096
|
+
<title-warning lang="en">WARNING</title-warning>
|
12097
|
+
<title-warning lang="zh">警告</title-warning>
|
12098
|
+
|
12099
|
+
<title-amendment lang="en">AMENDMENT</title-amendment>
|
12100
|
+
</xsl:variable><xsl:template name="getTitle">
|
12101
|
+
<xsl:param name="name"/>
|
12102
|
+
<xsl:variable name="lang">
|
12103
|
+
<xsl:call-template name="getLang"/>
|
12104
|
+
</xsl:variable>
|
12105
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $lang]"/>
|
12106
|
+
<xsl:choose>
|
12107
|
+
<xsl:when test="normalize-space($title_) != ''">
|
12108
|
+
<xsl:value-of select="$title_"/>
|
12109
|
+
</xsl:when>
|
12110
|
+
<xsl:otherwise>
|
12111
|
+
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
12112
|
+
</xsl:otherwise>
|
12113
|
+
</xsl:choose>
|
12114
|
+
</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">
|
12115
|
+
|
12116
|
+
|
12117
|
+
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
11940
12118
|
|
11941
12119
|
|
11942
12120
|
|
@@ -11950,22 +12128,22 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
11950
12128
|
|
11951
12129
|
|
11952
12130
|
|
11953
|
-
</xsl:attribute-set><xsl:attribute-set
|
12131
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
11954
12132
|
|
11955
12133
|
|
11956
12134
|
|
11957
|
-
</xsl:attribute-set><xsl:attribute-set
|
12135
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
|
11958
12136
|
|
11959
12137
|
|
11960
12138
|
|
11961
|
-
</xsl:attribute-set><xsl:template
|
12139
|
+
</xsl:attribute-set><xsl:template match="text()">
|
11962
12140
|
<xsl:value-of select="."/>
|
11963
|
-
</xsl:template><xsl:template
|
12141
|
+
</xsl:template><xsl:template match="*[local-name()='br']">
|
11964
12142
|
<xsl:value-of select="$linebreak"/>
|
11965
|
-
</xsl:template><xsl:template
|
12143
|
+
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
11966
12144
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
11967
12145
|
<xsl:call-template name="add-zero-spaces-java"/>
|
11968
|
-
</xsl:template><xsl:template
|
12146
|
+
</xsl:template><xsl:template match="*[local-name()='table']">
|
11969
12147
|
|
11970
12148
|
<xsl:variable name="simple-table">
|
11971
12149
|
<!-- <xsl:copy> -->
|
@@ -11996,6 +12174,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
11996
12174
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
11997
12175
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
11998
12176
|
|
12177
|
+
<xsl:variable name="title-table">
|
12178
|
+
<xsl:call-template name="getTitle">
|
12179
|
+
<xsl:with-param name="name" select="'title-table'"/>
|
12180
|
+
</xsl:call-template>
|
12181
|
+
</xsl:variable>
|
11999
12182
|
<xsl:value-of select="$title-table"/>
|
12000
12183
|
<xsl:choose>
|
12001
12184
|
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
@@ -12117,13 +12300,22 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12117
12300
|
</xsl:otherwise>
|
12118
12301
|
</xsl:choose>
|
12119
12302
|
</xsl:for-each>
|
12120
|
-
|
12303
|
+
|
12304
|
+
<xsl:choose>
|
12305
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
12306
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
12307
|
+
</xsl:when>
|
12308
|
+
<xsl:otherwise>
|
12309
|
+
<xsl:apply-templates/>
|
12310
|
+
</xsl:otherwise>
|
12311
|
+
</xsl:choose>
|
12312
|
+
|
12121
12313
|
</fo:table>
|
12122
12314
|
|
12123
12315
|
|
12124
12316
|
|
12125
12317
|
</fo:block-container>
|
12126
|
-
</xsl:template><xsl:template
|
12318
|
+
</xsl:template><xsl:template name="getTableNumber">
|
12127
12319
|
<xsl:choose>
|
12128
12320
|
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
12129
12321
|
<xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
|
@@ -12151,15 +12343,15 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12151
12343
|
|
12152
12344
|
</xsl:otherwise>
|
12153
12345
|
</xsl:choose>
|
12154
|
-
</xsl:template><xsl:template
|
12346
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']"/><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="process">
|
12155
12347
|
<xsl:apply-templates/>
|
12156
|
-
</xsl:template><xsl:template
|
12348
|
+
</xsl:template><xsl:template name="calculate-columns-numbers">
|
12157
12349
|
<xsl:param name="table-row"/>
|
12158
12350
|
<xsl:variable name="columns-count" select="count($table-row/*)"/>
|
12159
12351
|
<xsl:variable name="sum-colspans" select="sum($table-row/*/@colspan)"/>
|
12160
12352
|
<xsl:variable name="columns-with-colspan" select="count($table-row/*[@colspan])"/>
|
12161
12353
|
<xsl:value-of select="$columns-count + $sum-colspans - $columns-with-colspan"/>
|
12162
|
-
</xsl:template><xsl:template
|
12354
|
+
</xsl:template><xsl:template name="calculate-column-widths">
|
12163
12355
|
<xsl:param name="table"/>
|
12164
12356
|
<xsl:param name="cols-count"/>
|
12165
12357
|
<xsl:param name="curr-col" select="1"/>
|
@@ -12257,23 +12449,27 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12257
12449
|
<xsl:with-param name="table" select="$table"/>
|
12258
12450
|
</xsl:call-template>
|
12259
12451
|
</xsl:if>
|
12260
|
-
</xsl:template><xsl:template
|
12452
|
+
</xsl:template><xsl:template match="text()" mode="td_text">
|
12261
12453
|
<xsl:variable name="zero-space"></xsl:variable>
|
12262
12454
|
<xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
|
12263
|
-
</xsl:template><xsl:template
|
12455
|
+
</xsl:template><xsl:template match="*[local-name()='termsource']" mode="td_text">
|
12264
12456
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
12265
|
-
</xsl:template><xsl:template
|
12457
|
+
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
12266
12458
|
<xsl:value-of select="@target"/>
|
12267
|
-
</xsl:template><xsl:template
|
12459
|
+
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
12268
12460
|
<xsl:param name="cols-count"/>
|
12269
12461
|
<!-- font-weight="bold" -->
|
12270
12462
|
<fo:table-header>
|
12271
12463
|
|
12272
12464
|
<xsl:apply-templates/>
|
12273
12465
|
</fo:table-header>
|
12274
|
-
</xsl:template><xsl:template
|
12466
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
12467
|
+
<fo:table-body>
|
12468
|
+
<xsl:apply-templates/>
|
12469
|
+
</fo:table-body>
|
12470
|
+
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
12275
12471
|
<xsl:apply-templates/>
|
12276
|
-
</xsl:template><xsl:template
|
12472
|
+
</xsl:template><xsl:template name="insertTableFooter">
|
12277
12473
|
<xsl:param name="cols-count"/>
|
12278
12474
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
12279
12475
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -12313,7 +12509,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12313
12509
|
</fo:table-footer>
|
12314
12510
|
|
12315
12511
|
</xsl:if>
|
12316
|
-
</xsl:template><xsl:template
|
12512
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
12317
12513
|
|
12318
12514
|
<xsl:variable name="cols-count">
|
12319
12515
|
<xsl:choose>
|
@@ -12344,7 +12540,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12344
12540
|
|
12345
12541
|
</fo:table-body>
|
12346
12542
|
|
12347
|
-
</xsl:template><xsl:template
|
12543
|
+
</xsl:template><xsl:template match="*[local-name()='tr']">
|
12348
12544
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
12349
12545
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
12350
12546
|
<fo:table-row min-height="4mm">
|
@@ -12364,7 +12560,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12364
12560
|
|
12365
12561
|
<xsl:apply-templates/>
|
12366
12562
|
</fo:table-row>
|
12367
|
-
</xsl:template><xsl:template
|
12563
|
+
</xsl:template><xsl:template match="*[local-name()='th']">
|
12368
12564
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
12369
12565
|
|
12370
12566
|
|
@@ -12403,7 +12599,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12403
12599
|
<xsl:apply-templates/>
|
12404
12600
|
</fo:block>
|
12405
12601
|
</fo:table-cell>
|
12406
|
-
</xsl:template><xsl:template
|
12602
|
+
</xsl:template><xsl:template match="*[local-name()='td']">
|
12407
12603
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
12408
12604
|
|
12409
12605
|
|
@@ -12446,7 +12642,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12446
12642
|
|
12447
12643
|
|
12448
12644
|
</fo:table-cell>
|
12449
|
-
</xsl:template><xsl:template
|
12645
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
|
12450
12646
|
|
12451
12647
|
|
12452
12648
|
<fo:block font-size="10pt" margin-bottom="12pt">
|
@@ -12457,6 +12653,22 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12457
12653
|
<fo:inline padding-right="2mm">
|
12458
12654
|
|
12459
12655
|
|
12656
|
+
|
12657
|
+
<xsl:if test="@type = 'source' or @type = 'abbreviation'">
|
12658
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
12659
|
+
<fo:inline>
|
12660
|
+
<xsl:call-template name="capitalize">
|
12661
|
+
<xsl:with-param name="str" select="@type"/>
|
12662
|
+
</xsl:call-template>
|
12663
|
+
<xsl:text>: </xsl:text>
|
12664
|
+
</fo:inline>
|
12665
|
+
</xsl:if>
|
12666
|
+
|
12667
|
+
<xsl:variable name="title-note">
|
12668
|
+
<xsl:call-template name="getTitle">
|
12669
|
+
<xsl:with-param name="name" select="'title-note'"/>
|
12670
|
+
</xsl:call-template>
|
12671
|
+
</xsl:variable>
|
12460
12672
|
<xsl:value-of select="$title-note"/>
|
12461
12673
|
|
12462
12674
|
|
@@ -12467,9 +12679,9 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12467
12679
|
<xsl:apply-templates mode="process"/>
|
12468
12680
|
</fo:block>
|
12469
12681
|
|
12470
|
-
</xsl:template><xsl:template
|
12682
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
12471
12683
|
<xsl:apply-templates/>
|
12472
|
-
</xsl:template><xsl:template
|
12684
|
+
</xsl:template><xsl:template name="fn_display">
|
12473
12685
|
<xsl:variable name="references">
|
12474
12686
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
12475
12687
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
@@ -12506,7 +12718,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12506
12718
|
</fo:block>
|
12507
12719
|
</xsl:if>
|
12508
12720
|
</xsl:for-each>
|
12509
|
-
</xsl:template><xsl:template
|
12721
|
+
</xsl:template><xsl:template name="fn_name_display">
|
12510
12722
|
<!-- <xsl:variable name="references">
|
12511
12723
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
12512
12724
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
@@ -12522,7 +12734,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12522
12734
|
<xsl:apply-templates/>
|
12523
12735
|
</fo:block>
|
12524
12736
|
</xsl:for-each>
|
12525
|
-
</xsl:template><xsl:template
|
12737
|
+
</xsl:template><xsl:template name="fn_display_figure">
|
12526
12738
|
<xsl:variable name="key_iso">
|
12527
12739
|
<!-- and (not(@class) or @class !='pseudocode') -->
|
12528
12740
|
</xsl:variable>
|
@@ -12533,6 +12745,36 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12533
12745
|
</fn>
|
12534
12746
|
</xsl:for-each>
|
12535
12747
|
</xsl:variable>
|
12748
|
+
|
12749
|
+
<!-- current hierarchy is 'figure' element -->
|
12750
|
+
<xsl:variable name="following_dl_colwidths">
|
12751
|
+
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
12752
|
+
<xsl:variable name="html-table">
|
12753
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
12754
|
+
<xsl:element name="{$ns}:table">
|
12755
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
12756
|
+
<tbody>
|
12757
|
+
<xsl:apply-templates mode="dl"/>
|
12758
|
+
</tbody>
|
12759
|
+
</xsl:for-each>
|
12760
|
+
</xsl:element>
|
12761
|
+
</xsl:variable>
|
12762
|
+
|
12763
|
+
<xsl:call-template name="calculate-column-widths">
|
12764
|
+
<xsl:with-param name="cols-count" select="2"/>
|
12765
|
+
<xsl:with-param name="table" select="$html-table"/>
|
12766
|
+
</xsl:call-template>
|
12767
|
+
|
12768
|
+
</xsl:if>
|
12769
|
+
</xsl:variable>
|
12770
|
+
|
12771
|
+
|
12772
|
+
<xsl:variable name="maxlength_dt">
|
12773
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
12774
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
12775
|
+
</xsl:for-each>
|
12776
|
+
</xsl:variable>
|
12777
|
+
|
12536
12778
|
<xsl:if test="xalan:nodeset($references)//fn">
|
12537
12779
|
<fo:block>
|
12538
12780
|
<fo:table width="95%" table-layout="fixed">
|
@@ -12540,8 +12782,19 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12540
12782
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
12541
12783
|
|
12542
12784
|
</xsl:if>
|
12543
|
-
<
|
12544
|
-
|
12785
|
+
<xsl:choose>
|
12786
|
+
<!-- if there 'dl', then set same columns width -->
|
12787
|
+
<xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
|
12788
|
+
<xsl:call-template name="setColumnWidth_dl">
|
12789
|
+
<xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
|
12790
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
12791
|
+
</xsl:call-template>
|
12792
|
+
</xsl:when>
|
12793
|
+
<xsl:otherwise>
|
12794
|
+
<fo:table-column column-width="15%"/>
|
12795
|
+
<fo:table-column column-width="85%"/>
|
12796
|
+
</xsl:otherwise>
|
12797
|
+
</xsl:choose>
|
12545
12798
|
<fo:table-body>
|
12546
12799
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
12547
12800
|
<xsl:variable name="reference" select="@reference"/>
|
@@ -12573,7 +12826,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12573
12826
|
</fo:block>
|
12574
12827
|
</xsl:if>
|
12575
12828
|
|
12576
|
-
</xsl:template><xsl:template
|
12829
|
+
</xsl:template><xsl:template match="*[local-name()='fn']">
|
12577
12830
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
12578
12831
|
<fo:inline font-size="80%" keep-with-previous.within-line="always">
|
12579
12832
|
|
@@ -12585,11 +12838,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12585
12838
|
<xsl:value-of select="@reference"/>
|
12586
12839
|
</fo:basic-link>
|
12587
12840
|
</fo:inline>
|
12588
|
-
</xsl:template><xsl:template
|
12841
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
12589
12842
|
<fo:inline>
|
12590
12843
|
<xsl:apply-templates/>
|
12591
12844
|
</fo:inline>
|
12592
|
-
</xsl:template><xsl:template
|
12845
|
+
</xsl:template><xsl:template match="*[local-name()='dl']">
|
12593
12846
|
<xsl:variable name="parent" select="local-name(..)"/>
|
12594
12847
|
|
12595
12848
|
<xsl:variable name="key_iso">
|
@@ -12602,6 +12855,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12602
12855
|
|
12603
12856
|
<fo:block margin-bottom="12pt" text-align="left">
|
12604
12857
|
|
12858
|
+
<xsl:variable name="title-where">
|
12859
|
+
<xsl:call-template name="getTitle">
|
12860
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
12861
|
+
</xsl:call-template>
|
12862
|
+
</xsl:variable>
|
12605
12863
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
12606
12864
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
12607
12865
|
<xsl:text/>
|
@@ -12615,14 +12873,24 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12615
12873
|
|
12616
12874
|
|
12617
12875
|
|
12876
|
+
<xsl:variable name="title-where">
|
12877
|
+
<xsl:call-template name="getTitle">
|
12878
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
12879
|
+
</xsl:call-template>
|
12880
|
+
</xsl:variable>
|
12618
12881
|
<xsl:value-of select="$title-where"/>
|
12619
12882
|
</fo:block>
|
12620
12883
|
</xsl:when>
|
12621
12884
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
12622
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt">
|
12885
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
12623
12886
|
|
12624
12887
|
|
12625
12888
|
|
12889
|
+
<xsl:variable name="title-key">
|
12890
|
+
<xsl:call-template name="getTitle">
|
12891
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
12892
|
+
</xsl:call-template>
|
12893
|
+
</xsl:variable>
|
12626
12894
|
<xsl:value-of select="$title-key"/>
|
12627
12895
|
</fo:block>
|
12628
12896
|
</xsl:when>
|
@@ -12639,23 +12907,6 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12639
12907
|
|
12640
12908
|
|
12641
12909
|
|
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
12910
|
|
12660
12911
|
<fo:table width="95%" table-layout="fixed">
|
12661
12912
|
|
@@ -12668,42 +12919,30 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12668
12919
|
|
12669
12920
|
</xsl:when>
|
12670
12921
|
</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>
|
12922
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
12923
|
+
<xsl:variable name="html-table">
|
12924
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
12925
|
+
<xsl:element name="{$ns}:table">
|
12926
|
+
<tbody>
|
12927
|
+
<xsl:apply-templates mode="dl"/>
|
12928
|
+
</tbody>
|
12929
|
+
</xsl:element>
|
12930
|
+
</xsl:variable>
|
12931
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
12932
|
+
<xsl:variable name="colwidths">
|
12933
|
+
<xsl:call-template name="calculate-column-widths">
|
12934
|
+
<xsl:with-param name="cols-count" select="2"/>
|
12935
|
+
<xsl:with-param name="table" select="$html-table"/>
|
12936
|
+
</xsl:call-template>
|
12937
|
+
</xsl:variable>
|
12938
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
12939
|
+
<xsl:variable name="maxlength_dt">
|
12940
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
12941
|
+
</xsl:variable>
|
12942
|
+
<xsl:call-template name="setColumnWidth_dl">
|
12943
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
12944
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
12945
|
+
</xsl:call-template>
|
12707
12946
|
<fo:table-body>
|
12708
12947
|
<xsl:apply-templates>
|
12709
12948
|
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
@@ -12713,7 +12952,61 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12713
12952
|
</fo:block>
|
12714
12953
|
</fo:block>
|
12715
12954
|
</xsl:if>
|
12716
|
-
</xsl:template><xsl:template
|
12955
|
+
</xsl:template><xsl:template name="setColumnWidth_dl">
|
12956
|
+
<xsl:param name="colwidths"/>
|
12957
|
+
<xsl:param name="maxlength_dt"/>
|
12958
|
+
<xsl:choose>
|
12959
|
+
<xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
|
12960
|
+
<fo:table-column column-width="50%"/>
|
12961
|
+
<fo:table-column column-width="50%"/>
|
12962
|
+
</xsl:when>
|
12963
|
+
<xsl:otherwise>
|
12964
|
+
<xsl:choose>
|
12965
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
12966
|
+
<fo:table-column column-width="5%"/>
|
12967
|
+
<fo:table-column column-width="95%"/>
|
12968
|
+
</xsl:when>
|
12969
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like t90, a, etc -->
|
12970
|
+
<fo:table-column column-width="10%"/>
|
12971
|
+
<fo:table-column column-width="90%"/>
|
12972
|
+
</xsl:when>
|
12973
|
+
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
12974
|
+
<fo:table-column column-width="60%"/>
|
12975
|
+
<fo:table-column column-width="40%"/>
|
12976
|
+
</xsl:when> -->
|
12977
|
+
<xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.3">
|
12978
|
+
<fo:table-column column-width="50%"/>
|
12979
|
+
<fo:table-column column-width="50%"/>
|
12980
|
+
</xsl:when>
|
12981
|
+
<xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 0.5">
|
12982
|
+
<fo:table-column column-width="40%"/>
|
12983
|
+
<fo:table-column column-width="60%"/>
|
12984
|
+
</xsl:when>
|
12985
|
+
<xsl:otherwise>
|
12986
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
12987
|
+
<xsl:choose>
|
12988
|
+
<xsl:when test=". = 1 or . = 0">
|
12989
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
12990
|
+
</xsl:when>
|
12991
|
+
<xsl:otherwise>
|
12992
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
12993
|
+
</xsl:otherwise>
|
12994
|
+
</xsl:choose>
|
12995
|
+
</xsl:for-each>
|
12996
|
+
</xsl:otherwise>
|
12997
|
+
</xsl:choose>
|
12998
|
+
<!-- <fo:table-column column-width="15%"/>
|
12999
|
+
<fo:table-column column-width="85%"/> -->
|
13000
|
+
</xsl:otherwise>
|
13001
|
+
</xsl:choose>
|
13002
|
+
</xsl:template><xsl:template name="getMaxLength_dt">
|
13003
|
+
<xsl:for-each select="*[local-name()='dt']">
|
13004
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
13005
|
+
<xsl:if test="position() = 1">
|
13006
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
13007
|
+
</xsl:if>
|
13008
|
+
</xsl:for-each>
|
13009
|
+
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
|
12717
13010
|
<xsl:param name="key_iso"/>
|
12718
13011
|
|
12719
13012
|
<!-- <tr>
|
@@ -12729,6 +13022,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12729
13022
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
12730
13023
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
12731
13024
|
</xsl:if>
|
13025
|
+
<xsl:variable name="title-note">
|
13026
|
+
<xsl:call-template name="getTitle">
|
13027
|
+
<xsl:with-param name="name" select="'title-note'"/>
|
13028
|
+
</xsl:call-template>
|
13029
|
+
</xsl:variable>
|
12732
13030
|
<xsl:value-of select="$title-note"/>
|
12733
13031
|
</fo:block>
|
12734
13032
|
</fo:table-cell>
|
@@ -12738,7 +13036,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12738
13036
|
</fo:block>
|
12739
13037
|
</fo:table-cell>
|
12740
13038
|
</fo:table-row>
|
12741
|
-
</xsl:template><xsl:template
|
13039
|
+
</xsl:template><xsl:template match="*[local-name()='dt']" mode="dl">
|
12742
13040
|
<tr>
|
12743
13041
|
<td>
|
12744
13042
|
<xsl:apply-templates/>
|
@@ -12751,7 +13049,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12751
13049
|
</td>
|
12752
13050
|
</tr>
|
12753
13051
|
|
12754
|
-
</xsl:template><xsl:template
|
13052
|
+
</xsl:template><xsl:template match="*[local-name()='dt']">
|
12755
13053
|
<xsl:param name="key_iso"/>
|
12756
13054
|
|
12757
13055
|
<fo:table-row>
|
@@ -12770,7 +13068,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12770
13068
|
|
12771
13069
|
|
12772
13070
|
<xsl:apply-templates/>
|
12773
|
-
|
13071
|
+
<!-- <xsl:if test="$namespace = 'gb'">
|
13072
|
+
<xsl:if test="ancestor::*[local-name()='formula']">
|
13073
|
+
<xsl:text>—</xsl:text>
|
13074
|
+
</xsl:if>
|
13075
|
+
</xsl:if> -->
|
12774
13076
|
</fo:block>
|
12775
13077
|
</fo:table-cell>
|
12776
13078
|
<fo:table-cell>
|
@@ -12784,37 +13086,37 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12784
13086
|
</fo:table-cell>
|
12785
13087
|
</fo:table-row>
|
12786
13088
|
|
12787
|
-
</xsl:template><xsl:template
|
13089
|
+
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
12788
13090
|
<xsl:apply-templates/>
|
12789
|
-
</xsl:template><xsl:template
|
13091
|
+
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
12790
13092
|
<xsl:apply-templates/>
|
12791
|
-
</xsl:template><xsl:template
|
13093
|
+
</xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
12792
13094
|
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
12793
|
-
</xsl:template><xsl:template
|
13095
|
+
</xsl:template><xsl:template match="*[local-name()='em']">
|
12794
13096
|
<fo:inline font-style="italic">
|
12795
13097
|
<xsl:apply-templates/>
|
12796
13098
|
</fo:inline>
|
12797
|
-
</xsl:template><xsl:template
|
13099
|
+
</xsl:template><xsl:template match="*[local-name()='strong']">
|
12798
13100
|
<fo:inline font-weight="bold">
|
12799
13101
|
<xsl:apply-templates/>
|
12800
13102
|
</fo:inline>
|
12801
|
-
</xsl:template><xsl:template
|
13103
|
+
</xsl:template><xsl:template match="*[local-name()='sup']">
|
12802
13104
|
<fo:inline font-size="80%" vertical-align="super">
|
12803
13105
|
<xsl:apply-templates/>
|
12804
13106
|
</fo:inline>
|
12805
|
-
</xsl:template><xsl:template
|
13107
|
+
</xsl:template><xsl:template match="*[local-name()='sub']">
|
12806
13108
|
<fo:inline font-size="80%" vertical-align="sub">
|
12807
13109
|
<xsl:apply-templates/>
|
12808
13110
|
</fo:inline>
|
12809
|
-
</xsl:template><xsl:template
|
13111
|
+
</xsl:template><xsl:template match="*[local-name()='tt']">
|
12810
13112
|
<fo:inline font-family="Courier" font-size="10pt">
|
12811
13113
|
<xsl:apply-templates/>
|
12812
13114
|
</fo:inline>
|
12813
|
-
</xsl:template><xsl:template
|
13115
|
+
</xsl:template><xsl:template match="*[local-name()='del']">
|
12814
13116
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
12815
13117
|
<xsl:apply-templates/>
|
12816
13118
|
</fo:inline>
|
12817
|
-
</xsl:template><xsl:template
|
13119
|
+
</xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
12818
13120
|
<xsl:variable name="text" select="normalize-space(.)"/>
|
12819
13121
|
<fo:inline font-size="75%">
|
12820
13122
|
<xsl:if test="string-length($text) > 0">
|
@@ -12823,10 +13125,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12823
13125
|
</xsl:call-template>
|
12824
13126
|
</xsl:if>
|
12825
13127
|
</fo:inline>
|
12826
|
-
</xsl:template><xsl:template
|
13128
|
+
</xsl:template><xsl:template name="recursiveSmallCaps">
|
12827
13129
|
<xsl:param name="text"/>
|
12828
13130
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
12829
|
-
<xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/>
|
13131
|
+
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
13132
|
+
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
12830
13133
|
<xsl:choose>
|
12831
13134
|
<xsl:when test="$char=$upperCase">
|
12832
13135
|
<fo:inline font-size="{100 div 0.75}%">
|
@@ -12842,7 +13145,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12842
13145
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
12843
13146
|
</xsl:call-template>
|
12844
13147
|
</xsl:if>
|
12845
|
-
</xsl:template><xsl:template
|
13148
|
+
</xsl:template><xsl:template name="tokenize">
|
12846
13149
|
<xsl:param name="text"/>
|
12847
13150
|
<xsl:param name="separator" select="' '"/>
|
12848
13151
|
<xsl:choose>
|
@@ -12890,7 +13193,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12890
13193
|
</xsl:call-template>
|
12891
13194
|
</xsl:otherwise>
|
12892
13195
|
</xsl:choose>
|
12893
|
-
</xsl:template><xsl:template
|
13196
|
+
</xsl:template><xsl:template name="max_length">
|
12894
13197
|
<xsl:param name="words"/>
|
12895
13198
|
<xsl:for-each select="$words//word">
|
12896
13199
|
<xsl:sort select="." data-type="number" order="descending"/>
|
@@ -12898,11 +13201,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12898
13201
|
<xsl:value-of select="."/>
|
12899
13202
|
</xsl:if>
|
12900
13203
|
</xsl:for-each>
|
12901
|
-
</xsl:template><xsl:template
|
13204
|
+
</xsl:template><xsl:template name="add-zero-spaces-java">
|
12902
13205
|
<xsl:param name="text" select="."/>
|
12903
13206
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
12904
13207
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
12905
|
-
</xsl:template><xsl:template
|
13208
|
+
</xsl:template><xsl:template name="add-zero-spaces">
|
12906
13209
|
<xsl:param name="text" select="."/>
|
12907
13210
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
12908
13211
|
<xsl:variable name="zero-space-after-dot">.</xsl:variable>
|
@@ -12955,7 +13258,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12955
13258
|
<xsl:value-of select="$text"/>
|
12956
13259
|
</xsl:otherwise>
|
12957
13260
|
</xsl:choose>
|
12958
|
-
</xsl:template><xsl:template
|
13261
|
+
</xsl:template><xsl:template name="add-zero-spaces-equal">
|
12959
13262
|
<xsl:param name="text" select="."/>
|
12960
13263
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
12961
13264
|
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
@@ -12981,7 +13284,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12981
13284
|
<xsl:value-of select="$text"/>
|
12982
13285
|
</xsl:otherwise>
|
12983
13286
|
</xsl:choose>
|
12984
|
-
</xsl:template><xsl:template
|
13287
|
+
</xsl:template><xsl:template name="getSimpleTable">
|
12985
13288
|
<xsl:variable name="simple-table">
|
12986
13289
|
|
12987
13290
|
<!-- Step 1. colspan processing -->
|
@@ -13008,9 +13311,9 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13008
13311
|
</xsl:choose> -->
|
13009
13312
|
</xsl:variable>
|
13010
13313
|
<xsl:copy-of select="$simple-table"/>
|
13011
|
-
</xsl:template><xsl:template
|
13314
|
+
</xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
|
13012
13315
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
13013
|
-
</xsl:template><xsl:template
|
13316
|
+
</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
13317
|
<xsl:choose>
|
13015
13318
|
<xsl:when test="@colspan">
|
13016
13319
|
<xsl:variable name="td">
|
@@ -13032,16 +13335,16 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13032
13335
|
</xsl:element>
|
13033
13336
|
</xsl:otherwise>
|
13034
13337
|
</xsl:choose>
|
13035
|
-
</xsl:template><xsl:template
|
13338
|
+
</xsl:template><xsl:template match="@colspan" mode="simple-table-colspan"/><xsl:template match="*[local-name()='tr']" mode="simple-table-colspan">
|
13036
13339
|
<xsl:element name="tr">
|
13037
13340
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
13038
13341
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
13039
13342
|
</xsl:element>
|
13040
|
-
</xsl:template><xsl:template
|
13343
|
+
</xsl:template><xsl:template match="@*|node()" mode="simple-table-colspan">
|
13041
13344
|
<xsl:copy>
|
13042
13345
|
<xsl:apply-templates select="@*|node()" mode="simple-table-colspan"/>
|
13043
13346
|
</xsl:copy>
|
13044
|
-
</xsl:template><xsl:template
|
13347
|
+
</xsl:template><xsl:template name="repeatNode">
|
13045
13348
|
<xsl:param name="count"/>
|
13046
13349
|
<xsl:param name="node"/>
|
13047
13350
|
|
@@ -13052,18 +13355,18 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13052
13355
|
</xsl:call-template>
|
13053
13356
|
<xsl:copy-of select="$node"/>
|
13054
13357
|
</xsl:if>
|
13055
|
-
</xsl:template><xsl:template
|
13358
|
+
</xsl:template><xsl:template match="@*|node()" mode="simple-table-rowspan">
|
13056
13359
|
<xsl:copy>
|
13057
13360
|
<xsl:apply-templates select="@*|node()" mode="simple-table-rowspan"/>
|
13058
13361
|
</xsl:copy>
|
13059
|
-
</xsl:template><xsl:template
|
13362
|
+
</xsl:template><xsl:template match="tbody" mode="simple-table-rowspan">
|
13060
13363
|
<xsl:copy>
|
13061
13364
|
<xsl:copy-of select="tr[1]"/>
|
13062
13365
|
<xsl:apply-templates select="tr[2]" mode="simple-table-rowspan">
|
13063
13366
|
<xsl:with-param name="previousRow" select="tr[1]"/>
|
13064
13367
|
</xsl:apply-templates>
|
13065
13368
|
</xsl:copy>
|
13066
|
-
</xsl:template><xsl:template
|
13369
|
+
</xsl:template><xsl:template match="tr" mode="simple-table-rowspan">
|
13067
13370
|
<xsl:param name="previousRow"/>
|
13068
13371
|
<xsl:variable name="currentRow" select="."/>
|
13069
13372
|
|
@@ -13097,43 +13400,53 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13097
13400
|
<xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
|
13098
13401
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
13099
13402
|
</xsl:apply-templates>
|
13100
|
-
</xsl:template><xsl:template
|
13403
|
+
</xsl:template><xsl:template name="getLang">
|
13101
13404
|
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
13102
13405
|
<xsl:choose>
|
13103
13406
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
13104
13407
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
13105
13408
|
</xsl:choose>
|
13106
|
-
</xsl:template><xsl:template
|
13409
|
+
</xsl:template><xsl:template name="capitalizeWords">
|
13107
13410
|
<xsl:param name="str"/>
|
13108
13411
|
<xsl:variable name="str2" select="translate($str, '-', ' ')"/>
|
13109
13412
|
<xsl:choose>
|
13110
13413
|
<xsl:when test="contains($str2, ' ')">
|
13111
13414
|
<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)"/>
|
13415
|
+
<!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
|
13416
|
+
<xsl:value-of select="substring($substr, 2)"/> -->
|
13417
|
+
<xsl:call-template name="capitalize">
|
13418
|
+
<xsl:with-param name="str" select="$substr"/>
|
13419
|
+
</xsl:call-template>
|
13114
13420
|
<xsl:text> </xsl:text>
|
13115
13421
|
<xsl:call-template name="capitalizeWords">
|
13116
13422
|
<xsl:with-param name="str" select="substring-after($str2, ' ')"/>
|
13117
13423
|
</xsl:call-template>
|
13118
13424
|
</xsl:when>
|
13119
13425
|
<xsl:otherwise>
|
13120
|
-
<xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
|
13121
|
-
<xsl:value-of select="substring($str2, 2)"/>
|
13426
|
+
<!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
|
13427
|
+
<xsl:value-of select="substring($str2, 2)"/> -->
|
13428
|
+
<xsl:call-template name="capitalize">
|
13429
|
+
<xsl:with-param name="str" select="$str2"/>
|
13430
|
+
</xsl:call-template>
|
13122
13431
|
</xsl:otherwise>
|
13123
13432
|
</xsl:choose>
|
13124
|
-
</xsl:template><xsl:template
|
13433
|
+
</xsl:template><xsl:template name="capitalize">
|
13434
|
+
<xsl:param name="str"/>
|
13435
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
13436
|
+
<xsl:value-of select="substring($str, 2)"/>
|
13437
|
+
</xsl:template><xsl:template match="mathml:math">
|
13125
13438
|
<fo:inline font-family="STIX2Math">
|
13126
13439
|
<fo:instream-foreign-object fox:alt-text="Math">
|
13127
13440
|
<xsl:copy-of select="."/>
|
13128
13441
|
</fo:instream-foreign-object>
|
13129
13442
|
</fo:inline>
|
13130
|
-
</xsl:template><xsl:template
|
13443
|
+
</xsl:template><xsl:template match="*[local-name()='localityStack']">
|
13131
13444
|
<xsl:for-each select="*[local-name()='locality']">
|
13132
13445
|
<xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
|
13133
13446
|
<xsl:apply-templates select="."/>
|
13134
13447
|
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
13135
13448
|
</xsl:for-each>
|
13136
|
-
</xsl:template><xsl:template
|
13449
|
+
</xsl:template><xsl:template match="*[local-name()='link']" name="link">
|
13137
13450
|
<xsl:variable name="target">
|
13138
13451
|
<xsl:choose>
|
13139
13452
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
@@ -13163,7 +13476,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13163
13476
|
</xsl:otherwise>
|
13164
13477
|
</xsl:choose>
|
13165
13478
|
</fo:inline>
|
13166
|
-
</xsl:template><xsl:template
|
13479
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
13167
13480
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
13168
13481
|
<!-- <xsl:choose>
|
13169
13482
|
<xsl:when test="@lang = 'en'"></xsl:when>
|
@@ -13174,19 +13487,29 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13174
13487
|
</xsl:choose> -->
|
13175
13488
|
<xsl:apply-templates/>
|
13176
13489
|
</fo:block>
|
13177
|
-
</xsl:template><xsl:template
|
13490
|
+
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
13178
13491
|
<fo:inline id="{@id}"/>
|
13179
|
-
</xsl:template><xsl:template
|
13492
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
13180
13493
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
13494
|
+
<xsl:variable name="title-appendix">
|
13495
|
+
<xsl:call-template name="getTitle">
|
13496
|
+
<xsl:with-param name="name" select="'title-appendix'"/>
|
13497
|
+
</xsl:call-template>
|
13498
|
+
</xsl:variable>
|
13181
13499
|
<fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
|
13182
13500
|
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
13183
13501
|
</fo:block>
|
13184
13502
|
<xsl:apply-templates/>
|
13185
|
-
</xsl:template><xsl:template
|
13503
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
13186
13504
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
13187
|
-
</xsl:template><xsl:template
|
13505
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']">
|
13188
13506
|
<fo:block xsl:use-attribute-sets="appendix-example-style">
|
13189
13507
|
<xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
|
13508
|
+
<xsl:variable name="title-example">
|
13509
|
+
<xsl:call-template name="getTitle">
|
13510
|
+
<xsl:with-param name="name" select="'title-example'"/>
|
13511
|
+
</xsl:call-template>
|
13512
|
+
</xsl:variable>
|
13190
13513
|
<xsl:value-of select="$title-example"/>
|
13191
13514
|
<xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) > 1">
|
13192
13515
|
<xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
|
@@ -13196,11 +13519,11 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13196
13519
|
</xsl:if>
|
13197
13520
|
</fo:block>
|
13198
13521
|
<xsl:apply-templates/>
|
13199
|
-
</xsl:template><xsl:template
|
13522
|
+
</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
13523
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
13201
|
-
</xsl:template><xsl:template
|
13524
|
+
</xsl:template><xsl:template match="*[local-name() = 'callout']">
|
13202
13525
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
13203
|
-
</xsl:template><xsl:template
|
13526
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']">
|
13204
13527
|
<xsl:variable name="annotation-id" select="@id"/>
|
13205
13528
|
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
13206
13529
|
<fo:block id="{$annotation-id}" white-space="nowrap">
|
@@ -13210,14 +13533,25 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13210
13533
|
</xsl:apply-templates>
|
13211
13534
|
</fo:inline>
|
13212
13535
|
</fo:block>
|
13213
|
-
</xsl:template><xsl:template
|
13536
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
13214
13537
|
<xsl:param name="callout"/>
|
13215
13538
|
<fo:inline id="{@id}">
|
13216
13539
|
<!-- for first p in annotation, put <x> -->
|
13217
13540
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
13218
13541
|
<xsl:apply-templates/>
|
13219
13542
|
</fo:inline>
|
13220
|
-
</xsl:template><xsl:template
|
13543
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
13544
|
+
<xsl:variable name="title-modified">
|
13545
|
+
<xsl:call-template name="getTitle">
|
13546
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
13547
|
+
</xsl:call-template>
|
13548
|
+
</xsl:variable>
|
13549
|
+
<xsl:choose>
|
13550
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
13551
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
13552
|
+
</xsl:choose>
|
13553
|
+
<xsl:apply-templates/>
|
13554
|
+
</xsl:template><xsl:template name="convertDate">
|
13221
13555
|
<xsl:param name="date"/>
|
13222
13556
|
<xsl:param name="format" select="'short'"/>
|
13223
13557
|
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
@@ -13250,7 +13584,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13250
13584
|
</xsl:choose>
|
13251
13585
|
</xsl:variable>
|
13252
13586
|
<xsl:value-of select="$result"/>
|
13253
|
-
</xsl:template><xsl:template
|
13587
|
+
</xsl:template><xsl:template name="insertKeywords">
|
13254
13588
|
<xsl:param name="sorting" select="'true'"/>
|
13255
13589
|
<xsl:param name="charAtEnd" select="'.'"/>
|
13256
13590
|
<xsl:param name="charDelim" select="', '"/>
|
@@ -13273,7 +13607,7 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13273
13607
|
</xsl:for-each>
|
13274
13608
|
</xsl:otherwise>
|
13275
13609
|
</xsl:choose>
|
13276
|
-
</xsl:template><xsl:template
|
13610
|
+
</xsl:template><xsl:template name="insertKeyword">
|
13277
13611
|
<xsl:param name="charAtEnd"/>
|
13278
13612
|
<xsl:param name="charDelim"/>
|
13279
13613
|
<xsl:apply-templates/>
|
@@ -13281,4 +13615,136 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13281
13615
|
<xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
|
13282
13616
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
13283
13617
|
</xsl:choose>
|
13618
|
+
</xsl:template><xsl:template name="addPDFUAmeta">
|
13619
|
+
<fo:declarations>
|
13620
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
13621
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
13622
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
13623
|
+
</pdf:dictionary>
|
13624
|
+
</pdf:catalog>
|
13625
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
13626
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
13627
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
13628
|
+
<!-- Dublin Core properties go here -->
|
13629
|
+
<dc:title>
|
13630
|
+
<xsl:variable name="title">
|
13631
|
+
|
13632
|
+
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en' and @type = 'main']"/>
|
13633
|
+
|
13634
|
+
|
13635
|
+
|
13636
|
+
|
13637
|
+
</xsl:variable>
|
13638
|
+
<xsl:choose>
|
13639
|
+
<xsl:when test="normalize-space($title) != ''">
|
13640
|
+
<xsl:value-of select="$title"/>
|
13641
|
+
</xsl:when>
|
13642
|
+
<xsl:otherwise>
|
13643
|
+
<xsl:text> </xsl:text>
|
13644
|
+
</xsl:otherwise>
|
13645
|
+
</xsl:choose>
|
13646
|
+
</dc:title>
|
13647
|
+
<dc:creator>
|
13648
|
+
|
13649
|
+
|
13650
|
+
</dc:creator>
|
13651
|
+
<dc:description>
|
13652
|
+
<xsl:variable name="abstract">
|
13653
|
+
|
13654
|
+
|
13655
|
+
|
13656
|
+
<xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
13657
|
+
|
13658
|
+
|
13659
|
+
</xsl:variable>
|
13660
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
13661
|
+
</dc:description>
|
13662
|
+
<pdf:Keywords>
|
13663
|
+
<xsl:call-template name="insertKeywords"/>
|
13664
|
+
</pdf:Keywords>
|
13665
|
+
</rdf:Description>
|
13666
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
13667
|
+
<!-- XMP properties go here -->
|
13668
|
+
<xmp:CreatorTool/>
|
13669
|
+
</rdf:Description>
|
13670
|
+
</rdf:RDF>
|
13671
|
+
</x:xmpmeta>
|
13672
|
+
</fo:declarations>
|
13673
|
+
</xsl:template><xsl:template name="getId">
|
13674
|
+
<xsl:choose>
|
13675
|
+
<xsl:when test="../@id">
|
13676
|
+
<xsl:value-of select="../@id"/>
|
13677
|
+
</xsl:when>
|
13678
|
+
<xsl:otherwise>
|
13679
|
+
<!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
|
13680
|
+
<xsl:value-of select="concat(generate-id(..), '_', text())"/>
|
13681
|
+
</xsl:otherwise>
|
13682
|
+
</xsl:choose>
|
13683
|
+
</xsl:template><xsl:template name="getLevel">
|
13684
|
+
<xsl:variable name="level_total" select="count(ancestor::*)"/>
|
13685
|
+
<xsl:variable name="level">
|
13686
|
+
<xsl:choose>
|
13687
|
+
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
13688
|
+
<xsl:value-of select="$level_total - 2"/>
|
13689
|
+
</xsl:when>
|
13690
|
+
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
13691
|
+
<xsl:value-of select="$level_total - 2"/>
|
13692
|
+
</xsl:when>
|
13693
|
+
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
13694
|
+
<xsl:value-of select="$level_total - 2"/>
|
13695
|
+
</xsl:when>
|
13696
|
+
<xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
|
13697
|
+
<xsl:otherwise>
|
13698
|
+
<xsl:value-of select="$level_total - 1"/>
|
13699
|
+
</xsl:otherwise>
|
13700
|
+
</xsl:choose>
|
13701
|
+
</xsl:variable>
|
13702
|
+
<xsl:value-of select="$level"/>
|
13703
|
+
</xsl:template><xsl:template name="getSubSection">
|
13704
|
+
<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']"/>
|
13705
|
+
</xsl:template><xsl:template name="split">
|
13706
|
+
<xsl:param name="pText" select="."/>
|
13707
|
+
<xsl:param name="sep" select="','"/>
|
13708
|
+
<xsl:if test="string-length($pText) >0">
|
13709
|
+
<item>
|
13710
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, ','), $sep))"/>
|
13711
|
+
</item>
|
13712
|
+
<xsl:call-template name="split">
|
13713
|
+
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
13714
|
+
<xsl:with-param name="sep" select="$sep"/>
|
13715
|
+
</xsl:call-template>
|
13716
|
+
</xsl:if>
|
13717
|
+
</xsl:template><xsl:template name="getDocumentId">
|
13718
|
+
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
13719
|
+
</xsl:template><xsl:template name="namespaceCheck">
|
13720
|
+
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
|
13721
|
+
<xsl:variable name="XSLNS">
|
13722
|
+
|
13723
|
+
|
13724
|
+
|
13725
|
+
|
13726
|
+
<xsl:value-of select="document('')//*/namespace::unece"/>
|
13727
|
+
|
13728
|
+
|
13729
|
+
|
13730
|
+
|
13731
|
+
|
13732
|
+
|
13733
|
+
|
13734
|
+
|
13735
|
+
|
13736
|
+
</xsl:variable>
|
13737
|
+
<xsl:if test="$documentNS != $XSLNS">
|
13738
|
+
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
13739
|
+
</xsl:if>
|
13740
|
+
</xsl:template><xsl:template name="getLanguage">
|
13741
|
+
<xsl:param name="lang"/>
|
13742
|
+
<xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
|
13743
|
+
<xsl:choose>
|
13744
|
+
<xsl:when test="$language = 'en'">English</xsl:when>
|
13745
|
+
<xsl:when test="$language = 'fr'">French</xsl:when>
|
13746
|
+
<xsl:when test="$language = 'de'">Deutsch</xsl:when>
|
13747
|
+
<xsl:when test="$language = 'cn'">Chinese</xsl:when>
|
13748
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
13749
|
+
</xsl:choose>
|
13284
13750
|
</xsl:template></xsl:stylesheet>
|