metanorma-un 0.6.3 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +12 -11
- data/.hound.yml +3 -1
- data/.rubocop.yml +3 -5
- data/lib/asciidoctor/un/isodoc.rng +16 -0
- data/lib/asciidoctor/un/un.rng +3 -0
- data/lib/isodoc/un/un.plenary-attachment.xsl +42 -8
- data/lib/isodoc/un/un.plenary.xsl +42 -8
- data/lib/isodoc/un/un.recommendation.xsl +42 -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: e71f536abb0db67acc17cc170df30bc5bf75f08dd77b1ed422be2f9adc508224
|
4
|
+
data.tar.gz: 1e35c83a41170225d7ba66249d46a3f508fcf8037c668f9c1829fcfe1a9a21e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c82c6e187908b68c2bd5966c30b57a91a9e2684ee81ef37108e35cc080c53f18740f327060324b8f3245b92310f2abc3b9b64a1ed3d6f97dde72fe566ce09e78
|
7
|
+
data.tar.gz: e25b815d746e0dc5ff056a0fefe47719a279ec32bdd1003102ce11bda1ec61ab622f3599b3dcc4df181b3b9d99979bd62adafc34845161dde69f7670bc3e8230
|
data/.github/workflows/rake.yml
CHANGED
@@ -16,19 +16,9 @@ jobs:
|
|
16
16
|
strategy:
|
17
17
|
fail-fast: false
|
18
18
|
matrix:
|
19
|
-
ruby: [ '2.7', '2.6', '2.5', '2.4' ]
|
19
|
+
ruby: [ '3.0', '2.7', '2.6', '2.5', '2.4' ]
|
20
20
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
21
|
experimental: [ false ]
|
22
|
-
include:
|
23
|
-
- ruby: '3.0'
|
24
|
-
os: 'ubuntu-latest'
|
25
|
-
experimental: true
|
26
|
-
- ruby: '3.0'
|
27
|
-
os: 'windows-latest'
|
28
|
-
experimental: true
|
29
|
-
- ruby: '3.0'
|
30
|
-
os: 'macos-latest'
|
31
|
-
experimental: true
|
32
22
|
steps:
|
33
23
|
- uses: actions/checkout@v2
|
34
24
|
with:
|
@@ -40,3 +30,14 @@ jobs:
|
|
40
30
|
bundler-cache: true
|
41
31
|
|
42
32
|
- run: bundle exec rake
|
33
|
+
|
34
|
+
tests-passed:
|
35
|
+
needs: rake
|
36
|
+
runs-on: ubuntu-latest
|
37
|
+
steps:
|
38
|
+
- uses: peter-evans/repository-dispatch@v1
|
39
|
+
with:
|
40
|
+
token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
41
|
+
repository: ${{ github.repository }}
|
42
|
+
event-type: tests-passed
|
43
|
+
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
data/.hound.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,12 +1,10 @@
|
|
1
|
-
#
|
2
|
-
# https://github.com/
|
3
|
-
# All project-specific additions and overrides should be specified in this file.
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
4
3
|
inherit_from:
|
5
4
|
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
6
5
|
|
7
6
|
# local repo-specific modifications
|
7
|
+
# ...
|
8
8
|
|
9
9
|
AllCops:
|
10
|
-
DisplayCopNames: false
|
11
|
-
StyleGuideCopsOnly: false
|
12
10
|
TargetRubyVersion: 2.4
|
@@ -45,6 +45,11 @@
|
|
45
45
|
<optional>
|
46
46
|
<attribute name="alt"/>
|
47
47
|
</optional>
|
48
|
+
<optional>
|
49
|
+
<attribute name="updatetype">
|
50
|
+
<data type="boolean"/>
|
51
|
+
</attribute>
|
52
|
+
</optional>
|
48
53
|
<text/>
|
49
54
|
</element>
|
50
55
|
</define>
|
@@ -543,6 +548,9 @@
|
|
543
548
|
</define>
|
544
549
|
<define name="BibDataExtensionType">
|
545
550
|
<ref name="doctype"/>
|
551
|
+
<optional>
|
552
|
+
<ref name="docsubtype"/>
|
553
|
+
</optional>
|
546
554
|
<optional>
|
547
555
|
<ref name="editorialgroup"/>
|
548
556
|
</optional>
|
@@ -890,6 +898,14 @@
|
|
890
898
|
</define>
|
891
899
|
</include>
|
892
900
|
<!-- end overrides -->
|
901
|
+
<define name="docsubtype">
|
902
|
+
<element name="docsubtype">
|
903
|
+
<ref name="DocumentSubtype"/>
|
904
|
+
</element>
|
905
|
+
</define>
|
906
|
+
<define name="DocumentSubtype">
|
907
|
+
<text/>
|
908
|
+
</define>
|
893
909
|
<define name="colgroup">
|
894
910
|
<element name="colgroup">
|
895
911
|
<oneOrMore>
|
data/lib/asciidoctor/un/un.rng
CHANGED
@@ -1360,6 +1360,7 @@
|
|
1360
1360
|
|
1361
1361
|
|
1362
1362
|
|
1363
|
+
|
1363
1364
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1364
1365
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1365
1366
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -1418,6 +1419,7 @@
|
|
1418
1419
|
|
1419
1420
|
|
1420
1421
|
|
1422
|
+
|
1421
1423
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1422
1424
|
|
1423
1425
|
|
@@ -1434,9 +1436,7 @@
|
|
1434
1436
|
|
1435
1437
|
|
1436
1438
|
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1439
|
+
|
1440
1440
|
|
1441
1441
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1442
1442
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -1493,6 +1493,7 @@
|
|
1493
1493
|
|
1494
1494
|
|
1495
1495
|
|
1496
|
+
|
1496
1497
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1497
1498
|
|
1498
1499
|
|
@@ -1506,6 +1507,7 @@
|
|
1506
1507
|
|
1507
1508
|
|
1508
1509
|
|
1510
|
+
|
1509
1511
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1510
1512
|
|
1511
1513
|
|
@@ -1513,6 +1515,7 @@
|
|
1513
1515
|
|
1514
1516
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1515
1517
|
|
1518
|
+
|
1516
1519
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1517
1520
|
|
1518
1521
|
|
@@ -1596,10 +1599,12 @@
|
|
1596
1599
|
|
1597
1600
|
|
1598
1601
|
|
1602
|
+
|
1599
1603
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1600
1604
|
|
1601
1605
|
|
1602
1606
|
|
1607
|
+
|
1603
1608
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1604
1609
|
|
1605
1610
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1670,8 +1675,10 @@
|
|
1670
1675
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1671
1676
|
|
1672
1677
|
|
1678
|
+
|
1673
1679
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1674
1680
|
|
1681
|
+
|
1675
1682
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1676
1683
|
|
1677
1684
|
|
@@ -2436,6 +2443,7 @@
|
|
2436
2443
|
|
2437
2444
|
|
2438
2445
|
|
2446
|
+
|
2439
2447
|
<xsl:if test="$lang = 'ar'">
|
2440
2448
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2441
2449
|
</xsl:if>
|
@@ -2815,6 +2823,7 @@
|
|
2815
2823
|
|
2816
2824
|
|
2817
2825
|
|
2826
|
+
|
2818
2827
|
<xsl:variable name="title-key">
|
2819
2828
|
|
2820
2829
|
|
@@ -3096,6 +3105,8 @@
|
|
3096
3105
|
|
3097
3106
|
<xsl:apply-templates/>
|
3098
3107
|
</fo:inline>
|
3108
|
+
</xsl:template><xsl:template match="*[local-name()='padding']">
|
3109
|
+
<fo:inline padding-right="{@value}"> </fo:inline>
|
3099
3110
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
3100
3111
|
<fo:inline font-size="80%" vertical-align="super">
|
3101
3112
|
<xsl:apply-templates/>
|
@@ -3588,6 +3599,16 @@
|
|
3588
3599
|
<mathml:mspace width="0.5ex"/>
|
3589
3600
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3590
3601
|
<xsl:variable name="target">
|
3602
|
+
<xsl:choose>
|
3603
|
+
<xsl:when test="@updatetype = 'true'">
|
3604
|
+
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
3605
|
+
</xsl:when>
|
3606
|
+
<xsl:otherwise>
|
3607
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
3608
|
+
</xsl:otherwise>
|
3609
|
+
</xsl:choose>
|
3610
|
+
</xsl:variable>
|
3611
|
+
<xsl:variable name="target_text">
|
3591
3612
|
<xsl:choose>
|
3592
3613
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
3593
3614
|
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
@@ -3600,19 +3621,19 @@
|
|
3600
3621
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3601
3622
|
|
3602
3623
|
<xsl:choose>
|
3603
|
-
<xsl:when test="$
|
3624
|
+
<xsl:when test="$target_text = ''">
|
3604
3625
|
<xsl:apply-templates/>
|
3605
3626
|
</xsl:when>
|
3606
3627
|
<xsl:otherwise>
|
3607
|
-
<fo:basic-link external-destination="{
|
3628
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
3608
3629
|
<xsl:choose>
|
3609
3630
|
<xsl:when test="normalize-space(.) = ''">
|
3610
|
-
<!-- <xsl:value-of select="$target"/> -->
|
3611
3631
|
<xsl:call-template name="add-zero-spaces-link-java">
|
3612
|
-
<xsl:with-param name="text" select="$
|
3632
|
+
<xsl:with-param name="text" select="$target_text"/>
|
3613
3633
|
</xsl:call-template>
|
3614
3634
|
</xsl:when>
|
3615
3635
|
<xsl:otherwise>
|
3636
|
+
<!-- output text from <link>text</link> -->
|
3616
3637
|
<xsl:apply-templates/>
|
3617
3638
|
</xsl:otherwise>
|
3618
3639
|
</xsl:choose>
|
@@ -4199,6 +4220,7 @@
|
|
4199
4220
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4200
4221
|
|
4201
4222
|
<fo:block-container margin-left="0mm">
|
4223
|
+
<xsl:copy-of select="@id"/>
|
4202
4224
|
<xsl:if test="parent::*[local-name() = 'note']">
|
4203
4225
|
<xsl:attribute name="margin-left">
|
4204
4226
|
<xsl:choose>
|
@@ -4476,6 +4498,7 @@
|
|
4476
4498
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
4477
4499
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4478
4500
|
|
4501
|
+
|
4479
4502
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4480
4503
|
|
4481
4504
|
<xsl:variable name="element">
|
@@ -4700,6 +4723,7 @@
|
|
4700
4723
|
|
4701
4724
|
|
4702
4725
|
|
4726
|
+
|
4703
4727
|
<xsl:choose>
|
4704
4728
|
<xsl:when test="ancestor::un:sections and $depth = 1">12</xsl:when>
|
4705
4729
|
<xsl:when test="ancestor::un:sections">8</xsl:when>
|
@@ -5383,6 +5407,9 @@
|
|
5383
5407
|
<xsl:when test="parent::*[local-name() = 'preface']">
|
5384
5408
|
<xsl:value-of select="$level_total - 1"/>
|
5385
5409
|
</xsl:when>
|
5410
|
+
<xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
|
5411
|
+
<xsl:value-of select="$level_total - 1"/>
|
5412
|
+
</xsl:when>
|
5386
5413
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
5387
5414
|
<xsl:value-of select="$level_total - 2"/>
|
5388
5415
|
</xsl:when>
|
@@ -5523,7 +5550,14 @@
|
|
5523
5550
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5524
5551
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5525
5552
|
</xsl:when>
|
5526
|
-
<xsl:otherwise
|
5553
|
+
<xsl:otherwise>
|
5554
|
+
<xsl:variable name="key_">
|
5555
|
+
<xsl:call-template name="capitalize">
|
5556
|
+
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
|
5557
|
+
</xsl:call-template>
|
5558
|
+
</xsl:variable>
|
5559
|
+
<xsl:value-of select="$key_"/>
|
5560
|
+
</xsl:otherwise>
|
5527
5561
|
</xsl:choose>
|
5528
5562
|
|
5529
5563
|
</xsl:template><xsl:template name="setTrackChangesStyles">
|
@@ -1360,6 +1360,7 @@
|
|
1360
1360
|
|
1361
1361
|
|
1362
1362
|
|
1363
|
+
|
1363
1364
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1364
1365
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1365
1366
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -1418,6 +1419,7 @@
|
|
1418
1419
|
|
1419
1420
|
|
1420
1421
|
|
1422
|
+
|
1421
1423
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1422
1424
|
|
1423
1425
|
|
@@ -1434,9 +1436,7 @@
|
|
1434
1436
|
|
1435
1437
|
|
1436
1438
|
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1439
|
+
|
1440
1440
|
|
1441
1441
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1442
1442
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -1493,6 +1493,7 @@
|
|
1493
1493
|
|
1494
1494
|
|
1495
1495
|
|
1496
|
+
|
1496
1497
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1497
1498
|
|
1498
1499
|
|
@@ -1506,6 +1507,7 @@
|
|
1506
1507
|
|
1507
1508
|
|
1508
1509
|
|
1510
|
+
|
1509
1511
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1510
1512
|
|
1511
1513
|
|
@@ -1513,6 +1515,7 @@
|
|
1513
1515
|
|
1514
1516
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1515
1517
|
|
1518
|
+
|
1516
1519
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1517
1520
|
|
1518
1521
|
|
@@ -1596,10 +1599,12 @@
|
|
1596
1599
|
|
1597
1600
|
|
1598
1601
|
|
1602
|
+
|
1599
1603
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1600
1604
|
|
1601
1605
|
|
1602
1606
|
|
1607
|
+
|
1603
1608
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1604
1609
|
|
1605
1610
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1670,8 +1675,10 @@
|
|
1670
1675
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1671
1676
|
|
1672
1677
|
|
1678
|
+
|
1673
1679
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1674
1680
|
|
1681
|
+
|
1675
1682
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1676
1683
|
|
1677
1684
|
|
@@ -2436,6 +2443,7 @@
|
|
2436
2443
|
|
2437
2444
|
|
2438
2445
|
|
2446
|
+
|
2439
2447
|
<xsl:if test="$lang = 'ar'">
|
2440
2448
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2441
2449
|
</xsl:if>
|
@@ -2815,6 +2823,7 @@
|
|
2815
2823
|
|
2816
2824
|
|
2817
2825
|
|
2826
|
+
|
2818
2827
|
<xsl:variable name="title-key">
|
2819
2828
|
|
2820
2829
|
|
@@ -3096,6 +3105,8 @@
|
|
3096
3105
|
|
3097
3106
|
<xsl:apply-templates/>
|
3098
3107
|
</fo:inline>
|
3108
|
+
</xsl:template><xsl:template match="*[local-name()='padding']">
|
3109
|
+
<fo:inline padding-right="{@value}"> </fo:inline>
|
3099
3110
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
3100
3111
|
<fo:inline font-size="80%" vertical-align="super">
|
3101
3112
|
<xsl:apply-templates/>
|
@@ -3588,6 +3599,16 @@
|
|
3588
3599
|
<mathml:mspace width="0.5ex"/>
|
3589
3600
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3590
3601
|
<xsl:variable name="target">
|
3602
|
+
<xsl:choose>
|
3603
|
+
<xsl:when test="@updatetype = 'true'">
|
3604
|
+
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
3605
|
+
</xsl:when>
|
3606
|
+
<xsl:otherwise>
|
3607
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
3608
|
+
</xsl:otherwise>
|
3609
|
+
</xsl:choose>
|
3610
|
+
</xsl:variable>
|
3611
|
+
<xsl:variable name="target_text">
|
3591
3612
|
<xsl:choose>
|
3592
3613
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
3593
3614
|
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
@@ -3600,19 +3621,19 @@
|
|
3600
3621
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3601
3622
|
|
3602
3623
|
<xsl:choose>
|
3603
|
-
<xsl:when test="$
|
3624
|
+
<xsl:when test="$target_text = ''">
|
3604
3625
|
<xsl:apply-templates/>
|
3605
3626
|
</xsl:when>
|
3606
3627
|
<xsl:otherwise>
|
3607
|
-
<fo:basic-link external-destination="{
|
3628
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
3608
3629
|
<xsl:choose>
|
3609
3630
|
<xsl:when test="normalize-space(.) = ''">
|
3610
|
-
<!-- <xsl:value-of select="$target"/> -->
|
3611
3631
|
<xsl:call-template name="add-zero-spaces-link-java">
|
3612
|
-
<xsl:with-param name="text" select="$
|
3632
|
+
<xsl:with-param name="text" select="$target_text"/>
|
3613
3633
|
</xsl:call-template>
|
3614
3634
|
</xsl:when>
|
3615
3635
|
<xsl:otherwise>
|
3636
|
+
<!-- output text from <link>text</link> -->
|
3616
3637
|
<xsl:apply-templates/>
|
3617
3638
|
</xsl:otherwise>
|
3618
3639
|
</xsl:choose>
|
@@ -4199,6 +4220,7 @@
|
|
4199
4220
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4200
4221
|
|
4201
4222
|
<fo:block-container margin-left="0mm">
|
4223
|
+
<xsl:copy-of select="@id"/>
|
4202
4224
|
<xsl:if test="parent::*[local-name() = 'note']">
|
4203
4225
|
<xsl:attribute name="margin-left">
|
4204
4226
|
<xsl:choose>
|
@@ -4476,6 +4498,7 @@
|
|
4476
4498
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
4477
4499
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4478
4500
|
|
4501
|
+
|
4479
4502
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4480
4503
|
|
4481
4504
|
<xsl:variable name="element">
|
@@ -4700,6 +4723,7 @@
|
|
4700
4723
|
|
4701
4724
|
|
4702
4725
|
|
4726
|
+
|
4703
4727
|
<xsl:choose>
|
4704
4728
|
<xsl:when test="ancestor::un:sections and $depth = 1">12</xsl:when>
|
4705
4729
|
<xsl:when test="ancestor::un:sections">8</xsl:when>
|
@@ -5383,6 +5407,9 @@
|
|
5383
5407
|
<xsl:when test="parent::*[local-name() = 'preface']">
|
5384
5408
|
<xsl:value-of select="$level_total - 1"/>
|
5385
5409
|
</xsl:when>
|
5410
|
+
<xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
|
5411
|
+
<xsl:value-of select="$level_total - 1"/>
|
5412
|
+
</xsl:when>
|
5386
5413
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
5387
5414
|
<xsl:value-of select="$level_total - 2"/>
|
5388
5415
|
</xsl:when>
|
@@ -5523,7 +5550,14 @@
|
|
5523
5550
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5524
5551
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5525
5552
|
</xsl:when>
|
5526
|
-
<xsl:otherwise
|
5553
|
+
<xsl:otherwise>
|
5554
|
+
<xsl:variable name="key_">
|
5555
|
+
<xsl:call-template name="capitalize">
|
5556
|
+
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
|
5557
|
+
</xsl:call-template>
|
5558
|
+
</xsl:variable>
|
5559
|
+
<xsl:value-of select="$key_"/>
|
5560
|
+
</xsl:otherwise>
|
5527
5561
|
</xsl:choose>
|
5528
5562
|
|
5529
5563
|
</xsl:template><xsl:template name="setTrackChangesStyles">
|
@@ -1219,6 +1219,7 @@
|
|
1219
1219
|
|
1220
1220
|
|
1221
1221
|
|
1222
|
+
|
1222
1223
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1223
1224
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1224
1225
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -1277,6 +1278,7 @@
|
|
1277
1278
|
|
1278
1279
|
|
1279
1280
|
|
1281
|
+
|
1280
1282
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1281
1283
|
|
1282
1284
|
|
@@ -1293,9 +1295,7 @@
|
|
1293
1295
|
|
1294
1296
|
|
1295
1297
|
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1298
|
+
|
1299
1299
|
|
1300
1300
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1301
1301
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -1352,6 +1352,7 @@
|
|
1352
1352
|
|
1353
1353
|
|
1354
1354
|
|
1355
|
+
|
1355
1356
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1356
1357
|
|
1357
1358
|
|
@@ -1365,11 +1366,13 @@
|
|
1365
1366
|
|
1366
1367
|
|
1367
1368
|
|
1369
|
+
|
1368
1370
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1369
1371
|
|
1370
1372
|
|
1371
1373
|
|
1372
1374
|
|
1375
|
+
|
1373
1376
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1374
1377
|
|
1375
1378
|
|
@@ -1456,10 +1459,12 @@
|
|
1456
1459
|
|
1457
1460
|
|
1458
1461
|
|
1462
|
+
|
1459
1463
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1460
1464
|
|
1461
1465
|
|
1462
1466
|
|
1467
|
+
|
1463
1468
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1464
1469
|
|
1465
1470
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1530,8 +1535,10 @@
|
|
1530
1535
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1531
1536
|
|
1532
1537
|
|
1538
|
+
|
1533
1539
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1534
1540
|
|
1541
|
+
|
1535
1542
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1536
1543
|
|
1537
1544
|
|
@@ -2303,6 +2310,7 @@
|
|
2303
2310
|
|
2304
2311
|
|
2305
2312
|
|
2313
|
+
|
2306
2314
|
<xsl:if test="$lang = 'ar'">
|
2307
2315
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2308
2316
|
</xsl:if>
|
@@ -2680,6 +2688,7 @@
|
|
2680
2688
|
|
2681
2689
|
|
2682
2690
|
|
2691
|
+
|
2683
2692
|
<xsl:variable name="title-key">
|
2684
2693
|
|
2685
2694
|
|
@@ -2961,6 +2970,8 @@
|
|
2961
2970
|
|
2962
2971
|
<xsl:apply-templates/>
|
2963
2972
|
</fo:inline>
|
2973
|
+
</xsl:template><xsl:template match="*[local-name()='padding']">
|
2974
|
+
<fo:inline padding-right="{@value}"> </fo:inline>
|
2964
2975
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
2965
2976
|
<fo:inline font-size="80%" vertical-align="super">
|
2966
2977
|
<xsl:apply-templates/>
|
@@ -3453,6 +3464,16 @@
|
|
3453
3464
|
<mathml:mspace width="0.5ex"/>
|
3454
3465
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3455
3466
|
<xsl:variable name="target">
|
3467
|
+
<xsl:choose>
|
3468
|
+
<xsl:when test="@updatetype = 'true'">
|
3469
|
+
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
3470
|
+
</xsl:when>
|
3471
|
+
<xsl:otherwise>
|
3472
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
3473
|
+
</xsl:otherwise>
|
3474
|
+
</xsl:choose>
|
3475
|
+
</xsl:variable>
|
3476
|
+
<xsl:variable name="target_text">
|
3456
3477
|
<xsl:choose>
|
3457
3478
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
3458
3479
|
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
@@ -3465,19 +3486,19 @@
|
|
3465
3486
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3466
3487
|
|
3467
3488
|
<xsl:choose>
|
3468
|
-
<xsl:when test="$
|
3489
|
+
<xsl:when test="$target_text = ''">
|
3469
3490
|
<xsl:apply-templates/>
|
3470
3491
|
</xsl:when>
|
3471
3492
|
<xsl:otherwise>
|
3472
|
-
<fo:basic-link external-destination="{
|
3493
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
3473
3494
|
<xsl:choose>
|
3474
3495
|
<xsl:when test="normalize-space(.) = ''">
|
3475
|
-
<!-- <xsl:value-of select="$target"/> -->
|
3476
3496
|
<xsl:call-template name="add-zero-spaces-link-java">
|
3477
|
-
<xsl:with-param name="text" select="$
|
3497
|
+
<xsl:with-param name="text" select="$target_text"/>
|
3478
3498
|
</xsl:call-template>
|
3479
3499
|
</xsl:when>
|
3480
3500
|
<xsl:otherwise>
|
3501
|
+
<!-- output text from <link>text</link> -->
|
3481
3502
|
<xsl:apply-templates/>
|
3482
3503
|
</xsl:otherwise>
|
3483
3504
|
</xsl:choose>
|
@@ -4073,6 +4094,7 @@
|
|
4073
4094
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4074
4095
|
|
4075
4096
|
<fo:block-container margin-left="0mm">
|
4097
|
+
<xsl:copy-of select="@id"/>
|
4076
4098
|
<xsl:if test="parent::*[local-name() = 'note']">
|
4077
4099
|
<xsl:attribute name="margin-left">
|
4078
4100
|
<xsl:choose>
|
@@ -4350,6 +4372,7 @@
|
|
4350
4372
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
4351
4373
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4352
4374
|
|
4375
|
+
|
4353
4376
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4354
4377
|
|
4355
4378
|
<xsl:variable name="element">
|
@@ -4573,6 +4596,7 @@
|
|
4573
4596
|
|
4574
4597
|
|
4575
4598
|
|
4599
|
+
|
4576
4600
|
<xsl:choose>
|
4577
4601
|
<xsl:when test="ancestor::un:annex and $depth >= 2">9.5</xsl:when>
|
4578
4602
|
<xsl:when test="ancestor::un:sections">9.5</xsl:when>
|
@@ -5257,6 +5281,9 @@
|
|
5257
5281
|
<xsl:when test="parent::*[local-name() = 'preface']">
|
5258
5282
|
<xsl:value-of select="$level_total - 1"/>
|
5259
5283
|
</xsl:when>
|
5284
|
+
<xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
|
5285
|
+
<xsl:value-of select="$level_total - 1"/>
|
5286
|
+
</xsl:when>
|
5260
5287
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
5261
5288
|
<xsl:value-of select="$level_total - 2"/>
|
5262
5289
|
</xsl:when>
|
@@ -5397,7 +5424,14 @@
|
|
5397
5424
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5398
5425
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5399
5426
|
</xsl:when>
|
5400
|
-
<xsl:otherwise
|
5427
|
+
<xsl:otherwise>
|
5428
|
+
<xsl:variable name="key_">
|
5429
|
+
<xsl:call-template name="capitalize">
|
5430
|
+
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
|
5431
|
+
</xsl:call-template>
|
5432
|
+
</xsl:variable>
|
5433
|
+
<xsl:value-of select="$key_"/>
|
5434
|
+
</xsl:otherwise>
|
5401
5435
|
</xsl:choose>
|
5402
5436
|
|
5403
5437
|
</xsl:template><xsl:template name="setTrackChangesStyles">
|
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.4
|
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-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iso-639
|