metanorma-itu 1.2.1 → 1.2.6
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 +44 -0
- data/lib/asciidoctor/itu/basicdoc.rng +23 -0
- data/lib/asciidoctor/itu/cleanup.rb +1 -1
- data/lib/asciidoctor/itu/converter.rb +4 -3
- data/lib/asciidoctor/itu/front.rb +36 -12
- data/lib/asciidoctor/itu/isodoc.rng +125 -58
- data/lib/asciidoctor/itu/itu.rng +67 -0
- data/lib/isodoc/itu/base_convert.rb +2 -0
- 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 +4 -1
- data/lib/isodoc/itu/i18n-en.yaml +2 -0
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +971 -224
- data/lib/isodoc/itu/itu.recommendation.xsl +971 -224
- data/lib/isodoc/itu/itu.resolution.xsl +971 -224
- data/lib/isodoc/itu/metadata.rb +62 -3
- data/lib/isodoc/itu/presentation_xml_convert.rb +12 -0
- data/lib/isodoc/itu/word_cleanup.rb +152 -0
- data/lib/isodoc/itu/word_convert.rb +2 -125
- data/lib/isodoc/itu/xref.rb +3 -2
- 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
@@ -53,6 +53,7 @@ module IsoDoc
|
|
53
53
|
def make_body3(body, docxml)
|
54
54
|
body.div **{ class: "main-section" } do |div3|
|
55
55
|
boilerplate docxml, div3
|
56
|
+
preface_block docxml, div3
|
56
57
|
abstract docxml, div3
|
57
58
|
preface docxml, div3
|
58
59
|
middle docxml, div3
|
@@ -62,7 +63,9 @@ module IsoDoc
|
|
62
63
|
end
|
63
64
|
|
64
65
|
def authority_cleanup(docxml)
|
65
|
-
|
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)
|
66
69
|
super
|
67
70
|
end
|
68
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:local_bibdata/itu:ext/itu:structuredidentifier/itu:amendment[@language = $lang])"/>
|
67
|
+
<xsl:variable name="isCorrigendum" select="normalize-space(/itu:itu-standard/itu:local_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">
|
@@ -352,7 +387,7 @@
|
|
352
387
|
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
353
388
|
</xsl:if>
|
354
389
|
|
355
|
-
<xsl:if test="xalan:nodeset($contents)//item">
|
390
|
+
<xsl:if test="xalan:nodeset($contents)//item[@display = 'true']">
|
356
391
|
<fo:block break-after="page"/>
|
357
392
|
<fo:block-container>
|
358
393
|
<xsl:variable name="title-toc">
|
@@ -368,7 +403,7 @@
|
|
368
403
|
<fo:block margin-top="6pt" text-align="center" font-weight="bold"><xsl:value-of select="$title-toc"/></fo:block>
|
369
404
|
<fo:block margin-top="6pt" text-align="right" font-weight="bold"><xsl:value-of select="$title-page"/></fo:block>
|
370
405
|
|
371
|
-
<xsl:for-each select="xalan:nodeset($contents)//item">
|
406
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
372
407
|
<fo:block>
|
373
408
|
<xsl:if test="@level = 1">
|
374
409
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -407,8 +442,8 @@
|
|
407
442
|
</fo:list-item-label>
|
408
443
|
<fo:list-item-body start-indent="body-start()">
|
409
444
|
<fo:block text-align-last="justify">
|
410
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="
|
411
|
-
<xsl:apply-templates/>
|
445
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
446
|
+
<xsl:apply-templates select="title"/>
|
412
447
|
<fo:inline keep-together.within-line="always">
|
413
448
|
<fo:leader leader-pattern="dots"/>
|
414
449
|
<fo:page-number-citation ref-id="{@id}"/>
|
@@ -501,26 +536,35 @@
|
|
501
536
|
</xsl:variable>
|
502
537
|
|
503
538
|
<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>
|
539
|
+
<xsl:choose>
|
507
540
|
<xsl:when test="$level >= 3">false</xsl:when>
|
508
541
|
<xsl:when test="$section = '' and $type = 'clause' and $level >= 2">false</xsl:when>
|
509
542
|
<xsl:otherwise>true</xsl:otherwise>
|
510
543
|
</xsl:choose>
|
511
544
|
</xsl:variable>
|
512
545
|
|
513
|
-
<xsl:
|
546
|
+
<xsl:variable name="skip">
|
547
|
+
<xsl:choose>
|
548
|
+
<xsl:when test="ancestor-or-self::itu:bibitem">true</xsl:when>
|
549
|
+
<xsl:when test="ancestor-or-self::itu:term">true</xsl:when>
|
550
|
+
<xsl:otherwise>false</xsl:otherwise>
|
551
|
+
</xsl:choose>
|
552
|
+
</xsl:variable>
|
553
|
+
|
554
|
+
<xsl:if test="$skip = 'false'">
|
514
555
|
|
515
556
|
<xsl:variable name="title">
|
516
557
|
<xsl:call-template name="getName"/>
|
517
558
|
</xsl:variable>
|
518
559
|
|
519
|
-
<item level="{$level}" section="{$section}" type="{$type}">
|
560
|
+
<item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
520
561
|
<xsl:call-template name="setId"/>
|
521
|
-
<
|
562
|
+
<title>
|
563
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
564
|
+
</title>
|
565
|
+
<xsl:apply-templates mode="contents"/>
|
522
566
|
</item>
|
523
|
-
|
567
|
+
|
524
568
|
</xsl:if>
|
525
569
|
|
526
570
|
</xsl:template>
|
@@ -979,7 +1023,7 @@
|
|
979
1023
|
<xsl:template match="itu:docidentifier"/>
|
980
1024
|
|
981
1025
|
|
982
|
-
<xsl:template match="itu:ul | itu:ol | itu:sections/itu:ul | itu:sections/itu:ol">
|
1026
|
+
<xsl:template match="itu:ul | itu:ol | itu:sections/itu:ul | itu:sections/itu:ol" mode="ul_ol">
|
983
1027
|
<xsl:if test="preceding-sibling::*[1][local-name() = 'title']">
|
984
1028
|
<fo:block padding-top="-8pt" font-size="1pt"> </fo:block>
|
985
1029
|
</xsl:if>
|
@@ -992,17 +1036,21 @@
|
|
992
1036
|
<xsl:template match="itu:ul//itu:note | itu:ol//itu:note" priority="2"/>
|
993
1037
|
<xsl:template match="itu:ul//itu:note | itu:ol//itu:note" mode="process">
|
994
1038
|
<fo:block id="{@id}">
|
995
|
-
<xsl:apply-templates select="
|
1039
|
+
<xsl:apply-templates select="itu:name" mode="presentation"/>
|
996
1040
|
<xsl:apply-templates mode="process"/>
|
997
1041
|
</fo:block>
|
998
1042
|
</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">
|
1043
|
+
<xsl:template match="itu:ul//itu:note/itu:name | itu:ol//itu:note/itu:name" mode="process" priority="2"/>
|
1044
|
+
<xsl:template match="itu:ul//itu:note/itu:p | itu:ol//itu:note/itu:p" mode="process" priority="2">
|
1001
1045
|
<fo:block font-size="11pt" margin-top="4pt">
|
1002
1046
|
<xsl:apply-templates/>
|
1003
1047
|
</fo:block>
|
1004
1048
|
</xsl:template>
|
1005
1049
|
|
1050
|
+
<xsl:template match="itu:ul//itu:note/* | itu:ol//itu:note/*" mode="process">
|
1051
|
+
<xsl:apply-templates select="."/>
|
1052
|
+
</xsl:template>
|
1053
|
+
|
1006
1054
|
<xsl:template match="itu:li">
|
1007
1055
|
<fo:list-item id="{@id}">
|
1008
1056
|
<fo:list-item-label end-indent="label-end()">
|
@@ -1105,9 +1153,13 @@
|
|
1105
1153
|
</xsl:template>
|
1106
1154
|
|
1107
1155
|
<xsl:template match="mathml:math" priority="2">
|
1108
|
-
<fo:inline font-family="
|
1156
|
+
<fo:inline font-family="STIX Two Math" font-size="11pt">
|
1157
|
+
<xsl:variable name="mathml">
|
1158
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
1159
|
+
</xsl:variable>
|
1109
1160
|
<fo:instream-foreign-object fox:alt-text="Math">
|
1110
|
-
<xsl:copy-of select="."/>
|
1161
|
+
<!-- <xsl:copy-of select="."/> -->
|
1162
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
1111
1163
|
</fo:instream-foreign-object>
|
1112
1164
|
</fo:inline>
|
1113
1165
|
</xsl:template>
|
@@ -1218,6 +1270,12 @@
|
|
1218
1270
|
|
1219
1271
|
</title-edition>
|
1220
1272
|
|
1273
|
+
<title-edition lang="fr">
|
1274
|
+
|
1275
|
+
<xsl:text>Édition </xsl:text>
|
1276
|
+
|
1277
|
+
</title-edition>
|
1278
|
+
|
1221
1279
|
|
1222
1280
|
<title-toc lang="en">
|
1223
1281
|
|
@@ -1226,7 +1284,12 @@
|
|
1226
1284
|
|
1227
1285
|
|
1228
1286
|
</title-toc>
|
1229
|
-
<title-toc lang="fr">
|
1287
|
+
<title-toc lang="fr">
|
1288
|
+
|
1289
|
+
<xsl:text>Sommaire</xsl:text>
|
1290
|
+
|
1291
|
+
|
1292
|
+
</title-toc>
|
1230
1293
|
|
1231
1294
|
<title-toc lang="zh">Contents</title-toc>
|
1232
1295
|
|
@@ -1260,7 +1323,12 @@
|
|
1260
1323
|
|
1261
1324
|
|
1262
1325
|
|
1263
|
-
<title-source lang="en">
|
1326
|
+
<title-source lang="en">
|
1327
|
+
|
1328
|
+
<xsl:text>SOURCE</xsl:text>
|
1329
|
+
|
1330
|
+
|
1331
|
+
</title-source>
|
1264
1332
|
|
1265
1333
|
<title-keywords lang="en">Keywords</title-keywords>
|
1266
1334
|
|
@@ -1303,12 +1371,25 @@
|
|
1303
1371
|
<title-warning lang="zh">警告</title-warning>
|
1304
1372
|
|
1305
1373
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1374
|
+
|
1375
|
+
<title-continued lang="en">(continued)</title-continued>
|
1376
|
+
<title-continued lang="fr">(continué)</title-continued>
|
1377
|
+
|
1306
1378
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1307
1379
|
<xsl:param name="name"/>
|
1308
|
-
<xsl:
|
1309
|
-
|
1380
|
+
<xsl:param name="lang"/>
|
1381
|
+
<xsl:variable name="lang_">
|
1382
|
+
<xsl:choose>
|
1383
|
+
<xsl:when test="$lang != ''">
|
1384
|
+
<xsl:value-of select="$lang"/>
|
1385
|
+
</xsl:when>
|
1386
|
+
<xsl:otherwise>
|
1387
|
+
<xsl:call-template name="getLang"/>
|
1388
|
+
</xsl:otherwise>
|
1389
|
+
</xsl:choose>
|
1310
1390
|
</xsl:variable>
|
1311
|
-
<xsl:variable name="
|
1391
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1392
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
1312
1393
|
<xsl:choose>
|
1313
1394
|
<xsl:when test="normalize-space($title_) != ''">
|
1314
1395
|
<xsl:value-of select="$title_"/>
|
@@ -1317,7 +1398,10 @@
|
|
1317
1398
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
1318
1399
|
</xsl:otherwise>
|
1319
1400
|
</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="
|
1401
|
+
</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">
|
1402
|
+
|
1403
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1404
|
+
|
1321
1405
|
|
1322
1406
|
|
1323
1407
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
@@ -1328,14 +1412,14 @@
|
|
1328
1412
|
|
1329
1413
|
|
1330
1414
|
|
1331
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1332
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1415
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1333
1416
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1334
1417
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1335
1418
|
|
1336
1419
|
|
1337
1420
|
|
1338
1421
|
|
1422
|
+
|
1339
1423
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1340
1424
|
|
1341
1425
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -1380,6 +1464,7 @@
|
|
1380
1464
|
|
1381
1465
|
|
1382
1466
|
|
1467
|
+
|
1383
1468
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1384
1469
|
|
1385
1470
|
|
@@ -1400,6 +1485,7 @@
|
|
1400
1485
|
|
1401
1486
|
|
1402
1487
|
|
1488
|
+
|
1403
1489
|
|
1404
1490
|
|
1405
1491
|
|
@@ -1444,6 +1530,7 @@
|
|
1444
1530
|
|
1445
1531
|
|
1446
1532
|
|
1533
|
+
|
1447
1534
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1448
1535
|
|
1449
1536
|
|
@@ -1457,7 +1544,8 @@
|
|
1457
1544
|
|
1458
1545
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1459
1546
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1460
|
-
|
1547
|
+
|
1548
|
+
|
1461
1549
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1462
1550
|
|
1463
1551
|
|
@@ -1465,6 +1553,7 @@
|
|
1465
1553
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1466
1554
|
|
1467
1555
|
|
1556
|
+
|
1468
1557
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1469
1558
|
|
1470
1559
|
|
@@ -1484,8 +1573,10 @@
|
|
1484
1573
|
|
1485
1574
|
|
1486
1575
|
|
1576
|
+
</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">
|
1577
|
+
|
1578
|
+
|
1487
1579
|
|
1488
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1489
1580
|
|
1490
1581
|
|
1491
1582
|
|
@@ -1495,7 +1586,6 @@
|
|
1495
1586
|
|
1496
1587
|
|
1497
1588
|
|
1498
|
-
|
1499
1589
|
|
1500
1590
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1501
1591
|
|
@@ -1521,6 +1611,8 @@
|
|
1521
1611
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1522
1612
|
|
1523
1613
|
|
1614
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1615
|
+
|
1524
1616
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1525
1617
|
|
1526
1618
|
|
@@ -1547,6 +1639,7 @@
|
|
1547
1639
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1548
1640
|
|
1549
1641
|
|
1642
|
+
|
1550
1643
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1551
1644
|
|
1552
1645
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1556,6 +1649,7 @@
|
|
1556
1649
|
|
1557
1650
|
|
1558
1651
|
|
1652
|
+
|
1559
1653
|
|
1560
1654
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1561
1655
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -1604,11 +1698,14 @@
|
|
1604
1698
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1605
1699
|
|
1606
1700
|
|
1701
|
+
|
1607
1702
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1608
1703
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1609
1704
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1610
1705
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1611
1706
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1707
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1708
|
+
|
1612
1709
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1613
1710
|
|
1614
1711
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -1674,6 +1771,10 @@
|
|
1674
1771
|
|
1675
1772
|
|
1676
1773
|
|
1774
|
+
|
1775
|
+
|
1776
|
+
<!-- $namespace = 'iso' or -->
|
1777
|
+
|
1677
1778
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1678
1779
|
|
1679
1780
|
|
@@ -1709,6 +1810,7 @@
|
|
1709
1810
|
<xsl:with-param name="table" select="$simple-table"/>
|
1710
1811
|
</xsl:call-template>
|
1711
1812
|
</xsl:variable>
|
1813
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1712
1814
|
|
1713
1815
|
<!-- <xsl:variable name="colwidths2">
|
1714
1816
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1729,37 +1831,61 @@
|
|
1729
1831
|
|
1730
1832
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1731
1833
|
|
1732
|
-
<xsl:attribute name="
|
1733
|
-
|
1834
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1734
1835
|
|
1735
1836
|
|
1837
|
+
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
1736
1838
|
|
1839
|
+
|
1840
|
+
|
1841
|
+
|
1737
1842
|
|
1738
1843
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1739
1844
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1740
1845
|
<xsl:attribute name="space-after">18pt</xsl:attribute>
|
1741
1846
|
|
1742
1847
|
|
1848
|
+
|
1743
1849
|
|
1744
1850
|
|
1745
1851
|
|
1746
|
-
|
1747
|
-
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1852
|
+
|
1853
|
+
|
1854
|
+
|
1855
|
+
|
1856
|
+
<xsl:variable name="table_attributes">
|
1857
|
+
<attribute name="table-layout">fixed</attribute>
|
1858
|
+
<attribute name="width">100%</attribute>
|
1859
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1860
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1753
1861
|
|
1754
1862
|
|
1755
1863
|
|
1864
|
+
<attribute name="margin-left">0mm</attribute>
|
1865
|
+
<attribute name="margin-right">0mm</attribute>
|
1756
1866
|
|
1757
1867
|
|
1868
|
+
|
1869
|
+
|
1870
|
+
|
1758
1871
|
|
1759
|
-
|
1872
|
+
|
1760
1873
|
|
1874
|
+
</xsl:variable>
|
1875
|
+
|
1876
|
+
|
1877
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1761
1878
|
|
1879
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1880
|
+
<xsl:attribute name="{@name}">
|
1881
|
+
<xsl:value-of select="."/>
|
1882
|
+
</xsl:attribute>
|
1883
|
+
</xsl:for-each>
|
1762
1884
|
|
1885
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1886
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1887
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1888
|
+
</xsl:if>
|
1763
1889
|
|
1764
1890
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1765
1891
|
<xsl:choose>
|
@@ -1783,6 +1909,33 @@
|
|
1783
1909
|
|
1784
1910
|
</fo:table>
|
1785
1911
|
|
1912
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1913
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1914
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1915
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1916
|
+
</xsl:call-template>
|
1917
|
+
</xsl:for-each>
|
1918
|
+
|
1919
|
+
<!-- insert footer as table -->
|
1920
|
+
<!-- <fo:table>
|
1921
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1922
|
+
<xsl:attribute name="{@name}">
|
1923
|
+
<xsl:value-of select="."/>
|
1924
|
+
</xsl:attribute>
|
1925
|
+
</xsl:for-each>
|
1926
|
+
|
1927
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1928
|
+
<xsl:choose>
|
1929
|
+
<xsl:when test=". = 1 or . = 0">
|
1930
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1931
|
+
</xsl:when>
|
1932
|
+
<xsl:otherwise>
|
1933
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1934
|
+
</xsl:otherwise>
|
1935
|
+
</xsl:choose>
|
1936
|
+
</xsl:for-each>
|
1937
|
+
</fo:table>-->
|
1938
|
+
|
1786
1939
|
|
1787
1940
|
|
1788
1941
|
|
@@ -1791,8 +1944,9 @@
|
|
1791
1944
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1792
1945
|
<xsl:if test="normalize-space() != ''">
|
1793
1946
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1794
|
-
|
1795
|
-
|
1947
|
+
|
1948
|
+
<xsl:apply-templates/>
|
1949
|
+
</fo:block>
|
1796
1950
|
</xsl:if>
|
1797
1951
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1798
1952
|
<xsl:param name="table-row"/>
|
@@ -1846,6 +2000,13 @@
|
|
1846
2000
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1847
2001
|
<xsl:variable name="td_text">
|
1848
2002
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2003
|
+
|
2004
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2005
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
2006
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
2007
|
+
</xsl:for-each>
|
2008
|
+
</xsl:if> -->
|
2009
|
+
|
1849
2010
|
</xsl:variable>
|
1850
2011
|
<xsl:variable name="words">
|
1851
2012
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1905,13 +2066,31 @@
|
|
1905
2066
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1906
2067
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1907
2068
|
<xsl:value-of select="@target"/>
|
2069
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
2070
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
2071
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1908
2072
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1909
2073
|
<xsl:param name="cols-count"/>
|
1910
2074
|
<!-- font-weight="bold" -->
|
1911
|
-
<fo:table-header>
|
2075
|
+
<fo:table-header>
|
1912
2076
|
|
1913
2077
|
<xsl:apply-templates/>
|
1914
2078
|
</fo:table-header>
|
2079
|
+
</xsl:template><xsl:template name="table-header-title">
|
2080
|
+
<xsl:param name="cols-count"/>
|
2081
|
+
<!-- row for title -->
|
2082
|
+
<fo:table-row>
|
2083
|
+
<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">
|
2084
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
2085
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
2086
|
+
<xsl:call-template name="fn_name_display"/>
|
2087
|
+
</xsl:for-each>
|
2088
|
+
<fo:block text-align="right" font-style="italic">
|
2089
|
+
<xsl:text> </xsl:text>
|
2090
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
2091
|
+
</fo:block>
|
2092
|
+
</fo:table-cell>
|
2093
|
+
</fo:table-row>
|
1915
2094
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1916
2095
|
<fo:table-body>
|
1917
2096
|
<xsl:apply-templates/>
|
@@ -1919,6 +2098,13 @@
|
|
1919
2098
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1920
2099
|
<xsl:apply-templates/>
|
1921
2100
|
</xsl:template><xsl:template name="insertTableFooter">
|
2101
|
+
<xsl:param name="cols-count"/>
|
2102
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
2103
|
+
<fo:table-footer>
|
2104
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
2105
|
+
</fo:table-footer>
|
2106
|
+
</xsl:if>
|
2107
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1922
2108
|
<xsl:param name="cols-count"/>
|
1923
2109
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1924
2110
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1944,11 +2130,29 @@
|
|
1944
2130
|
<!-- fn will be processed inside 'note' processing -->
|
1945
2131
|
|
1946
2132
|
|
2133
|
+
|
2134
|
+
|
2135
|
+
|
2136
|
+
|
1947
2137
|
<!-- except gb -->
|
1948
2138
|
|
1949
2139
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1950
2140
|
|
1951
2141
|
|
2142
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
2143
|
+
<!-- empty, because notes show at page side in main sections -->
|
2144
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2145
|
+
<xsl:choose>
|
2146
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2147
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2148
|
+
</xsl:when>
|
2149
|
+
<xsl:otherwise>
|
2150
|
+
<fo:block/>
|
2151
|
+
</xsl:otherwise>
|
2152
|
+
</xsl:choose>
|
2153
|
+
</xsl:if> -->
|
2154
|
+
|
2155
|
+
|
1952
2156
|
<!-- horizontal row separator -->
|
1953
2157
|
|
1954
2158
|
|
@@ -1962,6 +2166,92 @@
|
|
1962
2166
|
</fo:table-footer>
|
1963
2167
|
|
1964
2168
|
</xsl:if>
|
2169
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2170
|
+
<xsl:param name="table_attributes"/>
|
2171
|
+
<xsl:param name="colwidths"/>
|
2172
|
+
|
2173
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2174
|
+
|
2175
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2176
|
+
|
2177
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
2178
|
+
|
2179
|
+
<fo:table keep-with-previous="always">
|
2180
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2181
|
+
<xsl:choose>
|
2182
|
+
<xsl:when test="@name = 'border-top'">
|
2183
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
2184
|
+
</xsl:when>
|
2185
|
+
<xsl:when test="@name = 'border'">
|
2186
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2187
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
2188
|
+
</xsl:when>
|
2189
|
+
<xsl:otherwise>
|
2190
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2191
|
+
</xsl:otherwise>
|
2192
|
+
</xsl:choose>
|
2193
|
+
</xsl:for-each>
|
2194
|
+
|
2195
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2196
|
+
<xsl:choose>
|
2197
|
+
<xsl:when test=". = 1 or . = 0">
|
2198
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2199
|
+
</xsl:when>
|
2200
|
+
<xsl:otherwise>
|
2201
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2202
|
+
</xsl:otherwise>
|
2203
|
+
</xsl:choose>
|
2204
|
+
</xsl:for-each>
|
2205
|
+
|
2206
|
+
<fo:table-body>
|
2207
|
+
<fo:table-row>
|
2208
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
2209
|
+
|
2210
|
+
|
2211
|
+
|
2212
|
+
<xsl:if test="ancestor::*[local-name()='preface']">
|
2213
|
+
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
2214
|
+
</xsl:if>
|
2215
|
+
|
2216
|
+
<!-- fn will be processed inside 'note' processing -->
|
2217
|
+
|
2218
|
+
|
2219
|
+
|
2220
|
+
|
2221
|
+
|
2222
|
+
|
2223
|
+
|
2224
|
+
<!-- except gb -->
|
2225
|
+
|
2226
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2227
|
+
|
2228
|
+
|
2229
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2230
|
+
<xsl:choose>
|
2231
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2232
|
+
show Note under table in preface (ex. abstract) sections
|
2233
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2234
|
+
</xsl:when>
|
2235
|
+
<xsl:otherwise>
|
2236
|
+
empty, because notes show at page side in main sections
|
2237
|
+
<fo:block/>
|
2238
|
+
</xsl:otherwise>
|
2239
|
+
</xsl:choose>
|
2240
|
+
</xsl:if> -->
|
2241
|
+
|
2242
|
+
|
2243
|
+
<!-- horizontal row separator -->
|
2244
|
+
|
2245
|
+
|
2246
|
+
<!-- fn processing -->
|
2247
|
+
<xsl:call-template name="fn_display"/>
|
2248
|
+
|
2249
|
+
</fo:table-cell>
|
2250
|
+
</fo:table-row>
|
2251
|
+
</fo:table-body>
|
2252
|
+
|
2253
|
+
</fo:table>
|
2254
|
+
</xsl:if>
|
1965
2255
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1966
2256
|
|
1967
2257
|
<xsl:variable name="cols-count">
|
@@ -1979,6 +2269,8 @@
|
|
1979
2269
|
</xsl:choose>
|
1980
2270
|
</xsl:variable>
|
1981
2271
|
|
2272
|
+
|
2273
|
+
|
1982
2274
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1983
2275
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1984
2276
|
</xsl:apply-templates>
|
@@ -1988,6 +2280,8 @@
|
|
1988
2280
|
</xsl:call-template>
|
1989
2281
|
|
1990
2282
|
<fo:table-body>
|
2283
|
+
|
2284
|
+
|
1991
2285
|
<xsl:apply-templates/>
|
1992
2286
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1993
2287
|
|
@@ -2011,6 +2305,11 @@
|
|
2011
2305
|
</xsl:if>
|
2012
2306
|
|
2013
2307
|
|
2308
|
+
|
2309
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2310
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
2311
|
+
</xsl:if> -->
|
2312
|
+
|
2014
2313
|
<xsl:apply-templates/>
|
2015
2314
|
</fo:table-row>
|
2016
2315
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -2036,6 +2335,8 @@
|
|
2036
2335
|
|
2037
2336
|
|
2038
2337
|
|
2338
|
+
|
2339
|
+
|
2039
2340
|
<xsl:if test="@colspan">
|
2040
2341
|
<xsl:attribute name="number-columns-spanned">
|
2041
2342
|
<xsl:value-of select="@colspan"/>
|
@@ -2046,10 +2347,22 @@
|
|
2046
2347
|
<xsl:value-of select="@rowspan"/>
|
2047
2348
|
</xsl:attribute>
|
2048
2349
|
</xsl:if>
|
2350
|
+
<xsl:call-template name="display-align"/>
|
2049
2351
|
<fo:block>
|
2050
2352
|
<xsl:apply-templates/>
|
2051
2353
|
</fo:block>
|
2052
2354
|
</fo:table-cell>
|
2355
|
+
</xsl:template><xsl:template name="display-align">
|
2356
|
+
<xsl:if test="@valign">
|
2357
|
+
<xsl:attribute name="display-align">
|
2358
|
+
<xsl:choose>
|
2359
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2360
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2361
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2362
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2363
|
+
</xsl:choose>
|
2364
|
+
</xsl:attribute>
|
2365
|
+
</xsl:if>
|
2053
2366
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2054
2367
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2055
2368
|
<xsl:attribute name="text-align">
|
@@ -2068,7 +2381,9 @@
|
|
2068
2381
|
<xsl:attribute name="display-align">before</xsl:attribute>
|
2069
2382
|
|
2070
2383
|
|
2071
|
-
|
2384
|
+
|
2385
|
+
|
2386
|
+
|
2072
2387
|
|
2073
2388
|
|
2074
2389
|
|
@@ -2084,8 +2399,8 @@
|
|
2084
2399
|
<xsl:value-of select="@rowspan"/>
|
2085
2400
|
</xsl:attribute>
|
2086
2401
|
</xsl:if>
|
2087
|
-
<
|
2088
|
-
|
2402
|
+
<xsl:call-template name="display-align"/>
|
2403
|
+
<fo:block>
|
2089
2404
|
<xsl:apply-templates/>
|
2090
2405
|
</fo:block>
|
2091
2406
|
</fo:table-cell>
|
@@ -2097,14 +2412,17 @@
|
|
2097
2412
|
|
2098
2413
|
|
2099
2414
|
|
2415
|
+
|
2416
|
+
|
2100
2417
|
<fo:inline padding-right="2mm">
|
2101
2418
|
|
2102
2419
|
|
2103
2420
|
|
2104
|
-
|
2421
|
+
|
2105
2422
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2106
2423
|
|
2107
2424
|
</fo:inline>
|
2425
|
+
|
2108
2426
|
<xsl:apply-templates mode="process"/>
|
2109
2427
|
</fo:block>
|
2110
2428
|
|
@@ -2137,6 +2455,7 @@
|
|
2137
2455
|
<xsl:attribute name="text-indent">-5mm</xsl:attribute>
|
2138
2456
|
<xsl:attribute name="start-indent">5mm</xsl:attribute>
|
2139
2457
|
|
2458
|
+
|
2140
2459
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
2141
2460
|
|
2142
2461
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -2149,8 +2468,10 @@
|
|
2149
2468
|
<xsl:attribute name="font-size">70%</xsl:attribute>
|
2150
2469
|
|
2151
2470
|
|
2471
|
+
|
2152
2472
|
<xsl:value-of select="@reference"/>
|
2153
2473
|
|
2474
|
+
|
2154
2475
|
<!-- <xsl:if test="@preface = 'true'"> -->
|
2155
2476
|
<xsl:text>)</xsl:text>
|
2156
2477
|
<!-- </xsl:if> -->
|
@@ -2158,7 +2479,8 @@
|
|
2158
2479
|
</fo:inline>
|
2159
2480
|
<fo:inline>
|
2160
2481
|
|
2161
|
-
<xsl:apply-templates/>
|
2482
|
+
<!-- <xsl:apply-templates /> -->
|
2483
|
+
<xsl:copy-of select="./node()"/>
|
2162
2484
|
</fo:inline>
|
2163
2485
|
</fo:block>
|
2164
2486
|
</xsl:if>
|
@@ -2195,7 +2517,20 @@
|
|
2195
2517
|
<xsl:variable name="following_dl_colwidths">
|
2196
2518
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
2197
2519
|
<xsl:variable name="html-table">
|
2198
|
-
<xsl:variable name="
|
2520
|
+
<xsl:variable name="doc_ns">
|
2521
|
+
|
2522
|
+
</xsl:variable>
|
2523
|
+
<xsl:variable name="ns">
|
2524
|
+
<xsl:choose>
|
2525
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2526
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2527
|
+
</xsl:when>
|
2528
|
+
<xsl:otherwise>
|
2529
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2530
|
+
</xsl:otherwise>
|
2531
|
+
</xsl:choose>
|
2532
|
+
</xsl:variable>
|
2533
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2199
2534
|
<xsl:element name="{$ns}:table">
|
2200
2535
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2201
2536
|
<tbody>
|
@@ -2260,7 +2595,8 @@
|
|
2260
2595
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2261
2596
|
</xsl:if>
|
2262
2597
|
|
2263
|
-
<xsl:apply-templates/>
|
2598
|
+
<!-- <xsl:apply-templates /> -->
|
2599
|
+
<xsl:copy-of select="./node()"/>
|
2264
2600
|
</fo:block>
|
2265
2601
|
</fo:table-cell>
|
2266
2602
|
</fo:table-row>
|
@@ -2277,13 +2613,17 @@
|
|
2277
2613
|
|
2278
2614
|
|
2279
2615
|
|
2616
|
+
|
2280
2617
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2281
2618
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2282
2619
|
|
2283
2620
|
|
2621
|
+
|
2284
2622
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2285
2623
|
|
2624
|
+
|
2286
2625
|
<xsl:value-of select="@reference"/>
|
2626
|
+
|
2287
2627
|
</fo:basic-link>
|
2288
2628
|
</fo:inline>
|
2289
2629
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -2291,124 +2631,151 @@
|
|
2291
2631
|
<xsl:apply-templates/>
|
2292
2632
|
</fo:inline>
|
2293
2633
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2294
|
-
<
|
2295
|
-
|
2296
|
-
|
2297
|
-
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2634
|
+
<fo:block-container margin-left="0mm">
|
2635
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2636
|
+
<xsl:attribute name="margin-left">
|
2637
|
+
<xsl:choose>
|
2638
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2639
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2640
|
+
</xsl:choose>
|
2641
|
+
</xsl:attribute>
|
2302
2642
|
|
2643
|
+
</xsl:if>
|
2644
|
+
<fo:block-container margin-left="0mm">
|
2645
|
+
|
2646
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
2303
2647
|
|
2304
|
-
|
2305
|
-
|
2306
|
-
|
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>
|
2316
|
-
|
2317
|
-
</xsl:when>
|
2318
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
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>
|
2352
|
-
|
2353
|
-
|
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
|
-
|
2648
|
+
<xsl:variable name="key_iso">
|
2649
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2650
|
+
</xsl:variable>
|
2361
2651
|
|
2652
|
+
<xsl:choose>
|
2653
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2654
|
+
|
2655
|
+
|
2656
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2657
|
+
|
2658
|
+
<xsl:variable name="title-where">
|
2659
|
+
<xsl:call-template name="getTitle">
|
2660
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2661
|
+
</xsl:call-template>
|
2662
|
+
</xsl:variable>
|
2663
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2664
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2665
|
+
<xsl:text/>
|
2666
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2667
|
+
</fo:block>
|
2668
|
+
|
2669
|
+
</xsl:when>
|
2670
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2671
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2672
|
+
|
2673
|
+
|
2674
|
+
|
2675
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2676
|
+
|
2677
|
+
|
2678
|
+
<xsl:variable name="title-where">
|
2679
|
+
<xsl:call-template name="getTitle">
|
2680
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2681
|
+
</xsl:call-template>
|
2682
|
+
</xsl:variable>
|
2683
|
+
<xsl:value-of select="$title-where"/>:
|
2684
|
+
</fo:block>
|
2685
|
+
</xsl:when>
|
2686
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2687
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2688
|
+
|
2689
|
+
|
2690
|
+
|
2691
|
+
<xsl:variable name="title-key">
|
2692
|
+
<xsl:call-template name="getTitle">
|
2693
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2694
|
+
</xsl:call-template>
|
2695
|
+
</xsl:variable>
|
2696
|
+
<xsl:value-of select="$title-key"/>
|
2697
|
+
</fo:block>
|
2698
|
+
</xsl:when>
|
2699
|
+
</xsl:choose>
|
2362
2700
|
|
2363
|
-
|
2364
|
-
|
2365
|
-
|
2366
|
-
|
2367
|
-
|
2368
|
-
<fo:table width="95%" table-layout="fixed">
|
2701
|
+
<!-- a few components -->
|
2702
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2703
|
+
<fo:block>
|
2369
2704
|
|
2370
|
-
|
2371
|
-
<xsl:
|
2372
|
-
|
2373
|
-
</xsl:
|
2374
|
-
<xsl:
|
2375
|
-
<xsl:attribute name="
|
2705
|
+
|
2706
|
+
<xsl:if test="$parent = 'figure' or $parent = 'formula'">
|
2707
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2708
|
+
</xsl:if>
|
2709
|
+
<xsl:if test="$parent = 'li'">
|
2710
|
+
<!-- <xsl:attribute name="margin-left">-4mm</xsl:attribute> -->
|
2711
|
+
</xsl:if>
|
2712
|
+
|
2713
|
+
|
2714
|
+
|
2715
|
+
<fo:block>
|
2716
|
+
|
2717
|
+
|
2718
|
+
|
2719
|
+
|
2720
|
+
<fo:table width="95%" table-layout="fixed">
|
2376
2721
|
|
2377
|
-
|
2378
|
-
|
2379
|
-
|
2380
|
-
|
2381
|
-
|
2382
|
-
|
2383
|
-
|
2384
|
-
|
2385
|
-
</
|
2386
|
-
|
2387
|
-
|
2388
|
-
|
2389
|
-
|
2390
|
-
|
2391
|
-
|
2392
|
-
|
2393
|
-
|
2394
|
-
|
2395
|
-
|
2396
|
-
|
2397
|
-
|
2398
|
-
|
2399
|
-
|
2400
|
-
|
2401
|
-
|
2402
|
-
|
2403
|
-
|
2404
|
-
|
2405
|
-
|
2406
|
-
|
2407
|
-
|
2408
|
-
|
2409
|
-
|
2410
|
-
|
2411
|
-
|
2722
|
+
<xsl:choose>
|
2723
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2724
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2725
|
+
</xsl:when>
|
2726
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2727
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2728
|
+
|
2729
|
+
</xsl:when>
|
2730
|
+
</xsl:choose>
|
2731
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2732
|
+
<xsl:variable name="html-table">
|
2733
|
+
<xsl:variable name="doc_ns">
|
2734
|
+
|
2735
|
+
</xsl:variable>
|
2736
|
+
<xsl:variable name="ns">
|
2737
|
+
<xsl:choose>
|
2738
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2739
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2740
|
+
</xsl:when>
|
2741
|
+
<xsl:otherwise>
|
2742
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2743
|
+
</xsl:otherwise>
|
2744
|
+
</xsl:choose>
|
2745
|
+
</xsl:variable>
|
2746
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2747
|
+
<xsl:element name="{$ns}:table">
|
2748
|
+
<tbody>
|
2749
|
+
<xsl:apply-templates mode="dl"/>
|
2750
|
+
</tbody>
|
2751
|
+
</xsl:element>
|
2752
|
+
</xsl:variable>
|
2753
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2754
|
+
<xsl:variable name="colwidths">
|
2755
|
+
<xsl:call-template name="calculate-column-widths">
|
2756
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2757
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2758
|
+
</xsl:call-template>
|
2759
|
+
</xsl:variable>
|
2760
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2761
|
+
<xsl:variable name="maxlength_dt">
|
2762
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2763
|
+
</xsl:variable>
|
2764
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2765
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2766
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2767
|
+
</xsl:call-template>
|
2768
|
+
<fo:table-body>
|
2769
|
+
<xsl:apply-templates>
|
2770
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2771
|
+
</xsl:apply-templates>
|
2772
|
+
</fo:table-body>
|
2773
|
+
</fo:table>
|
2774
|
+
</fo:block>
|
2775
|
+
</fo:block>
|
2776
|
+
</xsl:if>
|
2777
|
+
</fo:block-container>
|
2778
|
+
</fo:block-container>
|
2412
2779
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
2413
2780
|
<xsl:param name="colwidths"/>
|
2414
2781
|
<xsl:param name="maxlength_dt"/>
|
@@ -2505,6 +2872,7 @@
|
|
2505
2872
|
<xsl:param name="key_iso"/>
|
2506
2873
|
|
2507
2874
|
<fo:table-row>
|
2875
|
+
|
2508
2876
|
<fo:table-cell>
|
2509
2877
|
|
2510
2878
|
<xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
|
@@ -2527,6 +2895,7 @@
|
|
2527
2895
|
</xsl:if>
|
2528
2896
|
|
2529
2897
|
|
2898
|
+
|
2530
2899
|
<xsl:apply-templates/>
|
2531
2900
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2532
2901
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2540,14 +2909,36 @@
|
|
2540
2909
|
|
2541
2910
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
2542
2911
|
|
2543
|
-
|
2912
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2913
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
2914
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2915
|
+
</xsl:if>
|
2916
|
+
</xsl:if> -->
|
2544
2917
|
|
2545
2918
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2546
2919
|
|
2547
2920
|
</fo:block>
|
2548
2921
|
</fo:table-cell>
|
2549
2922
|
</fo:table-row>
|
2550
|
-
|
2923
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2924
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
2925
|
+
<fo:table-row>
|
2926
|
+
<fo:table-cell>
|
2927
|
+
<fo:block margin-top="6pt">
|
2928
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2929
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2930
|
+
</xsl:if>
|
2931
|
+
<xsl:text> </xsl:text>
|
2932
|
+
</fo:block>
|
2933
|
+
</fo:table-cell>
|
2934
|
+
<fo:table-cell>
|
2935
|
+
<fo:block>
|
2936
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2937
|
+
</fo:block>
|
2938
|
+
</fo:table-cell>
|
2939
|
+
</fo:table-row>
|
2940
|
+
</xsl:if>
|
2941
|
+
</xsl:if> -->
|
2551
2942
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2552
2943
|
<xsl:apply-templates/>
|
2553
2944
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -2572,6 +2963,31 @@
|
|
2572
2963
|
</fo:inline>
|
2573
2964
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2574
2965
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2966
|
+
<xsl:variable name="_font-size">
|
2967
|
+
|
2968
|
+
|
2969
|
+
|
2970
|
+
|
2971
|
+
|
2972
|
+
|
2973
|
+
|
2974
|
+
|
2975
|
+
|
2976
|
+
|
2977
|
+
|
2978
|
+
|
2979
|
+
|
2980
|
+
|
2981
|
+
</xsl:variable>
|
2982
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2983
|
+
<xsl:if test="$font-size != ''">
|
2984
|
+
<xsl:attribute name="font-size">
|
2985
|
+
<xsl:choose>
|
2986
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2987
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2988
|
+
</xsl:choose>
|
2989
|
+
</xsl:attribute>
|
2990
|
+
</xsl:if>
|
2575
2991
|
<xsl:apply-templates/>
|
2576
2992
|
</fo:inline>
|
2577
2993
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2897,11 +3313,24 @@
|
|
2897
3313
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2898
3314
|
<xsl:value-of select="substring($str, 2)"/>
|
2899
3315
|
</xsl:template><xsl:template match="mathml:math">
|
2900
|
-
<fo:inline font-family="
|
2901
|
-
<
|
2902
|
-
<xsl:
|
2903
|
-
</
|
3316
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3317
|
+
<xsl:variable name="mathml">
|
3318
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
3319
|
+
</xsl:variable>
|
3320
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
3321
|
+
<!-- <xsl:copy-of select="."/> -->
|
3322
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3323
|
+
</fo:instream-foreign-object>
|
2904
3324
|
</fo:inline>
|
3325
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3326
|
+
<xsl:copy>
|
3327
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3328
|
+
</xsl:copy>
|
3329
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
3330
|
+
<xsl:copy>
|
3331
|
+
<!-- replace start and end spaces to non-break space -->
|
3332
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3333
|
+
</xsl:copy>
|
2905
3334
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2906
3335
|
<xsl:variable name="target">
|
2907
3336
|
<xsl:choose>
|
@@ -2978,13 +3407,26 @@
|
|
2978
3407
|
<xsl:apply-templates/>
|
2979
3408
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2980
3409
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2981
|
-
|
3410
|
+
|
2982
3411
|
<xsl:apply-templates/>
|
2983
3412
|
</fo:basic-link>
|
2984
3413
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2985
|
-
<fo:block
|
2986
|
-
<xsl:
|
2987
|
-
|
3414
|
+
<fo:block-container margin-left="0mm">
|
3415
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3416
|
+
<xsl:attribute name="margin-left">
|
3417
|
+
<xsl:choose>
|
3418
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3419
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3420
|
+
</xsl:choose>
|
3421
|
+
</xsl:attribute>
|
3422
|
+
|
3423
|
+
</xsl:if>
|
3424
|
+
<fo:block-container margin-left="0mm">
|
3425
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3426
|
+
<xsl:apply-templates/>
|
3427
|
+
</fo:block>
|
3428
|
+
</fo:block-container>
|
3429
|
+
</fo:block-container>
|
2988
3430
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2989
3431
|
<fo:inline>
|
2990
3432
|
<xsl:apply-templates/>
|
@@ -3022,6 +3464,8 @@
|
|
3022
3464
|
|
3023
3465
|
|
3024
3466
|
|
3467
|
+
|
3468
|
+
|
3025
3469
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3026
3470
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3027
3471
|
</fo:inline>
|
@@ -3048,7 +3492,9 @@
|
|
3048
3492
|
</xsl:choose>
|
3049
3493
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3050
3494
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3051
|
-
<xsl:
|
3495
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3496
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3497
|
+
</fo:inline>
|
3052
3498
|
<xsl:apply-templates/>
|
3053
3499
|
</fo:block>
|
3054
3500
|
</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">
|
@@ -3147,15 +3593,109 @@
|
|
3147
3593
|
|
3148
3594
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3149
3595
|
</fo:block>
|
3150
|
-
</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">
|
3596
|
+
</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">
|
3151
3597
|
<xsl:apply-templates mode="contents"/>
|
3152
3598
|
<xsl:text> </xsl:text>
|
3153
|
-
</xsl:template><xsl:template match="
|
3599
|
+
</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">
|
3600
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3601
|
+
<xsl:text> </xsl:text>
|
3602
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3603
|
+
<xsl:value-of select="."/>
|
3604
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3154
3605
|
<xsl:value-of select="."/>
|
3155
|
-
</xsl:template><xsl:template match="
|
3606
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3607
|
+
<xsl:apply-templates mode="contents"/>
|
3608
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3609
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3610
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3611
|
+
<xsl:apply-templates select="."/>
|
3612
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3613
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3614
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3615
|
+
<xsl:param name="contents"/>
|
3616
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3617
|
+
<fo:bookmark-tree>
|
3618
|
+
<xsl:choose>
|
3619
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3620
|
+
<xsl:choose>
|
3621
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3622
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3623
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3624
|
+
<fo:bookmark-title>
|
3625
|
+
<xsl:variable name="bookmark-title_">
|
3626
|
+
<xsl:call-template name="getLangVersion">
|
3627
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3628
|
+
</xsl:call-template>
|
3629
|
+
</xsl:variable>
|
3630
|
+
<xsl:choose>
|
3631
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3632
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3633
|
+
</xsl:when>
|
3634
|
+
<xsl:otherwise>
|
3635
|
+
<xsl:choose>
|
3636
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3637
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3638
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3639
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3640
|
+
</xsl:choose>
|
3641
|
+
</xsl:otherwise>
|
3642
|
+
</xsl:choose>
|
3643
|
+
</fo:bookmark-title>
|
3644
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3645
|
+
</fo:bookmark>
|
3646
|
+
|
3647
|
+
</xsl:for-each>
|
3648
|
+
</xsl:when>
|
3649
|
+
<xsl:otherwise>
|
3650
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3651
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3652
|
+
</xsl:for-each>
|
3653
|
+
</xsl:otherwise>
|
3654
|
+
</xsl:choose>
|
3655
|
+
</xsl:when>
|
3656
|
+
<xsl:otherwise>
|
3657
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3658
|
+
</xsl:otherwise>
|
3659
|
+
</xsl:choose>
|
3660
|
+
|
3661
|
+
|
3662
|
+
|
3663
|
+
|
3664
|
+
|
3665
|
+
|
3666
|
+
|
3667
|
+
|
3668
|
+
</fo:bookmark-tree>
|
3669
|
+
</xsl:if>
|
3670
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3671
|
+
<xsl:param name="lang"/>
|
3672
|
+
<xsl:choose>
|
3673
|
+
<xsl:when test="$lang = 'en'">
|
3674
|
+
|
3675
|
+
|
3676
|
+
</xsl:when>
|
3677
|
+
<xsl:when test="$lang = 'fr'">
|
3678
|
+
|
3679
|
+
|
3680
|
+
</xsl:when>
|
3681
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3682
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3683
|
+
</xsl:choose>
|
3684
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3685
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3686
|
+
<fo:bookmark-title>
|
3687
|
+
<xsl:if test="@section != ''">
|
3688
|
+
<xsl:value-of select="@section"/>
|
3689
|
+
<xsl:text> </xsl:text>
|
3690
|
+
</xsl:if>
|
3691
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3692
|
+
</fo:bookmark-title>
|
3693
|
+
<xsl:apply-templates mode="bookmark"/>
|
3694
|
+
</fo:bookmark>
|
3695
|
+
</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">
|
3156
3696
|
<xsl:if test="normalize-space() != ''">
|
3157
3697
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3158
|
-
|
3698
|
+
|
3159
3699
|
<xsl:apply-templates/>
|
3160
3700
|
</fo:block>
|
3161
3701
|
</xsl:if>
|
@@ -3210,7 +3750,7 @@
|
|
3210
3750
|
<xsl:apply-templates/>
|
3211
3751
|
</xsl:otherwise>
|
3212
3752
|
</xsl:choose>
|
3213
|
-
</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">
|
3753
|
+
</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">
|
3214
3754
|
<xsl:text> </xsl:text>
|
3215
3755
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
3216
3756
|
<xsl:copy>
|
@@ -3219,21 +3759,61 @@
|
|
3219
3759
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3220
3760
|
<xsl:text> </xsl:text>
|
3221
3761
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3222
|
-
|
3223
|
-
|
3224
|
-
|
3225
|
-
|
3226
|
-
|
3762
|
+
|
3763
|
+
<fo:block-container margin-left="0mm">
|
3764
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3765
|
+
<xsl:attribute name="margin-left">
|
3766
|
+
<xsl:choose>
|
3767
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3768
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3769
|
+
</xsl:choose>
|
3770
|
+
</xsl:attribute>
|
3771
|
+
|
3772
|
+
</xsl:if>
|
3773
|
+
<fo:block-container margin-left="0mm">
|
3774
|
+
|
3775
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3776
|
+
<xsl:variable name="_font-size">
|
3777
|
+
|
3778
|
+
|
3779
|
+
|
3780
|
+
|
3781
|
+
|
3782
|
+
|
3783
|
+
10
|
3784
|
+
|
3785
|
+
|
3786
|
+
|
3787
|
+
|
3788
|
+
|
3789
|
+
|
3790
|
+
|
3791
|
+
</xsl:variable>
|
3792
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3793
|
+
<xsl:if test="$font-size != ''">
|
3794
|
+
<xsl:attribute name="font-size">
|
3795
|
+
<xsl:choose>
|
3796
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3797
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3798
|
+
</xsl:choose>
|
3799
|
+
</xsl:attribute>
|
3800
|
+
</xsl:if>
|
3801
|
+
<xsl:apply-templates/>
|
3802
|
+
</fo:block>
|
3803
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3804
|
+
|
3805
|
+
</fo:block-container>
|
3806
|
+
</fo:block-container>
|
3807
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
3227
3808
|
<xsl:variable name="text">
|
3228
3809
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
3229
3810
|
</xsl:variable>
|
3230
|
-
<xsl:call-template name="add-zero-spaces">
|
3811
|
+
<xsl:call-template name="add-zero-spaces-java">
|
3231
3812
|
<xsl:with-param name="text" select="$text"/>
|
3232
3813
|
</xsl:call-template>
|
3233
3814
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
3234
3815
|
<xsl:if test="normalize-space() != ''">
|
3235
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3236
|
-
|
3816
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3237
3817
|
<xsl:apply-templates/>
|
3238
3818
|
</fo:block>
|
3239
3819
|
</xsl:if>
|
@@ -3303,22 +3883,30 @@
|
|
3303
3883
|
</fo:block>
|
3304
3884
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3305
3885
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3886
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3887
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3888
|
+
</xsl:if>
|
3306
3889
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3307
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="
|
3890
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3891
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3892
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3893
|
+
</xsl:if>
|
3308
3894
|
<xsl:variable name="simple-table">
|
3309
3895
|
<xsl:call-template name="getSimpleTable"/>
|
3310
3896
|
</xsl:variable>
|
3311
3897
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3312
3898
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3313
|
-
<fo:table-column column-width="35mm"/>
|
3314
|
-
<fo:table-column column-width="115mm"/>
|
3899
|
+
<!-- <fo:table-column column-width="35mm"/>
|
3900
|
+
<fo:table-column column-width="115mm"/> -->
|
3901
|
+
<fo:table-column column-width="30%"/>
|
3902
|
+
<fo:table-column column-width="70%"/>
|
3315
3903
|
</xsl:if>
|
3316
3904
|
<xsl:apply-templates mode="requirement"/>
|
3317
3905
|
</fo:table>
|
3318
3906
|
<!-- fn processing -->
|
3319
3907
|
<xsl:if test=".//*[local-name() = 'fn']">
|
3320
3908
|
<xsl:for-each select="*[local-name() = 'tbody']">
|
3321
|
-
<fo:block font-size="90%" border-bottom="
|
3909
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
3322
3910
|
<xsl:call-template name="fn_display"/>
|
3323
3911
|
</fo:block>
|
3324
3912
|
</xsl:for-each>
|
@@ -3334,17 +3922,27 @@
|
|
3334
3922
|
<xsl:apply-templates mode="requirement"/>
|
3335
3923
|
</fo:table-body>
|
3336
3924
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3337
|
-
<fo:table-row>
|
3925
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3926
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3927
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3928
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3929
|
+
</xsl:if>
|
3930
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3931
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3932
|
+
</xsl:if>
|
3933
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3934
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3935
|
+
</xsl:if>
|
3338
3936
|
<xsl:apply-templates mode="requirement"/>
|
3339
3937
|
</fo:table-row>
|
3340
3938
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3341
|
-
<fo:table-cell text-align="{@align}">
|
3939
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3342
3940
|
<xsl:attribute name="text-align">
|
3343
3941
|
<xsl:choose>
|
3344
3942
|
<xsl:when test="@align">
|
3345
3943
|
<xsl:value-of select="@align"/>
|
3346
3944
|
</xsl:when>
|
3347
|
-
<xsl:otherwise>
|
3945
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3348
3946
|
</xsl:choose>
|
3349
3947
|
</xsl:attribute>
|
3350
3948
|
<xsl:if test="@colspan">
|
@@ -3357,22 +3955,27 @@
|
|
3357
3955
|
<xsl:value-of select="@rowspan"/>
|
3358
3956
|
</xsl:attribute>
|
3359
3957
|
</xsl:if>
|
3958
|
+
<xsl:call-template name="display-align"/>
|
3360
3959
|
|
3361
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3960
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3362
3961
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3363
3962
|
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
3364
3963
|
</xsl:if>
|
3365
3964
|
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
3366
3965
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3367
3966
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3368
|
-
</xsl:if>
|
3967
|
+
</xsl:if> -->
|
3369
3968
|
|
3370
3969
|
<fo:block>
|
3371
3970
|
<xsl:apply-templates/>
|
3372
3971
|
</fo:block>
|
3373
3972
|
</fo:table-cell>
|
3374
3973
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3375
|
-
<fo:table-cell text-align="{@align}">
|
3974
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3975
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3976
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3977
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
3978
|
+
</xsl:if>
|
3376
3979
|
<xsl:attribute name="text-align">
|
3377
3980
|
<xsl:choose>
|
3378
3981
|
<xsl:when test="@align">
|
@@ -3381,6 +3984,9 @@
|
|
3381
3984
|
<xsl:otherwise>left</xsl:otherwise>
|
3382
3985
|
</xsl:choose>
|
3383
3986
|
</xsl:attribute>
|
3987
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3988
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3989
|
+
</xsl:if>
|
3384
3990
|
<xsl:if test="@colspan">
|
3385
3991
|
<xsl:attribute name="number-columns-spanned">
|
3386
3992
|
<xsl:value-of select="@colspan"/>
|
@@ -3391,25 +3997,27 @@
|
|
3391
3997
|
<xsl:value-of select="@rowspan"/>
|
3392
3998
|
</xsl:attribute>
|
3393
3999
|
</xsl:if>
|
4000
|
+
<xsl:call-template name="display-align"/>
|
3394
4001
|
|
3395
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4002
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3396
4003
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
3397
|
-
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3398
|
-
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
4004
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4005
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3399
4006
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3400
4007
|
</xsl:if>
|
3401
|
-
</xsl:if>
|
4008
|
+
</xsl:if> -->
|
4009
|
+
<!-- 2nd line and below -->
|
3402
4010
|
|
3403
4011
|
<fo:block>
|
3404
4012
|
<xsl:apply-templates/>
|
3405
4013
|
</fo:block>
|
3406
4014
|
</fo:table-cell>
|
3407
4015
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3408
|
-
<fo:block font-size="11pt" font-weight="bold"
|
4016
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3409
4017
|
<xsl:apply-templates/>
|
3410
4018
|
</fo:block>
|
3411
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3412
|
-
<fo:block margin-bottom="10pt"
|
4019
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
4020
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
3413
4021
|
<xsl:apply-templates/>
|
3414
4022
|
</fo:block>
|
3415
4023
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
@@ -3431,12 +4039,13 @@
|
|
3431
4039
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3432
4040
|
|
3433
4041
|
<xsl:variable name="element">
|
3434
|
-
block
|
4042
|
+
block
|
3435
4043
|
|
4044
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3436
4045
|
</xsl:variable>
|
3437
4046
|
|
3438
4047
|
<xsl:choose>
|
3439
|
-
<xsl:when test="normalize-space($element)
|
4048
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3440
4049
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
3441
4050
|
<xsl:apply-templates/>
|
3442
4051
|
</fo:block>
|
@@ -3473,25 +4082,44 @@
|
|
3473
4082
|
</xsl:otherwise>
|
3474
4083
|
</xsl:choose>
|
3475
4084
|
|
3476
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3477
|
-
|
4085
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
4086
|
+
|
4087
|
+
<xsl:variable name="element">
|
4088
|
+
block
|
3478
4089
|
|
3479
|
-
|
3480
|
-
|
4090
|
+
</xsl:variable>
|
4091
|
+
<xsl:choose>
|
4092
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
4093
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
4094
|
+
|
4095
|
+
<xsl:apply-templates/>
|
4096
|
+
</fo:block>
|
4097
|
+
</xsl:when>
|
4098
|
+
<xsl:otherwise>
|
4099
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
4100
|
+
<xsl:apply-templates/>
|
4101
|
+
</fo:inline>
|
4102
|
+
</xsl:otherwise>
|
4103
|
+
</xsl:choose>
|
3481
4104
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3482
4105
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3483
4106
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3484
4107
|
<xsl:variable name="termsource_text">
|
3485
4108
|
<xsl:apply-templates/>
|
3486
4109
|
</xsl:variable>
|
4110
|
+
|
3487
4111
|
<xsl:choose>
|
3488
4112
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3489
4113
|
<xsl:apply-templates/>
|
3490
4114
|
</xsl:when>
|
3491
|
-
<xsl:otherwise>
|
3492
|
-
|
3493
|
-
|
3494
|
-
|
4115
|
+
<xsl:otherwise>
|
4116
|
+
|
4117
|
+
<xsl:text>[</xsl:text>
|
4118
|
+
|
4119
|
+
<xsl:apply-templates/>
|
4120
|
+
|
4121
|
+
<xsl:text>]</xsl:text>
|
4122
|
+
|
3495
4123
|
</xsl:otherwise>
|
3496
4124
|
</xsl:choose>
|
3497
4125
|
</fo:block>
|
@@ -3512,18 +4140,29 @@
|
|
3512
4140
|
<xsl:if test="normalize-space() != ''">
|
3513
4141
|
<xsl:value-of select="."/>
|
3514
4142
|
</xsl:if>
|
3515
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
4143
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
4144
|
+
<fo:block-container margin-left="0mm">
|
4145
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4146
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
4147
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
4148
|
+
</xsl:if>
|
4149
|
+
</xsl:if>
|
4150
|
+
|
4151
|
+
<fo:block-container margin-left="0mm">
|
3516
4152
|
|
3517
|
-
|
3518
|
-
|
3519
|
-
|
3520
|
-
|
3521
|
-
|
3522
|
-
|
3523
|
-
|
3524
|
-
|
3525
|
-
|
3526
|
-
|
4153
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
4154
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
4155
|
+
</fo:block>
|
4156
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4157
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
4158
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
4159
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
4160
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
4161
|
+
</fo:block>
|
4162
|
+
</xsl:if>
|
4163
|
+
|
4164
|
+
</fo:block-container>
|
4165
|
+
</fo:block-container>
|
3527
4166
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3528
4167
|
<xsl:if test="../*[local-name() = 'author']">
|
3529
4168
|
<xsl:text>, </xsl:text>
|
@@ -3551,6 +4190,7 @@
|
|
3551
4190
|
<xsl:if test="@type = 'inline'">
|
3552
4191
|
|
3553
4192
|
|
4193
|
+
|
3554
4194
|
</xsl:if>
|
3555
4195
|
|
3556
4196
|
|
@@ -3591,6 +4231,7 @@
|
|
3591
4231
|
|
3592
4232
|
|
3593
4233
|
|
4234
|
+
|
3594
4235
|
</xsl:variable>
|
3595
4236
|
|
3596
4237
|
<xsl:variable name="padding-right">
|
@@ -3681,6 +4322,7 @@
|
|
3681
4322
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3682
4323
|
<fo:block>
|
3683
4324
|
<xsl:call-template name="setId"/>
|
4325
|
+
|
3684
4326
|
<xsl:apply-templates/>
|
3685
4327
|
</fo:block>
|
3686
4328
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -3705,6 +4347,31 @@
|
|
3705
4347
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3706
4348
|
<!-- 0xA0 to space replacement -->
|
3707
4349
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4350
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4351
|
+
<xsl:choose>
|
4352
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
4353
|
+
<fo:block-container>
|
4354
|
+
<xsl:attribute name="margin-left">
|
4355
|
+
<xsl:choose>
|
4356
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4357
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4358
|
+
</xsl:choose>
|
4359
|
+
</xsl:attribute>
|
4360
|
+
|
4361
|
+
|
4362
|
+
<fo:block-container margin-left="0mm">
|
4363
|
+
<fo:block>
|
4364
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4365
|
+
</fo:block>
|
4366
|
+
</fo:block-container>
|
4367
|
+
</fo:block-container>
|
4368
|
+
</xsl:when>
|
4369
|
+
<xsl:otherwise>
|
4370
|
+
<fo:block>
|
4371
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4372
|
+
</fo:block>
|
4373
|
+
</xsl:otherwise>
|
4374
|
+
</xsl:choose>
|
3708
4375
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3709
4376
|
<!-- <row>
|
3710
4377
|
<date>05-07-2013</date>
|
@@ -3736,6 +4403,65 @@
|
|
3736
4403
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3737
4404
|
<fo:block><xsl:apply-templates/></fo:block>
|
3738
4405
|
</fo:table-cell>
|
4406
|
+
</xsl:template><xsl:template name="processBibitem">
|
4407
|
+
|
4408
|
+
|
4409
|
+
|
4410
|
+
|
4411
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4412
|
+
<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')]"/>
|
4413
|
+
<xsl:choose>
|
4414
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4415
|
+
<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"/>
|
4416
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4417
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4418
|
+
</xsl:if>
|
4419
|
+
<xsl:value-of select="$_doc_ident"/>
|
4420
|
+
</xsl:when>
|
4421
|
+
<xsl:otherwise>
|
4422
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4423
|
+
<xsl:if test="$type != ''">
|
4424
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4425
|
+
</xsl:if>
|
4426
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4427
|
+
</xsl:otherwise>
|
4428
|
+
</xsl:choose>
|
4429
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
4430
|
+
<xsl:choose>
|
4431
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
4432
|
+
<author>
|
4433
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4434
|
+
</author>
|
4435
|
+
</xsl:when>
|
4436
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
4437
|
+
<author>
|
4438
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4439
|
+
<xsl:text> </xsl:text>
|
4440
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
4441
|
+
</author>
|
4442
|
+
</xsl:when>
|
4443
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
4444
|
+
<author>
|
4445
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4446
|
+
<xsl:text> </xsl:text>
|
4447
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
4448
|
+
</author>
|
4449
|
+
</xsl:when>
|
4450
|
+
<xsl:otherwise>
|
4451
|
+
<xsl:apply-templates/>
|
4452
|
+
</xsl:otherwise>
|
4453
|
+
</xsl:choose>
|
4454
|
+
</xsl:template><xsl:template name="renderDate">
|
4455
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
4456
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
4457
|
+
</xsl:if>
|
4458
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
4459
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
4460
|
+
</xsl:if>
|
4461
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
4462
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
4463
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4464
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
3739
4465
|
</xsl:template><xsl:template name="convertDate">
|
3740
4466
|
<xsl:param name="date"/>
|
3741
4467
|
<xsl:param name="format" select="'short'"/>
|
@@ -3817,6 +4543,7 @@
|
|
3817
4543
|
|
3818
4544
|
|
3819
4545
|
|
4546
|
+
|
3820
4547
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@type='main']"/>
|
3821
4548
|
|
3822
4549
|
</xsl:variable>
|
@@ -3834,6 +4561,7 @@
|
|
3834
4561
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
3835
4562
|
|
3836
4563
|
|
4564
|
+
|
3837
4565
|
</dc:creator>
|
3838
4566
|
<dc:description>
|
3839
4567
|
<xsl:variable name="abstract">
|
@@ -3843,6 +4571,7 @@
|
|
3843
4571
|
|
3844
4572
|
<xsl:copy-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'abstract']//text()"/>
|
3845
4573
|
|
4574
|
+
|
3846
4575
|
</xsl:variable>
|
3847
4576
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3848
4577
|
</dc:description>
|
@@ -3943,6 +4672,7 @@
|
|
3943
4672
|
|
3944
4673
|
|
3945
4674
|
|
4675
|
+
|
3946
4676
|
</xsl:variable>
|
3947
4677
|
<xsl:if test="$documentNS != $XSLNS">
|
3948
4678
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3968,4 +4698,21 @@
|
|
3968
4698
|
</xsl:otherwise>
|
3969
4699
|
</xsl:choose>
|
3970
4700
|
</xsl:attribute>
|
4701
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4702
|
+
<xsl:param name="text"/>
|
4703
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4704
|
+
<xsl:if test="string-length($text) > 0">
|
4705
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4706
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4707
|
+
<xsl:if test="$char = '®'">
|
4708
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4709
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4710
|
+
</xsl:if>
|
4711
|
+
<xsl:value-of select="$char"/>
|
4712
|
+
</fo:inline>
|
4713
|
+
<xsl:call-template name="add-letter-spacing">
|
4714
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4715
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4716
|
+
</xsl:call-template>
|
4717
|
+
</xsl:if>
|
3971
4718
|
</xsl:template></xsl:stylesheet>
|