metanorma-un 0.6.11 → 0.6.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/un/isodoc.rng +9 -0
- data/lib/isodoc/un/un.plenary-attachment.xsl +152 -8
- data/lib/isodoc/un/un.plenary.xsl +152 -8
- data/lib/isodoc/un/un.recommendation.xsl +152 -8
- data/lib/metanorma/un/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81239633565c9e41ab2e2dd7ac8e30b6d17306628a0038c88d400ae4d97a16cd
|
4
|
+
data.tar.gz: 5b83a51cdc3f1dc81692e8721e9a3443fb025fb9cd39ea3cd33c8904ab2a2db4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8b00137085f9cb9b4d4821475b10b36df50d3d90b8e1d1f4bc3dd4d50f346af5f9701b49c8e4f46a7eba212e4965ac7b8ec9b47086e638e7053390dff08c466
|
7
|
+
data.tar.gz: 79b6c46e6d568f014e238731e2add2ad696a0a2ae538a9d797a557eb66a7729964e24eb8ddb393da2a4663c73a794f7b795b0930cf7a0abca9ae76c52deaf4fb
|
@@ -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">
|
@@ -1636,13 +1636,20 @@
|
|
1636
1636
|
|
1637
1637
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1638
1638
|
|
1639
|
-
</xsl:attribute-set><xsl:
|
1639
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1640
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1641
|
+
</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">
|
1640
1642
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1641
1643
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1642
1644
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1643
1645
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1644
1646
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1645
|
-
</xsl:template><xsl:template name="
|
1647
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1648
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1649
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1650
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1651
|
+
</xsl:for-each>
|
1652
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1646
1653
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1647
1654
|
|
1648
1655
|
<!-- Normative references -->
|
@@ -1655,13 +1662,33 @@
|
|
1655
1662
|
<!-- Bibliography -->
|
1656
1663
|
<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"/>
|
1657
1664
|
|
1658
|
-
</xsl:template><xsl:template name="
|
1665
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1666
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1667
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1668
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1669
|
+
</xsl:for-each>
|
1670
|
+
|
1671
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1672
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1673
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1674
|
+
</xsl:for-each>
|
1675
|
+
|
1676
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1677
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1678
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1679
|
+
</xsl:for-each>
|
1680
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1659
1681
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1660
1682
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1661
1683
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1662
1684
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1663
1685
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1664
|
-
</xsl:template><xsl:template name="
|
1686
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1687
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1688
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1689
|
+
<xsl:apply-templates select="."/>
|
1690
|
+
</xsl:for-each>
|
1691
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1665
1692
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1666
1693
|
|
1667
1694
|
<!-- Normative references -->
|
@@ -1673,6 +1700,22 @@
|
|
1673
1700
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1674
1701
|
<!-- Bibliography -->
|
1675
1702
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1703
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1704
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1705
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1706
|
+
<xsl:apply-templates select="."/>
|
1707
|
+
|
1708
|
+
</xsl:for-each>
|
1709
|
+
|
1710
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1711
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1712
|
+
<xsl:apply-templates select="."/>
|
1713
|
+
</xsl:for-each>
|
1714
|
+
|
1715
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1716
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1717
|
+
<xsl:apply-templates select="."/>
|
1718
|
+
</xsl:for-each>
|
1676
1719
|
</xsl:template><xsl:template match="text()">
|
1677
1720
|
<xsl:value-of select="."/>
|
1678
1721
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -4217,6 +4260,13 @@
|
|
4217
4260
|
</xsl:attribute>
|
4218
4261
|
<xsl:apply-templates mode="svg_update"/>
|
4219
4262
|
</xsl:copy>
|
4263
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4264
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4265
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4266
|
+
<xsl:call-template name="image_svg">
|
4267
|
+
<xsl:with-param name="name" select="$name"/>
|
4268
|
+
</xsl:call-template>
|
4269
|
+
</xsl:for-each>
|
4220
4270
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
4221
4271
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
4222
4272
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4321,7 +4371,7 @@
|
|
4321
4371
|
</fo:basic-link>
|
4322
4372
|
</fo:block>
|
4323
4373
|
</fo:block-container>
|
4324
|
-
</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">
|
4374
|
+
</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">
|
4325
4375
|
<xsl:apply-templates mode="contents"/>
|
4326
4376
|
<xsl:text> </xsl:text>
|
4327
4377
|
</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">
|
@@ -5006,8 +5056,8 @@
|
|
5006
5056
|
</xsl:if>
|
5007
5057
|
</xsl:template><xsl:variable name="localized.source">
|
5008
5058
|
<xsl:call-template name="getLocalizedString">
|
5009
|
-
|
5010
|
-
|
5059
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
5060
|
+
</xsl:call-template>
|
5011
5061
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
5012
5062
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5013
5063
|
<xsl:if test="normalize-space(@citeas) = ''">
|
@@ -5017,6 +5067,7 @@
|
|
5017
5067
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
5018
5068
|
<xsl:apply-templates/>
|
5019
5069
|
</fo:inline>
|
5070
|
+
|
5020
5071
|
</fo:basic-link>
|
5021
5072
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
5022
5073
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -5083,6 +5134,9 @@
|
|
5083
5134
|
|
5084
5135
|
</xsl:if>
|
5085
5136
|
|
5137
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
5138
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
5139
|
+
|
5086
5140
|
|
5087
5141
|
|
5088
5142
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -5097,7 +5151,9 @@
|
|
5097
5151
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
5098
5152
|
|
5099
5153
|
</xsl:if>
|
5100
|
-
|
5154
|
+
|
5155
|
+
|
5156
|
+
|
5101
5157
|
<xsl:apply-templates/>
|
5102
5158
|
</fo:basic-link>
|
5103
5159
|
|
@@ -5609,9 +5665,97 @@
|
|
5609
5665
|
<fo:block-container border="1pt solid black" width="50%">
|
5610
5666
|
<fo:block> </fo:block>
|
5611
5667
|
</fo:block-container>
|
5668
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5669
|
+
<xsl:param name="colwidths"/>
|
5670
|
+
<xsl:variable name="colwidths_">
|
5671
|
+
<xsl:choose>
|
5672
|
+
<xsl:when test="not($colwidths)">
|
5673
|
+
<xsl:variable name="toc_table_simple">
|
5674
|
+
<tbody>
|
5675
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5676
|
+
</tbody>
|
5677
|
+
</xsl:variable>
|
5678
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5679
|
+
<xsl:call-template name="calculate-column-widths">
|
5680
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5681
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5682
|
+
</xsl:call-template>
|
5683
|
+
</xsl:when>
|
5684
|
+
<xsl:otherwise>
|
5685
|
+
<xsl:copy-of select="$colwidths"/>
|
5686
|
+
</xsl:otherwise>
|
5687
|
+
</xsl:choose>
|
5688
|
+
</xsl:variable>
|
5689
|
+
<fo:block role="TOCI" space-after="16pt">
|
5690
|
+
<fo:table width="100%" table-layout="fixed">
|
5691
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5692
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5693
|
+
</xsl:for-each>
|
5694
|
+
<fo:table-body>
|
5695
|
+
<xsl:apply-templates/>
|
5696
|
+
</fo:table-body>
|
5697
|
+
</fo:table>
|
5698
|
+
</fo:block>
|
5699
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5700
|
+
<fo:table-row min-height="5mm">
|
5701
|
+
<xsl:apply-templates/>
|
5702
|
+
</fo:table-row>
|
5703
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5704
|
+
<xsl:apply-templates/>
|
5705
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5706
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5707
|
+
<xsl:variable name="target" select="@target"/>
|
5708
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5709
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5710
|
+
<fo:table-cell>
|
5711
|
+
<fo:block>
|
5712
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5713
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5714
|
+
<xsl:choose>
|
5715
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5716
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5717
|
+
</xsl:choose>
|
5718
|
+
</xsl:for-each>
|
5719
|
+
</fo:basic-link>
|
5720
|
+
</fo:block>
|
5721
|
+
</fo:table-cell>
|
5722
|
+
</xsl:for-each>
|
5723
|
+
<!-- last column - for page numbers -->
|
5724
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5725
|
+
<fo:block>
|
5726
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5727
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5728
|
+
</fo:basic-link>
|
5729
|
+
</fo:block>
|
5730
|
+
</fo:table-cell>
|
5731
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5732
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5733
|
+
</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">
|
5734
|
+
<tr>
|
5735
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5736
|
+
</tr>
|
5737
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5738
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5739
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5740
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5741
|
+
<td>
|
5742
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5743
|
+
<xsl:copy-of select="."/>
|
5744
|
+
</xsl:for-each>
|
5745
|
+
</td>
|
5746
|
+
</xsl:for-each>
|
5747
|
+
<td>333</td> <!-- page number, just for fill -->
|
5612
5748
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5613
5749
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5614
5750
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5751
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5752
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5753
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5754
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5755
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5756
|
+
</svg>
|
5757
|
+
</fo:instream-foreign-object>
|
5758
|
+
</fo:inline>
|
5615
5759
|
</xsl:template><xsl:template name="convertDate">
|
5616
5760
|
<xsl:param name="date"/>
|
5617
5761
|
<xsl:param name="format" select="'short'"/>
|
@@ -1636,13 +1636,20 @@
|
|
1636
1636
|
|
1637
1637
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1638
1638
|
|
1639
|
-
</xsl:attribute-set><xsl:
|
1639
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1640
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1641
|
+
</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">
|
1640
1642
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1641
1643
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1642
1644
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1643
1645
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1644
1646
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1645
|
-
</xsl:template><xsl:template name="
|
1647
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1648
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1649
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1650
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1651
|
+
</xsl:for-each>
|
1652
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1646
1653
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1647
1654
|
|
1648
1655
|
<!-- Normative references -->
|
@@ -1655,13 +1662,33 @@
|
|
1655
1662
|
<!-- Bibliography -->
|
1656
1663
|
<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"/>
|
1657
1664
|
|
1658
|
-
</xsl:template><xsl:template name="
|
1665
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1666
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1667
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1668
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1669
|
+
</xsl:for-each>
|
1670
|
+
|
1671
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1672
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1673
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1674
|
+
</xsl:for-each>
|
1675
|
+
|
1676
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1677
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1678
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1679
|
+
</xsl:for-each>
|
1680
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1659
1681
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1660
1682
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1661
1683
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1662
1684
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1663
1685
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1664
|
-
</xsl:template><xsl:template name="
|
1686
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1687
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1688
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1689
|
+
<xsl:apply-templates select="."/>
|
1690
|
+
</xsl:for-each>
|
1691
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1665
1692
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1666
1693
|
|
1667
1694
|
<!-- Normative references -->
|
@@ -1673,6 +1700,22 @@
|
|
1673
1700
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1674
1701
|
<!-- Bibliography -->
|
1675
1702
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1703
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1704
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1705
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1706
|
+
<xsl:apply-templates select="."/>
|
1707
|
+
|
1708
|
+
</xsl:for-each>
|
1709
|
+
|
1710
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1711
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1712
|
+
<xsl:apply-templates select="."/>
|
1713
|
+
</xsl:for-each>
|
1714
|
+
|
1715
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1716
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1717
|
+
<xsl:apply-templates select="."/>
|
1718
|
+
</xsl:for-each>
|
1676
1719
|
</xsl:template><xsl:template match="text()">
|
1677
1720
|
<xsl:value-of select="."/>
|
1678
1721
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -4217,6 +4260,13 @@
|
|
4217
4260
|
</xsl:attribute>
|
4218
4261
|
<xsl:apply-templates mode="svg_update"/>
|
4219
4262
|
</xsl:copy>
|
4263
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4264
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4265
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4266
|
+
<xsl:call-template name="image_svg">
|
4267
|
+
<xsl:with-param name="name" select="$name"/>
|
4268
|
+
</xsl:call-template>
|
4269
|
+
</xsl:for-each>
|
4220
4270
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
4221
4271
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
4222
4272
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4321,7 +4371,7 @@
|
|
4321
4371
|
</fo:basic-link>
|
4322
4372
|
</fo:block>
|
4323
4373
|
</fo:block-container>
|
4324
|
-
</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">
|
4374
|
+
</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">
|
4325
4375
|
<xsl:apply-templates mode="contents"/>
|
4326
4376
|
<xsl:text> </xsl:text>
|
4327
4377
|
</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">
|
@@ -5006,8 +5056,8 @@
|
|
5006
5056
|
</xsl:if>
|
5007
5057
|
</xsl:template><xsl:variable name="localized.source">
|
5008
5058
|
<xsl:call-template name="getLocalizedString">
|
5009
|
-
|
5010
|
-
|
5059
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
5060
|
+
</xsl:call-template>
|
5011
5061
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
5012
5062
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5013
5063
|
<xsl:if test="normalize-space(@citeas) = ''">
|
@@ -5017,6 +5067,7 @@
|
|
5017
5067
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
5018
5068
|
<xsl:apply-templates/>
|
5019
5069
|
</fo:inline>
|
5070
|
+
|
5020
5071
|
</fo:basic-link>
|
5021
5072
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
5022
5073
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -5083,6 +5134,9 @@
|
|
5083
5134
|
|
5084
5135
|
</xsl:if>
|
5085
5136
|
|
5137
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
5138
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
5139
|
+
|
5086
5140
|
|
5087
5141
|
|
5088
5142
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -5097,7 +5151,9 @@
|
|
5097
5151
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
5098
5152
|
|
5099
5153
|
</xsl:if>
|
5100
|
-
|
5154
|
+
|
5155
|
+
|
5156
|
+
|
5101
5157
|
<xsl:apply-templates/>
|
5102
5158
|
</fo:basic-link>
|
5103
5159
|
|
@@ -5609,9 +5665,97 @@
|
|
5609
5665
|
<fo:block-container border="1pt solid black" width="50%">
|
5610
5666
|
<fo:block> </fo:block>
|
5611
5667
|
</fo:block-container>
|
5668
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5669
|
+
<xsl:param name="colwidths"/>
|
5670
|
+
<xsl:variable name="colwidths_">
|
5671
|
+
<xsl:choose>
|
5672
|
+
<xsl:when test="not($colwidths)">
|
5673
|
+
<xsl:variable name="toc_table_simple">
|
5674
|
+
<tbody>
|
5675
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5676
|
+
</tbody>
|
5677
|
+
</xsl:variable>
|
5678
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5679
|
+
<xsl:call-template name="calculate-column-widths">
|
5680
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5681
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5682
|
+
</xsl:call-template>
|
5683
|
+
</xsl:when>
|
5684
|
+
<xsl:otherwise>
|
5685
|
+
<xsl:copy-of select="$colwidths"/>
|
5686
|
+
</xsl:otherwise>
|
5687
|
+
</xsl:choose>
|
5688
|
+
</xsl:variable>
|
5689
|
+
<fo:block role="TOCI" space-after="16pt">
|
5690
|
+
<fo:table width="100%" table-layout="fixed">
|
5691
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5692
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5693
|
+
</xsl:for-each>
|
5694
|
+
<fo:table-body>
|
5695
|
+
<xsl:apply-templates/>
|
5696
|
+
</fo:table-body>
|
5697
|
+
</fo:table>
|
5698
|
+
</fo:block>
|
5699
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5700
|
+
<fo:table-row min-height="5mm">
|
5701
|
+
<xsl:apply-templates/>
|
5702
|
+
</fo:table-row>
|
5703
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5704
|
+
<xsl:apply-templates/>
|
5705
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5706
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5707
|
+
<xsl:variable name="target" select="@target"/>
|
5708
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5709
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5710
|
+
<fo:table-cell>
|
5711
|
+
<fo:block>
|
5712
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5713
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5714
|
+
<xsl:choose>
|
5715
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5716
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5717
|
+
</xsl:choose>
|
5718
|
+
</xsl:for-each>
|
5719
|
+
</fo:basic-link>
|
5720
|
+
</fo:block>
|
5721
|
+
</fo:table-cell>
|
5722
|
+
</xsl:for-each>
|
5723
|
+
<!-- last column - for page numbers -->
|
5724
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5725
|
+
<fo:block>
|
5726
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5727
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5728
|
+
</fo:basic-link>
|
5729
|
+
</fo:block>
|
5730
|
+
</fo:table-cell>
|
5731
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5732
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5733
|
+
</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">
|
5734
|
+
<tr>
|
5735
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5736
|
+
</tr>
|
5737
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5738
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5739
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5740
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5741
|
+
<td>
|
5742
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5743
|
+
<xsl:copy-of select="."/>
|
5744
|
+
</xsl:for-each>
|
5745
|
+
</td>
|
5746
|
+
</xsl:for-each>
|
5747
|
+
<td>333</td> <!-- page number, just for fill -->
|
5612
5748
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5613
5749
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5614
5750
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5751
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5752
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5753
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5754
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5755
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5756
|
+
</svg>
|
5757
|
+
</fo:instream-foreign-object>
|
5758
|
+
</fo:inline>
|
5615
5759
|
</xsl:template><xsl:template name="convertDate">
|
5616
5760
|
<xsl:param name="date"/>
|
5617
5761
|
<xsl:param name="format" select="'short'"/>
|
@@ -1594,13 +1594,20 @@
|
|
1594
1594
|
|
1595
1595
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1596
1596
|
|
1597
|
-
</xsl:attribute-set><xsl:
|
1597
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1598
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1599
|
+
</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">
|
1598
1600
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1599
1601
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1600
1602
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1601
1603
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1602
1604
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1603
|
-
</xsl:template><xsl:template name="
|
1605
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1606
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1607
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1608
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1609
|
+
</xsl:for-each>
|
1610
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1604
1611
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1605
1612
|
|
1606
1613
|
<!-- Normative references -->
|
@@ -1613,13 +1620,33 @@
|
|
1613
1620
|
<!-- Bibliography -->
|
1614
1621
|
<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"/>
|
1615
1622
|
|
1616
|
-
</xsl:template><xsl:template name="
|
1623
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1624
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1625
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1626
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1627
|
+
</xsl:for-each>
|
1628
|
+
|
1629
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1630
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1631
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1632
|
+
</xsl:for-each>
|
1633
|
+
|
1634
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1635
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1636
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1637
|
+
</xsl:for-each>
|
1638
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1617
1639
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1618
1640
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1619
1641
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1620
1642
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1621
1643
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1622
|
-
</xsl:template><xsl:template name="
|
1644
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1645
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1646
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1647
|
+
<xsl:apply-templates select="."/>
|
1648
|
+
</xsl:for-each>
|
1649
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1623
1650
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1624
1651
|
|
1625
1652
|
<!-- Normative references -->
|
@@ -1631,6 +1658,22 @@
|
|
1631
1658
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1632
1659
|
<!-- Bibliography -->
|
1633
1660
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1661
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1662
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1663
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1664
|
+
<xsl:apply-templates select="."/>
|
1665
|
+
|
1666
|
+
</xsl:for-each>
|
1667
|
+
|
1668
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1669
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1670
|
+
<xsl:apply-templates select="."/>
|
1671
|
+
</xsl:for-each>
|
1672
|
+
|
1673
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1674
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1675
|
+
<xsl:apply-templates select="."/>
|
1676
|
+
</xsl:for-each>
|
1634
1677
|
</xsl:template><xsl:template match="text()">
|
1635
1678
|
<xsl:value-of select="."/>
|
1636
1679
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -4189,6 +4232,13 @@
|
|
4189
4232
|
</xsl:attribute>
|
4190
4233
|
<xsl:apply-templates mode="svg_update"/>
|
4191
4234
|
</xsl:copy>
|
4235
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4236
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4237
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4238
|
+
<xsl:call-template name="image_svg">
|
4239
|
+
<xsl:with-param name="name" select="$name"/>
|
4240
|
+
</xsl:call-template>
|
4241
|
+
</xsl:for-each>
|
4192
4242
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
4193
4243
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
4194
4244
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4293,7 +4343,7 @@
|
|
4293
4343
|
</fo:basic-link>
|
4294
4344
|
</fo:block>
|
4295
4345
|
</fo:block-container>
|
4296
|
-
</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">
|
4346
|
+
</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">
|
4297
4347
|
<xsl:apply-templates mode="contents"/>
|
4298
4348
|
<xsl:text> </xsl:text>
|
4299
4349
|
</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">
|
@@ -4978,8 +5028,8 @@
|
|
4978
5028
|
</xsl:if>
|
4979
5029
|
</xsl:template><xsl:variable name="localized.source">
|
4980
5030
|
<xsl:call-template name="getLocalizedString">
|
4981
|
-
|
4982
|
-
|
5031
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
5032
|
+
</xsl:call-template>
|
4983
5033
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4984
5034
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4985
5035
|
<xsl:if test="normalize-space(@citeas) = ''">
|
@@ -4989,6 +5039,7 @@
|
|
4989
5039
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4990
5040
|
<xsl:apply-templates/>
|
4991
5041
|
</fo:inline>
|
5042
|
+
|
4992
5043
|
</fo:basic-link>
|
4993
5044
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4994
5045
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -5055,6 +5106,9 @@
|
|
5055
5106
|
|
5056
5107
|
</xsl:if>
|
5057
5108
|
|
5109
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
5110
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
5111
|
+
|
5058
5112
|
|
5059
5113
|
|
5060
5114
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -5067,7 +5121,9 @@
|
|
5067
5121
|
|
5068
5122
|
|
5069
5123
|
</xsl:if>
|
5070
|
-
|
5124
|
+
|
5125
|
+
|
5126
|
+
|
5071
5127
|
<xsl:apply-templates/>
|
5072
5128
|
</fo:basic-link>
|
5073
5129
|
|
@@ -5581,9 +5637,97 @@
|
|
5581
5637
|
<fo:block-container border="1pt solid black" width="50%">
|
5582
5638
|
<fo:block> </fo:block>
|
5583
5639
|
</fo:block-container>
|
5640
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5641
|
+
<xsl:param name="colwidths"/>
|
5642
|
+
<xsl:variable name="colwidths_">
|
5643
|
+
<xsl:choose>
|
5644
|
+
<xsl:when test="not($colwidths)">
|
5645
|
+
<xsl:variable name="toc_table_simple">
|
5646
|
+
<tbody>
|
5647
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5648
|
+
</tbody>
|
5649
|
+
</xsl:variable>
|
5650
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5651
|
+
<xsl:call-template name="calculate-column-widths">
|
5652
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5653
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5654
|
+
</xsl:call-template>
|
5655
|
+
</xsl:when>
|
5656
|
+
<xsl:otherwise>
|
5657
|
+
<xsl:copy-of select="$colwidths"/>
|
5658
|
+
</xsl:otherwise>
|
5659
|
+
</xsl:choose>
|
5660
|
+
</xsl:variable>
|
5661
|
+
<fo:block role="TOCI" space-after="16pt">
|
5662
|
+
<fo:table width="100%" table-layout="fixed">
|
5663
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5664
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5665
|
+
</xsl:for-each>
|
5666
|
+
<fo:table-body>
|
5667
|
+
<xsl:apply-templates/>
|
5668
|
+
</fo:table-body>
|
5669
|
+
</fo:table>
|
5670
|
+
</fo:block>
|
5671
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5672
|
+
<fo:table-row min-height="5mm">
|
5673
|
+
<xsl:apply-templates/>
|
5674
|
+
</fo:table-row>
|
5675
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5676
|
+
<xsl:apply-templates/>
|
5677
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5678
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5679
|
+
<xsl:variable name="target" select="@target"/>
|
5680
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5681
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5682
|
+
<fo:table-cell>
|
5683
|
+
<fo:block>
|
5684
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5685
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5686
|
+
<xsl:choose>
|
5687
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5688
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5689
|
+
</xsl:choose>
|
5690
|
+
</xsl:for-each>
|
5691
|
+
</fo:basic-link>
|
5692
|
+
</fo:block>
|
5693
|
+
</fo:table-cell>
|
5694
|
+
</xsl:for-each>
|
5695
|
+
<!-- last column - for page numbers -->
|
5696
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5697
|
+
<fo:block>
|
5698
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5699
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5700
|
+
</fo:basic-link>
|
5701
|
+
</fo:block>
|
5702
|
+
</fo:table-cell>
|
5703
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5704
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5705
|
+
</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">
|
5706
|
+
<tr>
|
5707
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5708
|
+
</tr>
|
5709
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5710
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5711
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5712
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5713
|
+
<td>
|
5714
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5715
|
+
<xsl:copy-of select="."/>
|
5716
|
+
</xsl:for-each>
|
5717
|
+
</td>
|
5718
|
+
</xsl:for-each>
|
5719
|
+
<td>333</td> <!-- page number, just for fill -->
|
5584
5720
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5585
5721
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5586
5722
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5723
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5724
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5725
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5726
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5727
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5728
|
+
</svg>
|
5729
|
+
</fo:instream-foreign-object>
|
5730
|
+
</fo:inline>
|
5587
5731
|
</xsl:template><xsl:template name="convertDate">
|
5588
5732
|
<xsl:param name="date"/>
|
5589
5733
|
<xsl:param name="format" select="'short'"/>
|
data/lib/metanorma/un/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-un
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.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: iso-639
|