metanorma-un 0.6.11 → 0.7.1
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/basicdoc.rng +21 -4
- data/lib/asciidoctor/un/isodoc.rng +429 -76
- data/lib/asciidoctor/un/reqt.rng +23 -2
- data/lib/asciidoctor/un/un.rng +6 -16
- data/lib/isodoc/un/html/wordstyle.css +12 -1
- data/lib/isodoc/un/html/wordstyle.scss +12 -1
- data/lib/isodoc/un/un.plenary-attachment.xsl +196 -20
- data/lib/isodoc/un/un.plenary.xsl +196 -20
- data/lib/isodoc/un/un.recommendation.xsl +196 -20
- data/lib/metanorma/un/version.rb +1 -1
- data/metanorma-unece.gemspec +1 -2
- metadata +5 -19
@@ -1162,6 +1162,8 @@
|
|
1162
1162
|
|
1163
1163
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
1164
1164
|
|
1165
|
+
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
1166
|
+
|
1165
1167
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
1166
1168
|
|
1167
1169
|
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
@@ -1434,6 +1436,11 @@
|
|
1434
1436
|
|
1435
1437
|
|
1436
1438
|
|
1439
|
+
</xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
|
1440
|
+
|
1441
|
+
|
1442
|
+
|
1443
|
+
|
1437
1444
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1438
1445
|
|
1439
1446
|
|
@@ -1594,13 +1601,20 @@
|
|
1594
1601
|
|
1595
1602
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1596
1603
|
|
1597
|
-
</xsl:attribute-set><xsl:
|
1604
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1605
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1606
|
+
</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
1607
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1599
1608
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1600
1609
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1601
1610
|
<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
1611
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1603
|
-
</xsl:template><xsl:template name="
|
1612
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1613
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1614
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1615
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1616
|
+
</xsl:for-each>
|
1617
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1604
1618
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1605
1619
|
|
1606
1620
|
<!-- Normative references -->
|
@@ -1613,13 +1627,33 @@
|
|
1613
1627
|
<!-- Bibliography -->
|
1614
1628
|
<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
1629
|
|
1616
|
-
</xsl:template><xsl:template name="
|
1630
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1631
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1632
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1633
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1634
|
+
</xsl:for-each>
|
1635
|
+
|
1636
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1637
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1638
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1639
|
+
</xsl:for-each>
|
1640
|
+
|
1641
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1642
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1643
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1644
|
+
</xsl:for-each>
|
1645
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1617
1646
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1618
1647
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1619
1648
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1620
1649
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1621
1650
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1622
|
-
</xsl:template><xsl:template name="
|
1651
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1652
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1653
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1654
|
+
<xsl:apply-templates select="."/>
|
1655
|
+
</xsl:for-each>
|
1656
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1623
1657
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1624
1658
|
|
1625
1659
|
<!-- Normative references -->
|
@@ -1631,6 +1665,22 @@
|
|
1631
1665
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1632
1666
|
<!-- Bibliography -->
|
1633
1667
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1668
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1669
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1670
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1671
|
+
<xsl:apply-templates select="."/>
|
1672
|
+
|
1673
|
+
</xsl:for-each>
|
1674
|
+
|
1675
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1676
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1677
|
+
<xsl:apply-templates select="."/>
|
1678
|
+
</xsl:for-each>
|
1679
|
+
|
1680
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1681
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1682
|
+
<xsl:apply-templates select="."/>
|
1683
|
+
</xsl:for-each>
|
1634
1684
|
</xsl:template><xsl:template match="text()">
|
1635
1685
|
<xsl:value-of select="."/>
|
1636
1686
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -2499,9 +2549,7 @@
|
|
2499
2549
|
|
2500
2550
|
<!-- Table's note name (NOTE, for example) -->
|
2501
2551
|
|
2502
|
-
<fo:inline padding-right="2mm">
|
2503
|
-
|
2504
|
-
|
2552
|
+
<fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
|
2505
2553
|
|
2506
2554
|
|
2507
2555
|
|
@@ -2516,6 +2564,7 @@
|
|
2516
2564
|
</xsl:if>
|
2517
2565
|
|
2518
2566
|
|
2567
|
+
|
2519
2568
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2520
2569
|
|
2521
2570
|
</fo:inline>
|
@@ -3018,6 +3067,7 @@
|
|
3018
3067
|
<fo:table-cell>
|
3019
3068
|
|
3020
3069
|
<fo:block margin-top="6pt">
|
3070
|
+
<xsl:copy-of select="@id"/>
|
3021
3071
|
|
3022
3072
|
|
3023
3073
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
@@ -3121,6 +3171,8 @@
|
|
3121
3171
|
<xsl:if test="$font-size != ''">
|
3122
3172
|
<xsl:attribute name="font-size">
|
3123
3173
|
<xsl:choose>
|
3174
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
3175
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
3124
3176
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3125
3177
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3126
3178
|
</xsl:choose>
|
@@ -3868,14 +3920,18 @@
|
|
3868
3920
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
3869
3921
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
3870
3922
|
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
3923
|
+
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
3871
3924
|
<fo:block id="{@id}">
|
3872
3925
|
<xsl:apply-templates/>
|
3873
3926
|
</fo:block>
|
3874
3927
|
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
3928
|
+
<!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
|
3875
3929
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
3876
3930
|
|
3877
3931
|
|
3878
|
-
|
3932
|
+
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
3933
|
+
|
3934
|
+
</xsl:if>
|
3879
3935
|
<xsl:apply-templates/>
|
3880
3936
|
</fo:block>
|
3881
3937
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
@@ -3937,6 +3993,7 @@
|
|
3937
3993
|
<xsl:otherwise>
|
3938
3994
|
<fo:block xsl:use-attribute-sets="image-style">
|
3939
3995
|
|
3996
|
+
|
3940
3997
|
<xsl:if test="ancestor::un:admonition">
|
3941
3998
|
<xsl:attribute name="margin-top">-12mm</xsl:attribute>
|
3942
3999
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -4189,6 +4246,13 @@
|
|
4189
4246
|
</xsl:attribute>
|
4190
4247
|
<xsl:apply-templates mode="svg_update"/>
|
4191
4248
|
</xsl:copy>
|
4249
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4250
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4251
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4252
|
+
<xsl:call-template name="image_svg">
|
4253
|
+
<xsl:with-param name="name" select="$name"/>
|
4254
|
+
</xsl:call-template>
|
4255
|
+
</xsl:for-each>
|
4192
4256
|
</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
4257
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
4194
4258
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4293,7 +4357,7 @@
|
|
4293
4357
|
</fo:basic-link>
|
4294
4358
|
</fo:block>
|
4295
4359
|
</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">
|
4360
|
+
</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
4361
|
<xsl:apply-templates mode="contents"/>
|
4298
4362
|
<xsl:text> </xsl:text>
|
4299
4363
|
</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">
|
@@ -4301,7 +4365,7 @@
|
|
4301
4365
|
<xsl:text> </xsl:text>
|
4302
4366
|
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4303
4367
|
<xsl:value-of select="."/>
|
4304
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']
|
4368
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
4305
4369
|
<xsl:value-of select="."/>
|
4306
4370
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4307
4371
|
<xsl:apply-templates mode="contents"/>
|
@@ -4399,6 +4463,8 @@
|
|
4399
4463
|
|
4400
4464
|
|
4401
4465
|
|
4466
|
+
|
4467
|
+
|
4402
4468
|
</fo:bookmark-tree>
|
4403
4469
|
</xsl:if>
|
4404
4470
|
</xsl:template><xsl:template name="insertFigureBookmarks">
|
@@ -4592,12 +4658,16 @@
|
|
4592
4658
|
<xsl:if test="$font-size != ''">
|
4593
4659
|
<xsl:attribute name="font-size">
|
4594
4660
|
<xsl:choose>
|
4661
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4662
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4595
4663
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4596
4664
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4597
4665
|
</xsl:choose>
|
4598
4666
|
</xsl:attribute>
|
4599
4667
|
</xsl:if>
|
4600
4668
|
|
4669
|
+
|
4670
|
+
|
4601
4671
|
<xsl:apply-templates/>
|
4602
4672
|
</fo:block>
|
4603
4673
|
|
@@ -4840,7 +4910,8 @@
|
|
4840
4910
|
</fo:block>
|
4841
4911
|
</fo:table-cell>
|
4842
4912
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
4843
|
-
<fo:block font-size="11pt"
|
4913
|
+
<fo:block font-size="11pt">
|
4914
|
+
|
4844
4915
|
<xsl:apply-templates/>
|
4845
4916
|
</fo:block>
|
4846
4917
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
@@ -4950,6 +5021,7 @@
|
|
4950
5021
|
</xsl:choose>
|
4951
5022
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4952
5023
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
5024
|
+
|
4953
5025
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4954
5026
|
<xsl:variable name="termsource_text">
|
4955
5027
|
<xsl:apply-templates/>
|
@@ -4960,13 +5032,15 @@
|
|
4960
5032
|
<!-- <xsl:apply-templates /> -->
|
4961
5033
|
<xsl:copy-of select="$termsource_text"/>
|
4962
5034
|
</xsl:when>
|
4963
|
-
<xsl:otherwise>
|
5035
|
+
<xsl:otherwise>
|
5036
|
+
|
4964
5037
|
|
4965
5038
|
<xsl:text>[</xsl:text>
|
4966
5039
|
|
4967
5040
|
<!-- <xsl:apply-templates /> -->
|
4968
5041
|
<xsl:copy-of select="$termsource_text"/>
|
4969
5042
|
|
5043
|
+
|
4970
5044
|
<xsl:text>]</xsl:text>
|
4971
5045
|
|
4972
5046
|
</xsl:otherwise>
|
@@ -4978,8 +5052,8 @@
|
|
4978
5052
|
</xsl:if>
|
4979
5053
|
</xsl:template><xsl:variable name="localized.source">
|
4980
5054
|
<xsl:call-template name="getLocalizedString">
|
4981
|
-
|
4982
|
-
|
5055
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
5056
|
+
</xsl:call-template>
|
4983
5057
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4984
5058
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4985
5059
|
<xsl:if test="normalize-space(@citeas) = ''">
|
@@ -4989,6 +5063,7 @@
|
|
4989
5063
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4990
5064
|
<xsl:apply-templates/>
|
4991
5065
|
</fo:inline>
|
5066
|
+
|
4992
5067
|
</fo:basic-link>
|
4993
5068
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4994
5069
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -5032,12 +5107,20 @@
|
|
5032
5107
|
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
5033
5108
|
<xsl:text>— </xsl:text>
|
5034
5109
|
<xsl:apply-templates/>
|
5035
|
-
</xsl:template><xsl:
|
5110
|
+
</xsl:template><xsl:variable name="bibitem_hidden_">
|
5111
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden='true']">
|
5112
|
+
<xsl:copy-of select="."/>
|
5113
|
+
</xsl:for-each>
|
5114
|
+
<xsl:for-each select="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem']">
|
5115
|
+
<xsl:copy-of select="."/>
|
5116
|
+
</xsl:for-each>
|
5117
|
+
</xsl:variable><xsl:variable name="bibitem_hidden" select="xalan:nodeset($bibitem_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
|
5036
5118
|
|
5037
5119
|
<xsl:variable name="bibitemid">
|
5038
5120
|
<xsl:choose>
|
5039
|
-
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"
|
5040
|
-
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"
|
5121
|
+
<!-- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"></xsl:when>
|
5122
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"></xsl:when> -->
|
5123
|
+
<xsl:when test="$bibitem_hidden/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
5041
5124
|
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
5042
5125
|
</xsl:choose>
|
5043
5126
|
</xsl:variable>
|
@@ -5055,6 +5138,9 @@
|
|
5055
5138
|
|
5056
5139
|
</xsl:if>
|
5057
5140
|
|
5141
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
5142
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
5143
|
+
|
5058
5144
|
|
5059
5145
|
|
5060
5146
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -5067,7 +5153,9 @@
|
|
5067
5153
|
|
5068
5154
|
|
5069
5155
|
</xsl:if>
|
5070
|
-
|
5156
|
+
|
5157
|
+
|
5158
|
+
|
5071
5159
|
<xsl:apply-templates/>
|
5072
5160
|
</fo:basic-link>
|
5073
5161
|
|
@@ -5121,10 +5209,10 @@
|
|
5121
5209
|
</xsl:choose>
|
5122
5210
|
</xsl:variable>
|
5123
5211
|
|
5124
|
-
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
5212
|
+
<!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
|
5125
5213
|
|
5126
5214
|
<xsl:choose>
|
5127
|
-
<xsl:when test="$
|
5215
|
+
<xsl:when test="$lang = 'zh'">
|
5128
5216
|
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
5129
5217
|
</xsl:when>
|
5130
5218
|
<xsl:when test="../../@inline-header = 'true'">
|
@@ -5581,9 +5669,97 @@
|
|
5581
5669
|
<fo:block-container border="1pt solid black" width="50%">
|
5582
5670
|
<fo:block> </fo:block>
|
5583
5671
|
</fo:block-container>
|
5672
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5673
|
+
<xsl:param name="colwidths"/>
|
5674
|
+
<xsl:variable name="colwidths_">
|
5675
|
+
<xsl:choose>
|
5676
|
+
<xsl:when test="not($colwidths)">
|
5677
|
+
<xsl:variable name="toc_table_simple">
|
5678
|
+
<tbody>
|
5679
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5680
|
+
</tbody>
|
5681
|
+
</xsl:variable>
|
5682
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5683
|
+
<xsl:call-template name="calculate-column-widths">
|
5684
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5685
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5686
|
+
</xsl:call-template>
|
5687
|
+
</xsl:when>
|
5688
|
+
<xsl:otherwise>
|
5689
|
+
<xsl:copy-of select="$colwidths"/>
|
5690
|
+
</xsl:otherwise>
|
5691
|
+
</xsl:choose>
|
5692
|
+
</xsl:variable>
|
5693
|
+
<fo:block role="TOCI" space-after="16pt">
|
5694
|
+
<fo:table width="100%" table-layout="fixed">
|
5695
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5696
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5697
|
+
</xsl:for-each>
|
5698
|
+
<fo:table-body>
|
5699
|
+
<xsl:apply-templates/>
|
5700
|
+
</fo:table-body>
|
5701
|
+
</fo:table>
|
5702
|
+
</fo:block>
|
5703
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5704
|
+
<fo:table-row min-height="5mm">
|
5705
|
+
<xsl:apply-templates/>
|
5706
|
+
</fo:table-row>
|
5707
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5708
|
+
<xsl:apply-templates/>
|
5709
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5710
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5711
|
+
<xsl:variable name="target" select="@target"/>
|
5712
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5713
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5714
|
+
<fo:table-cell>
|
5715
|
+
<fo:block>
|
5716
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5717
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5718
|
+
<xsl:choose>
|
5719
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5720
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5721
|
+
</xsl:choose>
|
5722
|
+
</xsl:for-each>
|
5723
|
+
</fo:basic-link>
|
5724
|
+
</fo:block>
|
5725
|
+
</fo:table-cell>
|
5726
|
+
</xsl:for-each>
|
5727
|
+
<!-- last column - for page numbers -->
|
5728
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5729
|
+
<fo:block>
|
5730
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5731
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5732
|
+
</fo:basic-link>
|
5733
|
+
</fo:block>
|
5734
|
+
</fo:table-cell>
|
5735
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5736
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5737
|
+
</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">
|
5738
|
+
<tr>
|
5739
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5740
|
+
</tr>
|
5741
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5742
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5743
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5744
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5745
|
+
<td>
|
5746
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5747
|
+
<xsl:copy-of select="."/>
|
5748
|
+
</xsl:for-each>
|
5749
|
+
</td>
|
5750
|
+
</xsl:for-each>
|
5751
|
+
<td>333</td> <!-- page number, just for fill -->
|
5584
5752
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5585
5753
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5586
5754
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5755
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5756
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5757
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5758
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5759
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5760
|
+
</svg>
|
5761
|
+
</fo:instream-foreign-object>
|
5762
|
+
</fo:inline>
|
5587
5763
|
</xsl:template><xsl:template name="convertDate">
|
5588
5764
|
<xsl:param name="date"/>
|
5589
5765
|
<xsl:param name="format" select="'short'"/>
|
data/lib/metanorma/un/version.rb
CHANGED
data/metanorma-unece.gemspec
CHANGED
@@ -30,8 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_dependency "roman-numerals"
|
31
31
|
spec.add_dependency "twitter_cldr"
|
32
32
|
|
33
|
-
spec.add_dependency "
|
34
|
-
spec.add_dependency "metanorma-standoc", "~> 1.10.0"
|
33
|
+
spec.add_dependency "metanorma-standoc", "~> 1.11.0"
|
35
34
|
|
36
35
|
spec.add_development_dependency "byebug", "~> 9.1"
|
37
36
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
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.
|
4
|
+
version: 0.7.1
|
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-
|
11
|
+
date: 2021-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iso-639
|
@@ -52,34 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: isodoc
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 1.7.0
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 1.7.0
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: metanorma-standoc
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - "~>"
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
61
|
+
version: 1.11.0
|
76
62
|
type: :runtime
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
66
|
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
68
|
+
version: 1.11.0
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: byebug
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -306,7 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
292
|
- !ruby/object:Gem::Version
|
307
293
|
version: '0'
|
308
294
|
requirements: []
|
309
|
-
rubygems_version: 3.
|
295
|
+
rubygems_version: 3.2.22
|
310
296
|
signing_key:
|
311
297
|
specification_version: 4
|
312
298
|
summary: Metanorma for UN.
|