metanorma-un 0.5.10 → 0.5.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6000479dcb184f14cff08893a4c89cbf7f2f9f4d8ffdc5c907ed93385c429a46
4
- data.tar.gz: fd7bb76064bbf07fa758aadea5655a0c5eb2b7b4dea7627f42da27f44d49baba
3
+ metadata.gz: 3669c8651ebe2fd2d2ee518d75f80e152bdf76b1f6e6580ca2795e365a440fda
4
+ data.tar.gz: 75d299cd1e26be0ab1e8b407f60ac0c8eb6e790923d1beb4f4154383923da117
5
5
  SHA512:
6
- metadata.gz: 1fddc8abb9e9fe9c952bdc5bd727cba8bfbeba53e2a2c12ddb40ea5c8ddd0dfdac1bd37486bee884bcd017f383d07f2bb8bc603fc0824db71570692ff9fd0509
7
- data.tar.gz: c6271a453a8eae392041812fc945a31484e60fb7e705e640512d2bc47b355b6da87fa11fee05301768ac52f87c8d4ec0b7979ccfe9a3f4acb8ec0ffa1e2a6215
6
+ metadata.gz: 0b4fbbad777aed0a62be4f95fe3668fc7fcc1ed1a42478b9e6b69cbbe5c8adddcd833731cc64062e6484b735a9d35e2a378a6ea260f27bfe4bfc7eeff82aaa9c
7
+ data.tar.gz: 3e82ec5eb0e089f3259644789b6c53297f313d0d6f31dba720c656029cf40ce8396fcde56f82954aefa4988ffdf1551147b23a92090c6564fcc87bb5966a1f46
@@ -36,6 +36,9 @@ jobs:
36
36
  with:
37
37
  ruby-version: ${{ matrix.ruby }}
38
38
 
39
+ - if: matrix.os == 'macos-latest'
40
+ run: brew install autoconf automake libtool
41
+
39
42
  - uses: actions/cache@v2
40
43
  with:
41
44
  path: vendor/bundle
@@ -253,6 +253,9 @@
253
253
  <data type="boolean"/>
254
254
  </attribute>
255
255
  </optional>
256
+ <optional>
257
+ <attribute name="width"/>
258
+ </optional>
256
259
  <optional>
257
260
  <ref name="colgroup"/>
258
261
  </optional>
@@ -836,6 +839,9 @@
836
839
  <data type="boolean"/>
837
840
  </attribute>
838
841
  </optional>
842
+ <optional>
843
+ <attribute name="number"/>
844
+ </optional>
839
845
  <optional>
840
846
  <attribute name="obligation">
841
847
  <choice>
@@ -891,9 +897,11 @@
891
897
  <element name="code">
892
898
  <text/>
893
899
  </element>
894
- <element name="text">
895
- <text/>
896
- </element>
900
+ <optional>
901
+ <element name="text">
902
+ <text/>
903
+ </element>
904
+ </optional>
897
905
  </element>
898
906
  </define>
899
907
  <define name="standard-document">
@@ -1063,6 +1071,9 @@
1063
1071
  </choice>
1064
1072
  </attribute>
1065
1073
  </optional>
1074
+ <optional>
1075
+ <attribute name="number"/>
1076
+ </optional>
1066
1077
  <optional>
1067
1078
  <attribute name="type"/>
1068
1079
  </optional>
@@ -1116,6 +1127,9 @@
1116
1127
  <optional>
1117
1128
  <attribute name="type"/>
1118
1129
  </optional>
1130
+ <optional>
1131
+ <attribute name="number"/>
1132
+ </optional>
1119
1133
  <optional>
1120
1134
  <ref name="section-title"/>
1121
1135
  </optional>
@@ -1218,6 +1232,9 @@
1218
1232
  <optional>
1219
1233
  <attribute name="type"/>
1220
1234
  </optional>
1235
+ <optional>
1236
+ <attribute name="number"/>
1237
+ </optional>
1221
1238
  <optional>
1222
1239
  <attribute name="obligation">
1223
1240
  <choice>
@@ -1546,6 +1563,7 @@
1546
1563
  <value>add</value>
1547
1564
  <value>modify</value>
1548
1565
  <value>delete</value>
1566
+ <value>replace</value>
1549
1567
  </choice>
1550
1568
  </attribute>
1551
1569
  <optional>
@@ -1576,6 +1594,11 @@
1576
1594
  </optional>
1577
1595
  <optional>
1578
1596
  <element name="newcontent">
1597
+ <optional>
1598
+ <attribute name="id">
1599
+ <data type="ID"/>
1600
+ </attribute>
1601
+ </optional>
1579
1602
  <zeroOrMore>
1580
1603
  <ref name="BasicBlock"/>
1581
1604
  </zeroOrMore>
@@ -1790,7 +1790,12 @@
1790
1790
 
1791
1791
  <xsl:variable name="table_attributes">
1792
1792
  <attribute name="table-layout">fixed</attribute>
1793
- <attribute name="width">100%</attribute>
1793
+ <attribute name="width">
1794
+ <xsl:choose>
1795
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1796
+ <xsl:otherwise>100%</xsl:otherwise>
1797
+ </xsl:choose>
1798
+ </attribute>
1794
1799
  <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1795
1800
  <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1796
1801
 
@@ -2974,6 +2979,10 @@
2974
2979
  </xsl:if>
2975
2980
  <xsl:apply-templates/>
2976
2981
  </fo:inline>
2982
+ </xsl:template><xsl:template match="*[local-name()='underline']">
2983
+ <fo:inline text-decoration="underline">
2984
+ <xsl:apply-templates/>
2985
+ </fo:inline>
2977
2986
  </xsl:template><xsl:template match="*[local-name()='del']">
2978
2987
  <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2979
2988
  <xsl:apply-templates/>
@@ -4551,6 +4560,8 @@
4551
4560
  <xsl:value-of select="translate(.,'. ','')"/>
4552
4561
  </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
4553
4562
  <xsl:value-of select="substring(.,1,1)"/>
4563
+ </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
4564
+ <fo:inline><xsl:apply-templates/></fo:inline>
4554
4565
  </xsl:template><xsl:template name="convertDate">
4555
4566
  <xsl:param name="date"/>
4556
4567
  <xsl:param name="format" select="'short'"/>
@@ -4828,6 +4839,11 @@
4828
4839
  <xsl:call-template name="getLang"/>
4829
4840
  </xsl:variable>
4830
4841
 
4831
- <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
4842
+ <xsl:choose>
4843
+ <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
4844
+ <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
4845
+ </xsl:when>
4846
+ <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
4847
+ </xsl:choose>
4832
4848
 
4833
4849
  </xsl:template></xsl:stylesheet>
@@ -1790,7 +1790,12 @@
1790
1790
 
1791
1791
  <xsl:variable name="table_attributes">
1792
1792
  <attribute name="table-layout">fixed</attribute>
1793
- <attribute name="width">100%</attribute>
1793
+ <attribute name="width">
1794
+ <xsl:choose>
1795
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1796
+ <xsl:otherwise>100%</xsl:otherwise>
1797
+ </xsl:choose>
1798
+ </attribute>
1794
1799
  <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1795
1800
  <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1796
1801
 
@@ -2974,6 +2979,10 @@
2974
2979
  </xsl:if>
2975
2980
  <xsl:apply-templates/>
2976
2981
  </fo:inline>
2982
+ </xsl:template><xsl:template match="*[local-name()='underline']">
2983
+ <fo:inline text-decoration="underline">
2984
+ <xsl:apply-templates/>
2985
+ </fo:inline>
2977
2986
  </xsl:template><xsl:template match="*[local-name()='del']">
2978
2987
  <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2979
2988
  <xsl:apply-templates/>
@@ -4551,6 +4560,8 @@
4551
4560
  <xsl:value-of select="translate(.,'. ','')"/>
4552
4561
  </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
4553
4562
  <xsl:value-of select="substring(.,1,1)"/>
4563
+ </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
4564
+ <fo:inline><xsl:apply-templates/></fo:inline>
4554
4565
  </xsl:template><xsl:template name="convertDate">
4555
4566
  <xsl:param name="date"/>
4556
4567
  <xsl:param name="format" select="'short'"/>
@@ -4828,6 +4839,11 @@
4828
4839
  <xsl:call-template name="getLang"/>
4829
4840
  </xsl:variable>
4830
4841
 
4831
- <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
4842
+ <xsl:choose>
4843
+ <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
4844
+ <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
4845
+ </xsl:when>
4846
+ <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
4847
+ </xsl:choose>
4832
4848
 
4833
4849
  </xsl:template></xsl:stylesheet>
@@ -1652,7 +1652,12 @@
1652
1652
 
1653
1653
  <xsl:variable name="table_attributes">
1654
1654
  <attribute name="table-layout">fixed</attribute>
1655
- <attribute name="width">100%</attribute>
1655
+ <attribute name="width">
1656
+ <xsl:choose>
1657
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1658
+ <xsl:otherwise>100%</xsl:otherwise>
1659
+ </xsl:choose>
1660
+ </attribute>
1656
1661
  <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1657
1662
  <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1658
1663
 
@@ -2839,6 +2844,10 @@
2839
2844
  </xsl:if>
2840
2845
  <xsl:apply-templates/>
2841
2846
  </fo:inline>
2847
+ </xsl:template><xsl:template match="*[local-name()='underline']">
2848
+ <fo:inline text-decoration="underline">
2849
+ <xsl:apply-templates/>
2850
+ </fo:inline>
2842
2851
  </xsl:template><xsl:template match="*[local-name()='del']">
2843
2852
  <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2844
2853
  <xsl:apply-templates/>
@@ -4425,6 +4434,8 @@
4425
4434
  <xsl:value-of select="translate(.,'. ','')"/>
4426
4435
  </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
4427
4436
  <xsl:value-of select="substring(.,1,1)"/>
4437
+ </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
4438
+ <fo:inline><xsl:apply-templates/></fo:inline>
4428
4439
  </xsl:template><xsl:template name="convertDate">
4429
4440
  <xsl:param name="date"/>
4430
4441
  <xsl:param name="format" select="'short'"/>
@@ -4702,6 +4713,11 @@
4702
4713
  <xsl:call-template name="getLang"/>
4703
4714
  </xsl:variable>
4704
4715
 
4705
- <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
4716
+ <xsl:choose>
4717
+ <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
4718
+ <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
4719
+ </xsl:when>
4720
+ <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
4721
+ </xsl:choose>
4706
4722
 
4707
4723
  </xsl:template></xsl:stylesheet>
@@ -23,8 +23,10 @@ module IsoDoc
23
23
  def clause_names(docxml, sect_num)
24
24
  q = "//clause[parent::sections]"
25
25
  @paranumber = 0
26
- docxml.xpath(ns(q)).each_with_index do |c, i|
27
- section_names(c, (i + sect_num), 1)
26
+ i = 0
27
+ docxml.xpath(ns(q)).each do |c|
28
+ section_names(c, i, 1)
29
+ i += 1
28
30
  end
29
31
  end
30
32
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.5.10"
3
+ VERSION = "0.5.11"
4
4
  end
5
5
  end
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency "iso-639"
32
32
 
33
33
  spec.add_dependency "metanorma-standoc", "~> 1.7.0"
34
- spec.add_dependency "isodoc", "~> 1.4.0"
34
+ spec.add_dependency "isodoc", "~> 1.4.2"
35
35
 
36
36
  spec.add_development_dependency "byebug", "~> 9.1"
37
37
  spec.add_development_dependency "sassc", "2.4.0"
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.5.10
4
+ version: 0.5.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-28 00:00:00.000000000 Z
11
+ date: 2021-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roman-numerals
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.4.0
75
+ version: 1.4.2
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.4.0
82
+ version: 1.4.2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: byebug
85
85
  requirement: !ruby/object:Gem::Requirement