metanorma-m3aawg 1.7.11 → 1.7.12
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 73b221e78b68bb07ffad5cc9f071430937b938c405199a2b9d2f7a6ae0771140
|
|
4
|
+
data.tar.gz: d45c6226f8f9ed0577f0f8437d02ce819453c952bbe42d8a87e61b4e6fde7735
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fdcc9a39327bc00225a79e3a21adcc44354457f08e070ce344204a88f8613826513cb16491715466ee5d093a86006342c570ba5c346995eb8d0815adfd07bd72
|
|
7
|
+
data.tar.gz: ededc627b8dc364c11428d9eb846bd10f06c5d49a10986b8dec7ff391d0cc71f19241047aed9a306106278149d78363fa3fe101aa2588bed0d8f5a9cd36b7b44
|
|
@@ -40,9 +40,9 @@ module Asciidoctor
|
|
|
40
40
|
pdf_converter(node)&.convert(@filename + ".presentation.xml", nil, false, "#{@filename}.pdf")
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
def sections_cleanup(
|
|
43
|
+
def sections_cleanup(xml)
|
|
44
44
|
super
|
|
45
|
-
|
|
45
|
+
xml.xpath("//*[@inline-header]").each do |h|
|
|
46
46
|
h.delete("inline-header")
|
|
47
47
|
end
|
|
48
48
|
end
|
|
@@ -61,6 +61,7 @@ module Asciidoctor
|
|
|
61
61
|
|
|
62
62
|
def pdf_converter(node)
|
|
63
63
|
return nil if node.attr("no-pdf")
|
|
64
|
+
|
|
64
65
|
IsoDoc::M3AAWG::PdfConvert.new(doc_extract_attributes(node))
|
|
65
66
|
end
|
|
66
67
|
end
|
|
@@ -1036,6 +1036,7 @@
|
|
|
1036
1036
|
<ref name="svgmap"/>
|
|
1037
1037
|
<ref name="inputform"/>
|
|
1038
1038
|
<ref name="toc"/>
|
|
1039
|
+
<ref name="passthrough"/>
|
|
1039
1040
|
</choice>
|
|
1040
1041
|
</define>
|
|
1041
1042
|
<define name="toc">
|
|
@@ -1043,6 +1044,14 @@
|
|
|
1043
1044
|
<ref name="ul"/>
|
|
1044
1045
|
</element>
|
|
1045
1046
|
</define>
|
|
1047
|
+
<define name="passthrough">
|
|
1048
|
+
<element name="passthrough">
|
|
1049
|
+
<optional>
|
|
1050
|
+
<attribute name="formats"/>
|
|
1051
|
+
</optional>
|
|
1052
|
+
<text/>
|
|
1053
|
+
</element>
|
|
1054
|
+
</define>
|
|
1046
1055
|
<define name="inputform">
|
|
1047
1056
|
<element name="form">
|
|
1048
1057
|
<attribute name="id">
|
|
@@ -1445,13 +1445,20 @@
|
|
|
1445
1445
|
|
|
1446
1446
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
|
1447
1447
|
|
|
1448
|
-
</xsl:attribute-set><xsl:
|
|
1448
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
|
1449
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
|
1450
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
|
1449
1451
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
|
1450
1452
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
|
1451
1453
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
|
1452
1454
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
|
1453
1455
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
|
1454
|
-
</xsl:template><xsl:template name="
|
|
1456
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
1457
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
|
1458
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1459
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1460
|
+
</xsl:for-each>
|
|
1461
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
|
1455
1462
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
|
1456
1463
|
|
|
1457
1464
|
<!-- Normative references -->
|
|
@@ -1464,13 +1471,33 @@
|
|
|
1464
1471
|
<!-- Bibliography -->
|
|
1465
1472
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
|
1466
1473
|
|
|
1467
|
-
</xsl:template><xsl:template name="
|
|
1474
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
|
1475
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
|
1476
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1477
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1478
|
+
</xsl:for-each>
|
|
1479
|
+
|
|
1480
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
|
1481
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1482
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1483
|
+
</xsl:for-each>
|
|
1484
|
+
|
|
1485
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
|
1486
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1487
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1488
|
+
</xsl:for-each>
|
|
1489
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
|
1468
1490
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
|
1469
1491
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
|
1470
1492
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
|
1471
1493
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
|
1472
1494
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
|
1473
|
-
</xsl:template><xsl:template name="
|
|
1495
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
|
1496
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
|
1497
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1498
|
+
<xsl:apply-templates select="."/>
|
|
1499
|
+
</xsl:for-each>
|
|
1500
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
|
1474
1501
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
|
1475
1502
|
|
|
1476
1503
|
<xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
|
@@ -1486,6 +1513,28 @@
|
|
|
1486
1513
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
|
1487
1514
|
<!-- Bibliography -->
|
|
1488
1515
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
|
1516
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
|
1517
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
|
1518
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1519
|
+
<xsl:apply-templates select="."/>
|
|
1520
|
+
|
|
1521
|
+
<xsl:if test="local-name()='clause' and @type='scope'">
|
|
1522
|
+
<xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
|
1523
|
+
<fo:block break-after="page"/>
|
|
1524
|
+
</xsl:if>
|
|
1525
|
+
</xsl:if>
|
|
1526
|
+
|
|
1527
|
+
</xsl:for-each>
|
|
1528
|
+
|
|
1529
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
|
1530
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1531
|
+
<xsl:apply-templates select="."/>
|
|
1532
|
+
</xsl:for-each>
|
|
1533
|
+
|
|
1534
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
|
1535
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1536
|
+
<xsl:apply-templates select="."/>
|
|
1537
|
+
</xsl:for-each>
|
|
1489
1538
|
</xsl:template><xsl:template match="text()">
|
|
1490
1539
|
<xsl:value-of select="."/>
|
|
1491
1540
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
|
@@ -3989,6 +4038,13 @@
|
|
|
3989
4038
|
</xsl:attribute>
|
|
3990
4039
|
<xsl:apply-templates mode="svg_update"/>
|
|
3991
4040
|
</xsl:copy>
|
|
4041
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
|
4042
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
|
4043
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
|
4044
|
+
<xsl:call-template name="image_svg">
|
|
4045
|
+
<xsl:with-param name="name" select="$name"/>
|
|
4046
|
+
</xsl:call-template>
|
|
4047
|
+
</xsl:for-each>
|
|
3992
4048
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
|
3993
4049
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
|
3994
4050
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
|
@@ -4093,7 +4149,7 @@
|
|
|
4093
4149
|
</fo:basic-link>
|
|
4094
4150
|
</fo:block>
|
|
4095
4151
|
</fo:block-container>
|
|
4096
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
|
4152
|
+
</xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
|
4097
4153
|
<xsl:apply-templates mode="contents"/>
|
|
4098
4154
|
<xsl:text> </xsl:text>
|
|
4099
4155
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
|
@@ -4773,8 +4829,8 @@
|
|
|
4773
4829
|
</xsl:if>
|
|
4774
4830
|
</xsl:template><xsl:variable name="localized.source">
|
|
4775
4831
|
<xsl:call-template name="getLocalizedString">
|
|
4776
|
-
|
|
4777
|
-
|
|
4832
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
|
4833
|
+
</xsl:call-template>
|
|
4778
4834
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
|
4779
4835
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
4780
4836
|
<xsl:if test="normalize-space(@citeas) = ''">
|
|
@@ -4784,6 +4840,7 @@
|
|
|
4784
4840
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
|
4785
4841
|
<xsl:apply-templates/>
|
|
4786
4842
|
</fo:inline>
|
|
4843
|
+
|
|
4787
4844
|
</fo:basic-link>
|
|
4788
4845
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
|
4789
4846
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
@@ -4850,6 +4907,9 @@
|
|
|
4850
4907
|
|
|
4851
4908
|
</xsl:if>
|
|
4852
4909
|
|
|
4910
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
|
4911
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
|
4912
|
+
|
|
4853
4913
|
|
|
4854
4914
|
|
|
4855
4915
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
@@ -4862,7 +4922,9 @@
|
|
|
4862
4922
|
|
|
4863
4923
|
|
|
4864
4924
|
</xsl:if>
|
|
4865
|
-
|
|
4925
|
+
|
|
4926
|
+
|
|
4927
|
+
|
|
4866
4928
|
<xsl:apply-templates/>
|
|
4867
4929
|
</fo:basic-link>
|
|
4868
4930
|
|
|
@@ -5374,9 +5436,97 @@
|
|
|
5374
5436
|
<fo:block-container border="1pt solid black" width="50%">
|
|
5375
5437
|
<fo:block> </fo:block>
|
|
5376
5438
|
</fo:block-container>
|
|
5439
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
|
5440
|
+
<xsl:param name="colwidths"/>
|
|
5441
|
+
<xsl:variable name="colwidths_">
|
|
5442
|
+
<xsl:choose>
|
|
5443
|
+
<xsl:when test="not($colwidths)">
|
|
5444
|
+
<xsl:variable name="toc_table_simple">
|
|
5445
|
+
<tbody>
|
|
5446
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
|
5447
|
+
</tbody>
|
|
5448
|
+
</xsl:variable>
|
|
5449
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
|
5450
|
+
<xsl:call-template name="calculate-column-widths">
|
|
5451
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
5452
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
|
5453
|
+
</xsl:call-template>
|
|
5454
|
+
</xsl:when>
|
|
5455
|
+
<xsl:otherwise>
|
|
5456
|
+
<xsl:copy-of select="$colwidths"/>
|
|
5457
|
+
</xsl:otherwise>
|
|
5458
|
+
</xsl:choose>
|
|
5459
|
+
</xsl:variable>
|
|
5460
|
+
<fo:block role="TOCI" space-after="16pt">
|
|
5461
|
+
<fo:table width="100%" table-layout="fixed">
|
|
5462
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
|
5463
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
|
5464
|
+
</xsl:for-each>
|
|
5465
|
+
<fo:table-body>
|
|
5466
|
+
<xsl:apply-templates/>
|
|
5467
|
+
</fo:table-body>
|
|
5468
|
+
</fo:table>
|
|
5469
|
+
</fo:block>
|
|
5470
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
|
5471
|
+
<fo:table-row min-height="5mm">
|
|
5472
|
+
<xsl:apply-templates/>
|
|
5473
|
+
</fo:table-row>
|
|
5474
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
|
5475
|
+
<xsl:apply-templates/>
|
|
5476
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
|
5477
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
|
5478
|
+
<xsl:variable name="target" select="@target"/>
|
|
5479
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
|
5480
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
|
5481
|
+
<fo:table-cell>
|
|
5482
|
+
<fo:block>
|
|
5483
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
|
5484
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
|
5485
|
+
<xsl:choose>
|
|
5486
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
|
5487
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
|
5488
|
+
</xsl:choose>
|
|
5489
|
+
</xsl:for-each>
|
|
5490
|
+
</fo:basic-link>
|
|
5491
|
+
</fo:block>
|
|
5492
|
+
</fo:table-cell>
|
|
5493
|
+
</xsl:for-each>
|
|
5494
|
+
<!-- last column - for page numbers -->
|
|
5495
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
|
5496
|
+
<fo:block>
|
|
5497
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
|
5498
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
|
5499
|
+
</fo:basic-link>
|
|
5500
|
+
</fo:block>
|
|
5501
|
+
</fo:table-cell>
|
|
5502
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
|
5503
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
|
5504
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
|
|
5505
|
+
<tr>
|
|
5506
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
|
5507
|
+
</tr>
|
|
5508
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
|
5509
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
|
5510
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
|
5511
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
|
5512
|
+
<td>
|
|
5513
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
|
5514
|
+
<xsl:copy-of select="."/>
|
|
5515
|
+
</xsl:for-each>
|
|
5516
|
+
</td>
|
|
5517
|
+
</xsl:for-each>
|
|
5518
|
+
<td>333</td> <!-- page number, just for fill -->
|
|
5377
5519
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
|
5378
5520
|
<fo:inline padding-right="5mm"> </fo:inline>
|
|
5379
5521
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
5522
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
|
5523
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
|
5524
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
|
5525
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
|
5526
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
|
5527
|
+
</svg>
|
|
5528
|
+
</fo:instream-foreign-object>
|
|
5529
|
+
</fo:inline>
|
|
5380
5530
|
</xsl:template><xsl:template name="convertDate">
|
|
5381
5531
|
<xsl:param name="date"/>
|
|
5382
5532
|
<xsl:param name="format" select="'short'"/>
|
|
@@ -1445,13 +1445,20 @@
|
|
|
1445
1445
|
|
|
1446
1446
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
|
1447
1447
|
|
|
1448
|
-
</xsl:attribute-set><xsl:
|
|
1448
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
|
1449
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
|
1450
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
|
1449
1451
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
|
1450
1452
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
|
1451
1453
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
|
1452
1454
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
|
1453
1455
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
|
1454
|
-
</xsl:template><xsl:template name="
|
|
1456
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
1457
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
|
1458
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1459
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1460
|
+
</xsl:for-each>
|
|
1461
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
|
1455
1462
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
|
1456
1463
|
|
|
1457
1464
|
<!-- Normative references -->
|
|
@@ -1464,13 +1471,33 @@
|
|
|
1464
1471
|
<!-- Bibliography -->
|
|
1465
1472
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
|
1466
1473
|
|
|
1467
|
-
</xsl:template><xsl:template name="
|
|
1474
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
|
1475
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
|
1476
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1477
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1478
|
+
</xsl:for-each>
|
|
1479
|
+
|
|
1480
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
|
1481
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1482
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1483
|
+
</xsl:for-each>
|
|
1484
|
+
|
|
1485
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
|
1486
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1487
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1488
|
+
</xsl:for-each>
|
|
1489
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
|
1468
1490
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
|
1469
1491
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
|
1470
1492
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
|
1471
1493
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
|
1472
1494
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
|
1473
|
-
</xsl:template><xsl:template name="
|
|
1495
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
|
1496
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
|
1497
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1498
|
+
<xsl:apply-templates select="."/>
|
|
1499
|
+
</xsl:for-each>
|
|
1500
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
|
1474
1501
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
|
1475
1502
|
|
|
1476
1503
|
<xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
|
@@ -1486,6 +1513,28 @@
|
|
|
1486
1513
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
|
1487
1514
|
<!-- Bibliography -->
|
|
1488
1515
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
|
1516
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
|
1517
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
|
1518
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1519
|
+
<xsl:apply-templates select="."/>
|
|
1520
|
+
|
|
1521
|
+
<xsl:if test="local-name()='clause' and @type='scope'">
|
|
1522
|
+
<xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
|
1523
|
+
<fo:block break-after="page"/>
|
|
1524
|
+
</xsl:if>
|
|
1525
|
+
</xsl:if>
|
|
1526
|
+
|
|
1527
|
+
</xsl:for-each>
|
|
1528
|
+
|
|
1529
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
|
1530
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1531
|
+
<xsl:apply-templates select="."/>
|
|
1532
|
+
</xsl:for-each>
|
|
1533
|
+
|
|
1534
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
|
1535
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1536
|
+
<xsl:apply-templates select="."/>
|
|
1537
|
+
</xsl:for-each>
|
|
1489
1538
|
</xsl:template><xsl:template match="text()">
|
|
1490
1539
|
<xsl:value-of select="."/>
|
|
1491
1540
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
|
@@ -3989,6 +4038,13 @@
|
|
|
3989
4038
|
</xsl:attribute>
|
|
3990
4039
|
<xsl:apply-templates mode="svg_update"/>
|
|
3991
4040
|
</xsl:copy>
|
|
4041
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
|
4042
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
|
4043
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
|
4044
|
+
<xsl:call-template name="image_svg">
|
|
4045
|
+
<xsl:with-param name="name" select="$name"/>
|
|
4046
|
+
</xsl:call-template>
|
|
4047
|
+
</xsl:for-each>
|
|
3992
4048
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
|
3993
4049
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
|
3994
4050
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
|
@@ -4093,7 +4149,7 @@
|
|
|
4093
4149
|
</fo:basic-link>
|
|
4094
4150
|
</fo:block>
|
|
4095
4151
|
</fo:block-container>
|
|
4096
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
|
4152
|
+
</xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
|
4097
4153
|
<xsl:apply-templates mode="contents"/>
|
|
4098
4154
|
<xsl:text> </xsl:text>
|
|
4099
4155
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
|
@@ -4773,8 +4829,8 @@
|
|
|
4773
4829
|
</xsl:if>
|
|
4774
4830
|
</xsl:template><xsl:variable name="localized.source">
|
|
4775
4831
|
<xsl:call-template name="getLocalizedString">
|
|
4776
|
-
|
|
4777
|
-
|
|
4832
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
|
4833
|
+
</xsl:call-template>
|
|
4778
4834
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
|
4779
4835
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
4780
4836
|
<xsl:if test="normalize-space(@citeas) = ''">
|
|
@@ -4784,6 +4840,7 @@
|
|
|
4784
4840
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
|
4785
4841
|
<xsl:apply-templates/>
|
|
4786
4842
|
</fo:inline>
|
|
4843
|
+
|
|
4787
4844
|
</fo:basic-link>
|
|
4788
4845
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
|
4789
4846
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
@@ -4850,6 +4907,9 @@
|
|
|
4850
4907
|
|
|
4851
4908
|
</xsl:if>
|
|
4852
4909
|
|
|
4910
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
|
4911
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
|
4912
|
+
|
|
4853
4913
|
|
|
4854
4914
|
|
|
4855
4915
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
@@ -4862,7 +4922,9 @@
|
|
|
4862
4922
|
|
|
4863
4923
|
|
|
4864
4924
|
</xsl:if>
|
|
4865
|
-
|
|
4925
|
+
|
|
4926
|
+
|
|
4927
|
+
|
|
4866
4928
|
<xsl:apply-templates/>
|
|
4867
4929
|
</fo:basic-link>
|
|
4868
4930
|
|
|
@@ -5374,9 +5436,97 @@
|
|
|
5374
5436
|
<fo:block-container border="1pt solid black" width="50%">
|
|
5375
5437
|
<fo:block> </fo:block>
|
|
5376
5438
|
</fo:block-container>
|
|
5439
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
|
5440
|
+
<xsl:param name="colwidths"/>
|
|
5441
|
+
<xsl:variable name="colwidths_">
|
|
5442
|
+
<xsl:choose>
|
|
5443
|
+
<xsl:when test="not($colwidths)">
|
|
5444
|
+
<xsl:variable name="toc_table_simple">
|
|
5445
|
+
<tbody>
|
|
5446
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
|
5447
|
+
</tbody>
|
|
5448
|
+
</xsl:variable>
|
|
5449
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
|
5450
|
+
<xsl:call-template name="calculate-column-widths">
|
|
5451
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
5452
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
|
5453
|
+
</xsl:call-template>
|
|
5454
|
+
</xsl:when>
|
|
5455
|
+
<xsl:otherwise>
|
|
5456
|
+
<xsl:copy-of select="$colwidths"/>
|
|
5457
|
+
</xsl:otherwise>
|
|
5458
|
+
</xsl:choose>
|
|
5459
|
+
</xsl:variable>
|
|
5460
|
+
<fo:block role="TOCI" space-after="16pt">
|
|
5461
|
+
<fo:table width="100%" table-layout="fixed">
|
|
5462
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
|
5463
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
|
5464
|
+
</xsl:for-each>
|
|
5465
|
+
<fo:table-body>
|
|
5466
|
+
<xsl:apply-templates/>
|
|
5467
|
+
</fo:table-body>
|
|
5468
|
+
</fo:table>
|
|
5469
|
+
</fo:block>
|
|
5470
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
|
5471
|
+
<fo:table-row min-height="5mm">
|
|
5472
|
+
<xsl:apply-templates/>
|
|
5473
|
+
</fo:table-row>
|
|
5474
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
|
5475
|
+
<xsl:apply-templates/>
|
|
5476
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
|
5477
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
|
5478
|
+
<xsl:variable name="target" select="@target"/>
|
|
5479
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
|
5480
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
|
5481
|
+
<fo:table-cell>
|
|
5482
|
+
<fo:block>
|
|
5483
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
|
5484
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
|
5485
|
+
<xsl:choose>
|
|
5486
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
|
5487
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
|
5488
|
+
</xsl:choose>
|
|
5489
|
+
</xsl:for-each>
|
|
5490
|
+
</fo:basic-link>
|
|
5491
|
+
</fo:block>
|
|
5492
|
+
</fo:table-cell>
|
|
5493
|
+
</xsl:for-each>
|
|
5494
|
+
<!-- last column - for page numbers -->
|
|
5495
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
|
5496
|
+
<fo:block>
|
|
5497
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
|
5498
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
|
5499
|
+
</fo:basic-link>
|
|
5500
|
+
</fo:block>
|
|
5501
|
+
</fo:table-cell>
|
|
5502
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
|
5503
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
|
5504
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
|
|
5505
|
+
<tr>
|
|
5506
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
|
5507
|
+
</tr>
|
|
5508
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
|
5509
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
|
5510
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
|
5511
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
|
5512
|
+
<td>
|
|
5513
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
|
5514
|
+
<xsl:copy-of select="."/>
|
|
5515
|
+
</xsl:for-each>
|
|
5516
|
+
</td>
|
|
5517
|
+
</xsl:for-each>
|
|
5518
|
+
<td>333</td> <!-- page number, just for fill -->
|
|
5377
5519
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
|
5378
5520
|
<fo:inline padding-right="5mm"> </fo:inline>
|
|
5379
5521
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
5522
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
|
5523
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
|
5524
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
|
5525
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
|
5526
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
|
5527
|
+
</svg>
|
|
5528
|
+
</fo:instream-foreign-object>
|
|
5529
|
+
</fo:inline>
|
|
5380
5530
|
</xsl:template><xsl:template name="convertDate">
|
|
5381
5531
|
<xsl:param name="date"/>
|
|
5382
5532
|
<xsl:param name="format" select="'short'"/>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-m3aawg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-09-
|
|
11
|
+
date: 2021-09-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: htmlentities
|