metanorma-m3aawg 1.7.8 → 1.7.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/m3aawg/converter.rb +3 -2
- data/lib/asciidoctor/m3aawg/isodoc.rng +49 -11
- data/lib/asciidoctor/m3aawg/reqt.rng +15 -4
- data/lib/isodoc/m3aawg/m3aawg.policy.xsl +355 -60
- data/lib/isodoc/m3aawg/m3aawg.report.xsl +355 -60
- data/lib/metanorma/m3aawg/processor.rb +1 -2
- data/lib/metanorma/m3aawg/version.rb +1 -1
- metadata +2 -2
@@ -39,7 +39,7 @@
|
|
39
39
|
|
40
40
|
<xsl:template match="/">
|
41
41
|
<xsl:call-template name="namespaceCheck"/>
|
42
|
-
<fo:root font-family="Garamond" font-size="12pt" xml:lang="{$lang}">
|
42
|
+
<fo:root font-family="EB Garamond 12" font-size="12pt" xml:lang="{$lang}">
|
43
43
|
<fo:layout-master-set>
|
44
44
|
|
45
45
|
<!-- cover page -->
|
@@ -114,7 +114,7 @@
|
|
114
114
|
</fo:block>
|
115
115
|
</fo:block-container>
|
116
116
|
</fo:static-content>
|
117
|
-
<fo:static-content flow-name="footer">
|
117
|
+
<fo:static-content flow-name="footer" role="artifact">
|
118
118
|
<fo:block-container height="31mm" font-size="10pt">
|
119
119
|
<fo:block text-align-last="justify" margin-top="2mm">
|
120
120
|
<fo:inline font-weight="bold">
|
@@ -173,7 +173,7 @@
|
|
173
173
|
</fo:inline>
|
174
174
|
</fo:block>
|
175
175
|
|
176
|
-
<fo:block font-size="22pt" margin-bottom="12pt">
|
176
|
+
<fo:block font-size="22pt" margin-bottom="12pt" role="H1">
|
177
177
|
<xsl:value-of select="$title-en"/>
|
178
178
|
</fo:block>
|
179
179
|
<!-- Version 1.0 -->
|
@@ -225,8 +225,8 @@
|
|
225
225
|
<xsl:with-param name="name" select="'title-toc'"/>
|
226
226
|
</xsl:call-template>
|
227
227
|
</xsl:variable>
|
228
|
-
<fo:block font-size="12pt" font-weight="bold" text-decoration="underline" margin-bottom="4pt"><xsl:value-of select="$title-toc"/></fo:block>
|
229
|
-
<fo:block font-size="10pt">
|
228
|
+
<fo:block font-size="12pt" font-weight="bold" text-decoration="underline" margin-bottom="4pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
|
229
|
+
<fo:block font-size="10pt" role="TOC">
|
230
230
|
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
231
231
|
<xsl:choose>
|
232
232
|
<xsl:when test="@section = ''">
|
@@ -235,7 +235,7 @@
|
|
235
235
|
<fo:table-body>
|
236
236
|
<fo:table-row height="6mm">
|
237
237
|
<fo:table-cell>
|
238
|
-
<fo:block text-align-last="justify">
|
238
|
+
<fo:block text-align-last="justify" role="TOCI">
|
239
239
|
<xsl:if test="@level = 1">
|
240
240
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
241
241
|
</xsl:if>
|
@@ -261,7 +261,7 @@
|
|
261
261
|
<fo:table-body>
|
262
262
|
<fo:table-row height="6mm">
|
263
263
|
<fo:table-cell>
|
264
|
-
<fo:block font-weight="bold">
|
264
|
+
<fo:block font-weight="bold" role="TOCI">
|
265
265
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
266
266
|
<xsl:choose>
|
267
267
|
<!-- <xsl:when test="@section = ''">
|
@@ -279,7 +279,7 @@
|
|
279
279
|
</fo:block>
|
280
280
|
</fo:table-cell>
|
281
281
|
<fo:table-cell>
|
282
|
-
<fo:block text-align-last="justify">
|
282
|
+
<fo:block text-align-last="justify" role="TOCI">
|
283
283
|
<xsl:if test="@level = 1">
|
284
284
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
285
285
|
</xsl:if>
|
@@ -447,7 +447,10 @@
|
|
447
447
|
<!-- ====== -->
|
448
448
|
|
449
449
|
<xsl:template match="m3d:boilerplate//m3d:title">
|
450
|
-
<
|
450
|
+
<xsl:variable name="level">
|
451
|
+
<xsl:call-template name="getLevel"/>
|
452
|
+
</xsl:variable>
|
453
|
+
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="15.5pt" keep-with-next="always" role="H{$level}">
|
451
454
|
<xsl:apply-templates/>
|
452
455
|
</fo:block>
|
453
456
|
</xsl:template>
|
@@ -463,8 +466,9 @@
|
|
463
466
|
<xsl:otherwise>12pt</xsl:otherwise>
|
464
467
|
</xsl:choose>
|
465
468
|
</xsl:variable>
|
466
|
-
<fo:block font-size="{$font-size}" text-align="center" margin-bottom="24pt" keep-with-next="always">
|
469
|
+
<fo:block font-size="{$font-size}" text-align="center" margin-bottom="24pt" keep-with-next="always" role="H1">
|
467
470
|
<xsl:apply-templates/>
|
471
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
468
472
|
</fo:block>
|
469
473
|
</xsl:template>
|
470
474
|
|
@@ -511,8 +515,10 @@
|
|
511
515
|
</xsl:choose>
|
512
516
|
</xsl:attribute>
|
513
517
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
518
|
+
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
514
519
|
|
515
520
|
<xsl:apply-templates/>
|
521
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
516
522
|
|
517
523
|
</xsl:element>
|
518
524
|
|
@@ -1066,13 +1072,14 @@
|
|
1066
1072
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1067
1073
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1068
1074
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
1075
|
+
<xsl:attribute name="role">Code</xsl:attribute>
|
1069
1076
|
|
1070
1077
|
|
1071
1078
|
|
1072
1079
|
|
1073
1080
|
|
1074
1081
|
|
1075
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1082
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
1076
1083
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1077
1084
|
|
1078
1085
|
|
@@ -1090,8 +1097,13 @@
|
|
1090
1097
|
|
1091
1098
|
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
1092
1099
|
|
1093
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1094
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1100
|
+
</xsl:attribute-set><xsl:attribute-set name="subject-style">
|
1101
|
+
</xsl:attribute-set><xsl:attribute-set name="inherit-style">
|
1102
|
+
</xsl:attribute-set><xsl:attribute-set name="description-style">
|
1103
|
+
</xsl:attribute-set><xsl:attribute-set name="specification-style">
|
1104
|
+
</xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
|
1105
|
+
</xsl:attribute-set><xsl:attribute-set name="verification-style">
|
1106
|
+
</xsl:attribute-set><xsl:attribute-set name="import-style">
|
1095
1107
|
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
1096
1108
|
|
1097
1109
|
|
@@ -1160,6 +1172,7 @@
|
|
1160
1172
|
|
1161
1173
|
|
1162
1174
|
|
1175
|
+
|
1163
1176
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1164
1177
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1165
1178
|
|
@@ -1302,7 +1315,8 @@
|
|
1302
1315
|
|
1303
1316
|
|
1304
1317
|
|
1305
|
-
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1318
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1319
|
+
<xsl:attribute name="role">BlockQuote</xsl:attribute>
|
1306
1320
|
|
1307
1321
|
|
1308
1322
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1388,7 +1402,7 @@
|
|
1388
1402
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1389
1403
|
|
1390
1404
|
|
1391
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1405
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
1392
1406
|
|
1393
1407
|
|
1394
1408
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
@@ -1431,13 +1445,20 @@
|
|
1431
1445
|
|
1432
1446
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1433
1447
|
|
1434
|
-
</xsl:attribute-set><xsl:
|
1448
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1449
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1450
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
1435
1451
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1436
1452
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1437
1453
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1438
1454
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1439
1455
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1440
|
-
</xsl:template><xsl:template name="
|
1456
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1457
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1458
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1459
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1460
|
+
</xsl:for-each>
|
1461
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1441
1462
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1442
1463
|
|
1443
1464
|
<!-- Normative references -->
|
@@ -1450,13 +1471,33 @@
|
|
1450
1471
|
<!-- Bibliography -->
|
1451
1472
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
1452
1473
|
|
1453
|
-
</xsl:template><xsl:template name="
|
1474
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1475
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1476
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1477
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1478
|
+
</xsl:for-each>
|
1479
|
+
|
1480
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1481
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1482
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1483
|
+
</xsl:for-each>
|
1484
|
+
|
1485
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1486
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1487
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1488
|
+
</xsl:for-each>
|
1489
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1454
1490
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1455
1491
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1456
1492
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1457
1493
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1458
1494
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1459
|
-
</xsl:template><xsl:template name="
|
1495
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1496
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1497
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1498
|
+
<xsl:apply-templates select="."/>
|
1499
|
+
</xsl:for-each>
|
1500
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1460
1501
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1461
1502
|
|
1462
1503
|
<xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
@@ -1472,6 +1513,28 @@
|
|
1472
1513
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1473
1514
|
<!-- Bibliography -->
|
1474
1515
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1516
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1517
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1518
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1519
|
+
<xsl:apply-templates select="."/>
|
1520
|
+
|
1521
|
+
<xsl:if test="local-name()='clause' and @type='scope'">
|
1522
|
+
<xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1523
|
+
<fo:block break-after="page"/>
|
1524
|
+
</xsl:if>
|
1525
|
+
</xsl:if>
|
1526
|
+
|
1527
|
+
</xsl:for-each>
|
1528
|
+
|
1529
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1530
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1531
|
+
<xsl:apply-templates select="."/>
|
1532
|
+
</xsl:for-each>
|
1533
|
+
|
1534
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1535
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1536
|
+
<xsl:apply-templates select="."/>
|
1537
|
+
</xsl:for-each>
|
1475
1538
|
</xsl:template><xsl:template match="text()">
|
1476
1539
|
<xsl:value-of select="."/>
|
1477
1540
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -1502,7 +1565,9 @@
|
|
1502
1565
|
|
1503
1566
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1504
1567
|
|
1505
|
-
|
1568
|
+
|
1569
|
+
|
1570
|
+
|
1506
1571
|
|
1507
1572
|
<xsl:call-template name="fn_name_display"/>
|
1508
1573
|
|
@@ -1621,6 +1686,8 @@
|
|
1621
1686
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1622
1687
|
</xsl:if>
|
1623
1688
|
|
1689
|
+
|
1690
|
+
|
1624
1691
|
<xsl:choose>
|
1625
1692
|
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1626
1693
|
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
@@ -1908,9 +1975,9 @@
|
|
1908
1975
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1909
1976
|
<xsl:with-param name="continued">true</xsl:with-param>
|
1910
1977
|
</xsl:apply-templates>
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1978
|
+
|
1979
|
+
|
1980
|
+
|
1914
1981
|
|
1915
1982
|
</fo:table-cell>
|
1916
1983
|
</fo:table-row>
|
@@ -1992,7 +2059,11 @@
|
|
1992
2059
|
|
1993
2060
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1994
2061
|
|
1995
|
-
<xsl:
|
2062
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
2063
|
+
|
2064
|
+
</xsl:variable>
|
2065
|
+
|
2066
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
|
1996
2067
|
|
1997
2068
|
<xsl:variable name="cols-count">
|
1998
2069
|
<xsl:choose>
|
@@ -2133,6 +2204,19 @@
|
|
2133
2204
|
|
2134
2205
|
</fo:table-body>
|
2135
2206
|
|
2207
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
|
2208
|
+
<xsl:choose>
|
2209
|
+
<xsl:when test="substring-after(., '—') != ''">
|
2210
|
+
<xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
|
2211
|
+
</xsl:when>
|
2212
|
+
<xsl:otherwise>
|
2213
|
+
<xsl:value-of select="."/>
|
2214
|
+
</xsl:otherwise>
|
2215
|
+
</xsl:choose>
|
2216
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
|
2217
|
+
<xsl:apply-templates mode="presentation_name"/>
|
2218
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
|
2219
|
+
<xsl:apply-templates select="."/>
|
2136
2220
|
</xsl:template><xsl:template match="*[local-name()='tr']">
|
2137
2221
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
2138
2222
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
@@ -2305,14 +2389,12 @@
|
|
2305
2389
|
<xsl:apply-templates/>
|
2306
2390
|
</xsl:template><xsl:template name="fn_display">
|
2307
2391
|
<xsl:variable name="references">
|
2392
|
+
|
2308
2393
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
2309
|
-
<
|
2310
|
-
|
2311
|
-
|
2312
|
-
<xsl:apply-templates/>
|
2313
|
-
</fn>
|
2394
|
+
<xsl:call-template name="create_fn"/>
|
2314
2395
|
</xsl:for-each>
|
2315
2396
|
</xsl:variable>
|
2397
|
+
|
2316
2398
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
2317
2399
|
<xsl:variable name="reference" select="@reference"/>
|
2318
2400
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
@@ -2348,6 +2430,12 @@
|
|
2348
2430
|
</fo:block>
|
2349
2431
|
</xsl:if>
|
2350
2432
|
</xsl:for-each>
|
2433
|
+
</xsl:template><xsl:template name="create_fn">
|
2434
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2435
|
+
|
2436
|
+
|
2437
|
+
<xsl:apply-templates/>
|
2438
|
+
</fn>
|
2351
2439
|
</xsl:template><xsl:template name="fn_name_display">
|
2352
2440
|
<!-- <xsl:variable name="references">
|
2353
2441
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
@@ -3332,16 +3420,68 @@
|
|
3332
3420
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3333
3421
|
</xsl:call-template>
|
3334
3422
|
|
3423
|
+
|
3424
|
+
|
3335
3425
|
<xsl:variable name="mathml">
|
3336
3426
|
<xsl:apply-templates select="." mode="mathml"/>
|
3337
3427
|
</xsl:variable>
|
3338
3428
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3339
3429
|
|
3340
3430
|
|
3431
|
+
<xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
|
3432
|
+
<xsl:variable name="comment_text_">
|
3433
|
+
<xsl:choose>
|
3434
|
+
<xsl:when test="normalize-space($comment_text_following) != ''">
|
3435
|
+
<xsl:value-of select="$comment_text_following"/>
|
3436
|
+
</xsl:when>
|
3437
|
+
<xsl:otherwise>
|
3438
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
3439
|
+
</xsl:otherwise>
|
3440
|
+
</xsl:choose>
|
3441
|
+
</xsl:variable>
|
3442
|
+
<xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
|
3443
|
+
|
3444
|
+
<xsl:if test="normalize-space($comment_text) != ''">
|
3445
|
+
<!-- put Mathin Alternate Text -->
|
3446
|
+
<xsl:attribute name="fox:alt-text">
|
3447
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
|
3448
|
+
</xsl:attribute>
|
3449
|
+
</xsl:if>
|
3450
|
+
|
3451
|
+
<xsl:variable name="mathml_content">
|
3452
|
+
<xsl:apply-templates select="." mode="mathml_actual_text"/>
|
3453
|
+
</xsl:variable>
|
3454
|
+
<!-- put MathML in Actual Text -->
|
3455
|
+
<xsl:attribute name="fox:actual-text">
|
3456
|
+
<xsl:value-of select="$mathml_content"/>
|
3457
|
+
</xsl:attribute>
|
3458
|
+
|
3459
|
+
|
3341
3460
|
<!-- <xsl:copy-of select="."/> -->
|
3342
3461
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3343
3462
|
</fo:instream-foreign-object>
|
3344
3463
|
</fo:inline>
|
3464
|
+
</xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
|
3465
|
+
<!-- <xsl:text>a+b</xsl:text> -->
|
3466
|
+
<xsl:text><</xsl:text>
|
3467
|
+
<xsl:value-of select="local-name()"/>
|
3468
|
+
<xsl:if test="local-name() = 'math'">
|
3469
|
+
<xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
|
3470
|
+
</xsl:if>
|
3471
|
+
<xsl:for-each select="@*">
|
3472
|
+
<xsl:text> </xsl:text>
|
3473
|
+
<xsl:value-of select="local-name()"/>
|
3474
|
+
<xsl:text>="</xsl:text>
|
3475
|
+
<xsl:value-of select="."/>
|
3476
|
+
<xsl:text>"</xsl:text>
|
3477
|
+
</xsl:for-each>
|
3478
|
+
<xsl:text>></xsl:text>
|
3479
|
+
<xsl:apply-templates mode="mathml_actual_text"/>
|
3480
|
+
<xsl:text></</xsl:text>
|
3481
|
+
<xsl:value-of select="local-name()"/>
|
3482
|
+
<xsl:text>></xsl:text>
|
3483
|
+
</xsl:template><xsl:template match="text()" mode="mathml_actual_text">
|
3484
|
+
<xsl:value-of select="normalize-space()"/>
|
3345
3485
|
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3346
3486
|
<xsl:copy>
|
3347
3487
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
@@ -3351,19 +3491,6 @@
|
|
3351
3491
|
<!-- replace start and end spaces to non-break space -->
|
3352
3492
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3353
3493
|
</xsl:copy>
|
3354
|
-
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
3355
|
-
<xsl:copy>
|
3356
|
-
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3357
|
-
</xsl:copy>
|
3358
|
-
<xsl:choose>
|
3359
|
-
<!-- if in msub, then don't add space -->
|
3360
|
-
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
3361
|
-
<!-- if next char in digit, don't add space -->
|
3362
|
-
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
3363
|
-
<xsl:otherwise>
|
3364
|
-
<mathml:mspace width="0.5ex"/>
|
3365
|
-
</xsl:otherwise>
|
3366
|
-
</xsl:choose>
|
3367
3494
|
</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">
|
3368
3495
|
<xsl:variable name="target">
|
3369
3496
|
<xsl:choose>
|
@@ -3416,7 +3543,10 @@
|
|
3416
3543
|
</fo:block>
|
3417
3544
|
<xsl:apply-templates/>
|
3418
3545
|
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
3419
|
-
<
|
3546
|
+
<xsl:variable name="level">
|
3547
|
+
<xsl:call-template name="getLevel"/>
|
3548
|
+
</xsl:variable>
|
3549
|
+
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
3420
3550
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
3421
3551
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
3422
3552
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -3451,9 +3581,10 @@
|
|
3451
3581
|
|
3452
3582
|
</xsl:variable>
|
3453
3583
|
|
3584
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
3454
3585
|
<xsl:choose>
|
3455
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
3456
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
3586
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
3587
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
3457
3588
|
</xsl:choose>
|
3458
3589
|
<xsl:apply-templates/>
|
3459
3590
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
@@ -3603,7 +3734,10 @@
|
|
3603
3734
|
</fo:block>
|
3604
3735
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
3605
3736
|
<xsl:if test="normalize-space() != ''">
|
3606
|
-
<
|
3737
|
+
<xsl:variable name="level">
|
3738
|
+
<xsl:call-template name="getLevelTermName"/>
|
3739
|
+
</xsl:variable>
|
3740
|
+
<fo:inline role="H{$level}">
|
3607
3741
|
<xsl:apply-templates/>
|
3608
3742
|
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
3609
3743
|
<xsl:text>.</xsl:text>
|
@@ -3904,6 +4038,13 @@
|
|
3904
4038
|
</xsl:attribute>
|
3905
4039
|
<xsl:apply-templates mode="svg_update"/>
|
3906
4040
|
</xsl:copy>
|
4041
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4042
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4043
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4044
|
+
<xsl:call-template name="image_svg">
|
4045
|
+
<xsl:with-param name="name" select="$name"/>
|
4046
|
+
</xsl:call-template>
|
4047
|
+
</xsl:for-each>
|
3907
4048
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
3908
4049
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
3909
4050
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4008,7 +4149,7 @@
|
|
4008
4149
|
</fo:basic-link>
|
4009
4150
|
</fo:block>
|
4010
4151
|
</fo:block-container>
|
4011
|
-
</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">
|
4152
|
+
</xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
|
4012
4153
|
<xsl:apply-templates mode="contents"/>
|
4013
4154
|
<xsl:text> </xsl:text>
|
4014
4155
|
</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">
|
@@ -4234,6 +4375,7 @@
|
|
4234
4375
|
</xsl:when>
|
4235
4376
|
<xsl:otherwise>
|
4236
4377
|
<xsl:apply-templates/>
|
4378
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
4237
4379
|
</xsl:otherwise>
|
4238
4380
|
</xsl:choose>
|
4239
4381
|
</fo:block>
|
@@ -4374,14 +4516,6 @@
|
|
4374
4516
|
<fo:block>
|
4375
4517
|
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
4376
4518
|
</fo:block>
|
4377
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4378
|
-
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
4379
|
-
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4380
|
-
</fo:block>
|
4381
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
4382
|
-
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
4383
|
-
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
4384
|
-
</fo:block>
|
4385
4519
|
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
4386
4520
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
4387
4521
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -4398,6 +4532,38 @@
|
|
4398
4532
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
4399
4533
|
<xsl:apply-templates/>
|
4400
4534
|
</fo:block>
|
4535
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4536
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
4537
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4538
|
+
</fo:block>
|
4539
|
+
</xsl:template><xsl:template match="*[local-name() = 'subject']">
|
4540
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
4541
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4542
|
+
</fo:block>
|
4543
|
+
</xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
4544
|
+
<fo:block xsl:use-attribute-sets="inherit-style">
|
4545
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
4546
|
+
</fo:block>
|
4547
|
+
</xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
4548
|
+
<fo:block xsl:use-attribute-sets="description-style">
|
4549
|
+
<xsl:apply-templates/>
|
4550
|
+
</fo:block>
|
4551
|
+
</xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
4552
|
+
<fo:block xsl:use-attribute-sets="specification-style">
|
4553
|
+
<xsl:apply-templates/>
|
4554
|
+
</fo:block>
|
4555
|
+
</xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
4556
|
+
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
4557
|
+
<xsl:apply-templates/>
|
4558
|
+
</fo:block>
|
4559
|
+
</xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
4560
|
+
<fo:block xsl:use-attribute-sets="verification-style">
|
4561
|
+
<xsl:apply-templates/>
|
4562
|
+
</fo:block>
|
4563
|
+
</xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
4564
|
+
<fo:block xsl:use-attribute-sets="import-style">
|
4565
|
+
<xsl:apply-templates/>
|
4566
|
+
</fo:block>
|
4401
4567
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4402
4568
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
4403
4569
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -4549,7 +4715,19 @@
|
|
4549
4715
|
</fo:inline>
|
4550
4716
|
</xsl:if>
|
4551
4717
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
4552
|
-
<
|
4718
|
+
<xsl:variable name="element">inline
|
4719
|
+
|
4720
|
+
</xsl:variable>
|
4721
|
+
<xsl:choose>
|
4722
|
+
<xsl:when test="contains($element, 'block')">
|
4723
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
4724
|
+
<xsl:apply-templates/>
|
4725
|
+
</fo:block>
|
4726
|
+
</xsl:when>
|
4727
|
+
<xsl:otherwise>
|
4728
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4729
|
+
</xsl:otherwise>
|
4730
|
+
</xsl:choose>
|
4553
4731
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
4554
4732
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4555
4733
|
|
@@ -4651,8 +4829,8 @@
|
|
4651
4829
|
</xsl:if>
|
4652
4830
|
</xsl:template><xsl:variable name="localized.source">
|
4653
4831
|
<xsl:call-template name="getLocalizedString">
|
4654
|
-
|
4655
|
-
|
4832
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4833
|
+
</xsl:call-template>
|
4656
4834
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4657
4835
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4658
4836
|
<xsl:if test="normalize-space(@citeas) = ''">
|
@@ -4662,6 +4840,7 @@
|
|
4662
4840
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4663
4841
|
<xsl:apply-templates/>
|
4664
4842
|
</fo:inline>
|
4843
|
+
|
4665
4844
|
</fo:basic-link>
|
4666
4845
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4667
4846
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -4728,6 +4907,9 @@
|
|
4728
4907
|
|
4729
4908
|
</xsl:if>
|
4730
4909
|
|
4910
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
4911
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
4912
|
+
|
4731
4913
|
|
4732
4914
|
|
4733
4915
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -4740,7 +4922,9 @@
|
|
4740
4922
|
|
4741
4923
|
|
4742
4924
|
</xsl:if>
|
4743
|
-
|
4925
|
+
|
4926
|
+
|
4927
|
+
|
4744
4928
|
<xsl:apply-templates/>
|
4745
4929
|
</fo:basic-link>
|
4746
4930
|
|
@@ -5083,6 +5267,7 @@
|
|
5083
5267
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
5084
5268
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
5085
5269
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
5270
|
+
|
5086
5271
|
<xsl:apply-templates/>
|
5087
5272
|
</fo:block>
|
5088
5273
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -5122,7 +5307,6 @@
|
|
5122
5307
|
</xsl:template><xsl:template name="processBibitem">
|
5123
5308
|
|
5124
5309
|
|
5125
|
-
<!-- end BIPM bibitem processing-->
|
5126
5310
|
|
5127
5311
|
|
5128
5312
|
|
@@ -5252,6 +5436,97 @@
|
|
5252
5436
|
<fo:block-container border="1pt solid black" width="50%">
|
5253
5437
|
<fo:block> </fo:block>
|
5254
5438
|
</fo:block-container>
|
5439
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5440
|
+
<xsl:param name="colwidths"/>
|
5441
|
+
<xsl:variable name="colwidths_">
|
5442
|
+
<xsl:choose>
|
5443
|
+
<xsl:when test="not($colwidths)">
|
5444
|
+
<xsl:variable name="toc_table_simple">
|
5445
|
+
<tbody>
|
5446
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5447
|
+
</tbody>
|
5448
|
+
</xsl:variable>
|
5449
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5450
|
+
<xsl:call-template name="calculate-column-widths">
|
5451
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5452
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5453
|
+
</xsl:call-template>
|
5454
|
+
</xsl:when>
|
5455
|
+
<xsl:otherwise>
|
5456
|
+
<xsl:copy-of select="$colwidths"/>
|
5457
|
+
</xsl:otherwise>
|
5458
|
+
</xsl:choose>
|
5459
|
+
</xsl:variable>
|
5460
|
+
<fo:block role="TOCI" space-after="16pt">
|
5461
|
+
<fo:table width="100%" table-layout="fixed">
|
5462
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5463
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5464
|
+
</xsl:for-each>
|
5465
|
+
<fo:table-body>
|
5466
|
+
<xsl:apply-templates/>
|
5467
|
+
</fo:table-body>
|
5468
|
+
</fo:table>
|
5469
|
+
</fo:block>
|
5470
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5471
|
+
<fo:table-row min-height="5mm">
|
5472
|
+
<xsl:apply-templates/>
|
5473
|
+
</fo:table-row>
|
5474
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5475
|
+
<xsl:apply-templates/>
|
5476
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5477
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5478
|
+
<xsl:variable name="target" select="@target"/>
|
5479
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5480
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5481
|
+
<fo:table-cell>
|
5482
|
+
<fo:block>
|
5483
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5484
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5485
|
+
<xsl:choose>
|
5486
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5487
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5488
|
+
</xsl:choose>
|
5489
|
+
</xsl:for-each>
|
5490
|
+
</fo:basic-link>
|
5491
|
+
</fo:block>
|
5492
|
+
</fo:table-cell>
|
5493
|
+
</xsl:for-each>
|
5494
|
+
<!-- last column - for page numbers -->
|
5495
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5496
|
+
<fo:block>
|
5497
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5498
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5499
|
+
</fo:basic-link>
|
5500
|
+
</fo:block>
|
5501
|
+
</fo:table-cell>
|
5502
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5503
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5504
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
|
5505
|
+
<tr>
|
5506
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5507
|
+
</tr>
|
5508
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5509
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5510
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5511
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5512
|
+
<td>
|
5513
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5514
|
+
<xsl:copy-of select="."/>
|
5515
|
+
</xsl:for-each>
|
5516
|
+
</td>
|
5517
|
+
</xsl:for-each>
|
5518
|
+
<td>333</td> <!-- page number, just for fill -->
|
5519
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5520
|
+
<fo:inline padding-right="5mm"> </fo:inline>
|
5521
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5522
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5523
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5524
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5525
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5526
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5527
|
+
</svg>
|
5528
|
+
</fo:instream-foreign-object>
|
5529
|
+
</fo:inline>
|
5255
5530
|
</xsl:template><xsl:template name="convertDate">
|
5256
5531
|
<xsl:param name="date"/>
|
5257
5532
|
<xsl:param name="format" select="'short'"/>
|
@@ -5490,6 +5765,26 @@
|
|
5490
5765
|
<xsl:value-of select="$level"/>
|
5491
5766
|
</xsl:otherwise>
|
5492
5767
|
</xsl:choose>
|
5768
|
+
</xsl:template><xsl:template name="getLevelTermName">
|
5769
|
+
<xsl:choose>
|
5770
|
+
<xsl:when test="normalize-space(../@depth) != ''">
|
5771
|
+
<xsl:value-of select="../@depth"/>
|
5772
|
+
</xsl:when>
|
5773
|
+
<xsl:otherwise>
|
5774
|
+
<xsl:variable name="title_level_">
|
5775
|
+
<xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
|
5776
|
+
<xsl:call-template name="getLevel"/>
|
5777
|
+
</xsl:for-each>
|
5778
|
+
</xsl:variable>
|
5779
|
+
<xsl:variable name="title_level" select="normalize-space($title_level_)"/>
|
5780
|
+
<xsl:choose>
|
5781
|
+
<xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
|
5782
|
+
<xsl:otherwise>
|
5783
|
+
<xsl:call-template name="getLevel"/>
|
5784
|
+
</xsl:otherwise>
|
5785
|
+
</xsl:choose>
|
5786
|
+
</xsl:otherwise>
|
5787
|
+
</xsl:choose>
|
5493
5788
|
</xsl:template><xsl:template name="split">
|
5494
5789
|
<xsl:param name="pText" select="."/>
|
5495
5790
|
<xsl:param name="sep" select="','"/>
|