metanorma-iso 2.8.9 → 2.9.1

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.
@@ -1783,9 +1783,21 @@ that the `number` given for the series applies to the second iteration of number
1783
1783
  May be used to differentiate rendering of notes in bibliographies</a:documentation>
1784
1784
  </attribute>
1785
1785
  </optional>
1786
- <ref name="LocalizedMarkedUpString">
1786
+ <ref name="LocalizedStringAttributes">
1787
1787
  <a:documentation>The content of the note</a:documentation>
1788
1788
  </ref>
1789
+ <choice>
1790
+ <oneOrMore>
1791
+ <ref name="BasicBlockNoId">
1792
+ <a:documentation>Multiple blocks of content</a:documentation>
1793
+ </ref>
1794
+ </oneOrMore>
1795
+ <oneOrMore>
1796
+ <ref name="TextElement">
1797
+ <a:documentation>Single block of content</a:documentation>
1798
+ </ref>
1799
+ </oneOrMore>
1800
+ </choice>
1789
1801
  </element>
1790
1802
  </define>
1791
1803
  <define name="bibabstract">
@@ -21,6 +21,7 @@ module Metanorma
21
21
  @amd && a = node.attr("updates-document-type") and
22
22
  xml.updates_document_type a
23
23
  a = node.attr("fast-track") and xml.send "fast-track", a != "false"
24
+ a = node.attr("price-code") and xml.price_code a
24
25
  end
25
26
 
26
27
  STAGE_ERROR = [Pubid::Core::Errors::HarmonizedStageCodeInvalidError,
@@ -54,12 +54,10 @@ module Metanorma
54
54
  def contrib_committee_build(xml, agency, committee)
55
55
  name = org_abbrev.invert[agency] and agency = name
56
56
  xml.name agency
57
- xml.subdivision do |s|
58
- s.organization do |o|
57
+ xml.subdivision do |o|
59
58
  o.name committee[:name]
60
59
  committee[:abbr] and o.abbreviation committee[:abbr]
61
60
  committee[:ident] and o.identifier committee[:ident]
62
- end
63
61
  end
64
62
  end
65
63
 
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.3.4 -->
20
+ <!-- VERSION v1.4.1 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -326,7 +326,7 @@ normative or informative references, some split references into sections organiz
326
326
  <a:documentation>Content of note</a:documentation>
327
327
  <oneOrMore>
328
328
  <choice>
329
- <ref name="paragraph"/>
329
+ <ref name="paragraph-with-footnote"/>
330
330
  <ref name="ul"/>
331
331
  <ref name="ol"/>
332
332
  <ref name="dl"/>
@@ -412,7 +412,7 @@ normative or informative references, some split references into sections organiz
412
412
  <element name="note">
413
413
  <ref name="OptionalId"/>
414
414
  <oneOrMore>
415
- <ref name="paragraph"/>
415
+ <ref name="paragraph-with-footnote"/>
416
416
  </oneOrMore>
417
417
  </element>
418
418
  </define>
@@ -1977,7 +1977,7 @@ used in document amendments</a:documentation>
1977
1977
  <oneOrMore>
1978
1978
  <choice>
1979
1979
  <a:documentation>Content of the verbal representation of the term</a:documentation>
1980
- <ref name="paragraph"/>
1980
+ <ref name="paragraph-with-footnote"/>
1981
1981
  <ref name="dl"/>
1982
1982
  <ref name="ol"/>
1983
1983
  <ref name="ul"/>
@@ -2015,7 +2015,7 @@ used in document amendments</a:documentation>
2015
2015
  <oneOrMore>
2016
2016
  <choice>
2017
2017
  <a:documentation>Content of the term note</a:documentation>
2018
- <ref name="paragraph"/>
2018
+ <ref name="paragraph-with-footnote"/>
2019
2019
  <ref name="ul"/>
2020
2020
  <ref name="ol"/>
2021
2021
  <ref name="dl"/>
@@ -2037,7 +2037,7 @@ used in document amendments</a:documentation>
2037
2037
  <ref name="dl"/>
2038
2038
  <ref name="quote"/>
2039
2039
  <ref name="sourcecode"/>
2040
- <ref name="paragraph"/>
2040
+ <ref name="paragraph-with-footnote"/>
2041
2041
  <ref name="figure"/>
2042
2042
  </choice>
2043
2043
  </oneOrMore>
@@ -30,6 +30,9 @@
30
30
  <optional>
31
31
  <ref name="fast_track"/>
32
32
  </optional>
33
+ <optional>
34
+ <ref name="price-code"/>
35
+ </optional>
33
36
  </define>
34
37
  <define name="bdate">
35
38
  <element name="date">
@@ -60,36 +63,19 @@
60
63
  </choice>
61
64
  </element>
62
65
  </define>
63
- <define name="organization">
64
- <element name="organization">
65
- <oneOrMore>
66
- <ref name="orgname"/>
67
- </oneOrMore>
68
- <optional>
69
- <ref name="abbreviation"/>
70
- </optional>
71
- <optional>
72
- <ref name="uri"/>
73
- </optional>
74
- <zeroOrMore>
75
- <ref name="org-identifier"/>
76
- </zeroOrMore>
77
- <zeroOrMore>
78
- <ref name="contact"/>
79
- </zeroOrMore>
80
- <optional>
81
- <ref name="technical-committee"/>
82
- </optional>
83
- <optional>
84
- <ref name="subcommittee"/>
85
- </optional>
86
- <optional>
87
- <ref name="workgroup"/>
88
- </optional>
89
- <optional>
90
- <ref name="secretariat"/>
91
- </optional>
92
- </element>
66
+ <define name="OrganizationType" combine="interleave">
67
+ <optional>
68
+ <ref name="technical-committee"/>
69
+ </optional>
70
+ <optional>
71
+ <ref name="subcommittee"/>
72
+ </optional>
73
+ <optional>
74
+ <ref name="workgroup"/>
75
+ </optional>
76
+ <optional>
77
+ <ref name="secretariat"/>
78
+ </optional>
93
79
  </define>
94
80
  <define name="DocumentType">
95
81
  <choice>
@@ -234,4 +220,9 @@
234
220
  <data type="boolean"/>
235
221
  </element>
236
222
  </define>
223
+ <define name="price-code">
224
+ <element name="price-code">
225
+ <text/>
226
+ </element>
227
+ </define>
237
228
  </grammar>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iso
3
- VERSION = "2.8.9".freeze
3
+ VERSION = "2.9.1".freeze
4
4
  end
5
5
  end
@@ -1,24 +1,26 @@
1
1
  module Metanorma
2
2
  class Requirements
3
3
  class Modspec
4
- # Don't want to inherit from Metanorma::Requirements::Modspec
5
4
  class Iso < ::Metanorma::Requirements::Modspec
5
+ =begin
6
6
  def recommendation_label(elem, type, xrefs)
7
7
  lbl = super
8
8
  title = elem.at(ns("./title"))
9
9
  return lbl unless title &&
10
10
  elem.ancestors("requirement, recommendation, permission").empty?
11
11
 
12
- lbl += ": " if lbl
13
- lbl += title.children.to_xml
12
+ lbl += "<span class='fmt-caption-delim'>: </span>" if lbl
13
+ lbl += "<semx element='title' source='#{elem['id']}'>#{title.children.to_xml}</semx>"
14
+ require "debug"; binding.b
14
15
  l10n(lbl)
15
16
  end
16
17
 
17
18
  # ISO labels modspec reqt as table, with reqt label as title
18
19
  def recommendation_header(reqt, out)
19
- n = reqt.at(ns("./name")) and out << n
20
+ n = reqt.at(ns("./fmt-name")) and out << n
20
21
  out
21
22
  end
23
+ =end
22
24
 
23
25
  def requirement_table_nested_cleanup(node, table)
24
26
  table["type"] == "recommendclass" or return table
@@ -40,7 +42,7 @@ module Metanorma
40
42
  def nested_tables_names(table)
41
43
  table.xpath(ns("./tbody/tr/td/table"))
42
44
  .each_with_object([]) do |t, m|
43
- m << t.at(ns("./name")).children.to_xml
45
+ m << t.at(ns(".//fmt-name")).children.to_xml
44
46
  end
45
47
  end
46
48
 
@@ -49,8 +51,10 @@ module Metanorma
49
51
  anchor[:modspec] = anchor[:xref_bare]
50
52
  if l = block.at(ns("./title"))
51
53
  anchor[:modspec] =
52
- l10n("#{anchor[:modspec]}: #{l.children.to_xml.strip}")
54
+ l10n("#{anchor[:modspec]}<span class='fmt-caption-delim'>: </span><semx element='title' source='#{block['id']}'>#{l.children.to_xml.strip}</semx>")
53
55
  end
56
+ /<xref/.match?(anchor[:modspec]) or
57
+ anchor[:modspec] = "<xref target='#{block['id']}'>#{anchor[:modspec]}</xref>"
54
58
  anchor
55
59
  end
56
60
  end
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.test_files = `git ls-files -- {spec}/*`.split("\n")
33
33
  spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
34
34
 
35
- spec.add_dependency "metanorma-standoc", "~> 2.9.3"
35
+ spec.add_dependency "metanorma-standoc", "~> 2.10.1"
36
36
  spec.add_dependency "mnconvert", "~> 1.14"
37
37
  spec.add_dependency "pubid"
38
38
  spec.add_dependency "tokenizer", "~> 0.3.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.9
4
+ version: 2.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-28 00:00:00.000000000 Z
11
+ date: 2024-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.9.3
19
+ version: 2.10.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.9.3
26
+ version: 2.10.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mnconvert
29
29
  requirement: !ruby/object:Gem::Requirement