metanorma-csa 2.4.1 → 2.4.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33d743a277d5c4b8e79e72e00babc9a6d893b790aa6d05b20c255fdad5497440
4
- data.tar.gz: 11f31706e87c44207935ff00b4b04fba1521a946b5a5025d28c20c8a78c95bb2
3
+ metadata.gz: b5bef565529ba8c3d376a169c0593757f0be8e0f51a876ef8043aa08127728df
4
+ data.tar.gz: 47c1ae2636d2c8d0a954694480afe9f998d08afce3eb0626ae9e6f423e583ec4
5
5
  SHA512:
6
- metadata.gz: aed6f2d3098350158f721f3caf59dcc1347a5677746e7200c686d2440df3af93e2d13efc730fbd89e5cd1d4667562d352a8835b34c0585bf26ef6ed12ba5a060
7
- data.tar.gz: f1f3a765842c7c35a7d6e04c7bcdb5509da00e81a2ff7430fc87ee3c4755a1b00fbd60b5ea593fac0076072522bc0ca1f4176466d0a772208c53d907161ba87f
6
+ metadata.gz: 83bcf0f50b66cf1893a1de62f51e1fbcbe77a3703f6071d7be60d7968e6fdc28b772551062a781e3e1b9231aa6e16f190a00137765e60fd83dec2712c5d5e2dd
7
+ data.tar.gz: 8d50516c5236e27df948c97cf6e7c36a9182df9e1d51c9fbf382fd1a7c8392978425de3d210d825edf2268976af3c0edc4e35bc3528045f5b821b2fd69addbb7
@@ -1093,6 +1093,10 @@
1093
1093
 
1094
1094
  </xsl:attribute-set>
1095
1095
 
1096
+ <xsl:template name="refine_termexample-style">
1097
+
1098
+ </xsl:template>
1099
+
1096
1100
  <xsl:attribute-set name="example-style">
1097
1101
 
1098
1102
  <xsl:attribute name="font-size">10pt</xsl:attribute>
@@ -2185,6 +2189,36 @@
2185
2189
  </xsl:for-each>
2186
2190
  </xsl:template>
2187
2191
 
2192
+ <xsl:template name="processMainSectionsDefault_flatxml">
2193
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2194
+ <xsl:sort select="@displayorder" data-type="number"/>
2195
+ <xsl:variable name="flatxml">
2196
+ <xsl:apply-templates select="." mode="flatxml"/>
2197
+ </xsl:variable>
2198
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
2199
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
2200
+
2201
+ </xsl:for-each>
2202
+
2203
+ <xsl:for-each select="/*/*[local-name()='annex']">
2204
+ <xsl:sort select="@displayorder" data-type="number"/>
2205
+ <xsl:variable name="flatxml">
2206
+ <xsl:apply-templates select="." mode="flatxml"/>
2207
+ </xsl:variable>
2208
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
2209
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
2210
+ </xsl:for-each>
2211
+
2212
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2213
+ <xsl:sort select="@displayorder" data-type="number"/>
2214
+ <xsl:variable name="flatxml">
2215
+ <xsl:apply-templates select="." mode="flatxml"/>
2216
+ </xsl:variable>
2217
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
2218
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
2219
+ </xsl:for-each>
2220
+ </xsl:template>
2221
+
2188
2222
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2189
2223
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
2190
2224
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
@@ -4258,13 +4292,13 @@
4258
4292
  <tr>
4259
4293
  <td>
4260
4294
  <xsl:attribute name="id">
4261
- <xsl:value-of select="concat($id,'_',$row_number,'_1')"/>
4295
+ <xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
4262
4296
  </xsl:attribute>
4263
4297
  <xsl:apply-templates/>
4264
4298
  </td>
4265
4299
  <td>
4266
4300
  <xsl:attribute name="id">
4267
- <xsl:value-of select="concat($id,'_',$row_number,'_2')"/>
4301
+ <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
4268
4302
  </xsl:attribute>
4269
4303
 
4270
4304
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
@@ -4875,6 +4909,10 @@
4875
4909
  <fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
4876
4910
  </xsl:template>
4877
4911
 
4912
+ <xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
4913
+ <xsl:value-of select="."/>
4914
+ </xsl:template>
4915
+
4878
4916
  <!-- ========================= -->
4879
4917
  <!-- END Rich text formatting -->
4880
4918
  <!-- ========================= -->
@@ -5505,7 +5543,7 @@
5505
5543
  </xsl:choose>
5506
5544
  </xsl:variable>
5507
5545
  <xsl:attribute name="id">
5508
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
5546
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
5509
5547
  </xsl:attribute>
5510
5548
 
5511
5549
  <xsl:for-each select="*[local-name() = 'p']">
@@ -5513,7 +5551,7 @@
5513
5551
  <xsl:copy-of select="@*"/>
5514
5552
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
5515
5553
  <xsl:attribute name="id">
5516
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
5554
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
5517
5555
  </xsl:attribute>
5518
5556
 
5519
5557
  <!-- <xsl:copy-of select="node()" /> -->
@@ -5577,7 +5615,7 @@
5577
5615
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
5578
5616
  <xsl:copy>
5579
5617
  <xsl:attribute name="id">
5580
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
5618
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
5581
5619
  </xsl:attribute>
5582
5620
  <xsl:copy-of select="node()"/>
5583
5621
  </xsl:copy>
@@ -8382,7 +8420,7 @@
8382
8420
  <!-- ====== -->
8383
8421
  <xsl:template match="*[local-name() = 'termexample']">
8384
8422
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
8385
-
8423
+ <xsl:call-template name="refine_termexample-style"/>
8386
8424
  <xsl:call-template name="setBlockSpanAll"/>
8387
8425
 
8388
8426
  <xsl:apply-templates select="*[local-name()='name']"/>
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'isodoc'
3
+ require "isodoc"
4
4
 
5
5
  module IsoDoc
6
6
  module Csa
@@ -12,7 +12,8 @@ module IsoDoc
12
12
  end
13
13
 
14
14
  def title(isoxml, _out)
15
- main = isoxml&.at(ns("//bibdata/title[@language='en']"))&.text
15
+ main = isoxml.at(ns("//bibdata/title[@language='en']"))
16
+ &.children&.to_xml
16
17
  set(:doctitle, main)
17
18
  end
18
19
 
@@ -39,8 +40,8 @@ module IsoDoc
39
40
  end
40
41
 
41
42
  def nonauth_roles(isoxml, persons)
42
- roles = isoxml.xpath(ns("//bibdata/contributor[person]/role/@type")).
43
- inject([]) { |m, t| m << t.value }.reject { |i| i == "author" }
43
+ roles = isoxml.xpath(ns("//bibdata/contributor[person]/role/@type"))
44
+ .inject([]) { |m, t| m << t.value }.reject { |i| i == "author" }
44
45
  roles.uniq.sort.each do |r|
45
46
  n = isoxml.xpath(ns("//bibdata/contributor[role/@type = '#{r}']"\
46
47
  "/person"))
@@ -51,12 +52,13 @@ module IsoDoc
51
52
 
52
53
  def auth_roles(isoxml, persons)
53
54
  roles = isoxml.xpath(ns("//bibdata/contributor[person]/"\
54
- "role[@type = 'author']/description")).
55
- inject([]) { |m, t| m << t.text }
55
+ "role[@type = 'author']/description"))
56
+ .inject([]) { |m, t| m << t.text }
56
57
  roles.uniq.sort.each do |r|
57
58
  n = isoxml.xpath(
58
- ns("//bibdata/contributor[role/@type = 'author']"\
59
- "[xmlns:role/description = '#{r}']/person"))
59
+ ns("//bibdata/contributor[role/@type = 'author']"\
60
+ "[xmlns:role/description = '#{r}']/person"),
61
+ )
60
62
  n.empty? or persons[r] = extract_person_names_affiliations(n)
61
63
  end
62
64
  persons
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csa
3
- VERSION = "2.4.1".freeze
3
+ VERSION = "2.4.2".freeze
4
4
  end
5
5
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
31
31
 
32
- spec.add_dependency "metanorma-generic", "~> 2.6.0"
32
+ spec.add_dependency "metanorma-generic", "~> 2.6.1"
33
33
 
34
34
  spec.add_development_dependency "debug"
35
35
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csa
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.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: 2024-02-05 00:00:00.000000000 Z
11
+ date: 2024-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.6.0
19
+ version: 2.6.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.6.0
26
+ version: 2.6.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement