metanorma-iso 2.3.4 → 2.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -216,6 +216,9 @@
216
216
  <optional>
217
217
  <ref name="fullname"/>
218
218
  </optional>
219
+ <zeroOrMore>
220
+ <ref name="credential"/>
221
+ </zeroOrMore>
219
222
  <zeroOrMore>
220
223
  <ref name="affiliation"/>
221
224
  </zeroOrMore>
@@ -232,6 +235,11 @@
232
235
  <ref name="FullNameType"/>
233
236
  </element>
234
237
  </define>
238
+ <define name="credential">
239
+ <element name="credential">
240
+ <text/>
241
+ </element>
242
+ </define>
235
243
  <define name="FullNameType">
236
244
  <choice>
237
245
  <group>
@@ -305,7 +313,9 @@
305
313
  <zeroOrMore>
306
314
  <ref name="affiliationdescription"/>
307
315
  </zeroOrMore>
308
- <ref name="organization"/>
316
+ <optional>
317
+ <ref name="organization"/>
318
+ </optional>
309
319
  </element>
310
320
  </define>
311
321
  <define name="affiliationname">
@@ -44,18 +44,8 @@ module Metanorma
44
44
  # ISO as a prefix goes first
45
45
  def docidentifier_cleanup(xmldoc)
46
46
  prefix = get_id_prefix(xmldoc)
47
- =begin
48
- id = xmldoc.at("//bibdata/docidentifier[@type = 'ISO']") or return
49
- id.content = id_prefix(prefix, id)
50
- =end
51
47
  id = xmldoc.at("//bibdata/ext/structuredidentifier/project-number") and
52
48
  id.content = id_prefix(prefix, id)
53
- =begin
54
- %w(iso-with-lang iso-reference iso-undated).each do |t|
55
- id = xmldoc.at("//bibdata/docidentifier[@type = '#{t}']") and
56
- id.content = id_prefix(prefix, id)
57
- end
58
- =end
59
49
  end
60
50
 
61
51
  def format_ref(ref, type)
@@ -46,11 +46,14 @@ module Metanorma
46
46
  end
47
47
 
48
48
  def metadata_id(node, xml)
49
- iso_id(node, xml)
49
+ if id = node.attr("docidentifier")
50
+ xml.docidentifier id, **attr_code(type: "ISO")
51
+ else iso_id(node, xml)
52
+ end
50
53
  node.attr("tc-docnumber")&.split(/,\s*/)&.each do |n|
51
54
  xml.docidentifier(n, **attr_code(type: "iso-tc"))
52
55
  end
53
- xml.docnumber node&.attr("docnumber")
56
+ xml.docnumber node.attr("docnumber")
54
57
  end
55
58
 
56
59
  # @param type [nil, :tr, :ts, :amd, :cor, :guide, :dir, :tc, Type]
@@ -62,6 +65,7 @@ module Metanorma
62
65
  when "directive" then :dir
63
66
  when "technical-report" then :tr
64
67
  when "technical-specification" then :ts
68
+ when "publicly-available-specification" then :pas
65
69
  when "guide" then :guide
66
70
  end
67
71
  end
@@ -138,7 +142,7 @@ module Metanorma
138
142
  xml.docidentifier iso_id_default(params).to_s(with_prf: with_prf),
139
143
  **attr_code(type: "ISO")
140
144
  xml.docidentifier iso_id_reference(params)
141
- .to_s(format: :ref_num_long, with_prf: with_prf),
145
+ .to_s(format: :ref_num_short, with_prf: with_prf),
142
146
  **attr_code(type: "iso-reference")
143
147
  xml.docidentifier iso_id_reference(params).urn, **attr_code(type: "URN")
144
148
  return if @amd
@@ -146,7 +150,7 @@ module Metanorma
146
150
  xml.docidentifier iso_id_undated(params).to_s(with_prf: with_prf),
147
151
  **attr_code(type: "iso-undated")
148
152
  xml.docidentifier iso_id_with_lang(params)
149
- .to_s(format: :ref_num_short, with_prf: with_prf),
153
+ .to_s(format: :ref_num_long, with_prf: with_prf),
150
154
  **attr_code(type: "iso-with-lang")
151
155
  rescue StandardError => e
152
156
  clean_abort("Document identifier: #{e}", xml)
@@ -1578,6 +1578,9 @@
1578
1578
  <zeroOrMore>
1579
1579
  <ref name="indexsect"/>
1580
1580
  </zeroOrMore>
1581
+ <optional>
1582
+ <ref name="colophon"/>
1583
+ </optional>
1581
1584
  </element>
1582
1585
  </define>
1583
1586
  <define name="misccontainer">
@@ -1600,6 +1603,13 @@
1600
1603
  </oneOrMore>
1601
1604
  </element>
1602
1605
  </define>
1606
+ <define name="colophon">
1607
+ <element name="colophon">
1608
+ <oneOrMore>
1609
+ <ref name="content"/>
1610
+ </oneOrMore>
1611
+ </element>
1612
+ </define>
1603
1613
  <define name="foreword">
1604
1614
  <element name="foreword">
1605
1615
  <ref name="Content-Section"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "2.3.4".freeze
3
+ VERSION = "2.3.6".freeze
4
4
  end
5
5
  end
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.3.4
4
+ version: 2.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-07 00:00:00.000000000 Z
11
+ date: 2023-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc