metanorma-bipm 1.0.5 → 1.0.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 +9 -32
- data/lib/asciidoctor/bipm/converter.rb +1 -1
- data/lib/asciidoctor/bipm/isodoc.rng +23 -1
- data/lib/isodoc/bipm/bipm.brochure.xsl +318 -278
- data/lib/isodoc/bipm/bipm.guide.xsl +318 -278
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +318 -278
- data/lib/isodoc/bipm/bipm.rapport.xsl +318 -278
- data/lib/isodoc/bipm/jcgm.standard.xsl +402 -254
- data/lib/isodoc/bipm/presentation_xml_convert.rb +1 -1
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +1 -1
- metadata +4 -4
@@ -8,7 +8,6 @@
|
|
8
8
|
<!-- <item id="#">N_page</item> -->
|
9
9
|
<!-- param for second pass -->
|
10
10
|
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
11
|
-
<xsl:variable name="index" select="document($external_index)"/>
|
12
11
|
|
13
12
|
|
14
13
|
|
@@ -16,7 +15,18 @@
|
|
16
15
|
|
17
16
|
|
18
17
|
|
19
|
-
<xsl:variable name="
|
18
|
+
<xsl:variable name="align_cross_elements_default">clause</xsl:variable>
|
19
|
+
<xsl:variable name="align_cross_elements_doc" select="normalize-space((//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:ext/jcgm:parallel-align-element)"/>
|
20
|
+
<xsl:variable name="align_cross_elements_">
|
21
|
+
<xsl:choose>
|
22
|
+
<xsl:when test="$align_cross_elements_doc != ''">
|
23
|
+
<xsl:value-of select="$align_cross_elements_doc"/>
|
24
|
+
</xsl:when>
|
25
|
+
<xsl:otherwise>
|
26
|
+
<xsl:value-of select="$align_cross_elements_default"/>
|
27
|
+
</xsl:otherwise>
|
28
|
+
</xsl:choose>
|
29
|
+
</xsl:variable>
|
20
30
|
<xsl:variable name="align_cross_elements">
|
21
31
|
<xsl:text>#</xsl:text><xsl:value-of select="translate(normalize-space($align_cross_elements_), ' ', '#')"/><xsl:text>#</xsl:text>
|
22
32
|
</xsl:variable>
|
@@ -97,7 +107,8 @@
|
|
97
107
|
<xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
|
98
108
|
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
99
109
|
<!-- Index -->
|
100
|
-
<xsl:apply-templates select="//jcgm:clause[@type = 'index']" mode="contents"/>
|
110
|
+
<!-- <xsl:apply-templates select="//jcgm:clause[@type = 'index']" mode="contents"/> -->
|
111
|
+
<xsl:apply-templates select="//jcgm:indexsect" mode="contents"/>
|
101
112
|
</contents>
|
102
113
|
</doc>
|
103
114
|
</xsl:for-each>
|
@@ -120,7 +131,8 @@
|
|
120
131
|
|
121
132
|
<!-- add id to xref and split xref with @to into two xref -->
|
122
133
|
<xsl:variable name="current_document_index_id">
|
123
|
-
<xsl:apply-templates select=".//jcgm:clause[@type = 'index']" mode="index_add_id"/>
|
134
|
+
<!-- <xsl:apply-templates select=".//jcgm:clause[@type = 'index']" mode="index_add_id"/> -->
|
135
|
+
<xsl:apply-templates select=".//jcgm:indexsect" mode="index_add_id"/>
|
124
136
|
</xsl:variable>
|
125
137
|
|
126
138
|
<xsl:variable name="current_document_index">
|
@@ -138,8 +150,6 @@
|
|
138
150
|
</xsl:for-each>
|
139
151
|
|
140
152
|
</xsl:variable>
|
141
|
-
|
142
|
-
<xsl:variable name="dash" select="'–'"/>
|
143
153
|
|
144
154
|
|
145
155
|
<xsl:variable name="lang">
|
@@ -188,7 +198,9 @@
|
|
188
198
|
</fo:page-sequence-master>
|
189
199
|
</fo:layout-master-set>
|
190
200
|
|
191
|
-
<
|
201
|
+
<fo:declarations>
|
202
|
+
<xsl:call-template name="addPDFUAmeta"/>
|
203
|
+
</fo:declarations>
|
192
204
|
|
193
205
|
<xsl:call-template name="addBookmarks">
|
194
206
|
<xsl:with-param name="contents" select="$contents"/>
|
@@ -499,7 +511,8 @@
|
|
499
511
|
|
500
512
|
<!-- indexes=<xsl:copy-of select="$indexes"/> -->
|
501
513
|
<!-- Index -->
|
502
|
-
<xsl:apply-templates select="xalan:nodeset($indexes)/doc//jcgm:clause[@type = 'index']" mode="index"/>
|
514
|
+
<!-- <xsl:apply-templates select="xalan:nodeset($indexes)/doc//jcgm:clause[@type = 'index']" mode="index" /> -->
|
515
|
+
<xsl:apply-templates select="xalan:nodeset($indexes)/doc//jcgm:indexsect" mode="index"/>
|
503
516
|
|
504
517
|
</fo:root>
|
505
518
|
</xsl:template>
|
@@ -532,6 +545,7 @@
|
|
532
545
|
<xsl:variable name="type">
|
533
546
|
<xsl:choose>
|
534
547
|
<xsl:when test="@type = 'index'">index</xsl:when>
|
548
|
+
<xsl:when test="local-name() = 'indexsect'">index</xsl:when>
|
535
549
|
<xsl:otherwise><xsl:value-of select="local-name()"/></xsl:otherwise>
|
536
550
|
</xsl:choose>
|
537
551
|
</xsl:variable>
|
@@ -974,7 +988,85 @@
|
|
974
988
|
</fo:inline>
|
975
989
|
</xsl:template>
|
976
990
|
|
991
|
+
<!-- for chemical expressions, when prefix superscripted -->
|
992
|
+
<xsl:template match="mathml:msup[count(*) = 2 and count(mathml:mrow) = 2]/mathml:mrow[1][count(*) = 1 and mathml:mtext and (mathml:mtext/text() = '' or not(mathml:mtext/text()))]/mathml:mtext" mode="mathml" priority="2">
|
993
|
+
<mathml:mspace height="1ex"/>
|
994
|
+
</xsl:template>
|
995
|
+
<xsl:template match="mathml:msup[count(*) = 2 and count(mathml:mrow) = 2]/mathml:mrow[1][count(*) = 1 and mathml:mtext and (mathml:mtext/text() = ' ' or mathml:mtext/text() = ' ')]/mathml:mtext" mode="mathml" priority="2">
|
996
|
+
<mathml:mspace width="1ex" height="1ex"/>
|
997
|
+
</xsl:template>
|
998
|
+
|
999
|
+
<!-- set height for sup -->
|
1000
|
+
<!-- <xsl:template match="mathml:msup[count(*) = 2 and count(mathml:mrow) = 2]/mathml:mrow[1][count(*) = 1 and mathml:mtext and (mathml:mtext/text() != '' and mathml:mtext/text() != ' ' and mathml:mtext/text() != ' ')]/mathml:mtext" mode="mtext"> -->
|
1001
|
+
<xsl:template match="mathml:msup[count(*) = 2 and count(mathml:mrow) = 2]/mathml:mrow[1][count(*) = 1]/*" mode="mathml" priority="2">
|
1002
|
+
<xsl:copy>
|
1003
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
1004
|
+
</xsl:copy>
|
1005
|
+
<!-- <xsl:copy-of select="."/> -->
|
1006
|
+
<mathml:mspace height="1.47ex"/>
|
1007
|
+
</xsl:template>
|
1008
|
+
|
1009
|
+
<!-- set script minimal font-size -->
|
1010
|
+
<xsl:template match="mathml:math" mode="mathml" priority="2">
|
1011
|
+
<xsl:copy>
|
1012
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
1013
|
+
<mathml:mstyle scriptminsize="6pt">
|
1014
|
+
<xsl:apply-templates select="node()" mode="mathml"/>
|
1015
|
+
</mathml:mstyle>
|
1016
|
+
</xsl:copy>
|
1017
|
+
</xsl:template>
|
1018
|
+
|
1019
|
+
<!-- issue 'over bar above equation with sub' fixing -->
|
1020
|
+
<xsl:template match="mathml:msub/mathml:mrow[1][mathml:mover and count(following-sibling::*) = 1 and following-sibling::mathml:mrow]" mode="mathml" priority="2">
|
1021
|
+
<mathml:mstyle>
|
1022
|
+
<xsl:copy-of select="."/>
|
1023
|
+
</mathml:mstyle>
|
1024
|
+
</xsl:template>
|
1025
|
+
|
1026
|
+
<!-- Decrease space between ()
|
1027
|
+
from:
|
1028
|
+
<mfenced open="(" close=")">
|
1029
|
+
<mrow>
|
1030
|
+
<mtext>Cu</mtext>
|
1031
|
+
</mrow>
|
1032
|
+
</mfenced>
|
1033
|
+
to:
|
1034
|
+
<mrow>
|
1035
|
+
<mtext>(Cu)</mtext>
|
1036
|
+
</mrow> -->
|
1037
|
+
<xsl:template match="mathml:mfenced[count(*) = 1 and *[count(*) = 1] and */*[count(*) = 0]] | mathml:mfenced[count(*) = 1 and *[count(*) = 1] and */*[count(*) = 1] and */*/*[count(*) = 0]]" mode="mathml" priority="2">
|
1038
|
+
<xsl:apply-templates mode="mathml"/>
|
1039
|
+
</xsl:template>
|
1040
|
+
|
1041
|
+
<xsl:template match="mathml:mfenced[count(*) = 1]/*[count(*) = 1]/*[count(*) = 0] | mathml:mfenced[count(*) = 1]/*[count(*) = 1]/*[count(*) = 1]/*[count(*) = 0]" mode="mathml" priority="2"> <!-- [not(following-sibling::*) and not(preceding-sibling::*)] -->
|
1042
|
+
<xsl:copy>
|
1043
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
1044
|
+
<xsl:value-of select="ancestor::mathml:mfenced/@open"/>
|
1045
|
+
<xsl:value-of select="."/>
|
1046
|
+
<xsl:value-of select="ancestor::mathml:mfenced/@close"/>
|
1047
|
+
</xsl:copy>
|
1048
|
+
</xsl:template>
|
977
1049
|
|
1050
|
+
<!-- Decrease height of / and | -->
|
1051
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '/' or normalize-space(text()) = '|']" mode="mathml" priority="2">
|
1052
|
+
<xsl:copy>
|
1053
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
1054
|
+
<xsl:if test="not(@stretchy)">
|
1055
|
+
<xsl:attribute name="stretchy">false</xsl:attribute>
|
1056
|
+
</xsl:if>
|
1057
|
+
<xsl:apply-templates mode="mathml"/>
|
1058
|
+
</xsl:copy>
|
1059
|
+
</xsl:template>
|
1060
|
+
|
1061
|
+
<xsl:template match="mathml:mi[string-length(normalize-space()) > 1]" mode="mathml" priority="2">
|
1062
|
+
<xsl:if test="preceding-sibling::* and preceding-sibling::*[1][not(local-name() = 'mfenced' or local-name() = 'mo')]">
|
1063
|
+
<mathml:mspace width="0.3em"/>
|
1064
|
+
</xsl:if>
|
1065
|
+
<xsl:copy-of select="."/>
|
1066
|
+
<xsl:if test="following-sibling::* and following-sibling::*[1][not(local-name() = 'mfenced' or local-name() = 'mo')]">
|
1067
|
+
<mathml:mspace width="0.3em"/>
|
1068
|
+
</xsl:if>
|
1069
|
+
</xsl:template>
|
978
1070
|
|
979
1071
|
<xsl:template match="*[local-name()='admonition']">
|
980
1072
|
<fo:block margin-bottom="12pt" font-weight="bold"> <!-- text-align="center" -->
|
@@ -1330,177 +1422,58 @@
|
|
1330
1422
|
<!-- Index processing -->
|
1331
1423
|
<!-- =================== -->
|
1332
1424
|
|
1333
|
-
<xsl:template match="
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
</xsl:template>
|
1338
|
-
|
1339
|
-
<xsl:template match="jcgm:xref" mode="index_add_id">
|
1340
|
-
<xsl:variable name="id">
|
1341
|
-
<xsl:call-template name="generateIndexXrefId"/>
|
1342
|
-
</xsl:variable>
|
1343
|
-
<xsl:copy> <!-- add id to xref -->
|
1344
|
-
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
1345
|
-
<xsl:attribute name="id">
|
1346
|
-
<xsl:value-of select="$id"/>
|
1347
|
-
</xsl:attribute>
|
1348
|
-
<xsl:apply-templates mode="index_add_id"/>
|
1349
|
-
</xsl:copy>
|
1350
|
-
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
1351
|
-
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
1352
|
-
<xsl:if test="@to">
|
1353
|
-
<xsl:value-of select="$dash"/>
|
1354
|
-
<xsl:copy>
|
1355
|
-
<xsl:copy-of select="@*"/>
|
1356
|
-
<xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
|
1357
|
-
<xsl:attribute name="id">
|
1358
|
-
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
1359
|
-
</xsl:attribute>
|
1360
|
-
<xsl:apply-templates mode="index_add_id"/>
|
1361
|
-
</xsl:copy>
|
1362
|
-
</xsl:if>
|
1363
|
-
</xsl:template>
|
1364
|
-
|
1365
|
-
<xsl:template match="@*|node()" mode="index_update">
|
1366
|
-
<xsl:copy>
|
1367
|
-
<xsl:apply-templates select="@*|node()" mode="index_update"/>
|
1368
|
-
</xsl:copy>
|
1369
|
-
</xsl:template>
|
1370
|
-
|
1371
|
-
<xsl:template match="jcgm:clause[@type = 'index']//jcgm:li" mode="index_update">
|
1372
|
-
<xsl:copy>
|
1373
|
-
<xsl:apply-templates select="@*" mode="index_update"/>
|
1374
|
-
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
1375
|
-
</xsl:copy>
|
1376
|
-
</xsl:template>
|
1425
|
+
<!-- <xsl:template match="jcgm:clause[@type = 'index']" />
|
1426
|
+
<xsl:template match="jcgm:clause[@type = 'index']" mode="index"> -->
|
1427
|
+
<xsl:template match="jcgm:indexsect"/>
|
1428
|
+
<xsl:template match="jcgm:indexsect" mode="index">
|
1377
1429
|
|
1378
|
-
|
1379
|
-
|
1380
|
-
<xsl:param name="remove" select="'false'"/>
|
1381
|
-
<!-- <node></node> -->
|
1382
|
-
<xsl:choose>
|
1383
|
-
<xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
|
1384
|
-
<!-- skip text (i.e. remove it) and process next element -->
|
1385
|
-
<!-- [removed_<xsl:value-of select="."/>] -->
|
1386
|
-
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
1387
|
-
</xsl:when>
|
1388
|
-
<xsl:when test="self::text()">
|
1389
|
-
<xsl:value-of select="."/>
|
1390
|
-
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
1391
|
-
</xsl:when>
|
1392
|
-
<xsl:when test="self::* and local-name(.) = 'xref'">
|
1393
|
-
<xsl:variable name="id" select="@id"/>
|
1394
|
-
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
1395
|
-
<xsl:variable name="id_next" select="following-sibling::jcgm:xref[1]/@id"/>
|
1396
|
-
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
1397
|
-
|
1398
|
-
<xsl:variable name="id_prev" select="preceding-sibling::jcgm:xref[1]/@id"/>
|
1399
|
-
<xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
|
1400
|
-
|
1430
|
+
<fo:page-sequence master-reference="document-jcgm" force-page-count="no-force">
|
1431
|
+
<xsl:variable name="header-title">
|
1401
1432
|
<xsl:choose>
|
1402
|
-
|
1403
|
-
|
1404
|
-
<xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
|
1405
|
-
<!-- skip element (i.e. remove it) and remove next text ',' -->
|
1406
|
-
<!-- [removed_xref] -->
|
1407
|
-
|
1408
|
-
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
1409
|
-
<xsl:with-param name="remove">true</xsl:with-param>
|
1410
|
-
</xsl:apply-templates>
|
1411
|
-
</xsl:when>
|
1412
|
-
|
1413
|
-
<xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
|
1414
|
-
<!-- remove xref -->
|
1415
|
-
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
1416
|
-
<xsl:with-param name="remove">true</xsl:with-param>
|
1417
|
-
</xsl:apply-templates>
|
1433
|
+
<xsl:when test="./jcgm:title[1]/*[local-name() = 'tab']">
|
1434
|
+
<xsl:apply-templates select="./jcgm:title[1]/*[local-name() = 'tab'][1]/following-sibling::node()" mode="header"/>
|
1418
1435
|
</xsl:when>
|
1419
|
-
|
1420
1436
|
<xsl:otherwise>
|
1421
|
-
<xsl:
|
1422
|
-
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
1437
|
+
<xsl:apply-templates select="./jcgm:title[1]" mode="header"/>
|
1423
1438
|
</xsl:otherwise>
|
1424
1439
|
</xsl:choose>
|
1425
|
-
</xsl:
|
1426
|
-
<xsl:when test="self::* and local-name(.) = 'ul'">
|
1427
|
-
<!-- ul -->
|
1428
|
-
<xsl:apply-templates select="." mode="index_update"/>
|
1429
|
-
</xsl:when>
|
1430
|
-
<xsl:otherwise>
|
1431
|
-
<xsl:copy-of select="."/>
|
1432
|
-
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
1433
|
-
</xsl:otherwise>
|
1434
|
-
</xsl:choose>
|
1435
|
-
</xsl:template>
|
1436
|
-
|
1437
|
-
|
1438
|
-
<xsl:template name="generateIndexXrefId">
|
1439
|
-
<xsl:variable name="level" select="count(ancestor::jcgm:ul)"/>
|
1440
|
-
<!-- <xsl:variable name="parent_ul_id" select="generate-id(ancestor::jcgm:ul[1])"/>
|
1441
|
-
<xsl:variable name="item_number" select="count(ancestor::jcgm:li[ancestor::jcgm:ul[generate-id() = $parent_ul_id]])"/> -->
|
1442
|
-
<xsl:variable name="docid">
|
1443
|
-
<xsl:call-template name="getDocumentId"/>
|
1444
|
-
</xsl:variable>
|
1445
|
-
<xsl:variable name="item_number">
|
1446
|
-
<xsl:number count="jcgm:li[ancestor::jcgm:clause[@type = 'index']]" level="any"/>
|
1447
|
-
</xsl:variable>
|
1448
|
-
<xsl:variable name="xref_number"><xsl:number count="jcgm:xref"/></xsl:variable>
|
1449
|
-
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
1450
|
-
</xsl:template>
|
1451
|
-
|
1452
|
-
<xsl:template match="jcgm:clause[@type = 'index']"/>
|
1453
|
-
<xsl:template match="jcgm:clause[@type = 'index']" mode="index">
|
1454
|
-
|
1455
|
-
<fo:page-sequence master-reference="document-jcgm" force-page-count="no-force">
|
1440
|
+
</xsl:variable>
|
1456
1441
|
|
1457
1442
|
<xsl:call-template name="insertHeaderFooter"/>
|
1458
1443
|
|
1459
1444
|
<fo:flow flow-name="xsl-region-body">
|
1460
|
-
<fo:block id="{@id}">
|
1461
|
-
<xsl:apply-templates/>
|
1445
|
+
<fo:block id="{@id}" span="all">
|
1446
|
+
<xsl:apply-templates select="bipm:title"/>
|
1447
|
+
</fo:block>
|
1448
|
+
<fo:block>
|
1449
|
+
<xsl:apply-templates select="*[not(local-name() = 'title')]"/>
|
1462
1450
|
</fo:block>
|
1463
1451
|
</fo:flow>
|
1464
1452
|
</fo:page-sequence>
|
1465
1453
|
</xsl:template>
|
1466
1454
|
|
1467
|
-
<xsl:template match="jcgm:clause[@type = 'index']/jcgm:title" priority="4">
|
1455
|
+
<!-- <xsl:template match="jcgm:clause[@type = 'index']/jcgm:title" priority="4"> -->
|
1456
|
+
<xsl:template match="jcgm:indexsect/jcgm:title" priority="4">
|
1468
1457
|
<fo:block font-weight="bold" span="all">
|
1469
1458
|
<!-- Index -->
|
1470
1459
|
<xsl:apply-templates/>
|
1471
1460
|
</fo:block>
|
1472
1461
|
</xsl:template>
|
1473
1462
|
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
<xsl:if test="following-sibling::jcgm:clause">
|
1478
|
-
<fo:block> </fo:block>
|
1479
|
-
</xsl:if>
|
1480
|
-
</fo:block>
|
1481
|
-
</xsl:template>
|
1482
|
-
|
1483
|
-
<xsl:template match="jcgm:clause[@type = 'index']/jcgm:clause/jcgm:title" priority="4">
|
1463
|
+
|
1464
|
+
<!-- <xsl:template match="jcgm:clause[@type = 'index']/jcgm:clause/jcgm:title" priority="4"> -->
|
1465
|
+
<xsl:template match="jcgm:indexsect/jcgm:clause/jcgm:title" priority="4">
|
1484
1466
|
<!-- Letter A, B, C, ... -->
|
1485
1467
|
<fo:block font-weight="bold" margin-left="25mm" keep-with-next="always">
|
1486
1468
|
<xsl:apply-templates/>
|
1487
1469
|
</fo:block>
|
1488
1470
|
</xsl:template>
|
1489
1471
|
|
1490
|
-
<xsl:template match="jcgm:clause[@type = 'index']//jcgm:ul" priority="4">
|
1472
|
+
<!-- <xsl:template match="jcgm:clause[@type = 'index']//jcgm:ul" priority="4"> -->
|
1473
|
+
<xsl:template match="jcgm:indexsect//jcgm:ul" priority="4">
|
1491
1474
|
<xsl:apply-templates/>
|
1492
1475
|
</xsl:template>
|
1493
|
-
|
1494
|
-
<xsl:template match="jcgm:clause[@type = 'index']//jcgm:li" priority="4">
|
1495
|
-
<xsl:variable name="level" select="count(ancestor::jcgm:ul)"/>
|
1496
|
-
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
1497
|
-
<xsl:apply-templates/>
|
1498
|
-
</fo:block>
|
1499
|
-
</xsl:template>
|
1500
|
-
|
1501
|
-
<xsl:template match="jcgm:bookmark">
|
1502
|
-
<fo:inline id="{@id}"/>
|
1503
|
-
</xsl:template>
|
1476
|
+
|
1504
1477
|
|
1505
1478
|
<!-- =================== -->
|
1506
1479
|
<!-- End of Index processing -->
|
@@ -1577,36 +1550,36 @@
|
|
1577
1550
|
<xsl:apply-templates/>
|
1578
1551
|
</xsl:template>
|
1579
1552
|
|
1580
|
-
<!-- no display table/figure from slave documents if common
|
1581
|
-
<xsl:template match="*[@slave]//*[local-name()='table'][@
|
1582
|
-
<xsl:template match="*[@slave]//*[local-name()='table'][@
|
1583
|
-
<xsl:template match="*[@slave]//*[local-name()='figure'][@
|
1584
|
-
<xsl:template match="*[@slave]//*[local-name()='figure'][@
|
1553
|
+
<!-- no display table/figure from slave documents if @multilingual-rendering="common" or @multilingual-rendering = 'all-columns' -->
|
1554
|
+
<xsl:template match="*[@slave]//*[local-name()='table'][@multilingual-rendering= 'common']" priority="2"/>
|
1555
|
+
<xsl:template match="*[@slave]//*[local-name()='table'][@multilingual-rendering = 'all-columns']" priority="2"/>
|
1556
|
+
<xsl:template match="*[@slave]//*[local-name()='figure'][@multilingual-rendering = 'common']" priority="2"/>
|
1557
|
+
<xsl:template match="*[@slave]//*[local-name()='figure'][@multilingual-rendering = 'all-columns']" priority="2"/>
|
1585
1558
|
|
1586
|
-
<!-- for table and figure with @common
|
1559
|
+
<!-- for table and figure with @multilingual-rendering="common" -->
|
1587
1560
|
<!-- display only element from first document -->
|
1588
|
-
<xsl:template match="*[@first]//*[local-name() = 'cross-align'][@
|
1561
|
+
<xsl:template match="*[@first]//*[local-name() = 'cross-align'][@multilingual-rendering = 'common']" mode="multi_columns">
|
1589
1562
|
<fo:block>
|
1590
1563
|
<xsl:apply-templates/>
|
1591
1564
|
</fo:block>
|
1592
1565
|
</xsl:template>
|
1593
1566
|
|
1594
|
-
<!-- for table and figure with @
|
1567
|
+
<!-- for table and figure with @multilingual-rendering = 'all-columns' -->
|
1595
1568
|
<!-- display element from first document, then (after) from 2nd one, then 3rd, etc. -->
|
1596
|
-
<xsl:template match="*[@first]//*[local-name() = 'cross-align'][@
|
1569
|
+
<xsl:template match="*[@first]//*[local-name() = 'cross-align'][@multilingual-rendering = 'all-columns']" mode="multi_columns">
|
1597
1570
|
<xsl:variable name="element-number" select="@element-number"/>
|
1598
1571
|
<fo:block>
|
1599
1572
|
<xsl:apply-templates/>
|
1600
1573
|
<fo:block> </fo:block>
|
1601
1574
|
<xsl:choose>
|
1602
|
-
<xsl:when test="local-name(*[@
|
1575
|
+
<xsl:when test="local-name(*[@multilingual-rendering = 'all-columns']) = 'table'">
|
1603
1576
|
<xsl:for-each select="xalan:nodeset($docs_slave)/*">
|
1604
1577
|
<xsl:for-each select=".//*[local-name() = 'table' and @element-number=$element-number]">
|
1605
1578
|
<xsl:call-template name="table"/>
|
1606
1579
|
</xsl:for-each>
|
1607
1580
|
</xsl:for-each>
|
1608
1581
|
</xsl:when>
|
1609
|
-
<xsl:when test="local-name(*[@
|
1582
|
+
<xsl:when test="local-name(*[@multilingual-rendering = 'all-columns']) = 'figure'">
|
1610
1583
|
<xsl:for-each select="xalan:nodeset($docs_slave)/*">
|
1611
1584
|
<xsl:for-each select=".//*[local-name() = 'figure' and @element-number=$element-number]">
|
1612
1585
|
<xsl:call-template name="figure"/>
|
@@ -1924,7 +1897,7 @@
|
|
1924
1897
|
Elements that should be aligned:
|
1925
1898
|
- name of element presents in field align-cross-elements="clause note"
|
1926
1899
|
- marked with attribute name
|
1927
|
-
- table/figure with attribute
|
1900
|
+
- table/figure with attribute @multilingual-rendering = 'common' or @multilingual-rendering = 'all-columns'
|
1928
1901
|
- marked with attribute cross-align
|
1929
1902
|
-->
|
1930
1903
|
<xsl:template name="isCrossAligned">
|
@@ -1933,10 +1906,10 @@
|
|
1933
1906
|
<!-- if element`s name is presents in array align_cross_elements -->
|
1934
1907
|
<xsl:when test="contains($align_cross_elements, concat('#',$element_name,'#'))">true</xsl:when>
|
1935
1908
|
<!-- if element has attribute name/bookmark -->
|
1936
|
-
<xsl:when test="normalize-space(@name) != ''">true</xsl:when>
|
1937
|
-
<xsl:when test="($element_name = 'table' or $element_name = 'figure') and (@
|
1909
|
+
<xsl:when test="normalize-space(@name) != '' and @multilingual-rendering = 'name'">true</xsl:when>
|
1910
|
+
<xsl:when test="($element_name = 'table' or $element_name = 'figure') and (@multilingual-rendering = 'common' or @multilingual-rendering = 'all-columns')">true</xsl:when>
|
1938
1911
|
<!-- element marked as cross-align -->
|
1939
|
-
<xsl:when test="@
|
1912
|
+
<xsl:when test="@multilingual-rendering='parallel'">true</xsl:when>
|
1940
1913
|
<xsl:otherwise>false</xsl:otherwise>
|
1941
1914
|
</xsl:choose>
|
1942
1915
|
</xsl:template>
|
@@ -1946,7 +1919,7 @@
|
|
1946
1919
|
<xsl:variable name="element-number">
|
1947
1920
|
<xsl:choose>
|
1948
1921
|
<!-- if name set, then use it -->
|
1949
|
-
<xsl:when test="@name"><xsl:value-of select="@name"/></xsl:when>
|
1922
|
+
<xsl:when test="@name and @multilingual-rendering = 'name'"><xsl:value-of select="@name"/></xsl:when>
|
1950
1923
|
<xsl:otherwise>
|
1951
1924
|
<xsl:for-each select="ancestor-or-self::*[ancestor-or-self::*[local-name() = 'sections' or local-name() = 'annex']]">
|
1952
1925
|
<xsl:value-of select="local-name()"/>
|
@@ -1977,13 +1950,12 @@
|
|
1977
1950
|
</xsl:copy>
|
1978
1951
|
</xsl:template>
|
1979
1952
|
|
1980
|
-
<!-- enclose elements after table/figure with
|
1981
|
-
<xsl:template match="*[@
|
1953
|
+
<!-- enclose elements after table/figure with @multilingual-rendering = 'common' and @multilingual-rendering = 'all-columns' in a separate element cross-align -->
|
1954
|
+
<xsl:template match="*[@multilingual-rendering = 'common' or @multilingual-rendering = 'all-columns']" mode="flatxml_step2" priority="2">
|
1982
1955
|
<xsl:variable name="curr_id" select="generate-id()"/>
|
1983
1956
|
<xsl:element name="cross-align" namespace="https://www.metanorma.org/ns/bipm">
|
1984
1957
|
<xsl:copy-of select="@element-number"/>
|
1985
|
-
<xsl:copy-of select="@
|
1986
|
-
<xsl:copy-of select="@span"/>
|
1958
|
+
<xsl:copy-of select="@multilingual-rendering"/>
|
1987
1959
|
<xsl:copy-of select="."/>
|
1988
1960
|
</xsl:element>
|
1989
1961
|
<xsl:if test="following-sibling::*[(not(@cross-align) or not(@cross-align='true')) and preceding-sibling::*[@cross-align='true'][1][generate-id() = $curr_id]]">
|
@@ -2009,8 +1981,7 @@
|
|
2009
1981
|
<xsl:if test="local-name() = 'title'">
|
2010
1982
|
<xsl:copy-of select="@keep-with-next"/>
|
2011
1983
|
</xsl:if>
|
2012
|
-
<xsl:copy-of select="@
|
2013
|
-
<xsl:copy-of select="@span"/>
|
1984
|
+
<xsl:copy-of select="@multilingual-rendering"/>
|
2014
1985
|
<xsl:copy-of select="."/>
|
2015
1986
|
|
2016
1987
|
<!-- copy next elements until next element with cross-align=true -->
|
@@ -2318,6 +2289,7 @@
|
|
2318
2289
|
|
2319
2290
|
|
2320
2291
|
|
2292
|
+
|
2321
2293
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
2322
2294
|
|
2323
2295
|
|
@@ -2953,7 +2925,15 @@
|
|
2953
2925
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
2954
2926
|
<xsl:value-of select="@target"/>
|
2955
2927
|
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
2956
|
-
<xsl:variable name="
|
2928
|
+
<xsl:variable name="mathml">
|
2929
|
+
<xsl:for-each select="*">
|
2930
|
+
<xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
|
2931
|
+
<xsl:copy-of select="."/>
|
2932
|
+
</xsl:if>
|
2933
|
+
</xsl:for-each>
|
2934
|
+
</xsl:variable>
|
2935
|
+
|
2936
|
+
<xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
|
2957
2937
|
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
2958
2938
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
2959
2939
|
<xsl:param name="cols-count"/>
|
@@ -3994,6 +3974,10 @@
|
|
3994
3974
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
3995
3975
|
<xsl:apply-templates/>
|
3996
3976
|
</fo:inline>
|
3977
|
+
</xsl:template><xsl:template match="*[local-name()='hi']">
|
3978
|
+
<fo:inline background-color="yellow">
|
3979
|
+
<xsl:apply-templates/>
|
3980
|
+
</fo:inline>
|
3997
3981
|
</xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
3998
3982
|
<xsl:variable name="text" select="normalize-space(.)"/>
|
3999
3983
|
<fo:inline font-size="75%">
|
@@ -4334,6 +4318,7 @@
|
|
4334
4318
|
<xsl:apply-templates select="." mode="mathml"/>
|
4335
4319
|
</xsl:variable>
|
4336
4320
|
<fo:instream-foreign-object fox:alt-text="Math">
|
4321
|
+
|
4337
4322
|
<!-- <xsl:copy-of select="."/> -->
|
4338
4323
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
4339
4324
|
</fo:instream-foreign-object>
|
@@ -4352,7 +4337,7 @@
|
|
4352
4337
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
4353
4338
|
</xsl:copy>
|
4354
4339
|
<mathml:mspace width="0.5ex"/>
|
4355
|
-
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
4340
|
+
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
4356
4341
|
<xsl:variable name="target">
|
4357
4342
|
<xsl:choose>
|
4358
4343
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
@@ -4386,8 +4371,6 @@
|
|
4386
4371
|
</xsl:otherwise>
|
4387
4372
|
</xsl:choose>
|
4388
4373
|
</fo:inline>
|
4389
|
-
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
4390
|
-
<fo:inline id="{@id}"/>
|
4391
4374
|
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
4392
4375
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
4393
4376
|
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
@@ -4596,6 +4579,7 @@
|
|
4596
4579
|
<fo:block id="{@id}">
|
4597
4580
|
<xsl:apply-templates/>
|
4598
4581
|
</fo:block>
|
4582
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4599
4583
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
4600
4584
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
4601
4585
|
<xsl:apply-templates/>
|
@@ -5179,10 +5163,11 @@
|
|
5179
5163
|
</xsl:choose>
|
5180
5164
|
|
5181
5165
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
5182
|
-
|
5166
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
5183
5167
|
<xsl:variable name="element">
|
5184
5168
|
block
|
5185
5169
|
|
5170
|
+
|
5186
5171
|
</xsl:variable>
|
5187
5172
|
<xsl:choose>
|
5188
5173
|
<xsl:when test="normalize-space($element) = 'block'">
|
@@ -5296,29 +5281,47 @@
|
|
5296
5281
|
<xsl:text>— </xsl:text>
|
5297
5282
|
<xsl:apply-templates/>
|
5298
5283
|
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
5299
|
-
|
5300
|
-
|
5301
|
-
|
5302
|
-
|
5303
|
-
|
5304
|
-
|
5305
|
-
|
5306
|
-
|
5307
|
-
|
5308
|
-
|
5309
|
-
|
5310
|
-
|
5311
|
-
|
5312
|
-
|
5313
|
-
|
5314
|
-
|
5315
|
-
|
5316
|
-
|
5317
|
-
|
5318
|
-
|
5319
|
-
|
5320
|
-
|
5321
|
-
|
5284
|
+
|
5285
|
+
<xsl:variable name="bibitemid">
|
5286
|
+
<xsl:choose>
|
5287
|
+
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
|
5288
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
5289
|
+
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
5290
|
+
</xsl:choose>
|
5291
|
+
</xsl:variable>
|
5292
|
+
|
5293
|
+
<xsl:choose>
|
5294
|
+
<xsl:when test="normalize-space($bibitemid) != ''">
|
5295
|
+
<fo:inline xsl:use-attribute-sets="eref-style">
|
5296
|
+
<xsl:if test="@type = 'footnote'">
|
5297
|
+
|
5298
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
5299
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
5300
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
5301
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
5302
|
+
|
5303
|
+
|
5304
|
+
</xsl:if>
|
5305
|
+
|
5306
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5307
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
5308
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
5309
|
+
</xsl:if>
|
5310
|
+
<xsl:if test="@type = 'inline'">
|
5311
|
+
|
5312
|
+
|
5313
|
+
|
5314
|
+
</xsl:if>
|
5315
|
+
|
5316
|
+
<xsl:apply-templates/>
|
5317
|
+
</fo:basic-link>
|
5318
|
+
|
5319
|
+
</fo:inline>
|
5320
|
+
</xsl:when>
|
5321
|
+
<xsl:otherwise>
|
5322
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5323
|
+
</xsl:otherwise>
|
5324
|
+
</xsl:choose>
|
5322
5325
|
</xsl:template><xsl:template match="*[local-name() = 'tab']">
|
5323
5326
|
<!-- zero-space char -->
|
5324
5327
|
<xsl:variable name="depth">
|
@@ -5501,6 +5504,153 @@
|
|
5501
5504
|
</fo:block>
|
5502
5505
|
</xsl:otherwise>
|
5503
5506
|
</xsl:choose>
|
5507
|
+
</xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
|
5508
|
+
<xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
|
5509
|
+
<bookmark><xsl:value-of select="@id"/></bookmark>
|
5510
|
+
</xsl:for-each>
|
5511
|
+
</xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
|
5512
|
+
<xsl:copy>
|
5513
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id"/>
|
5514
|
+
</xsl:copy>
|
5515
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
5516
|
+
<xsl:variable name="id">
|
5517
|
+
<xsl:call-template name="generateIndexXrefId"/>
|
5518
|
+
</xsl:variable>
|
5519
|
+
<xsl:copy> <!-- add id to xref -->
|
5520
|
+
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
5521
|
+
<xsl:attribute name="id">
|
5522
|
+
<xsl:value-of select="$id"/>
|
5523
|
+
</xsl:attribute>
|
5524
|
+
<xsl:apply-templates mode="index_add_id"/>
|
5525
|
+
</xsl:copy>
|
5526
|
+
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
5527
|
+
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
5528
|
+
<xsl:if test="@to">
|
5529
|
+
<xsl:value-of select="$dash"/>
|
5530
|
+
<xsl:copy>
|
5531
|
+
<xsl:copy-of select="@*"/>
|
5532
|
+
<xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
|
5533
|
+
<xsl:attribute name="id">
|
5534
|
+
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
5535
|
+
</xsl:attribute>
|
5536
|
+
<xsl:apply-templates mode="index_add_id"/>
|
5537
|
+
</xsl:copy>
|
5538
|
+
</xsl:if>
|
5539
|
+
</xsl:template><xsl:template match="@*|node()" mode="index_update">
|
5540
|
+
<xsl:copy>
|
5541
|
+
<xsl:apply-templates select="@*|node()" mode="index_update"/>
|
5542
|
+
</xsl:copy>
|
5543
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" mode="index_update">
|
5544
|
+
<xsl:copy>
|
5545
|
+
<xsl:apply-templates select="@*" mode="index_update"/>
|
5546
|
+
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
5547
|
+
</xsl:copy>
|
5548
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/node()" mode="process_li_element" priority="2">
|
5549
|
+
<xsl:param name="element"/>
|
5550
|
+
<xsl:param name="remove" select="'false'"/>
|
5551
|
+
<xsl:param name="target"/>
|
5552
|
+
<!-- <node></node> -->
|
5553
|
+
<xsl:choose>
|
5554
|
+
<xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
|
5555
|
+
<!-- skip text (i.e. remove it) and process next element -->
|
5556
|
+
<!-- [removed_<xsl:value-of select="."/>] -->
|
5557
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
5558
|
+
<xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
|
5559
|
+
</xsl:apply-templates>
|
5560
|
+
</xsl:when>
|
5561
|
+
<xsl:when test="self::text()">
|
5562
|
+
<xsl:value-of select="."/>
|
5563
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
5564
|
+
</xsl:when>
|
5565
|
+
<xsl:when test="self::* and local-name(.) = 'xref'">
|
5566
|
+
<xsl:variable name="id" select="@id"/>
|
5567
|
+
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
5568
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
5569
|
+
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
5570
|
+
|
5571
|
+
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
5572
|
+
<xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
|
5573
|
+
|
5574
|
+
<xsl:choose>
|
5575
|
+
<!-- 2nd pass -->
|
5576
|
+
<!-- if page is equal to page for next and page is not the end of range -->
|
5577
|
+
<xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
|
5578
|
+
<!-- skip element (i.e. remove it) and remove next text ',' -->
|
5579
|
+
<!-- [removed_xref] -->
|
5580
|
+
|
5581
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
5582
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
5583
|
+
<xsl:with-param name="target">
|
5584
|
+
<xsl:choose>
|
5585
|
+
<xsl:when test="$target != ''"><xsl:value-of select="$target"/></xsl:when>
|
5586
|
+
<xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise>
|
5587
|
+
</xsl:choose>
|
5588
|
+
</xsl:with-param>
|
5589
|
+
</xsl:apply-templates>
|
5590
|
+
</xsl:when>
|
5591
|
+
|
5592
|
+
<xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
|
5593
|
+
<!-- remove xref -->
|
5594
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
5595
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
5596
|
+
</xsl:apply-templates>
|
5597
|
+
</xsl:when>
|
5598
|
+
|
5599
|
+
<xsl:otherwise>
|
5600
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
5601
|
+
<xsl:with-param name="target" select="$target"/>
|
5602
|
+
</xsl:apply-templates>
|
5603
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
5604
|
+
</xsl:otherwise>
|
5605
|
+
</xsl:choose>
|
5606
|
+
</xsl:when>
|
5607
|
+
<xsl:when test="self::* and local-name(.) = 'ul'">
|
5608
|
+
<!-- ul -->
|
5609
|
+
<xsl:apply-templates select="." mode="index_update"/>
|
5610
|
+
</xsl:when>
|
5611
|
+
<xsl:otherwise>
|
5612
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
5613
|
+
<xsl:with-param name="target" select="$target"/>
|
5614
|
+
</xsl:apply-templates>
|
5615
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
5616
|
+
</xsl:otherwise>
|
5617
|
+
</xsl:choose>
|
5618
|
+
</xsl:template><xsl:template match="@*|node()" mode="xref_copy">
|
5619
|
+
<xsl:param name="target"/>
|
5620
|
+
<xsl:copy>
|
5621
|
+
<xsl:apply-templates select="@*" mode="xref_copy"/>
|
5622
|
+
<xsl:if test="$target != '' and not(xalan:nodeset($bookmark_in_fn)//bookmark[. = $target])">
|
5623
|
+
<xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
|
5624
|
+
</xsl:if>
|
5625
|
+
<xsl:apply-templates select="node()" mode="xref_copy"/>
|
5626
|
+
</xsl:copy>
|
5627
|
+
</xsl:template><xsl:template name="generateIndexXrefId">
|
5628
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
5629
|
+
|
5630
|
+
<xsl:variable name="docid">
|
5631
|
+
<xsl:call-template name="getDocumentId"/>
|
5632
|
+
</xsl:variable>
|
5633
|
+
<xsl:variable name="item_number">
|
5634
|
+
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
5635
|
+
</xsl:variable>
|
5636
|
+
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
5637
|
+
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
5638
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
|
5639
|
+
<xsl:apply-templates/>
|
5640
|
+
<fo:block>
|
5641
|
+
<xsl:if test="following-sibling::*[local-name() = 'clause']">
|
5642
|
+
<fo:block> </fo:block>
|
5643
|
+
</xsl:if>
|
5644
|
+
</fo:block>
|
5645
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
|
5646
|
+
<xsl:apply-templates/>
|
5647
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
5648
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
5649
|
+
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
5650
|
+
<xsl:apply-templates/>
|
5651
|
+
</fo:block>
|
5652
|
+
</xsl:template><xsl:template match="*[local-name() = 'bookmark']">
|
5653
|
+
<fo:inline id="{@id}"/>
|
5504
5654
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
5505
5655
|
<!-- <row>
|
5506
5656
|
<date>05-07-2013</date>
|
@@ -5717,67 +5867,65 @@
|
|
5717
5867
|
<xsl:variable name="lang">
|
5718
5868
|
<xsl:call-template name="getLang"/>
|
5719
5869
|
</xsl:variable>
|
5720
|
-
<
|
5721
|
-
|
5722
|
-
<pdf:
|
5723
|
-
|
5724
|
-
|
5725
|
-
|
5726
|
-
<
|
5727
|
-
<rdf:
|
5728
|
-
|
5729
|
-
|
5730
|
-
<
|
5731
|
-
<xsl:variable name="title">
|
5732
|
-
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
5733
|
-
|
5734
|
-
|
5735
|
-
|
5736
|
-
<xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'part']"/>
|
5737
|
-
|
5738
|
-
|
5739
|
-
|
5740
|
-
|
5741
|
-
</xsl:for-each>
|
5742
|
-
</xsl:variable>
|
5743
|
-
<xsl:choose>
|
5744
|
-
<xsl:when test="normalize-space($title) != ''">
|
5745
|
-
<xsl:value-of select="$title"/>
|
5746
|
-
</xsl:when>
|
5747
|
-
<xsl:otherwise>
|
5748
|
-
<xsl:text> </xsl:text>
|
5749
|
-
</xsl:otherwise>
|
5750
|
-
</xsl:choose>
|
5751
|
-
</dc:title>
|
5752
|
-
<dc:creator>
|
5870
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
5871
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
5872
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
5873
|
+
</pdf:dictionary>
|
5874
|
+
</pdf:catalog>
|
5875
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
5876
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
5877
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
5878
|
+
<!-- Dublin Core properties go here -->
|
5879
|
+
<dc:title>
|
5880
|
+
<xsl:variable name="title">
|
5753
5881
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
5754
5882
|
|
5755
5883
|
|
5756
|
-
<xsl:value-of select="normalize-space(*[local-name() = 'ext']/*[local-name() = 'editorialgroup']/*[local-name() = 'committee'])"/>
|
5757
5884
|
|
5758
|
-
|
5759
|
-
</xsl:for-each>
|
5760
|
-
</dc:creator>
|
5761
|
-
<dc:description>
|
5762
|
-
<xsl:variable name="abstract">
|
5885
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'part']"/>
|
5763
5886
|
|
5764
5887
|
|
5765
|
-
<xsl:value-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
|
5766
5888
|
|
5767
|
-
|
5768
|
-
|
5769
|
-
</
|
5770
|
-
<
|
5771
|
-
<xsl:
|
5772
|
-
|
5773
|
-
|
5774
|
-
|
5775
|
-
|
5776
|
-
|
5777
|
-
|
5778
|
-
|
5779
|
-
|
5780
|
-
|
5889
|
+
|
5890
|
+
</xsl:for-each>
|
5891
|
+
</xsl:variable>
|
5892
|
+
<xsl:choose>
|
5893
|
+
<xsl:when test="normalize-space($title) != ''">
|
5894
|
+
<xsl:value-of select="$title"/>
|
5895
|
+
</xsl:when>
|
5896
|
+
<xsl:otherwise>
|
5897
|
+
<xsl:text> </xsl:text>
|
5898
|
+
</xsl:otherwise>
|
5899
|
+
</xsl:choose>
|
5900
|
+
</dc:title>
|
5901
|
+
<dc:creator>
|
5902
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
5903
|
+
|
5904
|
+
|
5905
|
+
<xsl:value-of select="normalize-space(*[local-name() = 'ext']/*[local-name() = 'editorialgroup']/*[local-name() = 'committee'])"/>
|
5906
|
+
|
5907
|
+
|
5908
|
+
</xsl:for-each>
|
5909
|
+
</dc:creator>
|
5910
|
+
<dc:description>
|
5911
|
+
<xsl:variable name="abstract">
|
5912
|
+
|
5913
|
+
|
5914
|
+
<xsl:value-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
|
5915
|
+
|
5916
|
+
</xsl:variable>
|
5917
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
5918
|
+
</dc:description>
|
5919
|
+
<pdf:Keywords>
|
5920
|
+
<xsl:call-template name="insertKeywords"/>
|
5921
|
+
</pdf:Keywords>
|
5922
|
+
</rdf:Description>
|
5923
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
5924
|
+
<!-- XMP properties go here -->
|
5925
|
+
<xmp:CreatorTool/>
|
5926
|
+
</rdf:Description>
|
5927
|
+
</rdf:RDF>
|
5928
|
+
</x:xmpmeta>
|
5781
5929
|
</xsl:template><xsl:template name="getId">
|
5782
5930
|
<xsl:choose>
|
5783
5931
|
<xsl:when test="../@id">
|