metanorma-ogc 1.4.3 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1658,6 +1658,8 @@
1658
1658
 
1659
1659
  <title-list-figures lang="en">List of Figures</title-list-figures>
1660
1660
 
1661
+ <title-table-figures lang="en">Table of Figures</title-table-figures>
1662
+
1661
1663
  <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
1662
1664
 
1663
1665
  <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
@@ -1987,6 +1989,11 @@
1987
1989
 
1988
1990
 
1989
1991
 
1992
+ </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1993
+
1994
+
1995
+
1996
+
1990
1997
  </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1991
1998
 
1992
1999
 
@@ -3119,9 +3126,8 @@
3119
3126
 
3120
3127
  <!-- Table's note name (NOTE, for example) -->
3121
3128
 
3122
- <fo:inline padding-right="2mm">
3129
+ <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
3123
3130
 
3124
-
3125
3131
 
3126
3132
 
3127
3133
 
@@ -3749,6 +3755,8 @@
3749
3755
  <xsl:if test="$font-size != ''">
3750
3756
  <xsl:attribute name="font-size">
3751
3757
  <xsl:choose>
3758
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
3759
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
3752
3760
  <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3753
3761
  <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3754
3762
  </xsl:choose>
@@ -4556,6 +4564,7 @@
4556
4564
  <xsl:otherwise>
4557
4565
  <fo:block xsl:use-attribute-sets="image-style">
4558
4566
 
4567
+
4559
4568
  <xsl:variable name="src">
4560
4569
  <xsl:call-template name="image_src"/>
4561
4570
  </xsl:variable>
@@ -4922,7 +4931,7 @@
4922
4931
  <xsl:text> </xsl:text>
4923
4932
  </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">
4924
4933
  <xsl:value-of select="."/>
4925
- </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">
4934
+ </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">
4926
4935
  <xsl:value-of select="."/>
4927
4936
  </xsl:template><xsl:template match="node()" mode="contents">
4928
4937
  <xsl:apply-templates mode="contents"/>
@@ -5015,41 +5024,72 @@
5015
5024
 
5016
5025
 
5017
5026
 
5018
- <xsl:if test="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
5019
- <fo:bookmark internal-destination="{//*[local-name() = 'figure'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
5020
- <fo:bookmark-title>Figures</fo:bookmark-title>
5021
- <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
5027
+
5028
+
5029
+
5030
+
5031
+
5032
+ <xsl:variable name="list_of_tables_">
5033
+ <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name'] and contains(*[local-name() = 'name'], '—')]">
5034
+ <table id="{@id}"><xsl:apply-templates select="*[local-name() = 'name']" mode="bookmarks"/></table>
5035
+ </xsl:for-each>
5036
+ </xsl:variable>
5037
+ <xsl:variable name="list_of_tables" select="xalan:nodeset($list_of_tables_)"/>
5038
+
5039
+ <xsl:variable name="list_of_figures_">
5040
+ <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and contains(*[local-name() = 'name'], '—')]">
5041
+ <figure id="{@id}"><xsl:apply-templates select="*[local-name() = 'name']" mode="bookmarks"/></figure>
5042
+ </xsl:for-each>
5043
+ </xsl:variable>
5044
+ <xsl:variable name="list_of_figures" select="xalan:nodeset($list_of_figures_)"/>
5045
+
5046
+ <xsl:if test="$list_of_tables//table or $list_of_figures/figure or //*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']]">
5047
+ <fo:bookmark internal-destination="empty_bookmark">
5048
+ <fo:bookmark-title>—————</fo:bookmark-title>
5049
+ </fo:bookmark>
5050
+ </xsl:if>
5051
+
5052
+ <xsl:if test="$list_of_tables//table">
5053
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide"> <!-- {$list_of_tables//table[1]/@id} -->
5054
+ <fo:bookmark-title>
5055
+ <xsl:call-template name="getTitle">
5056
+ <xsl:with-param name="name" select="'title-list-tables'"/>
5057
+ </xsl:call-template>
5058
+ </fo:bookmark-title>
5059
+ <xsl:for-each select="$list_of_tables//table">
5022
5060
  <fo:bookmark internal-destination="{@id}">
5023
- <fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']/text()" mode="bookmarks"/></fo:bookmark-title>
5061
+ <fo:bookmark-title><xsl:value-of select="."/></fo:bookmark-title>
5024
5062
  </fo:bookmark>
5025
5063
  </xsl:for-each>
5026
- </fo:bookmark>
5064
+ </fo:bookmark>
5027
5065
  </xsl:if>
5028
-
5029
-
5030
-
5031
- <xsl:if test="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
5032
- <fo:bookmark internal-destination="{//*[local-name() = 'table'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
5066
+
5067
+ <xsl:if test="$list_of_figures//figure">
5068
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide"> <!-- {$list_of_figures//figure[1]/@id} -->
5033
5069
  <fo:bookmark-title>
5034
- <xsl:choose>
5035
- <xsl:when test="@lang = 'fr'">Tableaux</xsl:when>
5036
- <xsl:otherwise>Tables</xsl:otherwise>
5037
- </xsl:choose>
5070
+
5071
+ <xsl:call-template name="getTitle">
5072
+ <xsl:with-param name="name" select="'title-list-figures'"/>
5073
+ </xsl:call-template>
5074
+
5075
+
5038
5076
  </fo:bookmark-title>
5039
- <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
5077
+ <xsl:for-each select="$list_of_figures//figure">
5040
5078
  <fo:bookmark internal-destination="{@id}">
5041
- <fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']//text()" mode="bookmarks"/></fo:bookmark-title>
5079
+ <fo:bookmark-title><xsl:value-of select="."/></fo:bookmark-title>
5042
5080
  </fo:bookmark>
5043
5081
  </xsl:for-each>
5044
- </fo:bookmark>
5082
+ </fo:bookmark>
5045
5083
  </xsl:if>
5046
-
5047
-
5048
-
5049
-
5084
+
5085
+
5050
5086
  <xsl:if test="//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']]">
5051
- <fo:bookmark internal-destination="{//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']][1]/@id}" starting-state="hide">
5052
- <fo:bookmark-title>Recommendations</fo:bookmark-title>
5087
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide"> <!-- {//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']][1]/@id} -->
5088
+ <fo:bookmark-title>
5089
+ <xsl:call-template name="getTitle">
5090
+ <xsl:with-param name="name" select="'title-list-recommendations'"/>
5091
+ </xsl:call-template>
5092
+ </fo:bookmark-title>
5053
5093
  <xsl:for-each select="//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']]">
5054
5094
  <xsl:variable name="table_id" select="@id"/>
5055
5095
  <fo:bookmark internal-destination="{@id}">
@@ -5057,8 +5097,7 @@
5057
5097
  </fo:bookmark>
5058
5098
  </xsl:for-each>
5059
5099
  </fo:bookmark>
5060
-
5061
- </xsl:if>
5100
+ </xsl:if>
5062
5101
 
5063
5102
 
5064
5103
 
@@ -5256,12 +5295,16 @@
5256
5295
  <xsl:if test="$font-size != ''">
5257
5296
  <xsl:attribute name="font-size">
5258
5297
  <xsl:choose>
5298
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
5299
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
5259
5300
  <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
5260
5301
  <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
5261
5302
  </xsl:choose>
5262
5303
  </xsl:attribute>
5263
5304
  </xsl:if>
5264
5305
 
5306
+
5307
+
5265
5308
  <xsl:apply-templates/>
5266
5309
  </fo:block>
5267
5310
 
@@ -5617,6 +5660,7 @@
5617
5660
  </xsl:choose>
5618
5661
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
5619
5662
  <fo:block xsl:use-attribute-sets="termsource-style">
5663
+
5620
5664
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
5621
5665
  <xsl:variable name="termsource_text">
5622
5666
  <xsl:apply-templates/>
@@ -243,7 +243,10 @@
243
243
  <fo:block font-size="11pt" margin-top="8pt"> </fo:block>
244
244
  <fo:block font-size="11pt" margin-top="8pt"> </fo:block>
245
245
  <fo:block xsl:use-attribute-sets="title-toc-style">
246
- <xsl:text>Table of Figures</xsl:text>
246
+ <!-- <xsl:text>Table of Figures</xsl:text> -->
247
+ <xsl:call-template name="getTitle">
248
+ <xsl:with-param name="name" select="'title-table-figures'"/>
249
+ </xsl:call-template>
247
250
  </fo:block>
248
251
  <xsl:for-each select="//ogc:figure[@id and ogc:name] | //ogc:table[@id and ogc:name]">
249
252
  <fo:block margin-top="8pt" margin-bottom="5pt" text-align-last="justify" role="TOCI">
@@ -1014,6 +1017,8 @@
1014
1017
 
1015
1018
  <title-list-figures lang="en">List of Figures</title-list-figures>
1016
1019
 
1020
+ <title-table-figures lang="en">Table of Figures</title-table-figures>
1021
+
1017
1022
  <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
1018
1023
 
1019
1024
  <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
@@ -1357,6 +1362,11 @@
1357
1362
 
1358
1363
 
1359
1364
 
1365
+ </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1366
+
1367
+
1368
+
1369
+
1360
1370
  </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1361
1371
 
1362
1372
 
@@ -2472,9 +2482,8 @@
2472
2482
 
2473
2483
  <!-- Table's note name (NOTE, for example) -->
2474
2484
 
2475
- <fo:inline padding-right="2mm">
2485
+ <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
2476
2486
 
2477
-
2478
2487
 
2479
2488
 
2480
2489
 
@@ -3103,6 +3112,8 @@
3103
3112
  <xsl:if test="$font-size != ''">
3104
3113
  <xsl:attribute name="font-size">
3105
3114
  <xsl:choose>
3115
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
3116
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
3106
3117
  <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3107
3118
  <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3108
3119
  </xsl:choose>
@@ -3908,6 +3919,7 @@
3908
3919
  <xsl:otherwise>
3909
3920
  <fo:block xsl:use-attribute-sets="image-style">
3910
3921
 
3922
+
3911
3923
  <xsl:variable name="src">
3912
3924
  <xsl:call-template name="image_src"/>
3913
3925
  </xsl:variable>
@@ -4274,7 +4286,7 @@
4274
4286
  <xsl:text> </xsl:text>
4275
4287
  </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">
4276
4288
  <xsl:value-of select="."/>
4277
- </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">
4289
+ </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">
4278
4290
  <xsl:value-of select="."/>
4279
4291
  </xsl:template><xsl:template match="node()" mode="contents">
4280
4292
  <xsl:apply-templates mode="contents"/>
@@ -4367,22 +4379,46 @@
4367
4379
 
4368
4380
 
4369
4381
 
4370
- <xsl:if test="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
4371
- <fo:bookmark internal-destination="{//*[local-name() = 'figure'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
4372
- <fo:bookmark-title>Figures</fo:bookmark-title>
4373
- <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
4382
+
4383
+
4384
+
4385
+
4386
+
4387
+
4388
+ <xsl:variable name="list_of_tables_figures_">
4389
+ <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']] | //*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
4390
+ <table_figure id="{@id}"><xsl:apply-templates select="*[local-name() = 'name']" mode="bookmarks"/></table_figure>
4391
+ </xsl:for-each>
4392
+ </xsl:variable>
4393
+ <xsl:variable name="list_of_tables_figures" select="xalan:nodeset($list_of_tables_figures_)"/>
4394
+
4395
+
4396
+ <xsl:if test="$list_of_tables_figures/table_figure">
4397
+ <fo:bookmark internal-destination="empty_bookmark">
4398
+ <fo:bookmark-title>—————</fo:bookmark-title>
4399
+ </fo:bookmark>
4400
+ </xsl:if>
4401
+
4402
+ <xsl:if test="$list_of_tables_figures//table_figure">
4403
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide"> <!-- {$list_of_figures//figure[1]/@id} -->
4404
+ <fo:bookmark-title>
4405
+
4406
+
4407
+ <xsl:call-template name="getTitle">
4408
+ <xsl:with-param name="name" select="'title-table-figures'"/>
4409
+ </xsl:call-template>
4410
+
4411
+ </fo:bookmark-title>
4412
+ <xsl:for-each select="$list_of_tables_figures//table_figure">
4374
4413
  <fo:bookmark internal-destination="{@id}">
4375
- <fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']/text()" mode="bookmarks"/></fo:bookmark-title>
4414
+ <fo:bookmark-title><xsl:value-of select="."/></fo:bookmark-title>
4376
4415
  </fo:bookmark>
4377
4416
  </xsl:for-each>
4378
- </fo:bookmark>
4417
+ </fo:bookmark>
4379
4418
  </xsl:if>
4380
4419
 
4381
4420
 
4382
4421
 
4383
-
4384
-
4385
-
4386
4422
  </fo:bookmark-tree>
4387
4423
  </xsl:if>
4388
4424
  </xsl:template><xsl:template name="insertFigureBookmarks">
@@ -4576,12 +4612,16 @@
4576
4612
  <xsl:if test="$font-size != ''">
4577
4613
  <xsl:attribute name="font-size">
4578
4614
  <xsl:choose>
4615
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
4616
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
4579
4617
  <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
4580
4618
  <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
4581
4619
  </xsl:choose>
4582
4620
  </xsl:attribute>
4583
4621
  </xsl:if>
4584
4622
 
4623
+
4624
+
4585
4625
  <xsl:apply-templates/>
4586
4626
  </fo:block>
4587
4627
 
@@ -4937,6 +4977,7 @@
4937
4977
  </xsl:choose>
4938
4978
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
4939
4979
  <fo:block xsl:use-attribute-sets="termsource-style">
4980
+
4940
4981
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
4941
4982
  <xsl:variable name="termsource_text">
4942
4983
  <xsl:apply-templates/>
@@ -49,7 +49,7 @@ module IsoDoc
49
49
  label.xpath(ns(".//concept")).each { |f| concept1(f) }
50
50
  b = out.add_child("<tr><td colspan='2'><p></p></td></tr>")
51
51
  p = b.at(ns(".//p"))
52
- p << label.text
52
+ p << label.children.to_xml
53
53
  end
54
54
 
55
55
  def recommendation_attributes1(node)
@@ -80,6 +80,7 @@ module IsoDoc
80
80
  f = f.replace("<li>#{f.children.to_xml}</li>").first
81
81
  d << f
82
82
  end
83
+ node
83
84
  end
84
85
 
85
86
  def recommendation_attributes1_component(node, out)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "1.4.3".freeze
3
+ VERSION = "1.5.0".freeze
4
4
  end
5
5
  end
@@ -25,8 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
26
26
 
27
27
  spec.add_dependency "iso-639"
28
- spec.add_dependency "isodoc", "~> 1.7.0"
29
- spec.add_dependency "metanorma-standoc", "~> 1.10.0"
28
+ spec.add_dependency "metanorma-standoc", "~> 1.11.0"
30
29
 
31
30
  spec.add_development_dependency "byebug", "~> 9.1"
32
31
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.5.0
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-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639
@@ -24,34 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: isodoc
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 1.7.0
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 1.7.0
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: metanorma-standoc
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: 1.10.0
33
+ version: 1.11.0
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: 1.10.0
40
+ version: 1.11.0
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: byebug
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -300,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
300
286
  - !ruby/object:Gem::Version
301
287
  version: '0'
302
288
  requirements: []
303
- rubygems_version: 3.1.4
289
+ rubygems_version: 3.2.22
304
290
  signing_key:
305
291
  specification_version: 4
306
292
  summary: Metanorma for the Open Geospatial Consortium.