metanorma-itu 1.2.2 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +63 -0
- data/README.adoc +3 -4
- data/lib/asciidoctor/itu/basicdoc.rng +23 -0
- data/lib/asciidoctor/itu/cleanup.rb +1 -1
- data/lib/asciidoctor/itu/converter.rb +3 -2
- data/lib/asciidoctor/itu/front.rb +36 -12
- data/lib/asciidoctor/itu/isodoc.rng +135 -58
- data/lib/asciidoctor/itu/itu.rng +67 -0
- data/lib/isodoc/itu/base_convert.rb +1 -6
- data/lib/isodoc/itu/html/_coverpage.css +8 -1
- data/lib/isodoc/itu/html/_coverpage.scss +4 -0
- data/lib/isodoc/itu/html/header.html +8 -8
- data/lib/isodoc/itu/html/html_itu_titlepage.html +23 -0
- data/lib/isodoc/itu/html/htmlstyle.css +13 -2
- data/lib/isodoc/itu/html/itu.css +16 -4
- data/lib/isodoc/itu/html/itu.scss +19 -5
- data/lib/isodoc/itu/html/word_itu_intro.html +16 -0
- data/lib/isodoc/itu/html/word_itu_titlepage.html +136 -3
- data/lib/isodoc/itu/html_convert.rb +3 -1
- data/lib/isodoc/itu/i18n-en.yaml +2 -0
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +996 -232
- data/lib/isodoc/itu/itu.recommendation.xsl +996 -232
- data/lib/isodoc/itu/itu.resolution.xsl +996 -232
- data/lib/isodoc/itu/metadata.rb +62 -3
- data/lib/isodoc/itu/presentation_xml_convert.rb +16 -0
- data/lib/isodoc/itu/terms.rb +7 -30
- data/lib/isodoc/itu/word_cleanup.rb +152 -0
- data/lib/isodoc/itu/word_convert.rb +1 -125
- data/lib/isodoc/itu/xref.rb +4 -3
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +3 -1
- metadata +34 -7
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
@@ -63,7 +63,9 @@ module IsoDoc
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def authority_cleanup(docxml)
|
66
|
-
|
66
|
+
dest = docxml.at("//div[@id = 'draft-warning-destination']")
|
67
|
+
auth = docxml.at("//div[@id = 'draft-warning']")
|
68
|
+
dest and auth and dest.replace(auth.remove)
|
67
69
|
super
|
68
70
|
end
|
69
71
|
|
data/lib/isodoc/itu/i18n-en.yaml
CHANGED
@@ -63,9 +63,12 @@
|
|
63
63
|
<xsl:call-template name="getLang"/>
|
64
64
|
</xsl:variable>
|
65
65
|
|
66
|
+
<xsl:variable name="isAmendment" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:amendment[@language = $lang])"/>
|
67
|
+
<xsl:variable name="isCorrigendum" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:corrigendum[@language = $lang])"/>
|
68
|
+
|
66
69
|
<xsl:template match="/">
|
67
70
|
<xsl:call-template name="namespaceCheck"/>
|
68
|
-
<fo:root font-family="Times New Roman,
|
71
|
+
<fo:root font-family="Times New Roman, STIX Two Math" font-size="12pt" xml:lang="{$lang}">
|
69
72
|
<fo:layout-master-set>
|
70
73
|
<!-- cover page -->
|
71
74
|
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
@@ -124,6 +127,10 @@
|
|
124
127
|
|
125
128
|
<xsl:call-template name="addPDFUAmeta"/>
|
126
129
|
|
130
|
+
<xsl:call-template name="addBookmarks">
|
131
|
+
<xsl:with-param name="contents" select="$contents"/>
|
132
|
+
</xsl:call-template>
|
133
|
+
|
127
134
|
<!-- cover page -->
|
128
135
|
<fo:page-sequence master-reference="cover-page">
|
129
136
|
<fo:flow flow-name="xsl-region-body">
|
@@ -200,6 +207,16 @@
|
|
200
207
|
<xsl:value-of select="$title-annex"/><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid"/>
|
201
208
|
</fo:block>
|
202
209
|
</xsl:if>
|
210
|
+
<xsl:if test="$isAmendment != ''">
|
211
|
+
<fo:block font-size="18pt" font-weight="bold">
|
212
|
+
<xsl:value-of select="$isAmendment"/>
|
213
|
+
</fo:block>
|
214
|
+
</xsl:if>
|
215
|
+
<xsl:if test="$isCorrigendum != ''">
|
216
|
+
<fo:block font-size="18pt" font-weight="bold">
|
217
|
+
<xsl:value-of select="$isCorrigendum"/>
|
218
|
+
</fo:block>
|
219
|
+
</xsl:if>
|
203
220
|
<fo:block font-size="14pt">
|
204
221
|
<xsl:call-template name="formatDate">
|
205
222
|
<xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
|
@@ -240,7 +257,7 @@
|
|
240
257
|
</fo:table-cell>
|
241
258
|
<fo:table-cell font-size="18pt" number-columns-spanned="3">
|
242
259
|
<fo:block padding-right="2mm" margin-top="6pt">
|
243
|
-
<xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en'])">
|
260
|
+
<xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']) and $isAmendment = '' and $isCorrigendum = ''">
|
244
261
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
245
262
|
</xsl:if>
|
246
263
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
|
@@ -250,6 +267,24 @@
|
|
250
267
|
<xsl:value-of select="."/>
|
251
268
|
</fo:block>
|
252
269
|
</xsl:for-each>
|
270
|
+
<xsl:if test="$isAmendment != ''">
|
271
|
+
<fo:block padding-right="2mm" margin-top="6pt" font-weight="bold">
|
272
|
+
<xsl:value-of select="$isAmendment"/>
|
273
|
+
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment']">
|
274
|
+
<xsl:text>: </xsl:text>
|
275
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment']"/>
|
276
|
+
</xsl:if>
|
277
|
+
</fo:block>
|
278
|
+
</xsl:if>
|
279
|
+
<xsl:if test="$isCorrigendum != ''">
|
280
|
+
<fo:block padding-right="2mm" margin-top="6pt" font-weight="bold">
|
281
|
+
<xsl:value-of select="$isCorrigendum"/>
|
282
|
+
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum']">
|
283
|
+
<xsl:text>: </xsl:text>
|
284
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum']"/>
|
285
|
+
</xsl:if>
|
286
|
+
</fo:block>
|
287
|
+
</xsl:if>
|
253
288
|
</fo:table-cell>
|
254
289
|
</fo:table-row>
|
255
290
|
<fo:table-row height="40mm">
|
@@ -278,8 +313,10 @@
|
|
278
313
|
<fo:block font-size="16pt" margin-top="3pt">
|
279
314
|
<xsl:value-of select="$doctype"/>
|
280
315
|
<xsl:text> </xsl:text>
|
281
|
-
<xsl:
|
282
|
-
|
316
|
+
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
|
317
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
|
318
|
+
<xsl:text>-</xsl:text>
|
319
|
+
</xsl:if>
|
283
320
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
|
284
321
|
<xsl:text> </xsl:text>
|
285
322
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
|
@@ -352,7 +389,7 @@
|
|
352
389
|
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
353
390
|
</xsl:if>
|
354
391
|
|
355
|
-
<xsl:if test="xalan:nodeset($contents)//item">
|
392
|
+
<xsl:if test="xalan:nodeset($contents)//item[@display = 'true']">
|
356
393
|
<fo:block break-after="page"/>
|
357
394
|
<fo:block-container>
|
358
395
|
<xsl:variable name="title-toc">
|
@@ -368,7 +405,7 @@
|
|
368
405
|
<fo:block margin-top="6pt" text-align="center" font-weight="bold"><xsl:value-of select="$title-toc"/></fo:block>
|
369
406
|
<fo:block margin-top="6pt" text-align="right" font-weight="bold"><xsl:value-of select="$title-page"/></fo:block>
|
370
407
|
|
371
|
-
<xsl:for-each select="xalan:nodeset($contents)//item">
|
408
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
372
409
|
<fo:block>
|
373
410
|
<xsl:if test="@level = 1">
|
374
411
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -407,8 +444,8 @@
|
|
407
444
|
</fo:list-item-label>
|
408
445
|
<fo:list-item-body start-indent="body-start()">
|
409
446
|
<fo:block text-align-last="justify">
|
410
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="
|
411
|
-
<xsl:apply-templates/>
|
447
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
448
|
+
<xsl:apply-templates select="title"/>
|
412
449
|
<fo:inline keep-together.within-line="always">
|
413
450
|
<fo:leader leader-pattern="dots"/>
|
414
451
|
<fo:page-number-citation ref-id="{@id}"/>
|
@@ -501,26 +538,35 @@
|
|
501
538
|
</xsl:variable>
|
502
539
|
|
503
540
|
<xsl:variable name="display">
|
504
|
-
<xsl:choose>
|
505
|
-
<xsl:when test="ancestor-or-self::itu:bibitem">false</xsl:when>
|
506
|
-
<xsl:when test="ancestor-or-self::itu:term">false</xsl:when>
|
541
|
+
<xsl:choose>
|
507
542
|
<xsl:when test="$level >= 3">false</xsl:when>
|
508
543
|
<xsl:when test="$section = '' and $type = 'clause' and $level >= 2">false</xsl:when>
|
509
544
|
<xsl:otherwise>true</xsl:otherwise>
|
510
545
|
</xsl:choose>
|
511
546
|
</xsl:variable>
|
512
547
|
|
513
|
-
<xsl:
|
548
|
+
<xsl:variable name="skip">
|
549
|
+
<xsl:choose>
|
550
|
+
<xsl:when test="ancestor-or-self::itu:bibitem">true</xsl:when>
|
551
|
+
<xsl:when test="ancestor-or-self::itu:term">true</xsl:when>
|
552
|
+
<xsl:otherwise>false</xsl:otherwise>
|
553
|
+
</xsl:choose>
|
554
|
+
</xsl:variable>
|
555
|
+
|
556
|
+
<xsl:if test="$skip = 'false'">
|
514
557
|
|
515
558
|
<xsl:variable name="title">
|
516
559
|
<xsl:call-template name="getName"/>
|
517
560
|
</xsl:variable>
|
518
561
|
|
519
|
-
<item level="{$level}" section="{$section}" type="{$type}">
|
562
|
+
<item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
520
563
|
<xsl:call-template name="setId"/>
|
521
|
-
<
|
564
|
+
<title>
|
565
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
566
|
+
</title>
|
567
|
+
<xsl:apply-templates mode="contents"/>
|
522
568
|
</item>
|
523
|
-
|
569
|
+
|
524
570
|
</xsl:if>
|
525
571
|
|
526
572
|
</xsl:template>
|
@@ -854,24 +900,38 @@
|
|
854
900
|
<xsl:apply-templates/>
|
855
901
|
</fo:inline>
|
856
902
|
<xsl:if test="../itu:termsource/itu:origin">
|
903
|
+
<xsl:text>: </xsl:text>
|
857
904
|
<xsl:variable name="citeas" select="../itu:termsource/itu:origin/@citeas"/>
|
858
|
-
<xsl:
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
<xsl:
|
863
|
-
<xsl:
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
905
|
+
<xsl:variable name="bibitemid" select="../itu:termsource/itu:origin/@bibitemid"/>
|
906
|
+
<xsl:variable name="origin_text" select="normalize-space(../itu:termsource/itu:origin/text())"/>
|
907
|
+
|
908
|
+
<fo:basic-link internal-destination="{$bibitemid}" fox:alt-text="{$citeas}">
|
909
|
+
<xsl:choose>
|
910
|
+
<xsl:when test="$origin_text != ''">
|
911
|
+
<xsl:text> </xsl:text><xsl:apply-templates select="../itu:termsource/itu:origin/node()"/>
|
912
|
+
</xsl:when>
|
913
|
+
<xsl:when test="contains($citeas, '[')">
|
914
|
+
<xsl:text> </xsl:text><xsl:value-of select="$citeas"/> <!-- disable-output-escaping="yes" -->
|
915
|
+
</xsl:when>
|
916
|
+
<xsl:otherwise>
|
917
|
+
<xsl:text> [</xsl:text><xsl:value-of select="$citeas"/><xsl:text>]</xsl:text>
|
918
|
+
</xsl:otherwise>
|
919
|
+
</xsl:choose>
|
920
|
+
</fo:basic-link>
|
921
|
+
</xsl:if>
|
922
|
+
<xsl:if test="following-sibling::itu:definition/node()">
|
923
|
+
<xsl:text>: </xsl:text>
|
924
|
+
<xsl:apply-templates select="following-sibling::itu:definition/node()" mode="process"/>
|
925
|
+
</xsl:if>
|
869
926
|
</fo:block>
|
870
927
|
<!-- <xsl:if test="following-sibling::itu:table">
|
871
928
|
<fo:block space-after="18pt"> </fo:block>
|
872
929
|
</xsl:if> -->
|
873
930
|
</xsl:template>
|
874
931
|
|
932
|
+
<xsl:template match="itu:term[itu:preferred]/itu:termsource" priority="2"/>
|
933
|
+
|
934
|
+
|
875
935
|
<xsl:template match="itu:definition/itu:p" priority="2"/>
|
876
936
|
<xsl:template match="itu:definition/itu:formula" priority="2"/>
|
877
937
|
|
@@ -979,7 +1039,7 @@
|
|
979
1039
|
<xsl:template match="itu:docidentifier"/>
|
980
1040
|
|
981
1041
|
|
982
|
-
<xsl:template match="itu:ul | itu:ol | itu:sections/itu:ul | itu:sections/itu:ol">
|
1042
|
+
<xsl:template match="itu:ul | itu:ol | itu:sections/itu:ul | itu:sections/itu:ol" mode="ul_ol">
|
983
1043
|
<xsl:if test="preceding-sibling::*[1][local-name() = 'title']">
|
984
1044
|
<fo:block padding-top="-8pt" font-size="1pt"> </fo:block>
|
985
1045
|
</xsl:if>
|
@@ -992,17 +1052,21 @@
|
|
992
1052
|
<xsl:template match="itu:ul//itu:note | itu:ol//itu:note" priority="2"/>
|
993
1053
|
<xsl:template match="itu:ul//itu:note | itu:ol//itu:note" mode="process">
|
994
1054
|
<fo:block id="{@id}">
|
995
|
-
<xsl:apply-templates select="
|
1055
|
+
<xsl:apply-templates select="itu:name" mode="presentation"/>
|
996
1056
|
<xsl:apply-templates mode="process"/>
|
997
1057
|
</fo:block>
|
998
1058
|
</xsl:template>
|
999
|
-
<xsl:template match="itu:ul//itu:note/itu:name | itu:ol//itu:note/itu:name" mode="process"/>
|
1000
|
-
<xsl:template match="itu:ul//itu:note/itu:p | itu:ol//itu:note/itu:p" mode="process">
|
1059
|
+
<xsl:template match="itu:ul//itu:note/itu:name | itu:ol//itu:note/itu:name" mode="process" priority="2"/>
|
1060
|
+
<xsl:template match="itu:ul//itu:note/itu:p | itu:ol//itu:note/itu:p" mode="process" priority="2">
|
1001
1061
|
<fo:block font-size="11pt" margin-top="4pt">
|
1002
1062
|
<xsl:apply-templates/>
|
1003
1063
|
</fo:block>
|
1004
1064
|
</xsl:template>
|
1005
1065
|
|
1066
|
+
<xsl:template match="itu:ul//itu:note/* | itu:ol//itu:note/*" mode="process">
|
1067
|
+
<xsl:apply-templates select="."/>
|
1068
|
+
</xsl:template>
|
1069
|
+
|
1006
1070
|
<xsl:template match="itu:li">
|
1007
1071
|
<fo:list-item id="{@id}">
|
1008
1072
|
<fo:list-item-label end-indent="label-end()">
|
@@ -1105,9 +1169,13 @@
|
|
1105
1169
|
</xsl:template>
|
1106
1170
|
|
1107
1171
|
<xsl:template match="mathml:math" priority="2">
|
1108
|
-
<fo:inline font-family="
|
1172
|
+
<fo:inline font-family="STIX Two Math" font-size="11pt">
|
1173
|
+
<xsl:variable name="mathml">
|
1174
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
1175
|
+
</xsl:variable>
|
1109
1176
|
<fo:instream-foreign-object fox:alt-text="Math">
|
1110
|
-
<xsl:copy-of select="."/>
|
1177
|
+
<!-- <xsl:copy-of select="."/> -->
|
1178
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
1111
1179
|
</fo:instream-foreign-object>
|
1112
1180
|
</fo:inline>
|
1113
1181
|
</xsl:template>
|
@@ -1218,6 +1286,12 @@
|
|
1218
1286
|
|
1219
1287
|
</title-edition>
|
1220
1288
|
|
1289
|
+
<title-edition lang="fr">
|
1290
|
+
|
1291
|
+
<xsl:text>Édition </xsl:text>
|
1292
|
+
|
1293
|
+
</title-edition>
|
1294
|
+
|
1221
1295
|
|
1222
1296
|
<title-toc lang="en">
|
1223
1297
|
|
@@ -1226,7 +1300,12 @@
|
|
1226
1300
|
|
1227
1301
|
|
1228
1302
|
</title-toc>
|
1229
|
-
<title-toc lang="fr">
|
1303
|
+
<title-toc lang="fr">
|
1304
|
+
|
1305
|
+
<xsl:text>Sommaire</xsl:text>
|
1306
|
+
|
1307
|
+
|
1308
|
+
</title-toc>
|
1230
1309
|
|
1231
1310
|
<title-toc lang="zh">Contents</title-toc>
|
1232
1311
|
|
@@ -1246,13 +1325,22 @@
|
|
1246
1325
|
<title-part lang="en">
|
1247
1326
|
|
1248
1327
|
|
1328
|
+
|
1249
1329
|
</title-part>
|
1250
1330
|
<title-part lang="fr">
|
1251
1331
|
|
1252
1332
|
|
1333
|
+
|
1253
1334
|
</title-part>
|
1254
1335
|
<title-part lang="zh">第 # 部分:</title-part>
|
1255
1336
|
|
1337
|
+
<title-subpart lang="en">
|
1338
|
+
|
1339
|
+
</title-subpart>
|
1340
|
+
<title-subpart lang="fr">
|
1341
|
+
|
1342
|
+
</title-subpart>
|
1343
|
+
|
1256
1344
|
<title-modified lang="en">modified</title-modified>
|
1257
1345
|
<title-modified lang="fr">modifiée</title-modified>
|
1258
1346
|
|
@@ -1260,7 +1348,12 @@
|
|
1260
1348
|
|
1261
1349
|
|
1262
1350
|
|
1263
|
-
<title-source lang="en">
|
1351
|
+
<title-source lang="en">
|
1352
|
+
|
1353
|
+
<xsl:text>SOURCE</xsl:text>
|
1354
|
+
|
1355
|
+
|
1356
|
+
</title-source>
|
1264
1357
|
|
1265
1358
|
<title-keywords lang="en">Keywords</title-keywords>
|
1266
1359
|
|
@@ -1303,12 +1396,25 @@
|
|
1303
1396
|
<title-warning lang="zh">警告</title-warning>
|
1304
1397
|
|
1305
1398
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1399
|
+
|
1400
|
+
<title-continued lang="en">(continued)</title-continued>
|
1401
|
+
<title-continued lang="fr">(continué)</title-continued>
|
1402
|
+
|
1306
1403
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1307
1404
|
<xsl:param name="name"/>
|
1308
|
-
<xsl:
|
1309
|
-
|
1405
|
+
<xsl:param name="lang"/>
|
1406
|
+
<xsl:variable name="lang_">
|
1407
|
+
<xsl:choose>
|
1408
|
+
<xsl:when test="$lang != ''">
|
1409
|
+
<xsl:value-of select="$lang"/>
|
1410
|
+
</xsl:when>
|
1411
|
+
<xsl:otherwise>
|
1412
|
+
<xsl:call-template name="getLang"/>
|
1413
|
+
</xsl:otherwise>
|
1414
|
+
</xsl:choose>
|
1310
1415
|
</xsl:variable>
|
1311
|
-
<xsl:variable name="
|
1416
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1417
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
1312
1418
|
<xsl:choose>
|
1313
1419
|
<xsl:when test="normalize-space($title_) != ''">
|
1314
1420
|
<xsl:value-of select="$title_"/>
|
@@ -1317,7 +1423,10 @@
|
|
1317
1423
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
1318
1424
|
</xsl:otherwise>
|
1319
1425
|
</xsl:choose>
|
1320
|
-
</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="
|
1426
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
1427
|
+
|
1428
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1429
|
+
|
1321
1430
|
|
1322
1431
|
|
1323
1432
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
@@ -1328,14 +1437,14 @@
|
|
1328
1437
|
|
1329
1438
|
|
1330
1439
|
|
1331
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1332
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1440
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1333
1441
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1334
1442
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1335
1443
|
|
1336
1444
|
|
1337
1445
|
|
1338
1446
|
|
1447
|
+
|
1339
1448
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1340
1449
|
|
1341
1450
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -1380,6 +1489,7 @@
|
|
1380
1489
|
|
1381
1490
|
|
1382
1491
|
|
1492
|
+
|
1383
1493
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1384
1494
|
|
1385
1495
|
|
@@ -1400,6 +1510,7 @@
|
|
1400
1510
|
|
1401
1511
|
|
1402
1512
|
|
1513
|
+
|
1403
1514
|
|
1404
1515
|
|
1405
1516
|
|
@@ -1444,6 +1555,7 @@
|
|
1444
1555
|
|
1445
1556
|
|
1446
1557
|
|
1558
|
+
|
1447
1559
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1448
1560
|
|
1449
1561
|
|
@@ -1457,7 +1569,8 @@
|
|
1457
1569
|
|
1458
1570
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1459
1571
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1460
|
-
|
1572
|
+
|
1573
|
+
|
1461
1574
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1462
1575
|
|
1463
1576
|
|
@@ -1465,6 +1578,7 @@
|
|
1465
1578
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1466
1579
|
|
1467
1580
|
|
1581
|
+
|
1468
1582
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1469
1583
|
|
1470
1584
|
|
@@ -1484,8 +1598,10 @@
|
|
1484
1598
|
|
1485
1599
|
|
1486
1600
|
|
1601
|
+
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
1602
|
+
|
1603
|
+
|
1487
1604
|
|
1488
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1489
1605
|
|
1490
1606
|
|
1491
1607
|
|
@@ -1495,7 +1611,6 @@
|
|
1495
1611
|
|
1496
1612
|
|
1497
1613
|
|
1498
|
-
|
1499
1614
|
|
1500
1615
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1501
1616
|
|
@@ -1521,6 +1636,8 @@
|
|
1521
1636
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1522
1637
|
|
1523
1638
|
|
1639
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1640
|
+
|
1524
1641
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1525
1642
|
|
1526
1643
|
|
@@ -1547,6 +1664,7 @@
|
|
1547
1664
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1548
1665
|
|
1549
1666
|
|
1667
|
+
|
1550
1668
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1551
1669
|
|
1552
1670
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1556,6 +1674,7 @@
|
|
1556
1674
|
|
1557
1675
|
|
1558
1676
|
|
1677
|
+
|
1559
1678
|
|
1560
1679
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1561
1680
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -1604,11 +1723,14 @@
|
|
1604
1723
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1605
1724
|
|
1606
1725
|
|
1726
|
+
|
1607
1727
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1608
1728
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1609
1729
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1610
1730
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1611
1731
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1732
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1733
|
+
|
1612
1734
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1613
1735
|
|
1614
1736
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -1674,6 +1796,12 @@
|
|
1674
1796
|
|
1675
1797
|
|
1676
1798
|
|
1799
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1800
|
+
<fo:block> </fo:block>
|
1801
|
+
</xsl:if> -->
|
1802
|
+
|
1803
|
+
<!-- $namespace = 'iso' or -->
|
1804
|
+
|
1677
1805
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1678
1806
|
|
1679
1807
|
|
@@ -1709,6 +1837,7 @@
|
|
1709
1837
|
<xsl:with-param name="table" select="$simple-table"/>
|
1710
1838
|
</xsl:call-template>
|
1711
1839
|
</xsl:variable>
|
1840
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1712
1841
|
|
1713
1842
|
<!-- <xsl:variable name="colwidths2">
|
1714
1843
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1729,37 +1858,61 @@
|
|
1729
1858
|
|
1730
1859
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1731
1860
|
|
1732
|
-
<xsl:attribute name="
|
1733
|
-
|
1861
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1734
1862
|
|
1735
1863
|
|
1864
|
+
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
1736
1865
|
|
1866
|
+
|
1867
|
+
|
1868
|
+
|
1737
1869
|
|
1738
1870
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1739
1871
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1740
1872
|
<xsl:attribute name="space-after">18pt</xsl:attribute>
|
1741
1873
|
|
1742
1874
|
|
1875
|
+
|
1743
1876
|
|
1744
1877
|
|
1745
1878
|
|
1746
|
-
|
1747
|
-
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1879
|
+
|
1880
|
+
|
1881
|
+
|
1882
|
+
|
1883
|
+
<xsl:variable name="table_attributes">
|
1884
|
+
<attribute name="table-layout">fixed</attribute>
|
1885
|
+
<attribute name="width">100%</attribute>
|
1886
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1887
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1753
1888
|
|
1754
1889
|
|
1755
1890
|
|
1891
|
+
<attribute name="margin-left">0mm</attribute>
|
1892
|
+
<attribute name="margin-right">0mm</attribute>
|
1756
1893
|
|
1757
1894
|
|
1895
|
+
|
1896
|
+
|
1897
|
+
|
1758
1898
|
|
1759
|
-
|
1899
|
+
|
1760
1900
|
|
1901
|
+
</xsl:variable>
|
1902
|
+
|
1903
|
+
|
1904
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1761
1905
|
|
1906
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1907
|
+
<xsl:attribute name="{@name}">
|
1908
|
+
<xsl:value-of select="."/>
|
1909
|
+
</xsl:attribute>
|
1910
|
+
</xsl:for-each>
|
1762
1911
|
|
1912
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1913
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1914
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1915
|
+
</xsl:if>
|
1763
1916
|
|
1764
1917
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1765
1918
|
<xsl:choose>
|
@@ -1783,6 +1936,33 @@
|
|
1783
1936
|
|
1784
1937
|
</fo:table>
|
1785
1938
|
|
1939
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1940
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1941
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1942
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1943
|
+
</xsl:call-template>
|
1944
|
+
</xsl:for-each>
|
1945
|
+
|
1946
|
+
<!-- insert footer as table -->
|
1947
|
+
<!-- <fo:table>
|
1948
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1949
|
+
<xsl:attribute name="{@name}">
|
1950
|
+
<xsl:value-of select="."/>
|
1951
|
+
</xsl:attribute>
|
1952
|
+
</xsl:for-each>
|
1953
|
+
|
1954
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1955
|
+
<xsl:choose>
|
1956
|
+
<xsl:when test=". = 1 or . = 0">
|
1957
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1958
|
+
</xsl:when>
|
1959
|
+
<xsl:otherwise>
|
1960
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1961
|
+
</xsl:otherwise>
|
1962
|
+
</xsl:choose>
|
1963
|
+
</xsl:for-each>
|
1964
|
+
</fo:table>-->
|
1965
|
+
|
1786
1966
|
|
1787
1967
|
|
1788
1968
|
|
@@ -1791,8 +1971,10 @@
|
|
1791
1971
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1792
1972
|
<xsl:if test="normalize-space() != ''">
|
1793
1973
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1794
|
-
|
1795
|
-
|
1974
|
+
|
1975
|
+
|
1976
|
+
<xsl:apply-templates/>
|
1977
|
+
</fo:block>
|
1796
1978
|
</xsl:if>
|
1797
1979
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1798
1980
|
<xsl:param name="table-row"/>
|
@@ -1846,6 +2028,13 @@
|
|
1846
2028
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1847
2029
|
<xsl:variable name="td_text">
|
1848
2030
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2031
|
+
|
2032
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2033
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
2034
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
2035
|
+
</xsl:for-each>
|
2036
|
+
</xsl:if> -->
|
2037
|
+
|
1849
2038
|
</xsl:variable>
|
1850
2039
|
<xsl:variable name="words">
|
1851
2040
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1905,13 +2094,31 @@
|
|
1905
2094
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1906
2095
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1907
2096
|
<xsl:value-of select="@target"/>
|
2097
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
2098
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
2099
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1908
2100
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1909
2101
|
<xsl:param name="cols-count"/>
|
1910
2102
|
<!-- font-weight="bold" -->
|
1911
|
-
<fo:table-header>
|
2103
|
+
<fo:table-header>
|
1912
2104
|
|
1913
2105
|
<xsl:apply-templates/>
|
1914
2106
|
</fo:table-header>
|
2107
|
+
</xsl:template><xsl:template name="table-header-title">
|
2108
|
+
<xsl:param name="cols-count"/>
|
2109
|
+
<!-- row for title -->
|
2110
|
+
<fo:table-row>
|
2111
|
+
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
2112
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
2113
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
2114
|
+
<xsl:call-template name="fn_name_display"/>
|
2115
|
+
</xsl:for-each>
|
2116
|
+
<fo:block text-align="right" font-style="italic">
|
2117
|
+
<xsl:text> </xsl:text>
|
2118
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
2119
|
+
</fo:block>
|
2120
|
+
</fo:table-cell>
|
2121
|
+
</fo:table-row>
|
1915
2122
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1916
2123
|
<fo:table-body>
|
1917
2124
|
<xsl:apply-templates/>
|
@@ -1919,6 +2126,13 @@
|
|
1919
2126
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1920
2127
|
<xsl:apply-templates/>
|
1921
2128
|
</xsl:template><xsl:template name="insertTableFooter">
|
2129
|
+
<xsl:param name="cols-count"/>
|
2130
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
2131
|
+
<fo:table-footer>
|
2132
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
2133
|
+
</fo:table-footer>
|
2134
|
+
</xsl:if>
|
2135
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1922
2136
|
<xsl:param name="cols-count"/>
|
1923
2137
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1924
2138
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1944,11 +2158,29 @@
|
|
1944
2158
|
<!-- fn will be processed inside 'note' processing -->
|
1945
2159
|
|
1946
2160
|
|
2161
|
+
|
2162
|
+
|
2163
|
+
|
2164
|
+
|
1947
2165
|
<!-- except gb -->
|
1948
2166
|
|
1949
2167
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1950
2168
|
|
1951
2169
|
|
2170
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
2171
|
+
<!-- empty, because notes show at page side in main sections -->
|
2172
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2173
|
+
<xsl:choose>
|
2174
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2175
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2176
|
+
</xsl:when>
|
2177
|
+
<xsl:otherwise>
|
2178
|
+
<fo:block/>
|
2179
|
+
</xsl:otherwise>
|
2180
|
+
</xsl:choose>
|
2181
|
+
</xsl:if> -->
|
2182
|
+
|
2183
|
+
|
1952
2184
|
<!-- horizontal row separator -->
|
1953
2185
|
|
1954
2186
|
|
@@ -1962,6 +2194,92 @@
|
|
1962
2194
|
</fo:table-footer>
|
1963
2195
|
|
1964
2196
|
</xsl:if>
|
2197
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2198
|
+
<xsl:param name="table_attributes"/>
|
2199
|
+
<xsl:param name="colwidths"/>
|
2200
|
+
|
2201
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2202
|
+
|
2203
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2204
|
+
|
2205
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
2206
|
+
|
2207
|
+
<fo:table keep-with-previous="always">
|
2208
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2209
|
+
<xsl:choose>
|
2210
|
+
<xsl:when test="@name = 'border-top'">
|
2211
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
2212
|
+
</xsl:when>
|
2213
|
+
<xsl:when test="@name = 'border'">
|
2214
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2215
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
2216
|
+
</xsl:when>
|
2217
|
+
<xsl:otherwise>
|
2218
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2219
|
+
</xsl:otherwise>
|
2220
|
+
</xsl:choose>
|
2221
|
+
</xsl:for-each>
|
2222
|
+
|
2223
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2224
|
+
<xsl:choose>
|
2225
|
+
<xsl:when test=". = 1 or . = 0">
|
2226
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2227
|
+
</xsl:when>
|
2228
|
+
<xsl:otherwise>
|
2229
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2230
|
+
</xsl:otherwise>
|
2231
|
+
</xsl:choose>
|
2232
|
+
</xsl:for-each>
|
2233
|
+
|
2234
|
+
<fo:table-body>
|
2235
|
+
<fo:table-row>
|
2236
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
2237
|
+
|
2238
|
+
|
2239
|
+
|
2240
|
+
<xsl:if test="ancestor::*[local-name()='preface']">
|
2241
|
+
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
2242
|
+
</xsl:if>
|
2243
|
+
|
2244
|
+
<!-- fn will be processed inside 'note' processing -->
|
2245
|
+
|
2246
|
+
|
2247
|
+
|
2248
|
+
|
2249
|
+
|
2250
|
+
|
2251
|
+
|
2252
|
+
<!-- except gb -->
|
2253
|
+
|
2254
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2255
|
+
|
2256
|
+
|
2257
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2258
|
+
<xsl:choose>
|
2259
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2260
|
+
show Note under table in preface (ex. abstract) sections
|
2261
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2262
|
+
</xsl:when>
|
2263
|
+
<xsl:otherwise>
|
2264
|
+
empty, because notes show at page side in main sections
|
2265
|
+
<fo:block/>
|
2266
|
+
</xsl:otherwise>
|
2267
|
+
</xsl:choose>
|
2268
|
+
</xsl:if> -->
|
2269
|
+
|
2270
|
+
|
2271
|
+
<!-- horizontal row separator -->
|
2272
|
+
|
2273
|
+
|
2274
|
+
<!-- fn processing -->
|
2275
|
+
<xsl:call-template name="fn_display"/>
|
2276
|
+
|
2277
|
+
</fo:table-cell>
|
2278
|
+
</fo:table-row>
|
2279
|
+
</fo:table-body>
|
2280
|
+
|
2281
|
+
</fo:table>
|
2282
|
+
</xsl:if>
|
1965
2283
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1966
2284
|
|
1967
2285
|
<xsl:variable name="cols-count">
|
@@ -1979,6 +2297,8 @@
|
|
1979
2297
|
</xsl:choose>
|
1980
2298
|
</xsl:variable>
|
1981
2299
|
|
2300
|
+
|
2301
|
+
|
1982
2302
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1983
2303
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1984
2304
|
</xsl:apply-templates>
|
@@ -1988,6 +2308,8 @@
|
|
1988
2308
|
</xsl:call-template>
|
1989
2309
|
|
1990
2310
|
<fo:table-body>
|
2311
|
+
|
2312
|
+
|
1991
2313
|
<xsl:apply-templates/>
|
1992
2314
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1993
2315
|
|
@@ -2011,6 +2333,12 @@
|
|
2011
2333
|
</xsl:if>
|
2012
2334
|
|
2013
2335
|
|
2336
|
+
|
2337
|
+
|
2338
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2339
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
2340
|
+
</xsl:if> -->
|
2341
|
+
|
2014
2342
|
<xsl:apply-templates/>
|
2015
2343
|
</fo:table-row>
|
2016
2344
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -2036,6 +2364,8 @@
|
|
2036
2364
|
|
2037
2365
|
|
2038
2366
|
|
2367
|
+
|
2368
|
+
|
2039
2369
|
<xsl:if test="@colspan">
|
2040
2370
|
<xsl:attribute name="number-columns-spanned">
|
2041
2371
|
<xsl:value-of select="@colspan"/>
|
@@ -2046,10 +2376,22 @@
|
|
2046
2376
|
<xsl:value-of select="@rowspan"/>
|
2047
2377
|
</xsl:attribute>
|
2048
2378
|
</xsl:if>
|
2379
|
+
<xsl:call-template name="display-align"/>
|
2049
2380
|
<fo:block>
|
2050
2381
|
<xsl:apply-templates/>
|
2051
2382
|
</fo:block>
|
2052
2383
|
</fo:table-cell>
|
2384
|
+
</xsl:template><xsl:template name="display-align">
|
2385
|
+
<xsl:if test="@valign">
|
2386
|
+
<xsl:attribute name="display-align">
|
2387
|
+
<xsl:choose>
|
2388
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2389
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2390
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2391
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2392
|
+
</xsl:choose>
|
2393
|
+
</xsl:attribute>
|
2394
|
+
</xsl:if>
|
2053
2395
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2054
2396
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2055
2397
|
<xsl:attribute name="text-align">
|
@@ -2068,7 +2410,9 @@
|
|
2068
2410
|
<xsl:attribute name="display-align">before</xsl:attribute>
|
2069
2411
|
|
2070
2412
|
|
2071
|
-
|
2413
|
+
|
2414
|
+
|
2415
|
+
|
2072
2416
|
|
2073
2417
|
|
2074
2418
|
|
@@ -2084,6 +2428,7 @@
|
|
2084
2428
|
<xsl:value-of select="@rowspan"/>
|
2085
2429
|
</xsl:attribute>
|
2086
2430
|
</xsl:if>
|
2431
|
+
<xsl:call-template name="display-align"/>
|
2087
2432
|
<fo:block>
|
2088
2433
|
|
2089
2434
|
<xsl:apply-templates/>
|
@@ -2097,14 +2442,17 @@
|
|
2097
2442
|
|
2098
2443
|
|
2099
2444
|
|
2445
|
+
|
2446
|
+
|
2100
2447
|
<fo:inline padding-right="2mm">
|
2101
2448
|
|
2102
2449
|
|
2103
2450
|
|
2104
|
-
|
2451
|
+
|
2105
2452
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2106
2453
|
|
2107
2454
|
</fo:inline>
|
2455
|
+
|
2108
2456
|
<xsl:apply-templates mode="process"/>
|
2109
2457
|
</fo:block>
|
2110
2458
|
|
@@ -2137,6 +2485,7 @@
|
|
2137
2485
|
<xsl:attribute name="text-indent">-5mm</xsl:attribute>
|
2138
2486
|
<xsl:attribute name="start-indent">5mm</xsl:attribute>
|
2139
2487
|
|
2488
|
+
|
2140
2489
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
2141
2490
|
|
2142
2491
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -2149,8 +2498,10 @@
|
|
2149
2498
|
<xsl:attribute name="font-size">70%</xsl:attribute>
|
2150
2499
|
|
2151
2500
|
|
2501
|
+
|
2152
2502
|
<xsl:value-of select="@reference"/>
|
2153
2503
|
|
2504
|
+
|
2154
2505
|
<!-- <xsl:if test="@preface = 'true'"> -->
|
2155
2506
|
<xsl:text>)</xsl:text>
|
2156
2507
|
<!-- </xsl:if> -->
|
@@ -2158,7 +2509,8 @@
|
|
2158
2509
|
</fo:inline>
|
2159
2510
|
<fo:inline>
|
2160
2511
|
|
2161
|
-
<xsl:apply-templates/>
|
2512
|
+
<!-- <xsl:apply-templates /> -->
|
2513
|
+
<xsl:copy-of select="./node()"/>
|
2162
2514
|
</fo:inline>
|
2163
2515
|
</fo:block>
|
2164
2516
|
</xsl:if>
|
@@ -2195,7 +2547,20 @@
|
|
2195
2547
|
<xsl:variable name="following_dl_colwidths">
|
2196
2548
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
2197
2549
|
<xsl:variable name="html-table">
|
2198
|
-
<xsl:variable name="
|
2550
|
+
<xsl:variable name="doc_ns">
|
2551
|
+
|
2552
|
+
</xsl:variable>
|
2553
|
+
<xsl:variable name="ns">
|
2554
|
+
<xsl:choose>
|
2555
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2556
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2557
|
+
</xsl:when>
|
2558
|
+
<xsl:otherwise>
|
2559
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2560
|
+
</xsl:otherwise>
|
2561
|
+
</xsl:choose>
|
2562
|
+
</xsl:variable>
|
2563
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2199
2564
|
<xsl:element name="{$ns}:table">
|
2200
2565
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2201
2566
|
<tbody>
|
@@ -2260,7 +2625,8 @@
|
|
2260
2625
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2261
2626
|
</xsl:if>
|
2262
2627
|
|
2263
|
-
<xsl:apply-templates/>
|
2628
|
+
<!-- <xsl:apply-templates /> -->
|
2629
|
+
<xsl:copy-of select="./node()"/>
|
2264
2630
|
</fo:block>
|
2265
2631
|
</fo:table-cell>
|
2266
2632
|
</fo:table-row>
|
@@ -2277,13 +2643,17 @@
|
|
2277
2643
|
|
2278
2644
|
|
2279
2645
|
|
2646
|
+
|
2280
2647
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2281
2648
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2282
2649
|
|
2283
2650
|
|
2651
|
+
|
2284
2652
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2285
2653
|
|
2654
|
+
|
2286
2655
|
<xsl:value-of select="@reference"/>
|
2656
|
+
|
2287
2657
|
</fo:basic-link>
|
2288
2658
|
</fo:inline>
|
2289
2659
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -2291,124 +2661,167 @@
|
|
2291
2661
|
<xsl:apply-templates/>
|
2292
2662
|
</fo:inline>
|
2293
2663
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2294
|
-
<
|
2295
|
-
|
2296
|
-
|
2297
|
-
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2302
|
-
|
2303
|
-
|
2304
|
-
|
2305
|
-
|
2306
|
-
<xsl:variable name="title-where">
|
2307
|
-
<xsl:call-template name="getTitle">
|
2308
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2309
|
-
</xsl:call-template>
|
2310
|
-
</xsl:variable>
|
2311
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2312
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2313
|
-
<xsl:text/>
|
2314
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2315
|
-
</fo:block>
|
2664
|
+
<fo:block-container>
|
2665
|
+
|
2666
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2667
|
+
|
2668
|
+
|
2669
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2670
|
+
<xsl:attribute name="margin-left">
|
2671
|
+
<xsl:choose>
|
2672
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2673
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2674
|
+
</xsl:choose>
|
2675
|
+
</xsl:attribute>
|
2316
2676
|
|
2317
|
-
</xsl:
|
2318
|
-
<
|
2319
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
2320
|
-
|
2321
|
-
|
2322
|
-
|
2323
|
-
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2324
|
-
|
2325
|
-
|
2326
|
-
<xsl:variable name="title-where">
|
2327
|
-
<xsl:call-template name="getTitle">
|
2328
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2329
|
-
</xsl:call-template>
|
2330
|
-
</xsl:variable>
|
2331
|
-
<xsl:value-of select="$title-where"/>:
|
2332
|
-
</fo:block>
|
2333
|
-
</xsl:when>
|
2334
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2335
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2336
|
-
|
2337
|
-
|
2338
|
-
|
2339
|
-
<xsl:variable name="title-key">
|
2340
|
-
<xsl:call-template name="getTitle">
|
2341
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
2342
|
-
</xsl:call-template>
|
2343
|
-
</xsl:variable>
|
2344
|
-
<xsl:value-of select="$title-key"/>
|
2345
|
-
</fo:block>
|
2346
|
-
</xsl:when>
|
2347
|
-
</xsl:choose>
|
2348
|
-
|
2349
|
-
<!-- a few components -->
|
2350
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2351
|
-
<fo:block>
|
2677
|
+
</xsl:if>
|
2678
|
+
<fo:block-container>
|
2352
2679
|
|
2680
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2353
2681
|
|
2354
|
-
<xsl:if test="$parent = 'figure' or $parent = 'formula'">
|
2355
|
-
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2356
|
-
</xsl:if>
|
2357
|
-
<xsl:if test="$parent = 'li'">
|
2358
|
-
<!-- <xsl:attribute name="margin-left">-4mm</xsl:attribute> -->
|
2359
|
-
</xsl:if>
|
2360
2682
|
|
2683
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
2361
2684
|
|
2685
|
+
<xsl:variable name="key_iso">
|
2686
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2687
|
+
</xsl:variable>
|
2362
2688
|
|
2363
|
-
<
|
2364
|
-
|
2365
|
-
|
2366
|
-
|
2367
|
-
|
2368
|
-
<fo:table width="95%" table-layout="fixed">
|
2689
|
+
<xsl:choose>
|
2690
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2369
2691
|
|
2370
|
-
|
2371
|
-
<
|
2372
|
-
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2373
|
-
</xsl:when>
|
2374
|
-
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2375
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2692
|
+
|
2693
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2376
2694
|
|
2377
|
-
|
2378
|
-
|
2379
|
-
|
2380
|
-
|
2381
|
-
|
2382
|
-
|
2383
|
-
|
2384
|
-
|
2385
|
-
</
|
2386
|
-
|
2387
|
-
|
2388
|
-
|
2389
|
-
|
2390
|
-
|
2391
|
-
|
2392
|
-
|
2393
|
-
|
2394
|
-
|
2395
|
-
|
2396
|
-
|
2397
|
-
|
2398
|
-
|
2399
|
-
|
2400
|
-
<xsl:
|
2401
|
-
|
2402
|
-
|
2403
|
-
|
2404
|
-
|
2405
|
-
|
2406
|
-
|
2407
|
-
|
2408
|
-
|
2409
|
-
|
2410
|
-
|
2411
|
-
|
2695
|
+
<xsl:variable name="title-where">
|
2696
|
+
|
2697
|
+
|
2698
|
+
<xsl:call-template name="getTitle">
|
2699
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2700
|
+
</xsl:call-template>
|
2701
|
+
|
2702
|
+
</xsl:variable>
|
2703
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2704
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2705
|
+
<xsl:text/>
|
2706
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2707
|
+
</fo:block>
|
2708
|
+
|
2709
|
+
</xsl:when>
|
2710
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2711
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2712
|
+
|
2713
|
+
|
2714
|
+
|
2715
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2716
|
+
|
2717
|
+
|
2718
|
+
<xsl:variable name="title-where">
|
2719
|
+
|
2720
|
+
|
2721
|
+
<xsl:call-template name="getTitle">
|
2722
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2723
|
+
</xsl:call-template>
|
2724
|
+
|
2725
|
+
</xsl:variable>
|
2726
|
+
<xsl:value-of select="$title-where"/>:
|
2727
|
+
</fo:block>
|
2728
|
+
</xsl:when>
|
2729
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2730
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2731
|
+
|
2732
|
+
|
2733
|
+
|
2734
|
+
<xsl:variable name="title-key">
|
2735
|
+
|
2736
|
+
|
2737
|
+
<xsl:call-template name="getTitle">
|
2738
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2739
|
+
</xsl:call-template>
|
2740
|
+
|
2741
|
+
</xsl:variable>
|
2742
|
+
<xsl:value-of select="$title-key"/>
|
2743
|
+
</fo:block>
|
2744
|
+
</xsl:when>
|
2745
|
+
</xsl:choose>
|
2746
|
+
|
2747
|
+
<!-- a few components -->
|
2748
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2749
|
+
<fo:block>
|
2750
|
+
|
2751
|
+
|
2752
|
+
<xsl:if test="$parent = 'figure' or $parent = 'formula'">
|
2753
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2754
|
+
</xsl:if>
|
2755
|
+
<xsl:if test="$parent = 'li'">
|
2756
|
+
<!-- <xsl:attribute name="margin-left">-4mm</xsl:attribute> -->
|
2757
|
+
</xsl:if>
|
2758
|
+
|
2759
|
+
|
2760
|
+
|
2761
|
+
<fo:block>
|
2762
|
+
|
2763
|
+
|
2764
|
+
|
2765
|
+
|
2766
|
+
<fo:table width="95%" table-layout="fixed">
|
2767
|
+
|
2768
|
+
<xsl:choose>
|
2769
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2770
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2771
|
+
</xsl:when>
|
2772
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2773
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2774
|
+
|
2775
|
+
</xsl:when>
|
2776
|
+
</xsl:choose>
|
2777
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2778
|
+
<xsl:variable name="html-table">
|
2779
|
+
<xsl:variable name="doc_ns">
|
2780
|
+
|
2781
|
+
</xsl:variable>
|
2782
|
+
<xsl:variable name="ns">
|
2783
|
+
<xsl:choose>
|
2784
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2785
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2786
|
+
</xsl:when>
|
2787
|
+
<xsl:otherwise>
|
2788
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2789
|
+
</xsl:otherwise>
|
2790
|
+
</xsl:choose>
|
2791
|
+
</xsl:variable>
|
2792
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2793
|
+
<xsl:element name="{$ns}:table">
|
2794
|
+
<tbody>
|
2795
|
+
<xsl:apply-templates mode="dl"/>
|
2796
|
+
</tbody>
|
2797
|
+
</xsl:element>
|
2798
|
+
</xsl:variable>
|
2799
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2800
|
+
<xsl:variable name="colwidths">
|
2801
|
+
<xsl:call-template name="calculate-column-widths">
|
2802
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2803
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2804
|
+
</xsl:call-template>
|
2805
|
+
</xsl:variable>
|
2806
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2807
|
+
<xsl:variable name="maxlength_dt">
|
2808
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2809
|
+
</xsl:variable>
|
2810
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2811
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2812
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2813
|
+
</xsl:call-template>
|
2814
|
+
<fo:table-body>
|
2815
|
+
<xsl:apply-templates>
|
2816
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2817
|
+
</xsl:apply-templates>
|
2818
|
+
</fo:table-body>
|
2819
|
+
</fo:table>
|
2820
|
+
</fo:block>
|
2821
|
+
</fo:block>
|
2822
|
+
</xsl:if>
|
2823
|
+
</fo:block-container>
|
2824
|
+
</fo:block-container>
|
2412
2825
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
2413
2826
|
<xsl:param name="colwidths"/>
|
2414
2827
|
<xsl:param name="maxlength_dt"/>
|
@@ -2505,6 +2918,7 @@
|
|
2505
2918
|
<xsl:param name="key_iso"/>
|
2506
2919
|
|
2507
2920
|
<fo:table-row>
|
2921
|
+
|
2508
2922
|
<fo:table-cell>
|
2509
2923
|
|
2510
2924
|
<xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
|
@@ -2527,6 +2941,7 @@
|
|
2527
2941
|
</xsl:if>
|
2528
2942
|
|
2529
2943
|
|
2944
|
+
|
2530
2945
|
<xsl:apply-templates/>
|
2531
2946
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2532
2947
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2594,6 +3009,31 @@
|
|
2594
3009
|
</fo:inline>
|
2595
3010
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2596
3011
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
3012
|
+
<xsl:variable name="_font-size">
|
3013
|
+
|
3014
|
+
|
3015
|
+
|
3016
|
+
|
3017
|
+
|
3018
|
+
|
3019
|
+
|
3020
|
+
|
3021
|
+
|
3022
|
+
|
3023
|
+
|
3024
|
+
|
3025
|
+
|
3026
|
+
|
3027
|
+
</xsl:variable>
|
3028
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3029
|
+
<xsl:if test="$font-size != ''">
|
3030
|
+
<xsl:attribute name="font-size">
|
3031
|
+
<xsl:choose>
|
3032
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3033
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3034
|
+
</xsl:choose>
|
3035
|
+
</xsl:attribute>
|
3036
|
+
</xsl:if>
|
2597
3037
|
<xsl:apply-templates/>
|
2598
3038
|
</fo:inline>
|
2599
3039
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2885,7 +3325,18 @@
|
|
2885
3325
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
2886
3326
|
</xsl:apply-templates>
|
2887
3327
|
</xsl:template><xsl:template name="getLang">
|
2888
|
-
<xsl:variable name="
|
3328
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3329
|
+
<xsl:variable name="language">
|
3330
|
+
<xsl:choose>
|
3331
|
+
<xsl:when test="$language_current != ''">
|
3332
|
+
<xsl:value-of select="$language_current"/>
|
3333
|
+
</xsl:when>
|
3334
|
+
<xsl:otherwise>
|
3335
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3336
|
+
</xsl:otherwise>
|
3337
|
+
</xsl:choose>
|
3338
|
+
</xsl:variable>
|
3339
|
+
|
2889
3340
|
<xsl:choose>
|
2890
3341
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
2891
3342
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -2919,11 +3370,25 @@
|
|
2919
3370
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2920
3371
|
<xsl:value-of select="substring($str, 2)"/>
|
2921
3372
|
</xsl:template><xsl:template match="mathml:math">
|
2922
|
-
<fo:inline font-family="
|
2923
|
-
|
2924
|
-
|
2925
|
-
|
3373
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3374
|
+
|
3375
|
+
<xsl:variable name="mathml">
|
3376
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
3377
|
+
</xsl:variable>
|
3378
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
3379
|
+
<!-- <xsl:copy-of select="."/> -->
|
3380
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3381
|
+
</fo:instream-foreign-object>
|
2926
3382
|
</fo:inline>
|
3383
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3384
|
+
<xsl:copy>
|
3385
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3386
|
+
</xsl:copy>
|
3387
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
3388
|
+
<xsl:copy>
|
3389
|
+
<!-- replace start and end spaces to non-break space -->
|
3390
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3391
|
+
</xsl:copy>
|
2927
3392
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2928
3393
|
<xsl:variable name="target">
|
2929
3394
|
<xsl:choose>
|
@@ -2989,10 +3454,14 @@
|
|
2989
3454
|
</fo:inline>
|
2990
3455
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
2991
3456
|
<xsl:variable name="title-modified">
|
2992
|
-
|
2993
|
-
|
2994
|
-
|
3457
|
+
|
3458
|
+
|
3459
|
+
<xsl:call-template name="getTitle">
|
3460
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
3461
|
+
</xsl:call-template>
|
3462
|
+
|
2995
3463
|
</xsl:variable>
|
3464
|
+
|
2996
3465
|
<xsl:choose>
|
2997
3466
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
2998
3467
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -3000,13 +3469,26 @@
|
|
3000
3469
|
<xsl:apply-templates/>
|
3001
3470
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3002
3471
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3003
|
-
|
3472
|
+
|
3004
3473
|
<xsl:apply-templates/>
|
3005
3474
|
</fo:basic-link>
|
3006
3475
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
3007
|
-
<fo:block
|
3008
|
-
<xsl:
|
3009
|
-
|
3476
|
+
<fo:block-container margin-left="0mm">
|
3477
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3478
|
+
<xsl:attribute name="margin-left">
|
3479
|
+
<xsl:choose>
|
3480
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3481
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3482
|
+
</xsl:choose>
|
3483
|
+
</xsl:attribute>
|
3484
|
+
|
3485
|
+
</xsl:if>
|
3486
|
+
<fo:block-container margin-left="0mm">
|
3487
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3488
|
+
<xsl:apply-templates/>
|
3489
|
+
</fo:block>
|
3490
|
+
</fo:block-container>
|
3491
|
+
</fo:block-container>
|
3010
3492
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
3011
3493
|
<fo:inline>
|
3012
3494
|
<xsl:apply-templates/>
|
@@ -3044,6 +3526,8 @@
|
|
3044
3526
|
|
3045
3527
|
|
3046
3528
|
|
3529
|
+
|
3530
|
+
|
3047
3531
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3048
3532
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3049
3533
|
</fo:inline>
|
@@ -3070,7 +3554,9 @@
|
|
3070
3554
|
</xsl:choose>
|
3071
3555
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3072
3556
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3073
|
-
<xsl:
|
3557
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3558
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3559
|
+
</fo:inline>
|
3074
3560
|
<xsl:apply-templates/>
|
3075
3561
|
</fo:block>
|
3076
3562
|
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
|
@@ -3169,15 +3655,109 @@
|
|
3169
3655
|
|
3170
3656
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3171
3657
|
</fo:block>
|
3172
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
3658
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
3173
3659
|
<xsl:apply-templates mode="contents"/>
|
3174
3660
|
<xsl:text> </xsl:text>
|
3175
|
-
</xsl:template><xsl:template match="
|
3661
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
3662
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3663
|
+
<xsl:text> </xsl:text>
|
3664
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3176
3665
|
<xsl:value-of select="."/>
|
3177
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3666
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3667
|
+
<xsl:value-of select="."/>
|
3668
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3669
|
+
<xsl:apply-templates mode="contents"/>
|
3670
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3671
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3672
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3673
|
+
<xsl:apply-templates select="."/>
|
3674
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3675
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3676
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3677
|
+
<xsl:param name="contents"/>
|
3678
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3679
|
+
<fo:bookmark-tree>
|
3680
|
+
<xsl:choose>
|
3681
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3682
|
+
<xsl:choose>
|
3683
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3684
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3685
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3686
|
+
<fo:bookmark-title>
|
3687
|
+
<xsl:variable name="bookmark-title_">
|
3688
|
+
<xsl:call-template name="getLangVersion">
|
3689
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3690
|
+
</xsl:call-template>
|
3691
|
+
</xsl:variable>
|
3692
|
+
<xsl:choose>
|
3693
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3694
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3695
|
+
</xsl:when>
|
3696
|
+
<xsl:otherwise>
|
3697
|
+
<xsl:choose>
|
3698
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3699
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3700
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3701
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3702
|
+
</xsl:choose>
|
3703
|
+
</xsl:otherwise>
|
3704
|
+
</xsl:choose>
|
3705
|
+
</fo:bookmark-title>
|
3706
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3707
|
+
</fo:bookmark>
|
3708
|
+
|
3709
|
+
</xsl:for-each>
|
3710
|
+
</xsl:when>
|
3711
|
+
<xsl:otherwise>
|
3712
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3713
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3714
|
+
</xsl:for-each>
|
3715
|
+
</xsl:otherwise>
|
3716
|
+
</xsl:choose>
|
3717
|
+
</xsl:when>
|
3718
|
+
<xsl:otherwise>
|
3719
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3720
|
+
</xsl:otherwise>
|
3721
|
+
</xsl:choose>
|
3722
|
+
|
3723
|
+
|
3724
|
+
|
3725
|
+
|
3726
|
+
|
3727
|
+
|
3728
|
+
|
3729
|
+
|
3730
|
+
</fo:bookmark-tree>
|
3731
|
+
</xsl:if>
|
3732
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3733
|
+
<xsl:param name="lang"/>
|
3734
|
+
<xsl:choose>
|
3735
|
+
<xsl:when test="$lang = 'en'">
|
3736
|
+
|
3737
|
+
|
3738
|
+
</xsl:when>
|
3739
|
+
<xsl:when test="$lang = 'fr'">
|
3740
|
+
|
3741
|
+
|
3742
|
+
</xsl:when>
|
3743
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3744
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3745
|
+
</xsl:choose>
|
3746
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3747
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3748
|
+
<fo:bookmark-title>
|
3749
|
+
<xsl:if test="@section != ''">
|
3750
|
+
<xsl:value-of select="@section"/>
|
3751
|
+
<xsl:text> </xsl:text>
|
3752
|
+
</xsl:if>
|
3753
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3754
|
+
</fo:bookmark-title>
|
3755
|
+
<xsl:apply-templates mode="bookmark"/>
|
3756
|
+
</fo:bookmark>
|
3757
|
+
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
3178
3758
|
<xsl:if test="normalize-space() != ''">
|
3179
3759
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3180
|
-
|
3760
|
+
|
3181
3761
|
<xsl:apply-templates/>
|
3182
3762
|
</fo:block>
|
3183
3763
|
</xsl:if>
|
@@ -3232,7 +3812,7 @@
|
|
3232
3812
|
<xsl:apply-templates/>
|
3233
3813
|
</xsl:otherwise>
|
3234
3814
|
</xsl:choose>
|
3235
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3815
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3236
3816
|
<xsl:text> </xsl:text>
|
3237
3817
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
3238
3818
|
<xsl:copy>
|
@@ -3241,21 +3821,61 @@
|
|
3241
3821
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3242
3822
|
<xsl:text> </xsl:text>
|
3243
3823
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3244
|
-
|
3245
|
-
|
3246
|
-
|
3247
|
-
|
3248
|
-
|
3824
|
+
|
3825
|
+
<fo:block-container margin-left="0mm">
|
3826
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3827
|
+
<xsl:attribute name="margin-left">
|
3828
|
+
<xsl:choose>
|
3829
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3830
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3831
|
+
</xsl:choose>
|
3832
|
+
</xsl:attribute>
|
3833
|
+
|
3834
|
+
</xsl:if>
|
3835
|
+
<fo:block-container margin-left="0mm">
|
3836
|
+
|
3837
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3838
|
+
<xsl:variable name="_font-size">
|
3839
|
+
|
3840
|
+
|
3841
|
+
|
3842
|
+
|
3843
|
+
|
3844
|
+
|
3845
|
+
10
|
3846
|
+
|
3847
|
+
|
3848
|
+
|
3849
|
+
|
3850
|
+
|
3851
|
+
|
3852
|
+
|
3853
|
+
</xsl:variable>
|
3854
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3855
|
+
<xsl:if test="$font-size != ''">
|
3856
|
+
<xsl:attribute name="font-size">
|
3857
|
+
<xsl:choose>
|
3858
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3859
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3860
|
+
</xsl:choose>
|
3861
|
+
</xsl:attribute>
|
3862
|
+
</xsl:if>
|
3863
|
+
<xsl:apply-templates/>
|
3864
|
+
</fo:block>
|
3865
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3866
|
+
|
3867
|
+
</fo:block-container>
|
3868
|
+
</fo:block-container>
|
3869
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
3249
3870
|
<xsl:variable name="text">
|
3250
3871
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
3251
3872
|
</xsl:variable>
|
3252
|
-
<xsl:call-template name="add-zero-spaces">
|
3873
|
+
<xsl:call-template name="add-zero-spaces-java">
|
3253
3874
|
<xsl:with-param name="text" select="$text"/>
|
3254
3875
|
</xsl:call-template>
|
3255
3876
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
3256
3877
|
<xsl:if test="normalize-space() != ''">
|
3257
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3258
|
-
|
3878
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3259
3879
|
<xsl:apply-templates/>
|
3260
3880
|
</fo:block>
|
3261
3881
|
</xsl:if>
|
@@ -3329,9 +3949,9 @@
|
|
3329
3949
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3330
3950
|
</xsl:if>
|
3331
3951
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3332
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black"
|
3952
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3333
3953
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3334
|
-
<xsl:attribute name="border">0.5pt solid black</xsl:attribute>
|
3954
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3335
3955
|
</xsl:if>
|
3336
3956
|
<xsl:variable name="simple-table">
|
3337
3957
|
<xsl:call-template name="getSimpleTable"/>
|
@@ -3340,8 +3960,8 @@
|
|
3340
3960
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3341
3961
|
<!-- <fo:table-column column-width="35mm"/>
|
3342
3962
|
<fo:table-column column-width="115mm"/> -->
|
3343
|
-
<fo:table-column column-width="
|
3344
|
-
<fo:table-column column-width="
|
3963
|
+
<fo:table-column column-width="30%"/>
|
3964
|
+
<fo:table-column column-width="70%"/>
|
3345
3965
|
</xsl:if>
|
3346
3966
|
<xsl:apply-templates mode="requirement"/>
|
3347
3967
|
</fo:table>
|
@@ -3364,14 +3984,21 @@
|
|
3364
3984
|
<xsl:apply-templates mode="requirement"/>
|
3365
3985
|
</fo:table-body>
|
3366
3986
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3367
|
-
<fo:table-row height="7mm">
|
3368
|
-
<xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])
|
3369
|
-
<xsl:attribute name="border">1pt solid black</xsl:attribute>
|
3987
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3988
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3989
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3990
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3991
|
+
</xsl:if>
|
3992
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3993
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3994
|
+
</xsl:if>
|
3995
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3996
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3370
3997
|
</xsl:if>
|
3371
3998
|
<xsl:apply-templates mode="requirement"/>
|
3372
3999
|
</fo:table-row>
|
3373
4000
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3374
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
4001
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3375
4002
|
<xsl:attribute name="text-align">
|
3376
4003
|
<xsl:choose>
|
3377
4004
|
<xsl:when test="@align">
|
@@ -3390,6 +4017,7 @@
|
|
3390
4017
|
<xsl:value-of select="@rowspan"/>
|
3391
4018
|
</xsl:attribute>
|
3392
4019
|
</xsl:if>
|
4020
|
+
<xsl:call-template name="display-align"/>
|
3393
4021
|
|
3394
4022
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3395
4023
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
@@ -3405,7 +4033,7 @@
|
|
3405
4033
|
</fo:block>
|
3406
4034
|
</fo:table-cell>
|
3407
4035
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3408
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
4036
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3409
4037
|
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3410
4038
|
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3411
4039
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -3418,6 +4046,9 @@
|
|
3418
4046
|
<xsl:otherwise>left</xsl:otherwise>
|
3419
4047
|
</xsl:choose>
|
3420
4048
|
</xsl:attribute>
|
4049
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
4050
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4051
|
+
</xsl:if>
|
3421
4052
|
<xsl:if test="@colspan">
|
3422
4053
|
<xsl:attribute name="number-columns-spanned">
|
3423
4054
|
<xsl:value-of select="@colspan"/>
|
@@ -3428,6 +4059,7 @@
|
|
3428
4059
|
<xsl:value-of select="@rowspan"/>
|
3429
4060
|
</xsl:attribute>
|
3430
4061
|
</xsl:if>
|
4062
|
+
<xsl:call-template name="display-align"/>
|
3431
4063
|
|
3432
4064
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3433
4065
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
@@ -3443,7 +4075,7 @@
|
|
3443
4075
|
</fo:block>
|
3444
4076
|
</fo:table-cell>
|
3445
4077
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3446
|
-
<fo:block font-size="11pt" font-weight="bold"
|
4078
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3447
4079
|
<xsl:apply-templates/>
|
3448
4080
|
</fo:block>
|
3449
4081
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
@@ -3469,12 +4101,13 @@
|
|
3469
4101
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3470
4102
|
|
3471
4103
|
<xsl:variable name="element">
|
3472
|
-
block
|
4104
|
+
block
|
3473
4105
|
|
4106
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3474
4107
|
</xsl:variable>
|
3475
4108
|
|
3476
4109
|
<xsl:choose>
|
3477
|
-
<xsl:when test="normalize-space($element)
|
4110
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3478
4111
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
3479
4112
|
<xsl:apply-templates/>
|
3480
4113
|
</fo:block>
|
@@ -3511,25 +4144,44 @@
|
|
3511
4144
|
</xsl:otherwise>
|
3512
4145
|
</xsl:choose>
|
3513
4146
|
|
3514
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3515
|
-
|
4147
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
4148
|
+
|
4149
|
+
<xsl:variable name="element">
|
4150
|
+
block
|
3516
4151
|
|
3517
|
-
|
3518
|
-
|
4152
|
+
</xsl:variable>
|
4153
|
+
<xsl:choose>
|
4154
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
4155
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
4156
|
+
|
4157
|
+
<xsl:apply-templates/>
|
4158
|
+
</fo:block>
|
4159
|
+
</xsl:when>
|
4160
|
+
<xsl:otherwise>
|
4161
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
4162
|
+
<xsl:apply-templates/>
|
4163
|
+
</fo:inline>
|
4164
|
+
</xsl:otherwise>
|
4165
|
+
</xsl:choose>
|
3519
4166
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3520
4167
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3521
4168
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3522
4169
|
<xsl:variable name="termsource_text">
|
3523
4170
|
<xsl:apply-templates/>
|
3524
4171
|
</xsl:variable>
|
4172
|
+
|
3525
4173
|
<xsl:choose>
|
3526
4174
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3527
4175
|
<xsl:apply-templates/>
|
3528
4176
|
</xsl:when>
|
3529
|
-
<xsl:otherwise>
|
3530
|
-
|
3531
|
-
|
3532
|
-
|
4177
|
+
<xsl:otherwise>
|
4178
|
+
|
4179
|
+
<xsl:text>[</xsl:text>
|
4180
|
+
|
4181
|
+
<xsl:apply-templates/>
|
4182
|
+
|
4183
|
+
<xsl:text>]</xsl:text>
|
4184
|
+
|
3533
4185
|
</xsl:otherwise>
|
3534
4186
|
</xsl:choose>
|
3535
4187
|
</fo:block>
|
@@ -3550,18 +4202,29 @@
|
|
3550
4202
|
<xsl:if test="normalize-space() != ''">
|
3551
4203
|
<xsl:value-of select="."/>
|
3552
4204
|
</xsl:if>
|
3553
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
4205
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
4206
|
+
<fo:block-container margin-left="0mm">
|
4207
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4208
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
4209
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
4210
|
+
</xsl:if>
|
4211
|
+
</xsl:if>
|
4212
|
+
|
4213
|
+
<fo:block-container margin-left="0mm">
|
3554
4214
|
|
3555
|
-
|
3556
|
-
|
3557
|
-
|
3558
|
-
|
3559
|
-
|
3560
|
-
|
3561
|
-
|
3562
|
-
|
3563
|
-
|
3564
|
-
|
4215
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
4216
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
4217
|
+
</fo:block>
|
4218
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4219
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
4220
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
4221
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
4222
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
4223
|
+
</fo:block>
|
4224
|
+
</xsl:if>
|
4225
|
+
|
4226
|
+
</fo:block-container>
|
4227
|
+
</fo:block-container>
|
3565
4228
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3566
4229
|
<xsl:if test="../*[local-name() = 'author']">
|
3567
4230
|
<xsl:text>, </xsl:text>
|
@@ -3589,6 +4252,7 @@
|
|
3589
4252
|
<xsl:if test="@type = 'inline'">
|
3590
4253
|
|
3591
4254
|
|
4255
|
+
|
3592
4256
|
</xsl:if>
|
3593
4257
|
|
3594
4258
|
|
@@ -3629,6 +4293,7 @@
|
|
3629
4293
|
|
3630
4294
|
|
3631
4295
|
|
4296
|
+
|
3632
4297
|
</xsl:variable>
|
3633
4298
|
|
3634
4299
|
<xsl:variable name="padding-right">
|
@@ -3675,9 +4340,12 @@
|
|
3675
4340
|
</fo:block>
|
3676
4341
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
3677
4342
|
<xsl:variable name="title-deprecated">
|
3678
|
-
|
3679
|
-
|
3680
|
-
|
4343
|
+
|
4344
|
+
|
4345
|
+
<xsl:call-template name="getTitle">
|
4346
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
4347
|
+
</xsl:call-template>
|
4348
|
+
|
3681
4349
|
</xsl:variable>
|
3682
4350
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
3683
4351
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -3719,6 +4387,7 @@
|
|
3719
4387
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3720
4388
|
<fo:block>
|
3721
4389
|
<xsl:call-template name="setId"/>
|
4390
|
+
|
3722
4391
|
<xsl:apply-templates/>
|
3723
4392
|
</fo:block>
|
3724
4393
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -3743,6 +4412,31 @@
|
|
3743
4412
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3744
4413
|
<!-- 0xA0 to space replacement -->
|
3745
4414
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4415
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4416
|
+
<xsl:choose>
|
4417
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
4418
|
+
<fo:block-container>
|
4419
|
+
<xsl:attribute name="margin-left">
|
4420
|
+
<xsl:choose>
|
4421
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4422
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4423
|
+
</xsl:choose>
|
4424
|
+
</xsl:attribute>
|
4425
|
+
|
4426
|
+
|
4427
|
+
<fo:block-container margin-left="0mm">
|
4428
|
+
<fo:block>
|
4429
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4430
|
+
</fo:block>
|
4431
|
+
</fo:block-container>
|
4432
|
+
</fo:block-container>
|
4433
|
+
</xsl:when>
|
4434
|
+
<xsl:otherwise>
|
4435
|
+
<fo:block>
|
4436
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4437
|
+
</fo:block>
|
4438
|
+
</xsl:otherwise>
|
4439
|
+
</xsl:choose>
|
3746
4440
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3747
4441
|
<!-- <row>
|
3748
4442
|
<date>05-07-2013</date>
|
@@ -3775,7 +4469,28 @@
|
|
3775
4469
|
<fo:block><xsl:apply-templates/></fo:block>
|
3776
4470
|
</fo:table-cell>
|
3777
4471
|
</xsl:template><xsl:template name="processBibitem">
|
4472
|
+
|
4473
|
+
|
3778
4474
|
|
4475
|
+
|
4476
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4477
|
+
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
4478
|
+
<xsl:choose>
|
4479
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4480
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
4481
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4482
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4483
|
+
</xsl:if>
|
4484
|
+
<xsl:value-of select="$_doc_ident"/>
|
4485
|
+
</xsl:when>
|
4486
|
+
<xsl:otherwise>
|
4487
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4488
|
+
<xsl:if test="$type != ''">
|
4489
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4490
|
+
</xsl:if>
|
4491
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4492
|
+
</xsl:otherwise>
|
4493
|
+
</xsl:choose>
|
3779
4494
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
3780
4495
|
<xsl:choose>
|
3781
4496
|
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
@@ -3893,6 +4608,7 @@
|
|
3893
4608
|
|
3894
4609
|
|
3895
4610
|
|
4611
|
+
|
3896
4612
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@type='main']"/>
|
3897
4613
|
|
3898
4614
|
</xsl:variable>
|
@@ -3910,6 +4626,7 @@
|
|
3910
4626
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
3911
4627
|
|
3912
4628
|
|
4629
|
+
|
3913
4630
|
</dc:creator>
|
3914
4631
|
<dc:description>
|
3915
4632
|
<xsl:variable name="abstract">
|
@@ -3919,6 +4636,7 @@
|
|
3919
4636
|
|
3920
4637
|
<xsl:copy-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'abstract']//text()"/>
|
3921
4638
|
|
4639
|
+
|
3922
4640
|
</xsl:variable>
|
3923
4641
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3924
4642
|
</dc:description>
|
@@ -3990,13 +4708,22 @@
|
|
3990
4708
|
</xsl:template><xsl:template name="split">
|
3991
4709
|
<xsl:param name="pText" select="."/>
|
3992
4710
|
<xsl:param name="sep" select="','"/>
|
4711
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
3993
4712
|
<xsl:if test="string-length($pText) >0">
|
3994
4713
|
<item>
|
3995
|
-
<xsl:
|
4714
|
+
<xsl:choose>
|
4715
|
+
<xsl:when test="$normalize-space = 'true'">
|
4716
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
4717
|
+
</xsl:when>
|
4718
|
+
<xsl:otherwise>
|
4719
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
4720
|
+
</xsl:otherwise>
|
4721
|
+
</xsl:choose>
|
3996
4722
|
</item>
|
3997
4723
|
<xsl:call-template name="split">
|
3998
4724
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
3999
4725
|
<xsl:with-param name="sep" select="$sep"/>
|
4726
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
4000
4727
|
</xsl:call-template>
|
4001
4728
|
</xsl:if>
|
4002
4729
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -4019,6 +4746,7 @@
|
|
4019
4746
|
|
4020
4747
|
|
4021
4748
|
|
4749
|
+
|
4022
4750
|
</xsl:variable>
|
4023
4751
|
<xsl:if test="$documentNS != $XSLNS">
|
4024
4752
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4044,4 +4772,40 @@
|
|
4044
4772
|
</xsl:otherwise>
|
4045
4773
|
</xsl:choose>
|
4046
4774
|
</xsl:attribute>
|
4775
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4776
|
+
<xsl:param name="text"/>
|
4777
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4778
|
+
<xsl:if test="string-length($text) > 0">
|
4779
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4780
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4781
|
+
<xsl:if test="$char = '®'">
|
4782
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4783
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4784
|
+
</xsl:if>
|
4785
|
+
<xsl:value-of select="$char"/>
|
4786
|
+
</fo:inline>
|
4787
|
+
<xsl:call-template name="add-letter-spacing">
|
4788
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4789
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4790
|
+
</xsl:call-template>
|
4791
|
+
</xsl:if>
|
4792
|
+
</xsl:template><xsl:template name="repeat">
|
4793
|
+
<xsl:param name="char" select="'*'"/>
|
4794
|
+
<xsl:param name="count"/>
|
4795
|
+
<xsl:if test="$count > 0">
|
4796
|
+
<xsl:value-of select="$char"/>
|
4797
|
+
<xsl:call-template name="repeat">
|
4798
|
+
<xsl:with-param name="char" select="$char"/>
|
4799
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
4800
|
+
</xsl:call-template>
|
4801
|
+
</xsl:if>
|
4802
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
4803
|
+
<xsl:param name="key"/>
|
4804
|
+
|
4805
|
+
<xsl:variable name="curr_lang">
|
4806
|
+
<xsl:call-template name="getLang"/>
|
4807
|
+
</xsl:variable>
|
4808
|
+
|
4809
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4810
|
+
|
4047
4811
|
</xsl:template></xsl:stylesheet>
|