metanorma-bipm 2.2.13 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/base_convert.rb +16 -15
- data/lib/isodoc/bipm/bipm.brochure.xsl +108 -79
- data/lib/isodoc/bipm/bipm.guide.xsl +108 -79
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +108 -79
- data/lib/isodoc/bipm/bipm.rapport.xsl +108 -79
- data/lib/isodoc/bipm/doccontrol.rb +4 -4
- data/lib/isodoc/bipm/html/htmlstyle.css +13 -9
- data/lib/isodoc/bipm/html/htmlstyle.scss +6 -6
- data/lib/isodoc/bipm/html_convert.rb +3 -9
- data/lib/isodoc/bipm/jcgm.standard.xsl +135 -75
- data/lib/isodoc/bipm/metadata.rb +4 -4
- data/lib/isodoc/bipm/presentation_blocks.rb +41 -0
- data/lib/isodoc/bipm/presentation_xml_convert.rb +15 -38
- data/lib/isodoc/bipm/xref.rb +14 -11
- data/lib/metanorma/bipm/front.rb +2 -2
- data/lib/metanorma/bipm/isodoc.rng +26 -4
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +2 -2
- metadata +7 -6
@@ -32,7 +32,7 @@
|
|
32
32
|
<xsl:for-each select="//bipm:bipm-standard">
|
33
33
|
<xsl:variable name="lang" select="*[local-name()='bibdata']/*[local-name()='language'][@current = 'true']"/>
|
34
34
|
<xsl:variable name="num"><xsl:number level="any" count="bipm:bipm-standard"/></xsl:variable>
|
35
|
-
<xsl:variable name="title-part"><xsl:value-of select="bipm:bibdata/bipm:title[@type = 'part']"/></xsl:variable>
|
35
|
+
<xsl:variable name="title-part"><xsl:value-of select="bipm:bibdata/bipm:title[@type = 'title-part']"/></xsl:variable>
|
36
36
|
<xsl:variable name="current_document">
|
37
37
|
<xsl:copy-of select="."/>
|
38
38
|
</xsl:variable>
|
@@ -983,7 +983,7 @@
|
|
983
983
|
|
984
984
|
<fo:block-container font-size="18pt" font-weight="bold" text-align="center">
|
985
985
|
<fo:block role="H1">
|
986
|
-
<xsl:value-of select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='cover']"/>
|
986
|
+
<xsl:value-of select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='title-cover']"/>
|
987
987
|
</fo:block>
|
988
988
|
</fo:block-container>
|
989
989
|
|
@@ -1076,7 +1076,7 @@
|
|
1076
1076
|
<fo:block-container margin-left="-14mm" margin-right="0mm">
|
1077
1077
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
1078
1078
|
<fo:block font-family="Arial" font-size="16pt" font-weight="bold" text-align-last="justify" margin-bottom="82pt" role="H1">
|
1079
|
-
<fo:inline><xsl:value-of select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='main']"/></fo:inline>
|
1079
|
+
<fo:inline><xsl:value-of select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='title-main']"/></fo:inline>
|
1080
1080
|
<fo:inline keep-together.within-line="always">
|
1081
1081
|
<fo:leader leader-pattern="space"/>
|
1082
1082
|
<fo:inline>
|
@@ -1215,20 +1215,20 @@
|
|
1215
1215
|
|
1216
1216
|
<xsl:choose>
|
1217
1217
|
<xsl:when test="$independentAppendix != ''">
|
1218
|
-
<xsl:apply-templates select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='appendix']" mode="title"/>
|
1218
|
+
<xsl:apply-templates select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='title-appendix']" mode="title"/>
|
1219
1219
|
<fo:block>
|
1220
|
-
<xsl:apply-templates select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='annex']" mode="title"/>
|
1220
|
+
<xsl:apply-templates select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='title-annex']" mode="title"/>
|
1221
1221
|
</fo:block>
|
1222
1222
|
</xsl:when>
|
1223
1223
|
<xsl:otherwise> <!-- doctype = 'guide' -->
|
1224
|
-
<xsl:apply-templates select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='main']" mode="title"/>
|
1224
|
+
<xsl:apply-templates select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='title-main']" mode="title"/>
|
1225
1225
|
</xsl:otherwise>
|
1226
1226
|
</xsl:choose>
|
1227
1227
|
|
1228
1228
|
</fo:block>
|
1229
1229
|
|
1230
1230
|
<!-- <xsl:variable name="part_num" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:part)"/> -->
|
1231
|
-
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part-with-numbering']">
|
1231
|
+
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'title-part-with-numbering']">
|
1232
1232
|
<fo:block role="H2">
|
1233
1233
|
<!-- <xsl:if test="$part_num != ''">
|
1234
1234
|
<xsl:call-template name="getLocalizedString">
|
@@ -1239,17 +1239,17 @@
|
|
1239
1239
|
<xsl:value-of select="$part_num"/>
|
1240
1240
|
</xsl:if>
|
1241
1241
|
<xsl:text>: </xsl:text> -->
|
1242
|
-
<xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part-with-numbering']" mode="title"/>
|
1242
|
+
<xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'title-part-with-numbering']" mode="title"/>
|
1243
1243
|
</fo:block>
|
1244
1244
|
</xsl:if>
|
1245
1245
|
<!-- <xsl:variable name="subpart_num" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:subpart)"/> -->
|
1246
|
-
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'subpart-with-numbering']">
|
1246
|
+
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'title-subpart-with-numbering']">
|
1247
1247
|
<fo:block role="H3">
|
1248
1248
|
<!-- <xsl:if test="$subpart_num != ''">
|
1249
1249
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-subpart[@lang=$curr_lang]),'#',$subpart_num)"/>
|
1250
1250
|
</xsl:if>
|
1251
1251
|
<xsl:text>: </xsl:text> -->
|
1252
|
-
<xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'subpart-with-numbering']" mode="title"/>
|
1252
|
+
<xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'title-subpart-with-numbering']" mode="title"/>
|
1253
1253
|
</fo:block>
|
1254
1254
|
</xsl:if>
|
1255
1255
|
|
@@ -1362,7 +1362,7 @@
|
|
1362
1362
|
<xsl:for-each select="xalan:nodeset($languages)/lang">
|
1363
1363
|
<xsl:variable name="title_num" select="position()"/>
|
1364
1364
|
<xsl:variable name="curr_lang" select="."/>
|
1365
|
-
<xsl:variable name="title-cover" select="xalan:nodeset($titles)//bipm:title[@language = $curr_lang and @type='main']"/>
|
1365
|
+
<xsl:variable name="title-cover" select="xalan:nodeset($titles)//bipm:title[@language = $curr_lang and @type='title-main']"/>
|
1366
1366
|
<xsl:variable name="title-cover_" select="java:replaceAll(java:java.lang.String.new($title-cover),'( (of )| (and )| (or ))','#$2')"/>
|
1367
1367
|
<xsl:variable name="titleParts">
|
1368
1368
|
<xsl:call-template name="splitTitle">
|
@@ -1421,8 +1421,8 @@
|
|
1421
1421
|
|
1422
1422
|
<fo:block-container absolute-position="fixed" left="12.5mm" top="60mm">
|
1423
1423
|
|
1424
|
-
<fo:block font-size="22.2pt" font-weight="{$weight-normal}" role="H1"><xsl:value-of select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'main']"/></fo:block>
|
1425
|
-
<fo:block font-size="22.2pt" font-weight="{$weight-bold}" margin-top="1mm" role="H1"><xsl:value-of select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'main']"/></fo:block>
|
1424
|
+
<fo:block font-size="22.2pt" font-weight="{$weight-normal}" role="H1"><xsl:value-of select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'title-main']"/></fo:block>
|
1425
|
+
<fo:block font-size="22.2pt" font-weight="{$weight-bold}" margin-top="1mm" role="H1"><xsl:value-of select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'title-main']"/></fo:block>
|
1426
1426
|
|
1427
1427
|
<xsl:variable name="edition_str">édition</xsl:variable>
|
1428
1428
|
|
@@ -1433,28 +1433,28 @@
|
|
1433
1433
|
<fo:block role="H1">
|
1434
1434
|
|
1435
1435
|
<xsl:variable name="title_appendix_fr">
|
1436
|
-
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'appendix']" mode="title"/>
|
1436
|
+
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'title-appendix']" mode="title"/>
|
1437
1437
|
</xsl:variable>
|
1438
1438
|
<xsl:variable name="title_appendix_en">
|
1439
|
-
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'appendix']" mode="title"/>
|
1439
|
+
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'title-appendix']" mode="title"/>
|
1440
1440
|
</xsl:variable>
|
1441
1441
|
<xsl:variable name="title_annex_fr">
|
1442
|
-
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'annex']" mode="title"/>
|
1442
|
+
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'title-annex']" mode="title"/>
|
1443
1443
|
</xsl:variable>
|
1444
1444
|
<xsl:variable name="title_annex_en">
|
1445
|
-
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'annex']" mode="title"/>
|
1445
|
+
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'title-annex']" mode="title"/>
|
1446
1446
|
</xsl:variable>
|
1447
1447
|
<xsl:variable name="title_part_fr">
|
1448
|
-
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'part']" mode="title"/>
|
1448
|
+
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'title-part']" mode="title"/>
|
1449
1449
|
</xsl:variable>
|
1450
1450
|
<xsl:variable name="title_part_en">
|
1451
|
-
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'part']" mode="title"/>
|
1451
|
+
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'title-part']" mode="title"/>
|
1452
1452
|
</xsl:variable>
|
1453
1453
|
<xsl:variable name="title_subpart_fr">
|
1454
|
-
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'subpart']" mode="title"/>
|
1454
|
+
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'title-subpart']" mode="title"/>
|
1455
1455
|
</xsl:variable>
|
1456
1456
|
<xsl:variable name="title_subpart_en">
|
1457
|
-
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'subpart']" mode="title"/>
|
1457
|
+
<xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'title-subpart']" mode="title"/>
|
1458
1458
|
</xsl:variable>
|
1459
1459
|
|
1460
1460
|
<xsl:variable name="titles_length" select="string-length($title_appendix_fr) + string-length($title_appendix_en) + string-length($title_annex_fr) + string-length($title_annex_en) + string-length($title_part_fr) + string-length($title_part_en) + string-length($title_subpart_fr) + string-length($title_subpart_fr)"/>
|
@@ -1492,7 +1492,7 @@
|
|
1492
1492
|
<fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-bold}">Appendix <xsl:value-of select="$appendix_num"/></fo:block>
|
1493
1493
|
</xsl:if>
|
1494
1494
|
|
1495
|
-
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'appendix']">
|
1495
|
+
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'title-appendix']">
|
1496
1496
|
<fo:block font-size="{$font-size-factor * 30.4}pt">
|
1497
1497
|
<fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
|
1498
1498
|
<fo:block font-weight="{$weight-normal}"><xsl:copy-of select="$title_appendix_fr"/></fo:block>
|
@@ -1505,7 +1505,7 @@
|
|
1505
1505
|
<!-- End Appendix titles processing -->
|
1506
1506
|
|
1507
1507
|
<!-- Annex title processing -->
|
1508
|
-
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'annex']">
|
1508
|
+
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'title-annex']">
|
1509
1509
|
<xsl:variable name="annex_num" select="normalize-space((//bipm:bipm-standard)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:annexid)"/>
|
1510
1510
|
<xsl:if test="$annex_num != ''">
|
1511
1511
|
<fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
|
@@ -1533,7 +1533,7 @@
|
|
1533
1533
|
<!-- End Annex titles processing -->
|
1534
1534
|
|
1535
1535
|
<!-- Part titles processing -->
|
1536
|
-
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'part']">
|
1536
|
+
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'title-part']">
|
1537
1537
|
<xsl:variable name="part_num" select="normalize-space((//bipm:bipm-standard)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:part)"/>
|
1538
1538
|
<xsl:if test="$part_num != ''">
|
1539
1539
|
<fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
|
@@ -1565,7 +1565,7 @@
|
|
1565
1565
|
<!-- End Part titles processing -->
|
1566
1566
|
|
1567
1567
|
<!-- Sub-part titles processing -->
|
1568
|
-
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'subpart']">
|
1568
|
+
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'title-subpart']">
|
1569
1569
|
<xsl:variable name="subpart_num" select="normalize-space((//bipm:bipm-standard)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:subpart)"/>
|
1570
1570
|
<xsl:if test="$subpart_num != ''">
|
1571
1571
|
<fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
|
@@ -1657,7 +1657,7 @@
|
|
1657
1657
|
|
1658
1658
|
<xsl:template name="insertInnerCoverPage">
|
1659
1659
|
|
1660
|
-
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type='cover']">
|
1660
|
+
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type='title-cover']">
|
1661
1661
|
|
1662
1662
|
<fo:page-sequence master-reference="title-page" format="1" initial-page-number="1" force-page-count="even">
|
1663
1663
|
|
@@ -1677,7 +1677,7 @@
|
|
1677
1677
|
|
1678
1678
|
<xsl:for-each select="xalan:nodeset($languages)/lang">
|
1679
1679
|
<xsl:variable name="curr_lang" select="."/>
|
1680
|
-
<xsl:variable name="title" select="xalan:nodeset($titles)//bipm:title[@language = $curr_lang and @type='cover']"/>
|
1680
|
+
<xsl:variable name="title" select="xalan:nodeset($titles)//bipm:title[@language = $curr_lang and @type='title-cover']"/>
|
1681
1681
|
<xsl:choose>
|
1682
1682
|
<xsl:when test="position() = 1">
|
1683
1683
|
<fo:block-container font-size="12pt" font-weight="bold" width="55mm">
|
@@ -4009,19 +4009,32 @@
|
|
4009
4009
|
<xsl:variable name="titles_">
|
4010
4010
|
|
4011
4011
|
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
4012
|
-
<title-toc lang="en">
|
4013
|
-
|
4014
|
-
|
4015
|
-
|
4012
|
+
<!-- <title-toc lang="en">
|
4013
|
+
<xsl:if test="$namespace = 'csd' or $namespace = 'ieee' or $namespace = 'iho' or $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'unece-rec'">
|
4014
|
+
<xsl:text>Contents</xsl:text>
|
4015
|
+
</xsl:if>
|
4016
|
+
<xsl:if test="$namespace = 'csa' or $namespace = 'm3d' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper'">
|
4017
|
+
<xsl:text>Table of Contents</xsl:text>
|
4018
|
+
</xsl:if>
|
4019
|
+
<xsl:if test="$namespace = 'gb'">
|
4020
|
+
<xsl:text>Table of contents</xsl:text>
|
4021
|
+
</xsl:if>
|
4022
|
+
</title-toc> -->
|
4023
|
+
<title-toc lang="en">Table of contents</title-toc>
|
4024
|
+
<!-- <title-toc lang="fr">
|
4016
4025
|
<xsl:text>Sommaire</xsl:text>
|
4017
|
-
</title-toc>
|
4018
|
-
<title-toc lang="zh">
|
4019
|
-
|
4026
|
+
</title-toc> -->
|
4027
|
+
<!-- <title-toc lang="zh">
|
4028
|
+
<xsl:choose>
|
4029
|
+
<xsl:when test="$namespace = 'gb'">
|
4030
|
+
<xsl:text>目次</xsl:text>
|
4031
|
+
</xsl:when>
|
4032
|
+
<xsl:otherwise>
|
4020
4033
|
<xsl:text>Contents</xsl:text>
|
4021
|
-
|
4022
|
-
|
4023
|
-
|
4024
|
-
<title-
|
4034
|
+
</xsl:otherwise>
|
4035
|
+
</xsl:choose>
|
4036
|
+
</title-toc> -->
|
4037
|
+
<title-toc lang="zh">目次</title-toc>
|
4025
4038
|
|
4026
4039
|
<title-part lang="en">
|
4027
4040
|
|
@@ -4041,20 +4054,6 @@
|
|
4041
4054
|
<title-subpart lang="en">Sub-part #</title-subpart>
|
4042
4055
|
<title-subpart lang="fr">Partie de sub #</title-subpart>
|
4043
4056
|
|
4044
|
-
<title-list-tables lang="en">List of Tables</title-list-tables>
|
4045
|
-
|
4046
|
-
<title-list-figures lang="en">List of Figures</title-list-figures>
|
4047
|
-
|
4048
|
-
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
4049
|
-
|
4050
|
-
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
4051
|
-
|
4052
|
-
<title-summary lang="en">Summary</title-summary>
|
4053
|
-
|
4054
|
-
<title-continued lang="ru">(продолжение)</title-continued>
|
4055
|
-
<title-continued lang="en">(continued)</title-continued>
|
4056
|
-
<title-continued lang="fr">(continué)</title-continued>
|
4057
|
-
|
4058
4057
|
</xsl:variable>
|
4059
4058
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
4060
4059
|
|
@@ -4062,8 +4061,8 @@
|
|
4062
4061
|
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
4063
4062
|
<xsl:value-of select="$toc_table_title"/>
|
4064
4063
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
4065
|
-
<xsl:call-template name="
|
4066
|
-
<xsl:with-param name="
|
4064
|
+
<xsl:call-template name="getLocalizedString">
|
4065
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
4067
4066
|
</xsl:call-template>
|
4068
4067
|
</xsl:if>
|
4069
4068
|
</xsl:variable>
|
@@ -4072,8 +4071,8 @@
|
|
4072
4071
|
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
4073
4072
|
<xsl:value-of select="$toc_figure_title"/>
|
4074
4073
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
4075
|
-
<xsl:call-template name="
|
4076
|
-
<xsl:with-param name="
|
4074
|
+
<xsl:call-template name="getLocalizedString">
|
4075
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
4077
4076
|
</xsl:call-template>
|
4078
4077
|
</xsl:if>
|
4079
4078
|
</xsl:variable>
|
@@ -4082,8 +4081,8 @@
|
|
4082
4081
|
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
4083
4082
|
<xsl:value-of select="$toc_requirement_title"/>
|
4084
4083
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
4085
|
-
<xsl:call-template name="
|
4086
|
-
<xsl:with-param name="
|
4084
|
+
<xsl:call-template name="getLocalizedString">
|
4085
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
4087
4086
|
</xsl:call-template>
|
4088
4087
|
</xsl:if>
|
4089
4088
|
</xsl:variable>
|
@@ -7879,6 +7878,9 @@
|
|
7879
7878
|
<!-- END Definition List -->
|
7880
7879
|
<!-- ===================== -->
|
7881
7880
|
|
7881
|
+
<!-- default: ignore title in sections/p -->
|
7882
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
|
7883
|
+
|
7882
7884
|
<!-- ========================= -->
|
7883
7885
|
<!-- Rich text formatting -->
|
7884
7886
|
<!-- ========================= -->
|
@@ -7954,7 +7956,7 @@
|
|
7954
7956
|
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
7955
7957
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
7956
7958
|
<xsl:choose>
|
7957
|
-
<xsl:when test="java:replaceAll(java:java.lang.String.new(.),
|
7959
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
|
7958
7960
|
<!-- url -->
|
7959
7961
|
<xsl:call-template name="add-zero-spaces-link-java"/>
|
7960
7962
|
</xsl:when>
|
@@ -8416,10 +8418,13 @@
|
|
8416
8418
|
</xsl:choose>
|
8417
8419
|
</xsl:variable>
|
8418
8420
|
|
8421
|
+
<!-- replace sequence #x200B to one ​ -->
|
8422
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '')"/>
|
8423
|
+
|
8419
8424
|
<!-- replace sequence #x200B and space TO space -->
|
8420
|
-
<xsl:variable name="
|
8425
|
+
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>
|
8421
8426
|
|
8422
|
-
<xsl:value-of select="$
|
8427
|
+
<xsl:value-of select="$text11"/>
|
8423
8428
|
</xsl:template>
|
8424
8429
|
|
8425
8430
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -8429,8 +8434,12 @@
|
|
8429
8434
|
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
8430
8435
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
|
8431
8436
|
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1')"/>
|
8437
|
+
|
8438
|
+
<!-- replace sequence #x200B to one ​ -->
|
8439
|
+
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '')"/>
|
8440
|
+
|
8432
8441
|
<!-- remove zero-width space at the end -->
|
8433
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
8442
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '$', '')"/>
|
8434
8443
|
</xsl:template>
|
8435
8444
|
|
8436
8445
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -9725,7 +9734,7 @@
|
|
9725
9734
|
|
9726
9735
|
<xsl:call-template name="refine_note_block_style"/>
|
9727
9736
|
|
9728
|
-
<fo:inline xsl:use-attribute-sets="note-name-style">
|
9737
|
+
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
9729
9738
|
|
9730
9739
|
<xsl:call-template name="refine_note-name-style"/>
|
9731
9740
|
|
@@ -9769,12 +9778,12 @@
|
|
9769
9778
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
9770
9779
|
<xsl:choose>
|
9771
9780
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
9772
|
-
<fo:inline xsl:use-attribute-sets="note-p-style">
|
9781
|
+
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
9773
9782
|
<xsl:apply-templates/>
|
9774
9783
|
</fo:inline>
|
9775
9784
|
</xsl:when>
|
9776
9785
|
<xsl:otherwise>
|
9777
|
-
<fo:block xsl:use-attribute-sets="note-p-style">
|
9786
|
+
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
9778
9787
|
<xsl:apply-templates/>
|
9779
9788
|
</fo:block>
|
9780
9789
|
</xsl:otherwise>
|
@@ -10007,25 +10016,45 @@
|
|
10007
10016
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
10008
10017
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
10009
10018
|
|
10010
|
-
<xsl:
|
10011
|
-
<xsl:
|
10012
|
-
<xsl:
|
10013
|
-
|
10014
|
-
|
10015
|
-
|
10019
|
+
<xsl:if test="@width != '' and @width != 'auto'">
|
10020
|
+
<xsl:attribute name="width">
|
10021
|
+
<xsl:value-of select="@width"/>
|
10022
|
+
</xsl:attribute>
|
10023
|
+
</xsl:if>
|
10024
|
+
|
10025
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
10026
|
+
<xsl:attribute name="height">
|
10027
|
+
<xsl:value-of select="@height"/>
|
10028
|
+
</xsl:attribute>
|
10029
|
+
</xsl:if>
|
10030
|
+
|
10031
|
+
<xsl:choose>
|
10032
|
+
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
10033
|
+
<xsl:attribute name="scaling">non-uniform</xsl:attribute>
|
10034
|
+
</xsl:when>
|
10035
|
+
<xsl:otherwise>
|
10016
10036
|
|
10017
|
-
|
10037
|
+
<xsl:variable name="img_src">
|
10038
|
+
<xsl:choose>
|
10039
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
10040
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
10041
|
+
</xsl:choose>
|
10042
|
+
</xsl:variable>
|
10018
10043
|
|
10019
|
-
|
10044
|
+
<xsl:variable name="image_width_effective">
|
10020
10045
|
|
10021
|
-
|
10046
|
+
<xsl:value-of select="$width_effective"/>
|
10022
10047
|
|
10023
|
-
|
10024
|
-
<xsl:if test="number($scale) < 100">
|
10048
|
+
</xsl:variable>
|
10025
10049
|
|
10026
|
-
|
10050
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
10051
|
+
<xsl:if test="number($scale) < 100">
|
10027
10052
|
|
10028
|
-
|
10053
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
10054
|
+
|
10055
|
+
</xsl:if>
|
10056
|
+
</xsl:otherwise>
|
10057
|
+
</xsl:choose>
|
10029
10058
|
|
10030
10059
|
</xsl:if>
|
10031
10060
|
|
@@ -13695,7 +13724,7 @@
|
|
13695
13724
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
13696
13725
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13697
13726
|
</xsl:template>
|
13698
|
-
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
13727
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]/*[local-name() = 'span'][@class] | *[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
13699
13728
|
<xsl:copy>
|
13700
13729
|
<xsl:copy-of select="@*"/>
|
13701
13730
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -5,7 +5,7 @@ module IsoDoc
|
|
5
5
|
return unless doc.at(ns("//bibdata/relation[@type = 'supersedes']"))
|
6
6
|
|
7
7
|
clause = <<~DOCCONTROL
|
8
|
-
<doccontrol>
|
8
|
+
<doccontrol displayorder="999">
|
9
9
|
<title>Document Control</title>
|
10
10
|
<table unnumbered="true"><tbody>
|
11
11
|
<tr><th>Authors:</th><td/><td>#{list_authors(doc)}</td></tr>
|
@@ -41,7 +41,7 @@ module IsoDoc
|
|
41
41
|
while list_draft(xml, i) != ["", ""]
|
42
42
|
ret += "<tr>#{list_draft(xml, i).map do |x|
|
43
43
|
"<td>#{x}</td>"
|
44
|
-
end.join} "\
|
44
|
+
end.join} " \
|
45
45
|
"<td/></tr>"
|
46
46
|
i += 1
|
47
47
|
end
|
@@ -49,7 +49,7 @@ module IsoDoc
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def list_draft(xml, idx)
|
52
|
-
d = xml.at(ns("//bibdata/relation[@type = 'supersedes'][#{idx}]"\
|
52
|
+
d = xml.at(ns("//bibdata/relation[@type = 'supersedes'][#{idx}]" \
|
53
53
|
"/bibitem")) or return ["", ""]
|
54
54
|
|
55
55
|
draft = d&.at(ns("./version/draft"))&.text and draft = "Draft #{draft}"
|
@@ -65,7 +65,7 @@ module IsoDoc
|
|
65
65
|
end
|
66
66
|
|
67
67
|
COCHAIR = "xmlns:role[contains(text(),'co-chair')]".freeze
|
68
|
-
CHAIR = "[xmlns:role[contains(text(),'chair')]"\
|
68
|
+
CHAIR = "[xmlns:role[contains(text(),'chair')]" \
|
69
69
|
"[not(contains(text(),'co-chair'))]]".freeze
|
70
70
|
|
71
71
|
def list_cochairs(xml)
|
@@ -98,7 +98,7 @@ h1, h2, h3, h4, h5, h6 {
|
|
98
98
|
|
99
99
|
blockquote, q {
|
100
100
|
quotes: none; }
|
101
|
-
blockquote
|
101
|
+
blockquote::before, blockquote::after, q::before, q::after {
|
102
102
|
content: '';
|
103
103
|
content: none; }
|
104
104
|
|
@@ -121,14 +121,18 @@ b, strong {
|
|
121
121
|
div.document-stage-band, div.document-type-band {
|
122
122
|
background-color: #333333; }
|
123
123
|
|
124
|
-
a.FootnoteRef + a.FootnoteRef
|
124
|
+
a.FootnoteRef + a.FootnoteRef::before {
|
125
125
|
content: ", ";
|
126
126
|
vertical-align: super; }
|
127
127
|
|
128
|
-
a.TableFootnoteRef + a.TableFootnoteRef
|
128
|
+
a.TableFootnoteRef + a.TableFootnoteRef::before {
|
129
129
|
content: ", ";
|
130
130
|
vertical-align: super; }
|
131
131
|
|
132
|
+
a.TableFootnoteRef, span.TableFootnoteRef,
|
133
|
+
a.FootnoteRef, span.FootnoteRef {
|
134
|
+
vertical-align: super; }
|
135
|
+
|
132
136
|
.addition {
|
133
137
|
color: blue; }
|
134
138
|
|
@@ -604,7 +608,7 @@ ul, ol {
|
|
604
608
|
ul li {
|
605
609
|
list-style: none; }
|
606
610
|
|
607
|
-
ul li
|
611
|
+
ul li::before {
|
608
612
|
content: "—";
|
609
613
|
display: inline-block;
|
610
614
|
width: 1em;
|
@@ -628,7 +632,7 @@ ol ul > li:first-child {
|
|
628
632
|
#toc-list li {
|
629
633
|
list-style-type: none; }
|
630
634
|
|
631
|
-
#toc li
|
635
|
+
#toc li::before {
|
632
636
|
content: " ";
|
633
637
|
display: none; }
|
634
638
|
|
@@ -649,13 +653,13 @@ ol[class="alphabet"] > li {
|
|
649
653
|
ol[class="alphabet"] ol[class="alphabet"] > li {
|
650
654
|
list-style: inherit; }
|
651
655
|
|
652
|
-
ol[class="alphabet"] > li
|
656
|
+
ol[class="alphabet"] > li::before {
|
653
657
|
counter-increment: alphabet;
|
654
658
|
content: counter(alphabet, lower-alpha) ") ";
|
655
659
|
position: absolute;
|
656
660
|
left: -1.4em; }
|
657
661
|
|
658
|
-
ol[class="alphabet"] ol[class="alphabet"] > li
|
662
|
+
ol[class="alphabet"] ol[class="alphabet"] > li::before {
|
659
663
|
counter-increment: none;
|
660
664
|
content: initial; }
|
661
665
|
|
@@ -669,13 +673,13 @@ ol[class="roman"] > li {
|
|
669
673
|
ol[class="roman"] ol[class="roman"] > li {
|
670
674
|
list-style: inherit; }
|
671
675
|
|
672
|
-
ol[class="roman"] > li
|
676
|
+
ol[class="roman"] > li::before {
|
673
677
|
counter-increment: roman;
|
674
678
|
content: "(" counter(roman, lower-roman) ") ";
|
675
679
|
position: absolute;
|
676
680
|
left: -2.0em; }
|
677
681
|
|
678
|
-
ol[class="roman"] ol[class="roman"] > li
|
682
|
+
ol[class="roman"] ol[class="roman"] > li::before {
|
679
683
|
counter-increment: none;
|
680
684
|
content: initial; }
|
681
685
|
|
@@ -244,7 +244,7 @@ ul li {
|
|
244
244
|
list-style: none;
|
245
245
|
}
|
246
246
|
|
247
|
-
ul li
|
247
|
+
ul li::before {
|
248
248
|
content: "—";
|
249
249
|
display: inline-block; width: 1em;
|
250
250
|
margin-left: -1.2em;
|
@@ -273,7 +273,7 @@ ol ul > li:first-child {
|
|
273
273
|
list-style-type: none;
|
274
274
|
}
|
275
275
|
|
276
|
-
#toc li
|
276
|
+
#toc li::before {
|
277
277
|
content: " ";
|
278
278
|
display: none;
|
279
279
|
}
|
@@ -296,13 +296,13 @@ ol[class="alphabet"] > li {
|
|
296
296
|
ol[class="alphabet"] ol[class="alphabet"] > li {
|
297
297
|
list-style: inherit;
|
298
298
|
}
|
299
|
-
ol[class="alphabet"] > li
|
299
|
+
ol[class="alphabet"] > li::before {
|
300
300
|
counter-increment: alphabet;
|
301
301
|
content: counter(alphabet, lower-alpha)") ";
|
302
302
|
position: absolute;
|
303
303
|
left: -1.4em;
|
304
304
|
}
|
305
|
-
ol[class="alphabet"] ol[class="alphabet"] > li
|
305
|
+
ol[class="alphabet"] ol[class="alphabet"] > li::before {
|
306
306
|
counter-increment: none;
|
307
307
|
content: initial;
|
308
308
|
}
|
@@ -316,13 +316,13 @@ ol[class="roman"] > li {
|
|
316
316
|
ol[class="roman"] ol[class="roman"] > li {
|
317
317
|
list-style: inherit;
|
318
318
|
}
|
319
|
-
ol[class="roman"] > li
|
319
|
+
ol[class="roman"] > li::before {
|
320
320
|
counter-increment: roman;
|
321
321
|
content: "("counter(roman, lower-roman)") ";
|
322
322
|
position: absolute;
|
323
323
|
left: -2.0em;
|
324
324
|
}
|
325
|
-
ol[class="roman"] ol[class="roman"] > li
|
325
|
+
ol[class="roman"] ol[class="roman"] > li::before {
|
326
326
|
counter-increment: none;
|
327
327
|
content: initial;
|
328
328
|
}
|
@@ -6,16 +6,10 @@ require_relative "base_convert"
|
|
6
6
|
module IsoDoc
|
7
7
|
module BIPM
|
8
8
|
class HtmlConvert < IsoDoc::Generic::HtmlConvert
|
9
|
-
def
|
10
|
-
super
|
11
|
-
doccontrol isoxml, out
|
12
|
-
end
|
13
|
-
|
14
|
-
def doccontrol(isoxml, out)
|
15
|
-
c = isoxml.at(ns("//doccontrol")) or return
|
9
|
+
def doccontrol(elem, out)
|
16
10
|
out.div **attr_code(class: "doccontrol") do |div|
|
17
|
-
clause_parse_title(
|
18
|
-
|
11
|
+
clause_parse_title(elem, div, elem.at(ns("./title")), out)
|
12
|
+
elem.children.reject { |c1| c1.name == "title" }.each do |c1|
|
19
13
|
parse(c1, div)
|
20
14
|
end
|
21
15
|
end
|