metanorma-un 0.6.12 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
 
@@ -2542,9 +2549,7 @@
2542
2549
 
2543
2550
  <!-- Table's note name (NOTE, for example) -->
2544
2551
 
2545
- <fo:inline padding-right="2mm">
2546
-
2547
-
2552
+ <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
2548
2553
 
2549
2554
 
2550
2555
 
@@ -2559,6 +2564,7 @@
2559
2564
  </xsl:if>
2560
2565
 
2561
2566
 
2567
+
2562
2568
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2563
2569
 
2564
2570
  </fo:inline>
@@ -3061,6 +3067,7 @@
3061
3067
  <fo:table-cell>
3062
3068
 
3063
3069
  <fo:block margin-top="6pt">
3070
+ <xsl:copy-of select="@id"/>
3064
3071
 
3065
3072
 
3066
3073
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -3164,6 +3171,8 @@
3164
3171
  <xsl:if test="$font-size != ''">
3165
3172
  <xsl:attribute name="font-size">
3166
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>
3167
3176
  <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3168
3177
  <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3169
3178
  </xsl:choose>
@@ -3911,14 +3920,18 @@
3911
3920
  </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
3912
3921
  <fo:inline><xsl:apply-templates/></fo:inline>
3913
3922
  </xsl:template><xsl:template match="*[local-name() = 'terms']">
3923
+ <!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
3914
3924
  <fo:block id="{@id}">
3915
3925
  <xsl:apply-templates/>
3916
3926
  </fo:block>
3917
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> -->
3918
3929
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
3919
3930
 
3920
3931
 
3921
-
3932
+ <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
3933
+
3934
+ </xsl:if>
3922
3935
  <xsl:apply-templates/>
3923
3936
  </fo:block>
3924
3937
  </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
@@ -3980,6 +3993,7 @@
3980
3993
  <xsl:otherwise>
3981
3994
  <fo:block xsl:use-attribute-sets="image-style">
3982
3995
 
3996
+
3983
3997
  <xsl:if test="ancestor::un:admonition">
3984
3998
  <xsl:attribute name="margin-top">-12mm</xsl:attribute>
3985
3999
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -4351,7 +4365,7 @@
4351
4365
  <xsl:text> </xsl:text>
4352
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">
4353
4367
  <xsl:value-of select="."/>
4354
- </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">
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">
4355
4369
  <xsl:value-of select="."/>
4356
4370
  </xsl:template><xsl:template match="node()" mode="contents">
4357
4371
  <xsl:apply-templates mode="contents"/>
@@ -4449,6 +4463,8 @@
4449
4463
 
4450
4464
 
4451
4465
 
4466
+
4467
+
4452
4468
  </fo:bookmark-tree>
4453
4469
  </xsl:if>
4454
4470
  </xsl:template><xsl:template name="insertFigureBookmarks">
@@ -4642,12 +4658,16 @@
4642
4658
  <xsl:if test="$font-size != ''">
4643
4659
  <xsl:attribute name="font-size">
4644
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>
4645
4663
  <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
4646
4664
  <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
4647
4665
  </xsl:choose>
4648
4666
  </xsl:attribute>
4649
4667
  </xsl:if>
4650
4668
 
4669
+
4670
+
4651
4671
  <xsl:apply-templates/>
4652
4672
  </fo:block>
4653
4673
 
@@ -4890,7 +4910,8 @@
4890
4910
  </fo:block>
4891
4911
  </fo:table-cell>
4892
4912
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
4893
- <fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
4913
+ <fo:block font-size="11pt">
4914
+
4894
4915
  <xsl:apply-templates/>
4895
4916
  </fo:block>
4896
4917
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
@@ -5000,6 +5021,7 @@
5000
5021
  </xsl:choose>
5001
5022
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
5002
5023
  <fo:block xsl:use-attribute-sets="termsource-style">
5024
+
5003
5025
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
5004
5026
  <xsl:variable name="termsource_text">
5005
5027
  <xsl:apply-templates/>
@@ -5010,13 +5032,15 @@
5010
5032
  <!-- <xsl:apply-templates /> -->
5011
5033
  <xsl:copy-of select="$termsource_text"/>
5012
5034
  </xsl:when>
5013
- <xsl:otherwise>
5035
+ <xsl:otherwise>
5036
+
5014
5037
 
5015
5038
  <xsl:text>[</xsl:text>
5016
5039
 
5017
5040
  <!-- <xsl:apply-templates /> -->
5018
5041
  <xsl:copy-of select="$termsource_text"/>
5019
5042
 
5043
+
5020
5044
  <xsl:text>]</xsl:text>
5021
5045
 
5022
5046
  </xsl:otherwise>
@@ -5083,12 +5107,20 @@
5083
5107
  </xsl:template><xsl:template match="*[local-name() = 'author']">
5084
5108
  <xsl:text>— </xsl:text>
5085
5109
  <xsl:apply-templates/>
5086
- </xsl:template><xsl:template match="*[local-name() = 'eref']">
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']">
5087
5118
 
5088
5119
  <xsl:variable name="bibitemid">
5089
5120
  <xsl:choose>
5090
- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
5091
- <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]"/>
5092
5124
  <xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
5093
5125
  </xsl:choose>
5094
5126
  </xsl:variable>
@@ -5177,10 +5209,10 @@
5177
5209
  </xsl:choose>
5178
5210
  </xsl:variable>
5179
5211
 
5180
- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
5212
+ <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
5181
5213
 
5182
5214
  <xsl:choose>
5183
- <xsl:when test="$language = 'zh'">
5215
+ <xsl:when test="$lang = 'zh'">
5184
5216
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
5185
5217
  </xsl:when>
5186
5218
  <xsl:when test="../../@inline-header = 'true'">
@@ -6172,12 +6204,15 @@
6172
6204
  <xsl:param name="default">left</xsl:param>
6173
6205
  <xsl:attribute name="text-align">
6174
6206
  <xsl:choose>
6175
- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
6207
+ <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
6176
6208
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
6177
6209
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
6178
6210
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
6179
6211
  </xsl:choose>
6180
6212
  </xsl:attribute>
6213
+ <xsl:if test="@align = 'indent'">
6214
+ <xsl:attribute name="margin-left">7mm</xsl:attribute>
6215
+ </xsl:if>
6181
6216
  </xsl:template><xsl:template name="number-to-words">
6182
6217
  <xsl:param name="number"/>
6183
6218
  <xsl:param name="first"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.6.12".freeze
3
+ VERSION = "0.7.2".freeze
4
4
  end
5
5
  end
@@ -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 "isodoc", "~> 1.7.0"
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.6.12
4
+ version: 0.7.2
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-27 00:00:00.000000000 Z
11
+ date: 2021-11-15 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.10.0
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.10.0
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.1.4
295
+ rubygems_version: 3.2.22
310
296
  signing_key:
311
297
  specification_version: 4
312
298
  summary: Metanorma for UN.