metanorma-ieee 1.5.1 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.adoc +1 -1
- data/lib/isodoc/ieee/html/htmlstyle.css +10 -0
- data/lib/isodoc/ieee/html/htmlstyle.scss +11 -0
- data/lib/isodoc/ieee/html_convert.rb +4 -1
- data/lib/isodoc/ieee/ieee.amendment.xsl +263 -111
- data/lib/isodoc/ieee/ieee.standard.xsl +263 -111
- data/lib/isodoc/ieee/metadata.rb +12 -10
- data/lib/isodoc/ieee/presentation_ref.rb +11 -8
- data/lib/isodoc/ieee/presentation_terms.rb +18 -14
- data/lib/isodoc/ieee/presentation_xml_convert.rb +10 -0
- data/lib/isodoc/ieee/word_authority.rb +1 -1
- data/lib/isodoc/ieee/word_convert.rb +3 -3
- data/lib/metanorma/ieee/basicdoc.rng +1 -1
- data/lib/metanorma/ieee/biblio-standoc.rng +0 -49
- data/lib/metanorma/ieee/biblio.rng +11 -1
- data/lib/metanorma/ieee/boilerplate.adoc +1 -1
- data/lib/metanorma/ieee/cleanup_boilerplate.rb +17 -6
- data/lib/metanorma/ieee/cleanup_ref.rb +12 -4
- data/lib/metanorma/ieee/front.rb +36 -11
- data/lib/metanorma/ieee/ieee-footnotes.yaml +18 -18
- data/lib/metanorma/ieee/isodoc.rng +7 -60
- data/lib/metanorma/ieee/relaton-ieee.rng +6 -43
- data/lib/metanorma/ieee/version.rb +1 -1
- data/metanorma-ieee.gemspec +1 -1
- metadata +3 -3
@@ -69,12 +69,16 @@
|
|
69
69
|
</xsl:choose>
|
70
70
|
</xsl:variable>
|
71
71
|
|
72
|
+
<!-- https://github.com/metanorma/metanorma-csa/issues/329 -->
|
73
|
+
<!-- if stage >= 60 -->
|
74
|
+
<xsl:variable name="stage_published" select="normalize-space((//mn:metanorma)[1]/mn:metanorma-extension/mn:semantic-metadata/mn:stage-published)"/>
|
75
|
+
|
72
76
|
<xsl:variable name="trial_use" select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:trial-use[normalize-space(@language) = '']"/>
|
73
77
|
|
74
78
|
<xsl:variable name="current_template">
|
75
79
|
<xsl:choose>
|
76
80
|
<xsl:when test="($doctype = 'standard' or $doctype = 'guide' or $doctype = 'recommended-practice') and $stage = 'draft'">draft</xsl:when>
|
77
|
-
<xsl:when test="($doctype = 'standard' or $doctype = 'guide' or $doctype = 'recommended-practice') and ($stage = 'published' or $stage = 'approved')">standard</xsl:when>
|
81
|
+
<xsl:when test="($doctype = 'standard' or $doctype = 'guide' or $doctype = 'recommended-practice') and ($stage = 'published' or $stage = 'approved' or $stage_published = 'true')">standard</xsl:when>
|
78
82
|
<xsl:when test="$doctype = 'whitepaper' and $subdoctype = 'icap'">icap-whitepaper</xsl:when>
|
79
83
|
<xsl:when test="$doctype = 'whitepaper' and $subdoctype = 'industry-connection-report'">industry-connection-report</xsl:when>
|
80
84
|
<xsl:otherwise><xsl:value-of select="$doctype"/></xsl:otherwise>
|
@@ -414,9 +418,11 @@
|
|
414
418
|
</xsl:choose>
|
415
419
|
</xsl:variable>
|
416
420
|
|
417
|
-
<xsl:variable name="society" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:society"/>
|
421
|
+
<!-- <xsl:variable name="society" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:society"/> -->
|
422
|
+
<xsl:variable name="society" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'authorizer']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Society']/mn:name"/>
|
418
423
|
|
419
|
-
<xsl:variable name="committee" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/>
|
424
|
+
<!-- <xsl:variable name="committee" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/> -->
|
425
|
+
<xsl:variable name="committee" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'authorizer']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name"/>
|
420
426
|
|
421
427
|
<xsl:variable name="approved_by">IEEE SA Standards Board</xsl:variable>
|
422
428
|
<xsl:variable name="approved_date">
|
@@ -1229,7 +1235,7 @@
|
|
1229
1235
|
<xsl:apply-templates select="mnx:title"/>
|
1230
1236
|
|
1231
1237
|
<fo:inline keep-together.within-line="always">
|
1232
|
-
<fo:leader
|
1238
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
1233
1239
|
<fo:inline>
|
1234
1240
|
<fo:page-number-citation ref-id="{@id}"/>
|
1235
1241
|
</fo:inline>
|
@@ -1241,28 +1247,28 @@
|
|
1241
1247
|
</xsl:for-each>
|
1242
1248
|
|
1243
1249
|
<!-- List of Tables -->
|
1244
|
-
<xsl:
|
1245
|
-
<xsl:
|
1246
|
-
<xsl:
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
</xsl:
|
1250
|
+
<xsl:for-each select="$contents//mnx:tables/mnx:table">
|
1251
|
+
<xsl:if test="position() = 1">
|
1252
|
+
<xsl:call-template name="insertListOf_Title">
|
1253
|
+
<xsl:with-param name="title" select="$title-list-tables"/>
|
1254
|
+
</xsl:call-template>
|
1255
|
+
</xsl:if>
|
1256
|
+
<xsl:call-template name="insertListOf_Item"/>
|
1257
|
+
</xsl:for-each>
|
1252
1258
|
|
1253
1259
|
<!-- List of Figures -->
|
1254
|
-
<xsl:
|
1255
|
-
<xsl:
|
1256
|
-
<xsl:
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
</xsl:
|
1260
|
+
<xsl:for-each select="$contents//mnx:figures/mnx:figure">
|
1261
|
+
<xsl:if test="position() = 1">
|
1262
|
+
<xsl:call-template name="insertListOf_Title">
|
1263
|
+
<xsl:with-param name="title" select="$title-list-figures"/>
|
1264
|
+
</xsl:call-template>
|
1265
|
+
</xsl:if>
|
1266
|
+
<xsl:call-template name="insertListOf_Item"/>
|
1267
|
+
</xsl:for-each>
|
1262
1268
|
|
1263
1269
|
</xsl:when> <!-- $stage = 'draft' -->
|
1264
1270
|
|
1265
|
-
<xsl:when test="$stage = 'published' or $stage = 'approved'">
|
1271
|
+
<xsl:when test="$stage = 'published' or $stage = 'approved' or $stage_published = 'true'">
|
1266
1272
|
|
1267
1273
|
<xsl:variable name="provisional-distance-between-starts">10</xsl:variable>
|
1268
1274
|
|
@@ -1298,7 +1304,7 @@
|
|
1298
1304
|
<xsl:apply-templates select="mnx:title"/>
|
1299
1305
|
|
1300
1306
|
<fo:inline keep-together.within-line="always">
|
1301
|
-
<fo:leader
|
1307
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
1302
1308
|
<fo:inline>
|
1303
1309
|
<fo:page-number-citation ref-id="{@id}"/>
|
1304
1310
|
</fo:inline>
|
@@ -1313,26 +1319,26 @@
|
|
1313
1319
|
</xsl:for-each>
|
1314
1320
|
|
1315
1321
|
<!-- List of Figures -->
|
1316
|
-
<xsl:
|
1317
|
-
<
|
1318
|
-
|
1319
|
-
<xsl:
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
</xsl:
|
1322
|
+
<xsl:for-each select="$contents//mnx:figures/mnx:figure">
|
1323
|
+
<xsl:if test="position() = 1">
|
1324
|
+
<fo:block break-after="page"/>
|
1325
|
+
<xsl:call-template name="insertListOf_Title">
|
1326
|
+
<xsl:with-param name="title" select="'Figures'"/>
|
1327
|
+
</xsl:call-template>
|
1328
|
+
</xsl:if>
|
1329
|
+
<xsl:call-template name="insertListOf_Item"/>
|
1330
|
+
</xsl:for-each>
|
1325
1331
|
|
1326
1332
|
<!-- List of Tables -->
|
1327
|
-
<xsl:
|
1328
|
-
<
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
</xsl:
|
1333
|
+
<xsl:for-each select="$contents//mnx:tables/mnx:table">
|
1334
|
+
<xsl:if test="position() = 1">
|
1335
|
+
<fo:block break-after="page"/>
|
1336
|
+
<xsl:call-template name="insertListOf_Title">
|
1337
|
+
<xsl:with-param name="title" select="'Tables'"/>
|
1338
|
+
</xsl:call-template>
|
1339
|
+
</xsl:if>
|
1340
|
+
<xsl:call-template name="insertListOf_Item"/>
|
1341
|
+
</xsl:for-each>
|
1336
1342
|
|
1337
1343
|
</xsl:when> <!-- $stage = 'published' or 'approved' -->
|
1338
1344
|
</xsl:choose>
|
@@ -1407,24 +1413,17 @@
|
|
1407
1413
|
</xsl:if>
|
1408
1414
|
</xsl:template>
|
1409
1415
|
|
1410
|
-
<xsl:template match="mn:preface/mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
|
1416
|
+
<xsl:template match="mn:preface/mn:clause[@type = 'toc']/mn:fmt-title" name="toc" priority="3">
|
1411
1417
|
<xsl:choose>
|
1412
|
-
<xsl:when test="$current_template = 'standard' or $current_template = 'draft'">
|
1413
|
-
<fo:block font-family="Arial" font-size="12pt" role="H1" font-weight="bold" margin-top="12pt" margin-bottom="24pt">
|
1414
|
-
<xsl:if test="$stage = 'published' or $stage = 'approved'">
|
1415
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1416
|
-
</xsl:if>
|
1417
|
-
<!-- Contents -->
|
1418
|
-
<!-- <xsl:call-template name="getLocalizedString">
|
1419
|
-
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
1420
|
-
</xsl:call-template> -->
|
1421
|
-
<xsl:apply-templates/>
|
1422
|
-
</fo:block>
|
1423
|
-
</xsl:when>
|
1424
1418
|
<xsl:when test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
|
1419
|
+
<!-- no title -->
|
1425
1420
|
</xsl:when>
|
1426
1421
|
<xsl:otherwise>
|
1427
|
-
<fo:block
|
1422
|
+
<fo:block xsl:use-attribute-sets="toc-title-style">
|
1423
|
+
<xsl:if test="($current_template = 'standard' or $current_template = 'draft') and ($stage = 'published' or $stage = 'approved' or $stage_published = 'true')">
|
1424
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1425
|
+
</xsl:if>
|
1426
|
+
<!-- Contents -->
|
1428
1427
|
<xsl:apply-templates/>
|
1429
1428
|
</fo:block>
|
1430
1429
|
</xsl:otherwise>
|
@@ -1433,13 +1432,17 @@
|
|
1433
1432
|
</xsl:template>
|
1434
1433
|
|
1435
1434
|
<xsl:template match="mn:boilerplate/mn:copyright-statement//mn:p" priority="2">
|
1436
|
-
<fo:block
|
1435
|
+
<fo:block xsl:use-attribute-sets="copyright-statement-p-style">
|
1436
|
+
<xsl:call-template name="refine_copyright-statement-p-style"/>
|
1437
|
+
|
1437
1438
|
<xsl:apply-templates/>
|
1438
1439
|
</fo:block>
|
1439
1440
|
</xsl:template>
|
1440
1441
|
|
1441
1442
|
<xsl:template match="mn:boilerplate/mn:license-statement//mn:p" priority="2">
|
1442
|
-
<fo:block
|
1443
|
+
<fo:block xsl:use-attribute-sets="license-statement-p-style">
|
1444
|
+
<xsl:call-template name="refine_license-statement-p-style"/>
|
1445
|
+
|
1443
1446
|
<xsl:apply-templates/>
|
1444
1447
|
</fo:block>
|
1445
1448
|
</xsl:template>
|
@@ -1538,8 +1541,10 @@
|
|
1538
1541
|
|
1539
1542
|
<xsl:variable name="officemembers_count" select="count($officemembers/officemember)"/>
|
1540
1543
|
|
1541
|
-
<xsl:variable name="
|
1542
|
-
|
1544
|
+
<xsl:variable name="cols">3</xsl:variable>
|
1545
|
+
|
1546
|
+
<xsl:variable name="mod" select="$officemembers_count mod $cols"/>
|
1547
|
+
<xsl:variable name="floor" select="floor($officemembers_count div $cols)"/>
|
1543
1548
|
|
1544
1549
|
<xsl:variable name="max">
|
1545
1550
|
<xsl:choose>
|
@@ -1548,11 +1553,41 @@
|
|
1548
1553
|
</xsl:choose>
|
1549
1554
|
</xsl:variable>
|
1550
1555
|
|
1551
|
-
<!-- <fo:block>officemembers_count=<xsl:value-of select="$officemembers_count"/></fo:block>
|
1552
|
-
<fo:block>mod=<xsl:value-of select="$mod"/></fo:block>
|
1556
|
+
<!-- <fo:block>DEBUG officemembers_count=<xsl:value-of select="$officemembers_count"/></fo:block> -->
|
1557
|
+
<!-- <fo:block>mod=<xsl:value-of select="$mod"/></fo:block>
|
1553
1558
|
<fo:block>floor=<xsl:value-of select="$floor"/></fo:block>
|
1554
1559
|
<fo:block>max=<xsl:value-of select="$max"/></fo:block> -->
|
1555
1560
|
|
1561
|
+
<!-- From https://github.com/metanorma/metanorma-ieee/issues/533#issuecomment-3178212854:
|
1562
|
+
Algorithm:
|
1563
|
+
3 cases: 0 extra, all balanced; 1 extra, place in middle, 2 extra, place on both sides.
|
1564
|
+
|
1565
|
+
The number of rows in each column is "ceil(names/cols)".
|
1566
|
+
The number of extras is calculated as "names mod cols"
|
1567
|
+
In the 1 extra case, place an additional line break after the "floor(names/cols)"-th item.
|
1568
|
+
In the 2 extra case, place an additional line break after the "ceil(names/cols) + floor(names/cols)"-th item
|
1569
|
+
-->
|
1570
|
+
|
1571
|
+
<xsl:variable name="number_in_each_column" select="ceiling($officemembers_count div $cols)"/>
|
1572
|
+
<!-- <fo:block>DEBUG number_in_each_column=<xsl:value-of select="$number_in_each_column"/></fo:block> -->
|
1573
|
+
<xsl:variable name="number_extras" select="$officemembers_count mod $cols"/>
|
1574
|
+
<!-- <fo:block>DEBUG number_extras=<xsl:value-of select="$number_extras"/></fo:block> -->
|
1575
|
+
|
1576
|
+
<xsl:variable name="officemembers_updated_">
|
1577
|
+
<xsl:for-each select="$officemembers/officemember">
|
1578
|
+
<xsl:copy-of select="."/>
|
1579
|
+
<xsl:choose>
|
1580
|
+
<xsl:when test="$number_extras = 1 and position() = $floor">
|
1581
|
+
<officemember/>
|
1582
|
+
</xsl:when>
|
1583
|
+
<xsl:when test="$number_extras = 2 and position() = ($number_in_each_column + $floor)">
|
1584
|
+
<officemember/>
|
1585
|
+
</xsl:when>
|
1586
|
+
</xsl:choose>
|
1587
|
+
</xsl:for-each>
|
1588
|
+
</xsl:variable>
|
1589
|
+
<xsl:variable name="officemembers_updated" select="xalan:nodeset($officemembers_updated_)"/>
|
1590
|
+
|
1556
1591
|
<fo:block font-size="9pt">
|
1557
1592
|
<fo:block> </fo:block>
|
1558
1593
|
<fo:table width="100%" table-layout="fixed">
|
@@ -1560,7 +1595,7 @@
|
|
1560
1595
|
<fo:table-column column-width="proportional-column-width(55)"/>
|
1561
1596
|
<fo:table-column column-width="proportional-column-width(42)"/>
|
1562
1597
|
<fo:table-body>
|
1563
|
-
<xsl:for-each select="$
|
1598
|
+
<xsl:for-each select="$officemembers_updated/officemember[position() <= $number_in_each_column]"> <!-- $max -->
|
1564
1599
|
<fo:table-row>
|
1565
1600
|
<fo:table-cell padding-right="3mm">
|
1566
1601
|
<fo:block>
|
@@ -1569,12 +1604,12 @@
|
|
1569
1604
|
</fo:table-cell>
|
1570
1605
|
<fo:table-cell padding-right="3mm">
|
1571
1606
|
<fo:block>
|
1572
|
-
<xsl:apply-templates select="following-sibling::*[number($
|
1607
|
+
<xsl:apply-templates select="following-sibling::*[number($number_in_each_column)]/node()"/> <!-- $max -->
|
1573
1608
|
</fo:block>
|
1574
1609
|
</fo:table-cell>
|
1575
1610
|
<fo:table-cell>
|
1576
1611
|
<fo:block>
|
1577
|
-
<xsl:apply-templates select="following-sibling::*[number($
|
1612
|
+
<xsl:apply-templates select="following-sibling::*[number($number_in_each_column) * 2]/node()"/> <!-- $max -->
|
1578
1613
|
</fo:block>
|
1579
1614
|
</fo:table-cell>
|
1580
1615
|
</fo:table-row>
|
@@ -1624,9 +1659,7 @@
|
|
1624
1659
|
|
1625
1660
|
<xsl:variable name="attributes_">
|
1626
1661
|
<attributes>
|
1627
|
-
|
1628
|
-
<xsl:attribute name="space-after">0</xsl:attribute>
|
1629
|
-
</xsl:if>
|
1662
|
+
|
1630
1663
|
<xsl:call-template name="setTextAlignment">
|
1631
1664
|
<xsl:with-param name="default">justify</xsl:with-param>
|
1632
1665
|
</xsl:call-template>
|
@@ -1642,6 +1675,11 @@
|
|
1642
1675
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
1643
1676
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
1644
1677
|
</xsl:if>
|
1678
|
+
|
1679
|
+
<xsl:if test="@align = 'center' and ancestor::mn:clause[@id = 'boilerplate-participants' or normalize-space(mn:fmt-title) = 'Participants'] and following-sibling::*[1][self::mn:p and @align = 'center']">
|
1680
|
+
<xsl:attribute name="space-after">0</xsl:attribute>
|
1681
|
+
</xsl:if>
|
1682
|
+
|
1645
1683
|
</attributes>
|
1646
1684
|
</xsl:variable>
|
1647
1685
|
|
@@ -1652,7 +1690,7 @@
|
|
1652
1690
|
<xsl:for-each select="$attributes/attributes/@*">
|
1653
1691
|
<xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
|
1654
1692
|
</xsl:for-each>
|
1655
|
-
|
1693
|
+
<!-- <fo:block>debug current_template=<xsl:value-of select="$current_template"/></fo:block> -->
|
1656
1694
|
<xsl:apply-templates/>
|
1657
1695
|
</fo:block>
|
1658
1696
|
</xsl:otherwise>
|
@@ -1965,13 +2003,10 @@
|
|
1965
2003
|
|
1966
2004
|
<xsl:template name="insertListOf_Title">
|
1967
2005
|
<xsl:param name="title"/>
|
1968
|
-
<fo:block
|
1969
|
-
|
1970
|
-
|
1971
|
-
|
1972
|
-
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
1973
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1974
|
-
</xsl:if>
|
2006
|
+
<fo:block xsl:use-attribute-sets="toc-listof-title-style">
|
2007
|
+
|
2008
|
+
<xsl:call-template name="refine_toc-listof-title-style"/>
|
2009
|
+
|
1975
2010
|
<xsl:value-of select="$title"/>
|
1976
2011
|
</fo:block>
|
1977
2012
|
</xsl:template>
|
@@ -1980,8 +2015,7 @@
|
|
1980
2015
|
|
1981
2016
|
<xsl:choose>
|
1982
2017
|
<xsl:when test="$current_template = 'standard'">
|
1983
|
-
<fo:list-block
|
1984
|
-
|
2018
|
+
<fo:list-block xsl:use-attribute-sets="toc-listof-item-style">
|
1985
2019
|
<fo:list-item>
|
1986
2020
|
<fo:list-item-label end-indent="label-end()">
|
1987
2021
|
<fo:block>
|
@@ -2006,8 +2040,8 @@
|
|
2006
2040
|
</fo:list-item-body>
|
2007
2041
|
</fo:list-item>
|
2008
2042
|
</fo:list-block>
|
2009
|
-
|
2010
2043
|
</xsl:when>
|
2044
|
+
|
2011
2045
|
<xsl:otherwise>
|
2012
2046
|
<fo:block role="TOCI" font-weight="normal" text-align-last="justify" margin-left="12mm">
|
2013
2047
|
<fo:basic-link internal-destination="{@id}">
|
@@ -3021,7 +3055,7 @@
|
|
3021
3055
|
</xsl:template>
|
3022
3056
|
|
3023
3057
|
<xsl:template name="insertFootnoteSeparator">
|
3024
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
3058
|
+
<fo:static-content flow-name="xsl-footnote-separator" role="artifact">
|
3025
3059
|
<fo:block>
|
3026
3060
|
<fo:leader leader-pattern="rule" rule-thickness="0.5pt" leader-length="35%">
|
3027
3061
|
<xsl:if test="$current_template = 'whitepaper' or $current_template= 'icap-whitepaper' or $current_template = 'industry-connection-report'">
|
@@ -5496,13 +5530,26 @@
|
|
5496
5530
|
<xsl:attribute-set name="copyright-statement-style">
|
5497
5531
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
5498
5532
|
|
5533
|
+
<xsl:template name="refine_copyright-statement-style">
|
5534
|
+
</xsl:template>
|
5535
|
+
|
5499
5536
|
<xsl:attribute-set name="copyright-statement-title-style">
|
5500
5537
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
5501
5538
|
|
5539
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
5540
|
+
</xsl:template>
|
5541
|
+
|
5502
5542
|
<xsl:attribute-set name="copyright-statement-p-style">
|
5503
5543
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
5504
5544
|
|
5505
|
-
|
5545
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
5546
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
5547
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
5548
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
5549
|
+
|
5550
|
+
</xsl:template>
|
5551
|
+
|
5552
|
+
<xsl:attribute-set name="license-statement-style">
|
5506
5553
|
</xsl:attribute-set> <!-- license-statement-style -->
|
5507
5554
|
|
5508
5555
|
<xsl:attribute-set name="license-statement-title-style">
|
@@ -5510,8 +5557,15 @@
|
|
5510
5557
|
</xsl:attribute-set> <!-- license-statement-title-style -->
|
5511
5558
|
|
5512
5559
|
<xsl:attribute-set name="license-statement-p-style">
|
5560
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
5561
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
5562
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
5513
5563
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
5514
5564
|
|
5565
|
+
<xsl:template name="refine_license-statement-p-style">
|
5566
|
+
|
5567
|
+
</xsl:template>
|
5568
|
+
|
5515
5569
|
<xsl:attribute-set name="legal-statement-style">
|
5516
5570
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
5517
5571
|
|
@@ -5539,6 +5593,8 @@
|
|
5539
5593
|
<!-- ================================= -->
|
5540
5594
|
<xsl:template match="mn:copyright-statement">
|
5541
5595
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
5596
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
5597
|
+
|
5542
5598
|
<xsl:apply-templates/>
|
5543
5599
|
</fo:block>
|
5544
5600
|
</xsl:template> <!-- copyright-statement -->
|
@@ -6647,7 +6703,7 @@
|
|
6647
6703
|
</xsl:otherwise>
|
6648
6704
|
</xsl:choose>
|
6649
6705
|
</xsl:variable>
|
6650
|
-
<xsl:if test="$key = 'font-family' or
|
6706
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
6651
6707
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
6652
6708
|
</xsl:if>
|
6653
6709
|
<xsl:if test="$key = 'text-indent'">
|
@@ -13453,7 +13509,7 @@
|
|
13453
13509
|
|
13454
13510
|
<xsl:template name="insertFootnoteSeparatorCommon">
|
13455
13511
|
<xsl:param name="leader_length">30%</xsl:param>
|
13456
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
13512
|
+
<fo:static-content flow-name="xsl-footnote-separator" role="artifact">
|
13457
13513
|
<fo:block>
|
13458
13514
|
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
13459
13515
|
</fo:block>
|
@@ -14264,13 +14320,31 @@
|
|
14264
14320
|
<!-- skip here, see the template 'fmt-review-start' -->
|
14265
14321
|
</xsl:when>
|
14266
14322
|
<xsl:otherwise>
|
14267
|
-
|
14268
|
-
|
14269
|
-
|
14270
|
-
|
14323
|
+
<xsl:choose>
|
14324
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
14325
|
+
<fo:block font-size="1pt" line-height="0.1">
|
14326
|
+
<xsl:call-template name="fo_inline_bookmark">
|
14327
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
14328
|
+
</xsl:call-template>
|
14329
|
+
</fo:block>
|
14330
|
+
</xsl:when>
|
14331
|
+
<xsl:otherwise>
|
14332
|
+
<xsl:call-template name="fo_inline_bookmark">
|
14333
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
14334
|
+
</xsl:call-template>
|
14335
|
+
</xsl:otherwise>
|
14336
|
+
</xsl:choose>
|
14271
14337
|
</xsl:otherwise>
|
14272
14338
|
</xsl:choose>
|
14273
14339
|
</xsl:template>
|
14340
|
+
|
14341
|
+
<xsl:template name="fo_inline_bookmark">
|
14342
|
+
<xsl:param name="bookmark_id"/>
|
14343
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
14344
|
+
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
|
14345
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
14346
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
14347
|
+
</xsl:template>
|
14274
14348
|
<!-- =================== -->
|
14275
14349
|
<!-- End of Index processing -->
|
14276
14350
|
<!-- =================== -->
|
@@ -14371,11 +14445,23 @@
|
|
14371
14445
|
</xsl:template>
|
14372
14446
|
|
14373
14447
|
<xsl:attribute-set name="toc-title-style">
|
14448
|
+
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
14449
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
14450
|
+
<xsl:attribute name="role">H1</xsl:attribute>
|
14451
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
14452
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
14453
|
+
<xsl:attribute name="margin-bottom">24pt</xsl:attribute>
|
14374
14454
|
</xsl:attribute-set>
|
14375
14455
|
|
14456
|
+
<xsl:template name="refine_toc-title-style">
|
14457
|
+
</xsl:template>
|
14458
|
+
|
14376
14459
|
<xsl:attribute-set name="toc-title-page-style">
|
14377
14460
|
</xsl:attribute-set> <!-- toc-title-page-style -->
|
14378
14461
|
|
14462
|
+
<xsl:template name="refine_toc-title-page-style">
|
14463
|
+
</xsl:template>
|
14464
|
+
|
14379
14465
|
<xsl:attribute-set name="toc-item-block-style">
|
14380
14466
|
</xsl:attribute-set>
|
14381
14467
|
|
@@ -14390,6 +14476,9 @@
|
|
14390
14476
|
</xsl:template> <!-- END: refine_toc-item-style -->
|
14391
14477
|
|
14392
14478
|
<xsl:attribute-set name="toc-leader-style">
|
14479
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
14480
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
14481
|
+
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
14393
14482
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
14394
14483
|
|
14395
14484
|
<xsl:attribute-set name="toc-pagenumber-style">
|
@@ -14397,13 +14486,29 @@
|
|
14397
14486
|
|
14398
14487
|
<!-- List of Figures, Tables -->
|
14399
14488
|
<xsl:attribute-set name="toc-listof-title-style">
|
14489
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
14490
|
+
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
14491
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
14400
14492
|
</xsl:attribute-set>
|
14401
14493
|
|
14494
|
+
<xsl:template name="refine_toc-listof-title-style">
|
14495
|
+
<xsl:if test="$current_template = 'standard'">
|
14496
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
14497
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
14498
|
+
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
14499
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
14500
|
+
</xsl:if>
|
14501
|
+
</xsl:template>
|
14502
|
+
|
14402
14503
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
14403
14504
|
</xsl:attribute-set>
|
14404
14505
|
|
14405
14506
|
<xsl:attribute-set name="toc-listof-item-style">
|
14406
14507
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
14508
|
+
<xsl:attribute name="provisional-distance-between-starts">22.5mm</xsl:attribute>
|
14509
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
14510
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
14511
|
+
<xsl:attribute name="margin-left">2mm</xsl:attribute>
|
14407
14512
|
</xsl:attribute-set>
|
14408
14513
|
|
14409
14514
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
@@ -14743,7 +14848,7 @@
|
|
14743
14848
|
</xsl:if>
|
14744
14849
|
|
14745
14850
|
<xsl:for-each select="$contents_nodes/mnx:doc">
|
14746
|
-
<fo:bookmark internal-destination="{contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
14851
|
+
<fo:bookmark internal-destination="{mnx:contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
14747
14852
|
<xsl:if test="@bundle = 'true'">
|
14748
14853
|
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
14749
14854
|
</xsl:if>
|
@@ -14777,7 +14882,7 @@
|
|
14777
14882
|
</xsl:choose>
|
14778
14883
|
</fo:bookmark-title>
|
14779
14884
|
|
14780
|
-
<xsl:apply-templates select="contents/mnx:item" mode="bookmark"/>
|
14885
|
+
<xsl:apply-templates select="mnx:contents/mnx:item" mode="bookmark"/>
|
14781
14886
|
|
14782
14887
|
<xsl:call-template name="insertFigureBookmarks">
|
14783
14888
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
@@ -16125,11 +16230,35 @@
|
|
16125
16230
|
|
16126
16231
|
<xsl:template match="mn:svgmap"/>
|
16127
16232
|
|
16233
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
16234
|
+
|
16128
16235
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
16129
16236
|
<xsl:template match="*[local-name() = 'lang_none']">
|
16130
16237
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
16131
16238
|
</xsl:template>
|
16132
16239
|
|
16240
|
+
<xsl:template name="addTagElementT">
|
16241
|
+
<xsl:variable name="title_">
|
16242
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
16243
|
+
</xsl:variable>
|
16244
|
+
<xsl:variable name="title__">
|
16245
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
16246
|
+
<xsl:choose>
|
16247
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
16248
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
16249
|
+
</xsl:choose>
|
16250
|
+
</xsl:for-each>
|
16251
|
+
</xsl:variable>
|
16252
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
16253
|
+
<xsl:if test="$title != ''">
|
16254
|
+
<xsl:attribute name="fox:title">
|
16255
|
+
<xsl:if test="ancestor::mn:sections">
|
16256
|
+
<xsl:text>Section </xsl:text>
|
16257
|
+
</xsl:if>
|
16258
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
16259
|
+
</xsl:if>
|
16260
|
+
</xsl:template>
|
16261
|
+
|
16133
16262
|
<xsl:template name="replaceChar">
|
16134
16263
|
<xsl:param name="text"/>
|
16135
16264
|
<xsl:param name="replace"/>
|
@@ -16410,7 +16539,8 @@
|
|
16410
16539
|
<xsl:for-each select="(//mn:metanorma)[1]/mn:bibdata">
|
16411
16540
|
<rdf:Seq>
|
16412
16541
|
<rdf:li>
|
16413
|
-
<xsl:value-of select="mn:ext/mn:editorialgroup/mn:committee"/>
|
16542
|
+
<!-- <xsl:value-of select="mn:ext/mn:editorialgroup/mn:committee"/> -->
|
16543
|
+
<xsl:value-of select="mn:contributor[mn:role[@type = 'authorizer']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name"/>
|
16414
16544
|
</rdf:li>
|
16415
16545
|
</rdf:Seq>
|
16416
16546
|
|
@@ -16895,6 +17025,13 @@
|
|
16895
17025
|
<xsl:with-param name="default" select="$text_align_default"/>
|
16896
17026
|
</xsl:call-template>
|
16897
17027
|
<xsl:call-template name="setKeepAttributes"/>
|
17028
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
17029
|
+
<xsl:variable name="styles">
|
17030
|
+
<xsl:apply-templates select="*[1]"/>
|
17031
|
+
</xsl:variable>
|
17032
|
+
<!-- move attribute line-height from inline to block -->
|
17033
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
17034
|
+
</xsl:if>
|
16898
17035
|
</xsl:template>
|
16899
17036
|
|
16900
17037
|
<xsl:template name="setKeepAttributes">
|
@@ -16920,34 +17057,41 @@
|
|
16920
17057
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
16921
17058
|
<fo:block>
|
16922
17059
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
16923
|
-
|
16924
|
-
|
16925
|
-
|
16926
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
16927
|
-
<xsl:call-template name="getSVG"/>
|
16928
|
-
</fo:instream-foreign-object>
|
16929
|
-
</xsl:when>
|
16930
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
16931
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
16932
|
-
</xsl:when>
|
16933
|
-
<xsl:otherwise> <!-- bitmap image -->
|
16934
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
16935
|
-
<xsl:if test="$coverimage_src != ''">
|
16936
|
-
<xsl:variable name="coverpage">
|
16937
|
-
<xsl:call-template name="getImageURL">
|
16938
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
16939
|
-
</xsl:call-template>
|
16940
|
-
</xsl:variable>
|
16941
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
16942
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
16943
|
-
</xsl:if>
|
16944
|
-
</xsl:otherwise>
|
16945
|
-
</xsl:choose>
|
17060
|
+
|
17061
|
+
<xsl:call-template name="insertPageImage"/>
|
17062
|
+
|
16946
17063
|
</xsl:for-each>
|
16947
17064
|
</fo:block>
|
16948
17065
|
</fo:block-container>
|
16949
17066
|
</xsl:template>
|
16950
17067
|
|
17068
|
+
<xsl:template name="insertPageImage">
|
17069
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
17070
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
17071
|
+
<xsl:choose>
|
17072
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
17073
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
17074
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
17075
|
+
<xsl:call-template name="getSVG"/>
|
17076
|
+
</fo:instream-foreign-object>
|
17077
|
+
</xsl:when>
|
17078
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
17079
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
17080
|
+
</xsl:when>
|
17081
|
+
<xsl:otherwise> <!-- bitmap image -->
|
17082
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
17083
|
+
<xsl:if test="$coverimage_src != ''">
|
17084
|
+
<xsl:variable name="coverpage">
|
17085
|
+
<xsl:call-template name="getImageURL">
|
17086
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
17087
|
+
</xsl:call-template>
|
17088
|
+
</xsl:variable>
|
17089
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
17090
|
+
</xsl:if>
|
17091
|
+
</xsl:otherwise>
|
17092
|
+
</xsl:choose>
|
17093
|
+
</xsl:template>
|
17094
|
+
|
16951
17095
|
<xsl:template name="getImageURL">
|
16952
17096
|
<xsl:param name="src"/>
|
16953
17097
|
<xsl:choose>
|
@@ -17375,6 +17519,14 @@
|
|
17375
17519
|
</xsl:attribute>
|
17376
17520
|
</xsl:template>
|
17377
17521
|
|
17522
|
+
<xsl:template name="getCharByCodePoint">
|
17523
|
+
<xsl:param name="codepoint"/>
|
17524
|
+
<xsl:param name="radix">16</xsl:param>
|
17525
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
17526
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
17527
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
17528
|
+
</xsl:template>
|
17529
|
+
|
17378
17530
|
<xsl:template name="substring-after-last">
|
17379
17531
|
<xsl:param name="value"/>
|
17380
17532
|
<xsl:param name="delimiter"/>
|