metanorma-cc 1.7.11 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/quickstart.adoc +2 -2
- data/lib/asciidoctor/cc/basicdoc.rng +21 -4
- data/lib/asciidoctor/cc/converter.rb +14 -12
- data/lib/asciidoctor/cc/isodoc.rng +429 -76
- data/lib/asciidoctor/cc/reqt.rng +23 -2
- data/lib/isodoc/cc/cc.standard.xsl +198 -20
- data/lib/isodoc/cc/html/wordstyle.css +11 -0
- data/lib/isodoc/cc/html/wordstyle.scss +13 -2
- data/lib/metanorma/cc/version.rb +1 -1
- data/metanorma-cc.gemspec +1 -1
- metadata +5 -5
data/lib/asciidoctor/cc/reqt.rng
CHANGED
@@ -58,6 +58,14 @@
|
|
58
58
|
<optional>
|
59
59
|
<attribute name="type"/>
|
60
60
|
</optional>
|
61
|
+
<optional>
|
62
|
+
<attribute name="tag"/>
|
63
|
+
</optional>
|
64
|
+
<optional>
|
65
|
+
<attribute name="multilingual-rendering">
|
66
|
+
<ref name="MultilingualRenderingType"/>
|
67
|
+
</attribute>
|
68
|
+
</optional>
|
61
69
|
<optional>
|
62
70
|
<ref name="reqtitle"/>
|
63
71
|
</optional>
|
@@ -101,7 +109,9 @@
|
|
101
109
|
</define>
|
102
110
|
<define name="label">
|
103
111
|
<element name="label">
|
104
|
-
<
|
112
|
+
<oneOrMore>
|
113
|
+
<ref name="TextElement"/>
|
114
|
+
</oneOrMore>
|
105
115
|
</element>
|
106
116
|
</define>
|
107
117
|
<define name="subject">
|
@@ -175,8 +185,19 @@
|
|
175
185
|
<data type="boolean"/>
|
176
186
|
</attribute>
|
177
187
|
</optional>
|
188
|
+
<optional>
|
189
|
+
<attribute name="tag"/>
|
190
|
+
</optional>
|
191
|
+
<optional>
|
192
|
+
<attribute name="multilingual-rendering">
|
193
|
+
<ref name="MultilingualRenderingType"/>
|
194
|
+
</attribute>
|
195
|
+
</optional>
|
178
196
|
<oneOrMore>
|
179
|
-
<
|
197
|
+
<choice>
|
198
|
+
<ref name="BasicBlock"/>
|
199
|
+
<ref name="component"/>
|
200
|
+
</choice>
|
180
201
|
</oneOrMore>
|
181
202
|
</define>
|
182
203
|
<define name="ObligationType">
|
@@ -649,7 +649,7 @@
|
|
649
649
|
</xsl:variable>
|
650
650
|
<fo:block font-size="{$font-size}" line-height="1.1" role="H{$levelTerm}">
|
651
651
|
<fo:block font-weight="bold" keep-with-next="always">
|
652
|
-
<xsl:apply-templates select="ancestor::csd:term/csd:name" mode="presentation"/>
|
652
|
+
<xsl:apply-templates select="ancestor::csd:term[1]/csd:name" mode="presentation"/>
|
653
653
|
</fo:block>
|
654
654
|
<fo:block font-weight="bold" keep-with-next="always">
|
655
655
|
<xsl:apply-templates/>
|
@@ -911,6 +911,8 @@
|
|
911
911
|
|
912
912
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
913
913
|
|
914
|
+
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
915
|
+
|
914
916
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
915
917
|
|
916
918
|
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
@@ -1201,6 +1203,11 @@
|
|
1201
1203
|
|
1202
1204
|
|
1203
1205
|
|
1206
|
+
</xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
|
1207
|
+
|
1208
|
+
|
1209
|
+
|
1210
|
+
|
1204
1211
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1205
1212
|
|
1206
1213
|
|
@@ -1368,13 +1375,20 @@
|
|
1368
1375
|
|
1369
1376
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1370
1377
|
|
1371
|
-
</xsl:attribute-set><xsl:
|
1378
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1379
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1380
|
+
</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">
|
1372
1381
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1373
1382
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1374
1383
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1375
1384
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1376
1385
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1377
|
-
</xsl:template><xsl:template name="
|
1386
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1387
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1388
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1389
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1390
|
+
</xsl:for-each>
|
1391
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1378
1392
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1379
1393
|
|
1380
1394
|
<!-- Normative references -->
|
@@ -1387,13 +1401,33 @@
|
|
1387
1401
|
<!-- Bibliography -->
|
1388
1402
|
<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"/>
|
1389
1403
|
|
1390
|
-
</xsl:template><xsl:template name="
|
1404
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1405
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1406
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1407
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1408
|
+
</xsl:for-each>
|
1409
|
+
|
1410
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1411
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1412
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1413
|
+
</xsl:for-each>
|
1414
|
+
|
1415
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1416
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1417
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1418
|
+
</xsl:for-each>
|
1419
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1391
1420
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1392
1421
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1393
1422
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1394
1423
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1395
1424
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1396
|
-
</xsl:template><xsl:template name="
|
1425
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1426
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1427
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1428
|
+
<xsl:apply-templates select="."/>
|
1429
|
+
</xsl:for-each>
|
1430
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1397
1431
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1398
1432
|
|
1399
1433
|
<!-- Normative references -->
|
@@ -1405,6 +1439,22 @@
|
|
1405
1439
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1406
1440
|
<!-- Bibliography -->
|
1407
1441
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1442
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1443
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1444
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1445
|
+
<xsl:apply-templates select="."/>
|
1446
|
+
|
1447
|
+
</xsl:for-each>
|
1448
|
+
|
1449
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1450
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1451
|
+
<xsl:apply-templates select="."/>
|
1452
|
+
</xsl:for-each>
|
1453
|
+
|
1454
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1455
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1456
|
+
<xsl:apply-templates select="."/>
|
1457
|
+
</xsl:for-each>
|
1408
1458
|
</xsl:template><xsl:template match="text()">
|
1409
1459
|
<xsl:value-of select="."/>
|
1410
1460
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -2241,9 +2291,8 @@
|
|
2241
2291
|
|
2242
2292
|
<!-- Table's note name (NOTE, for example) -->
|
2243
2293
|
|
2244
|
-
<fo:inline padding-right="2mm">
|
2294
|
+
<fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
|
2245
2295
|
|
2246
|
-
|
2247
2296
|
|
2248
2297
|
|
2249
2298
|
|
@@ -2750,6 +2799,7 @@
|
|
2750
2799
|
<fo:table-cell>
|
2751
2800
|
|
2752
2801
|
<fo:block margin-top="6pt">
|
2802
|
+
<xsl:copy-of select="@id"/>
|
2753
2803
|
|
2754
2804
|
|
2755
2805
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
@@ -2855,6 +2905,8 @@
|
|
2855
2905
|
<xsl:if test="$font-size != ''">
|
2856
2906
|
<xsl:attribute name="font-size">
|
2857
2907
|
<xsl:choose>
|
2908
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
2909
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
2858
2910
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2859
2911
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2860
2912
|
</xsl:choose>
|
@@ -3585,14 +3637,18 @@
|
|
3585
3637
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
3586
3638
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
3587
3639
|
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
3640
|
+
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
3588
3641
|
<fo:block id="{@id}">
|
3589
3642
|
<xsl:apply-templates/>
|
3590
3643
|
</fo:block>
|
3591
3644
|
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
3645
|
+
<!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
|
3592
3646
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
3593
3647
|
|
3594
3648
|
|
3595
|
-
|
3649
|
+
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
3650
|
+
|
3651
|
+
</xsl:if>
|
3596
3652
|
<xsl:apply-templates/>
|
3597
3653
|
</fo:block>
|
3598
3654
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
@@ -3654,6 +3710,7 @@
|
|
3654
3710
|
<xsl:otherwise>
|
3655
3711
|
<fo:block xsl:use-attribute-sets="image-style">
|
3656
3712
|
|
3713
|
+
|
3657
3714
|
<xsl:variable name="src">
|
3658
3715
|
<xsl:call-template name="image_src"/>
|
3659
3716
|
</xsl:variable>
|
@@ -3901,6 +3958,13 @@
|
|
3901
3958
|
</xsl:attribute>
|
3902
3959
|
<xsl:apply-templates mode="svg_update"/>
|
3903
3960
|
</xsl:copy>
|
3961
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
3962
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
3963
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
3964
|
+
<xsl:call-template name="image_svg">
|
3965
|
+
<xsl:with-param name="name" select="$name"/>
|
3966
|
+
</xsl:call-template>
|
3967
|
+
</xsl:for-each>
|
3904
3968
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
3905
3969
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
3906
3970
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4005,7 +4069,7 @@
|
|
4005
4069
|
</fo:basic-link>
|
4006
4070
|
</fo:block>
|
4007
4071
|
</fo:block-container>
|
4008
|
-
</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">
|
4072
|
+
</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">
|
4009
4073
|
<xsl:apply-templates mode="contents"/>
|
4010
4074
|
<xsl:text> </xsl:text>
|
4011
4075
|
</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">
|
@@ -4013,7 +4077,7 @@
|
|
4013
4077
|
<xsl:text> </xsl:text>
|
4014
4078
|
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4015
4079
|
<xsl:value-of select="."/>
|
4016
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']
|
4080
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
4017
4081
|
<xsl:value-of select="."/>
|
4018
4082
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4019
4083
|
<xsl:apply-templates mode="contents"/>
|
@@ -4111,6 +4175,8 @@
|
|
4111
4175
|
|
4112
4176
|
|
4113
4177
|
|
4178
|
+
|
4179
|
+
|
4114
4180
|
</fo:bookmark-tree>
|
4115
4181
|
</xsl:if>
|
4116
4182
|
</xsl:template><xsl:template name="insertFigureBookmarks">
|
@@ -4304,12 +4370,16 @@
|
|
4304
4370
|
<xsl:if test="$font-size != ''">
|
4305
4371
|
<xsl:attribute name="font-size">
|
4306
4372
|
<xsl:choose>
|
4373
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4374
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4307
4375
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4308
4376
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4309
4377
|
</xsl:choose>
|
4310
4378
|
</xsl:attribute>
|
4311
4379
|
</xsl:if>
|
4312
4380
|
|
4381
|
+
|
4382
|
+
|
4313
4383
|
<xsl:apply-templates/>
|
4314
4384
|
</fo:block>
|
4315
4385
|
|
@@ -4552,7 +4622,8 @@
|
|
4552
4622
|
</fo:block>
|
4553
4623
|
</fo:table-cell>
|
4554
4624
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
4555
|
-
<fo:block font-size="11pt"
|
4625
|
+
<fo:block font-size="11pt">
|
4626
|
+
|
4556
4627
|
<xsl:apply-templates/>
|
4557
4628
|
</fo:block>
|
4558
4629
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
@@ -4657,6 +4728,7 @@
|
|
4657
4728
|
</xsl:choose>
|
4658
4729
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4659
4730
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4731
|
+
|
4660
4732
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4661
4733
|
<xsl:variable name="termsource_text">
|
4662
4734
|
<xsl:apply-templates/>
|
@@ -4667,13 +4739,15 @@
|
|
4667
4739
|
<!-- <xsl:apply-templates /> -->
|
4668
4740
|
<xsl:copy-of select="$termsource_text"/>
|
4669
4741
|
</xsl:when>
|
4670
|
-
<xsl:otherwise>
|
4742
|
+
<xsl:otherwise>
|
4743
|
+
|
4671
4744
|
|
4672
4745
|
<xsl:text>[</xsl:text>
|
4673
4746
|
|
4674
4747
|
<!-- <xsl:apply-templates /> -->
|
4675
4748
|
<xsl:copy-of select="$termsource_text"/>
|
4676
4749
|
|
4750
|
+
|
4677
4751
|
<xsl:text>]</xsl:text>
|
4678
4752
|
|
4679
4753
|
</xsl:otherwise>
|
@@ -4685,14 +4759,15 @@
|
|
4685
4759
|
</xsl:if>
|
4686
4760
|
</xsl:template><xsl:variable name="localized.source">
|
4687
4761
|
<xsl:call-template name="getLocalizedString">
|
4688
|
-
|
4689
|
-
|
4762
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4763
|
+
</xsl:call-template>
|
4690
4764
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4691
4765
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4692
4766
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4693
4767
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4694
4768
|
</xsl:if>
|
4695
4769
|
|
4770
|
+
|
4696
4771
|
<fo:inline>
|
4697
4772
|
|
4698
4773
|
|
@@ -4700,6 +4775,7 @@
|
|
4700
4775
|
|
4701
4776
|
|
4702
4777
|
|
4778
|
+
|
4703
4779
|
<xsl:call-template name="getTitle">
|
4704
4780
|
<xsl:with-param name="name" select="'title-source'"/>
|
4705
4781
|
</xsl:call-template>
|
@@ -4711,6 +4787,7 @@
|
|
4711
4787
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4712
4788
|
<xsl:apply-templates/>
|
4713
4789
|
</fo:inline>
|
4790
|
+
|
4714
4791
|
</fo:basic-link>
|
4715
4792
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4716
4793
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -4754,12 +4831,20 @@
|
|
4754
4831
|
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
4755
4832
|
<xsl:text>— </xsl:text>
|
4756
4833
|
<xsl:apply-templates/>
|
4757
|
-
</xsl:template><xsl:
|
4834
|
+
</xsl:template><xsl:variable name="bibitem_hidden_">
|
4835
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden='true']">
|
4836
|
+
<xsl:copy-of select="."/>
|
4837
|
+
</xsl:for-each>
|
4838
|
+
<xsl:for-each select="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem']">
|
4839
|
+
<xsl:copy-of select="."/>
|
4840
|
+
</xsl:for-each>
|
4841
|
+
</xsl:variable><xsl:variable name="bibitem_hidden" select="xalan:nodeset($bibitem_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
|
4758
4842
|
|
4759
4843
|
<xsl:variable name="bibitemid">
|
4760
4844
|
<xsl:choose>
|
4761
|
-
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"
|
4762
|
-
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"
|
4845
|
+
<!-- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"></xsl:when>
|
4846
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"></xsl:when> -->
|
4847
|
+
<xsl:when test="$bibitem_hidden/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
4763
4848
|
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
4764
4849
|
</xsl:choose>
|
4765
4850
|
</xsl:variable>
|
@@ -4777,6 +4862,9 @@
|
|
4777
4862
|
|
4778
4863
|
</xsl:if>
|
4779
4864
|
|
4865
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
4866
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
4867
|
+
|
4780
4868
|
|
4781
4869
|
|
4782
4870
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -4792,7 +4880,9 @@
|
|
4792
4880
|
|
4793
4881
|
|
4794
4882
|
</xsl:if>
|
4795
|
-
|
4883
|
+
|
4884
|
+
|
4885
|
+
|
4796
4886
|
<xsl:apply-templates/>
|
4797
4887
|
</fo:basic-link>
|
4798
4888
|
|
@@ -4847,10 +4937,10 @@
|
|
4847
4937
|
</xsl:choose>
|
4848
4938
|
</xsl:variable>
|
4849
4939
|
|
4850
|
-
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
4940
|
+
<!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
|
4851
4941
|
|
4852
4942
|
<xsl:choose>
|
4853
|
-
<xsl:when test="$
|
4943
|
+
<xsl:when test="$lang = 'zh'">
|
4854
4944
|
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
4855
4945
|
</xsl:when>
|
4856
4946
|
<xsl:when test="../../@inline-header = 'true'">
|
@@ -5300,9 +5390,97 @@
|
|
5300
5390
|
<fo:block-container border="1pt solid black" width="50%">
|
5301
5391
|
<fo:block> </fo:block>
|
5302
5392
|
</fo:block-container>
|
5393
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5394
|
+
<xsl:param name="colwidths"/>
|
5395
|
+
<xsl:variable name="colwidths_">
|
5396
|
+
<xsl:choose>
|
5397
|
+
<xsl:when test="not($colwidths)">
|
5398
|
+
<xsl:variable name="toc_table_simple">
|
5399
|
+
<tbody>
|
5400
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5401
|
+
</tbody>
|
5402
|
+
</xsl:variable>
|
5403
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5404
|
+
<xsl:call-template name="calculate-column-widths">
|
5405
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5406
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5407
|
+
</xsl:call-template>
|
5408
|
+
</xsl:when>
|
5409
|
+
<xsl:otherwise>
|
5410
|
+
<xsl:copy-of select="$colwidths"/>
|
5411
|
+
</xsl:otherwise>
|
5412
|
+
</xsl:choose>
|
5413
|
+
</xsl:variable>
|
5414
|
+
<fo:block role="TOCI" space-after="16pt">
|
5415
|
+
<fo:table width="100%" table-layout="fixed">
|
5416
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5417
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5418
|
+
</xsl:for-each>
|
5419
|
+
<fo:table-body>
|
5420
|
+
<xsl:apply-templates/>
|
5421
|
+
</fo:table-body>
|
5422
|
+
</fo:table>
|
5423
|
+
</fo:block>
|
5424
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5425
|
+
<fo:table-row min-height="5mm">
|
5426
|
+
<xsl:apply-templates/>
|
5427
|
+
</fo:table-row>
|
5428
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5429
|
+
<xsl:apply-templates/>
|
5430
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5431
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5432
|
+
<xsl:variable name="target" select="@target"/>
|
5433
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5434
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5435
|
+
<fo:table-cell>
|
5436
|
+
<fo:block>
|
5437
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5438
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5439
|
+
<xsl:choose>
|
5440
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5441
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5442
|
+
</xsl:choose>
|
5443
|
+
</xsl:for-each>
|
5444
|
+
</fo:basic-link>
|
5445
|
+
</fo:block>
|
5446
|
+
</fo:table-cell>
|
5447
|
+
</xsl:for-each>
|
5448
|
+
<!-- last column - for page numbers -->
|
5449
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5450
|
+
<fo:block>
|
5451
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5452
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5453
|
+
</fo:basic-link>
|
5454
|
+
</fo:block>
|
5455
|
+
</fo:table-cell>
|
5456
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5457
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5458
|
+
</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">
|
5459
|
+
<tr>
|
5460
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5461
|
+
</tr>
|
5462
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5463
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5464
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5465
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5466
|
+
<td>
|
5467
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5468
|
+
<xsl:copy-of select="."/>
|
5469
|
+
</xsl:for-each>
|
5470
|
+
</td>
|
5471
|
+
</xsl:for-each>
|
5472
|
+
<td>333</td> <!-- page number, just for fill -->
|
5303
5473
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5304
5474
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5305
5475
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5476
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5477
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5478
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5479
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5480
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5481
|
+
</svg>
|
5482
|
+
</fo:instream-foreign-object>
|
5483
|
+
</fo:inline>
|
5306
5484
|
</xsl:template><xsl:template name="convertDate">
|
5307
5485
|
<xsl:param name="date"/>
|
5308
5486
|
<xsl:param name="format" select="'short'"/>
|
@@ -152,6 +152,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
|
|
152
152
|
|
153
153
|
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText {
|
154
154
|
mso-style-noshow: yes;
|
155
|
+
mso-style-name: "Comment Text";
|
155
156
|
mso-style-unhide: no;
|
156
157
|
margin: 0cm;
|
157
158
|
margin-bottom: .0001pt;
|
@@ -371,6 +372,7 @@ div.figure, p.figure {
|
|
371
372
|
|
372
373
|
h1 {
|
373
374
|
mso-style-priority: 1;
|
375
|
+
mso-style-name: "Heading 1";
|
374
376
|
mso-style-unhide: no;
|
375
377
|
mso-style-qformat: yes;
|
376
378
|
mso-style-link: "Heading 1 Char";
|
@@ -457,6 +459,7 @@ h1.Annex {
|
|
457
459
|
|
458
460
|
h2 {
|
459
461
|
mso-style-priority: 2;
|
462
|
+
mso-style-name: "Heading 2";
|
460
463
|
mso-style-unhide: no;
|
461
464
|
mso-style-qformat: yes;
|
462
465
|
mso-style-parent: "Heading 1";
|
@@ -485,6 +488,7 @@ h2 {
|
|
485
488
|
|
486
489
|
h3 {
|
487
490
|
mso-style-priority: 3;
|
491
|
+
mso-style-name: "Heading 3";
|
488
492
|
mso-style-unhide: no;
|
489
493
|
mso-style-qformat: yes;
|
490
494
|
mso-style-parent: "Heading 1";
|
@@ -512,6 +516,7 @@ h3 {
|
|
512
516
|
|
513
517
|
h4 {
|
514
518
|
mso-style-priority: 4;
|
519
|
+
mso-style-name: "Heading 4";
|
515
520
|
mso-style-unhide: no;
|
516
521
|
mso-style-qformat: yes;
|
517
522
|
mso-style-parent: "Heading 3";
|
@@ -539,6 +544,7 @@ h4 {
|
|
539
544
|
|
540
545
|
h5 {
|
541
546
|
mso-style-priority: 5;
|
547
|
+
mso-style-name: "Heading 5";
|
542
548
|
mso-style-unhide: no;
|
543
549
|
mso-style-qformat: yes;
|
544
550
|
mso-style-parent: "Heading 4";
|
@@ -566,6 +572,7 @@ h5 {
|
|
566
572
|
|
567
573
|
h6 {
|
568
574
|
mso-style-priority: 6;
|
575
|
+
mso-style-name: "Heading 6";
|
569
576
|
mso-style-unhide: no;
|
570
577
|
mso-style-qformat: yes;
|
571
578
|
mso-style-parent: "Heading 5";
|
@@ -593,6 +600,7 @@ h6 {
|
|
593
600
|
|
594
601
|
p.MsoToc1, li.MsoToc1, div.MsoToc1 {
|
595
602
|
mso-style-priority: 39;
|
603
|
+
mso-style-name: "TOC 1";
|
596
604
|
mso-style-unhide: no;
|
597
605
|
mso-style-next: Normal;
|
598
606
|
margin-top: 6.0pt;
|
@@ -615,6 +623,7 @@ p.MsoToc1, li.MsoToc1, div.MsoToc1 {
|
|
615
623
|
|
616
624
|
p.MsoToc2, li.MsoToc2, div.MsoToc2 {
|
617
625
|
mso-style-noshow: yes;
|
626
|
+
mso-style-name: "TOC 2";
|
618
627
|
mso-style-priority: 39;
|
619
628
|
mso-style-unhide: no;
|
620
629
|
mso-style-parent: "TOC 1";
|
@@ -639,6 +648,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2 {
|
|
639
648
|
|
640
649
|
p.MsoToc3, li.MsoToc3, div.MsoToc3 {
|
641
650
|
mso-style-noshow: yes;
|
651
|
+
mso-style-name: "TOC 3";
|
642
652
|
mso-style-priority: 39;
|
643
653
|
mso-style-unhide: no;
|
644
654
|
mso-style-parent: "TOC 2";
|
@@ -662,6 +672,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3 {
|
|
662
672
|
mso-bidi-font-weight: normal; }
|
663
673
|
|
664
674
|
span.MsoFootnoteReference {
|
675
|
+
mso-style-name: "Footnote Reference";
|
665
676
|
mso-style-priority: 99;
|
666
677
|
vertical-align: super; }
|
667
678
|
|
@@ -138,6 +138,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
|
|
138
138
|
|
139
139
|
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
|
140
140
|
{mso-style-noshow:yes;
|
141
|
+
mso-style-name:"Comment Text";
|
141
142
|
mso-style-unhide:no;
|
142
143
|
margin:0cm;
|
143
144
|
margin-bottom:.0001pt;
|
@@ -341,6 +342,7 @@ div.figure, p.figure
|
|
341
342
|
|
342
343
|
h1
|
343
344
|
{mso-style-priority:1;
|
345
|
+
mso-style-name:"Heading 1";
|
344
346
|
mso-style-unhide:no;
|
345
347
|
mso-style-qformat:yes;
|
346
348
|
mso-style-link:"Heading 1 Char";
|
@@ -424,6 +426,7 @@ h1.Annex
|
|
424
426
|
mso-bidi-font-weight:normal;}
|
425
427
|
h2
|
426
428
|
{mso-style-priority:2;
|
429
|
+
mso-style-name:"Heading 2";
|
427
430
|
mso-style-unhide:no;
|
428
431
|
mso-style-qformat:yes;
|
429
432
|
mso-style-parent:"Heading 1";
|
@@ -451,6 +454,7 @@ h2
|
|
451
454
|
mso-bidi-font-weight:normal;}
|
452
455
|
h3
|
453
456
|
{mso-style-priority:3;
|
457
|
+
mso-style-name:"Heading 3";
|
454
458
|
mso-style-unhide:no;
|
455
459
|
mso-style-qformat:yes;
|
456
460
|
mso-style-parent:"Heading 1";
|
@@ -477,6 +481,7 @@ h3
|
|
477
481
|
mso-bidi-font-weight:normal;}
|
478
482
|
h4
|
479
483
|
{mso-style-priority:4;
|
484
|
+
mso-style-name:"Heading 4";
|
480
485
|
mso-style-unhide:no;
|
481
486
|
mso-style-qformat:yes;
|
482
487
|
mso-style-parent:"Heading 3";
|
@@ -503,6 +508,7 @@ h4
|
|
503
508
|
mso-bidi-font-weight:normal;}
|
504
509
|
h5
|
505
510
|
{mso-style-priority:5;
|
511
|
+
mso-style-name:"Heading 5";
|
506
512
|
mso-style-unhide:no;
|
507
513
|
mso-style-qformat:yes;
|
508
514
|
mso-style-parent:"Heading 4";
|
@@ -529,6 +535,7 @@ h5
|
|
529
535
|
mso-bidi-font-weight:normal;}
|
530
536
|
h6
|
531
537
|
{mso-style-priority:6;
|
538
|
+
mso-style-name:"Heading 6";
|
532
539
|
mso-style-unhide:no;
|
533
540
|
mso-style-qformat:yes;
|
534
541
|
mso-style-parent:"Heading 5";
|
@@ -555,6 +562,7 @@ h6
|
|
555
562
|
mso-bidi-font-weight:normal;}
|
556
563
|
p.MsoToc1, li.MsoToc1, div.MsoToc1
|
557
564
|
{mso-style-priority:39;
|
565
|
+
mso-style-name:"TOC 1";
|
558
566
|
mso-style-unhide:no;
|
559
567
|
mso-style-next:Normal;
|
560
568
|
margin-top:6.0pt;
|
@@ -576,6 +584,7 @@ p.MsoToc1, li.MsoToc1, div.MsoToc1
|
|
576
584
|
mso-bidi-font-weight:normal;}
|
577
585
|
p.MsoToc2, li.MsoToc2, div.MsoToc2
|
578
586
|
{mso-style-noshow:yes;
|
587
|
+
mso-style-name:"TOC 2";
|
579
588
|
mso-style-priority:39;
|
580
589
|
mso-style-unhide:no;
|
581
590
|
mso-style-parent:"TOC 1";
|
@@ -599,6 +608,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2
|
|
599
608
|
mso-bidi-font-weight:normal;}
|
600
609
|
p.MsoToc3, li.MsoToc3, div.MsoToc3
|
601
610
|
{mso-style-noshow:yes;
|
611
|
+
mso-style-name:"TOC 3";
|
602
612
|
mso-style-priority:39;
|
603
613
|
mso-style-unhide:no;
|
604
614
|
mso-style-parent:"TOC 2";
|
@@ -620,8 +630,9 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
|
|
620
630
|
mso-ansi-language:EN-GB;
|
621
631
|
font-weight:bold;
|
622
632
|
mso-bidi-font-weight:normal;}
|
623
|
-
span.MsoFootnoteReference
|
624
|
-
|
633
|
+
span.MsoFootnoteReference {
|
634
|
+
mso-style-name:"Footnote Reference";
|
635
|
+
mso-style-priority:99;
|
625
636
|
vertical-align:super;}
|
626
637
|
p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
|
627
638
|
{mso-style-noshow:yes;
|