metanorma-ieee 1.5.2 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1f3bd984e4cf3c4cbfee3938fbd76e32aefa2143de7da149590c4af00e622f6
4
- data.tar.gz: 6df88d7475cff636f3a36c25726379dfe9934eeb973b1220c5f97b119d096439
3
+ metadata.gz: 68972c5486baf914108170d5e90570275fde3b68634a6f76fa2401516d5ed116
4
+ data.tar.gz: de708600107ef15b24b1547ccc26492ab6a1b18d2ae911ceee26aae41a02e84a
5
5
  SHA512:
6
- metadata.gz: badd50b4e680f74803f501bc8203cc26ea7845947af04a1c0daf4157812d530ad0fce25b3432b3391cfc71d19bfb7f65c157712c61c7c0b01c90620852a59e2f
7
- data.tar.gz: 91366936d455a1b7ec2b06a1e11cb42146f73d53e6d56388b0413df33c7bfa96ae2ad540967b9de80557e65dd93fffb3a9eedc8b7de80f4efd2de6c61aa41550
6
+ metadata.gz: 5a8260fa922d5323a746be177bb4fc3bb31229bc8313d1a72bd029439788fffc300fe44ac6bfe7050883ad4b5f65aab94232857b8ef9ce6605c9eca07b4e980d
7
+ data.tar.gz: c2a4c59b10dd5bdb6f2ff0eff2006e7a5b9c4e55bea816b6d6651a01f4612b87347eb96fb0de8ce636a500c5216aabb3fd1e29a773a4d9d2684bd0350d796303
@@ -1410,6 +1410,16 @@ div.zzHelp {
1410
1410
  text-align: left;
1411
1411
  }
1412
1412
 
1413
+ /* Boilerplate */
1414
+ p.officeholder {
1415
+ margin: 0px;
1416
+ }
1417
+
1418
+ /* Target the first p.officeholder in a series - when it's NOT preceded by another p.officeholder */
1419
+ p.officeholder:not(p.officeholder + p.officeholder) {
1420
+ margin-bottom: 0px;
1421
+ }
1422
+
1413
1423
  /* Collapse TOC */
1414
1424
  .collapse-group {
1415
1425
  display: flex;
@@ -717,6 +717,17 @@ div.zzHelp {
717
717
  text-align: left;
718
718
  }
719
719
 
720
+ /* Boilerplate */
721
+
722
+ p.officeholder {
723
+ margin: 0px;
724
+ }
725
+
726
+ /* Target the first p.officeholder in a series - when it's NOT preceded by another p.officeholder */
727
+ p.officeholder:not(p.officeholder + p.officeholder) {
728
+ margin-bottom: 0px;
729
+ }
730
+
720
731
  /* Collapse TOC */
721
732
 
722
733
  .collapse-group {
@@ -41,7 +41,10 @@ module IsoDoc
41
41
  end
42
42
 
43
43
  def para_type_strip(html)
44
- html.xpath("//p[@type]").each { |p| p.delete("type") }
44
+ html.xpath("//p[@type]").each do |p|
45
+ p["type"] == "officeholder" and p["class"] = "officeholder"
46
+ p.delete("type")
47
+ end
45
48
  html
46
49
  end
47
50
 
@@ -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">
@@ -1262,7 +1268,7 @@
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
 
@@ -1414,7 +1420,7 @@
1414
1420
  </xsl:when>
1415
1421
  <xsl:otherwise>
1416
1422
  <fo:block xsl:use-attribute-sets="toc-title-style">
1417
- <xsl:if test="($current_template = 'standard' or $current_template = 'draft') and ($stage = 'published' or $stage = 'approved')">
1423
+ <xsl:if test="($current_template = 'standard' or $current_template = 'draft') and ($stage = 'published' or $stage = 'approved' or $stage_published = 'true')">
1418
1424
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1419
1425
  </xsl:if>
1420
1426
  <!-- Contents -->
@@ -1426,13 +1432,17 @@
1426
1432
  </xsl:template>
1427
1433
 
1428
1434
  <xsl:template match="mn:boilerplate/mn:copyright-statement//mn:p" priority="2">
1429
- <fo:block margin-top="6pt" margin-bottom="6pt" text-align="justify">
1435
+ <fo:block xsl:use-attribute-sets="copyright-statement-p-style">
1436
+ <xsl:call-template name="refine_copyright-statement-p-style"/>
1437
+
1430
1438
  <xsl:apply-templates/>
1431
1439
  </fo:block>
1432
1440
  </xsl:template>
1433
1441
 
1434
1442
  <xsl:template match="mn:boilerplate/mn:license-statement//mn:p" priority="2">
1435
- <fo:block margin-top="6pt" margin-bottom="6pt" text-align="justify">
1443
+ <fo:block xsl:use-attribute-sets="license-statement-p-style">
1444
+ <xsl:call-template name="refine_license-statement-p-style"/>
1445
+
1436
1446
  <xsl:apply-templates/>
1437
1447
  </fo:block>
1438
1448
  </xsl:template>
@@ -1531,8 +1541,10 @@
1531
1541
 
1532
1542
  <xsl:variable name="officemembers_count" select="count($officemembers/officemember)"/>
1533
1543
 
1534
- <xsl:variable name="mod" select="$officemembers_count mod 3"/>
1535
- <xsl:variable name="floor" select="floor($officemembers_count div 3)"/>
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)"/>
1536
1548
 
1537
1549
  <xsl:variable name="max">
1538
1550
  <xsl:choose>
@@ -1541,11 +1553,41 @@
1541
1553
  </xsl:choose>
1542
1554
  </xsl:variable>
1543
1555
 
1544
- <!-- <fo:block>officemembers_count=<xsl:value-of select="$officemembers_count"/></fo:block>
1545
- <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>
1546
1558
  <fo:block>floor=<xsl:value-of select="$floor"/></fo:block>
1547
1559
  <fo:block>max=<xsl:value-of select="$max"/></fo:block> -->
1548
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
+
1549
1591
  <fo:block font-size="9pt">
1550
1592
  <fo:block> </fo:block>
1551
1593
  <fo:table width="100%" table-layout="fixed">
@@ -1553,7 +1595,7 @@
1553
1595
  <fo:table-column column-width="proportional-column-width(55)"/>
1554
1596
  <fo:table-column column-width="proportional-column-width(42)"/>
1555
1597
  <fo:table-body>
1556
- <xsl:for-each select="$officemembers/officemember[position() &lt;= $max]">
1598
+ <xsl:for-each select="$officemembers_updated/officemember[position() &lt;= $number_in_each_column]"> <!-- $max -->
1557
1599
  <fo:table-row>
1558
1600
  <fo:table-cell padding-right="3mm">
1559
1601
  <fo:block>
@@ -1562,12 +1604,12 @@
1562
1604
  </fo:table-cell>
1563
1605
  <fo:table-cell padding-right="3mm">
1564
1606
  <fo:block>
1565
- <xsl:apply-templates select="following-sibling::*[number($max)]/node()"/>
1607
+ <xsl:apply-templates select="following-sibling::*[number($number_in_each_column)]/node()"/> <!-- $max -->
1566
1608
  </fo:block>
1567
1609
  </fo:table-cell>
1568
1610
  <fo:table-cell>
1569
1611
  <fo:block>
1570
- <xsl:apply-templates select="following-sibling::*[number($max) * 2]/node()"/>
1612
+ <xsl:apply-templates select="following-sibling::*[number($number_in_each_column) * 2]/node()"/> <!-- $max -->
1571
1613
  </fo:block>
1572
1614
  </fo:table-cell>
1573
1615
  </fo:table-row>
@@ -1617,9 +1659,7 @@
1617
1659
 
1618
1660
  <xsl:variable name="attributes_">
1619
1661
  <attributes>
1620
- <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']">
1621
- <xsl:attribute name="space-after">0</xsl:attribute>
1622
- </xsl:if>
1662
+
1623
1663
  <xsl:call-template name="setTextAlignment">
1624
1664
  <xsl:with-param name="default">justify</xsl:with-param>
1625
1665
  </xsl:call-template>
@@ -1635,6 +1675,11 @@
1635
1675
  <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
1636
1676
  <xsl:attribute name="space-after">6pt</xsl:attribute>
1637
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
+
1638
1683
  </attributes>
1639
1684
  </xsl:variable>
1640
1685
 
@@ -1645,7 +1690,7 @@
1645
1690
  <xsl:for-each select="$attributes/attributes/@*">
1646
1691
  <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
1647
1692
  </xsl:for-each>
1648
-
1693
+ <!-- <fo:block>debug current_template=<xsl:value-of select="$current_template"/></fo:block> -->
1649
1694
  <xsl:apply-templates/>
1650
1695
  </fo:block>
1651
1696
  </xsl:otherwise>
@@ -3010,7 +3055,7 @@
3010
3055
  </xsl:template>
3011
3056
 
3012
3057
  <xsl:template name="insertFootnoteSeparator">
3013
- <fo:static-content flow-name="xsl-footnote-separator">
3058
+ <fo:static-content flow-name="xsl-footnote-separator" role="artifact">
3014
3059
  <fo:block>
3015
3060
  <fo:leader leader-pattern="rule" rule-thickness="0.5pt" leader-length="35%">
3016
3061
  <xsl:if test="$current_template = 'whitepaper' or $current_template= 'icap-whitepaper' or $current_template = 'industry-connection-report'">
@@ -5485,13 +5530,26 @@
5485
5530
  <xsl:attribute-set name="copyright-statement-style">
5486
5531
  </xsl:attribute-set> <!-- copyright-statement-style -->
5487
5532
 
5533
+ <xsl:template name="refine_copyright-statement-style">
5534
+ </xsl:template>
5535
+
5488
5536
  <xsl:attribute-set name="copyright-statement-title-style">
5489
5537
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
5490
5538
 
5539
+ <xsl:template name="refine_copyright-statement-title-style">
5540
+ </xsl:template>
5541
+
5491
5542
  <xsl:attribute-set name="copyright-statement-p-style">
5492
5543
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
5493
5544
 
5494
- <xsl:attribute-set name="license-statement-style">
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">
5495
5553
  </xsl:attribute-set> <!-- license-statement-style -->
5496
5554
 
5497
5555
  <xsl:attribute-set name="license-statement-title-style">
@@ -5499,8 +5557,15 @@
5499
5557
  </xsl:attribute-set> <!-- license-statement-title-style -->
5500
5558
 
5501
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>
5502
5563
  </xsl:attribute-set> <!-- license-statement-p-style -->
5503
5564
 
5565
+ <xsl:template name="refine_license-statement-p-style">
5566
+
5567
+ </xsl:template>
5568
+
5504
5569
  <xsl:attribute-set name="legal-statement-style">
5505
5570
  </xsl:attribute-set> <!-- legal-statement-style -->
5506
5571
 
@@ -5528,6 +5593,8 @@
5528
5593
  <!-- ================================= -->
5529
5594
  <xsl:template match="mn:copyright-statement">
5530
5595
  <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
5596
+ <xsl:call-template name="refine_copyright-statement-style"/>
5597
+
5531
5598
  <xsl:apply-templates/>
5532
5599
  </fo:block>
5533
5600
  </xsl:template> <!-- copyright-statement -->
@@ -6636,7 +6703,7 @@
6636
6703
  </xsl:otherwise>
6637
6704
  </xsl:choose>
6638
6705
  </xsl:variable>
6639
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
6706
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
6640
6707
  <style name="{$key}"><xsl:value-of select="$value"/></style>
6641
6708
  </xsl:if>
6642
6709
  <xsl:if test="$key = 'text-indent'">
@@ -14253,13 +14320,31 @@
14253
14320
  <!-- skip here, see the template 'fmt-review-start' -->
14254
14321
  </xsl:when>
14255
14322
  <xsl:otherwise>
14256
- <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
14257
- <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>
14258
- <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
14259
- <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
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>
14260
14337
  </xsl:otherwise>
14261
14338
  </xsl:choose>
14262
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>
14263
14348
  <!-- =================== -->
14264
14349
  <!-- End of Index processing -->
14265
14350
  <!-- =================== -->
@@ -16145,11 +16230,35 @@
16145
16230
 
16146
16231
  <xsl:template match="mn:svgmap"/>
16147
16232
 
16233
+ <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
16234
+
16148
16235
  <!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
16149
16236
  <xsl:template match="*[local-name() = 'lang_none']">
16150
16237
  <fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
16151
16238
  </xsl:template>
16152
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
+
16153
16262
  <xsl:template name="replaceChar">
16154
16263
  <xsl:param name="text"/>
16155
16264
  <xsl:param name="replace"/>
@@ -16430,7 +16539,8 @@
16430
16539
  <xsl:for-each select="(//mn:metanorma)[1]/mn:bibdata">
16431
16540
  <rdf:Seq>
16432
16541
  <rdf:li>
16433
- <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"/>
16434
16544
  </rdf:li>
16435
16545
  </rdf:Seq>
16436
16546
 
@@ -16915,6 +17025,13 @@
16915
17025
  <xsl:with-param name="default" select="$text_align_default"/>
16916
17026
  </xsl:call-template>
16917
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>
16918
17035
  </xsl:template>
16919
17036
 
16920
17037
  <xsl:template name="setKeepAttributes">
@@ -16940,34 +17057,41 @@
16940
17057
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
16941
17058
  <fo:block>
16942
17059
  <xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
16943
- <xsl:choose>
16944
- <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
16945
- <fo:instream-foreign-object fox:alt-text="Image Front">
16946
- <xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
16947
- <xsl:call-template name="getSVG"/>
16948
- </fo:instream-foreign-object>
16949
- </xsl:when>
16950
- <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
16951
- <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
16952
- </xsl:when>
16953
- <xsl:otherwise> <!-- bitmap image -->
16954
- <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
16955
- <xsl:if test="$coverimage_src != ''">
16956
- <xsl:variable name="coverpage">
16957
- <xsl:call-template name="getImageURL">
16958
- <xsl:with-param name="src" select="$coverimage_src"/>
16959
- </xsl:call-template>
16960
- </xsl:variable>
16961
- <!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
16962
- <fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
16963
- </xsl:if>
16964
- </xsl:otherwise>
16965
- </xsl:choose>
17060
+
17061
+ <xsl:call-template name="insertPageImage"/>
17062
+
16966
17063
  </xsl:for-each>
16967
17064
  </fo:block>
16968
17065
  </fo:block-container>
16969
17066
  </xsl:template>
16970
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
+
16971
17095
  <xsl:template name="getImageURL">
16972
17096
  <xsl:param name="src"/>
16973
17097
  <xsl:choose>
@@ -17395,6 +17519,14 @@
17395
17519
  </xsl:attribute>
17396
17520
  </xsl:template>
17397
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
+
17398
17530
  <xsl:template name="substring-after-last">
17399
17531
  <xsl:param name="value"/>
17400
17532
  <xsl:param name="delimiter"/>