metanorma-iso 2.9.0 → 2.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -63,36 +63,19 @@
63
63
  </choice>
64
64
  </element>
65
65
  </define>
66
- <define name="organization">
67
- <element name="organization">
68
- <oneOrMore>
69
- <ref name="orgname"/>
70
- </oneOrMore>
71
- <optional>
72
- <ref name="abbreviation"/>
73
- </optional>
74
- <optional>
75
- <ref name="uri"/>
76
- </optional>
77
- <zeroOrMore>
78
- <ref name="org-identifier"/>
79
- </zeroOrMore>
80
- <zeroOrMore>
81
- <ref name="contact"/>
82
- </zeroOrMore>
83
- <optional>
84
- <ref name="technical-committee"/>
85
- </optional>
86
- <optional>
87
- <ref name="subcommittee"/>
88
- </optional>
89
- <optional>
90
- <ref name="workgroup"/>
91
- </optional>
92
- <optional>
93
- <ref name="secretariat"/>
94
- </optional>
95
- </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>
96
79
  </define>
97
80
  <define name="DocumentType">
98
81
  <choice>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iso
3
- VERSION = "2.9.0".freeze
3
+ VERSION = "2.9.2".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.10.0"
35
+ spec.add_dependency "metanorma-standoc", "~> 2.10.2"
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.9.0
4
+ version: 2.9.2
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-11-11 00:00:00.000000000 Z
11
+ date: 2024-12-10 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.10.0
19
+ version: 2.10.2
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.10.0
26
+ version: 2.10.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mnconvert
29
29
  requirement: !ruby/object:Gem::Requirement