metanorma-ieee 1.5.2 → 1.5.3

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.
@@ -76,12 +76,6 @@ from other documents in the same doctype</a:documentation>
76
76
  <ref name="flavor">
77
77
  <a:documentation>Flavour of Metanorma used to process this document</a:documentation>
78
78
  </ref>
79
- <optional>
80
- <ref name="editorialgroup">
81
- <a:documentation>Groups associated with the production of the standards document, typically within
82
- a standards definition organization</a:documentation>
83
- </ref>
84
- </optional>
85
79
  <zeroOrMore>
86
80
  <ref name="ics">
87
81
  <a:documentation>Classification of the document contents taken from the International Classification of Standards</a:documentation>
@@ -130,49 +124,6 @@ a standards definition organization</a:documentation>
130
124
  However we prefer not to hardcode it, given ongoing extension.</a:documentation>
131
125
  <text/>
132
126
  </define>
133
- <define name="editorialgroup">
134
- <a:documentation>A group associated with the production of the standards document, typically within
135
- a standards definition organization</a:documentation>
136
- <element name="editorialgroup">
137
- <oneOrMore>
138
- <ref name="technical-committee">
139
- <a:documentation>A technical committee associated with the production of the standards document</a:documentation>
140
- </ref>
141
- </oneOrMore>
142
- </element>
143
- </define>
144
- <define name="technical-committee">
145
- <a:documentation>Technical committee associated with the production of a standards document</a:documentation>
146
- <element name="technical-committee">
147
- <ref name="IsoWorkgroup"/>
148
- </element>
149
- </define>
150
- <define name="IsoWorkgroup">
151
- <optional>
152
- <attribute name="number">
153
- <a:documentation>Numeric identifier of the technical committee</a:documentation>
154
- </attribute>
155
- </optional>
156
- <optional>
157
- <attribute name="type">
158
- <a:documentation>Type of the technical committee, used in identifying the technical committee</a:documentation>
159
- </attribute>
160
- </optional>
161
- <optional>
162
- <attribute name="identifier">
163
- <a:documentation>Non-numeric, complete identifier of the technical committee</a:documentation>
164
- </attribute>
165
- </optional>
166
- <optional>
167
- <attribute name="prefix">
168
- <a:documentation>Disambiguating prefix added to number to form the identifier of the technical committee,
169
- typically indicating its type</a:documentation>
170
- </attribute>
171
- </optional>
172
- <text>
173
- <a:documentation>Name of the technical committee</a:documentation>
174
- </text>
175
- </define>
176
127
  <define name="ics">
177
128
  <a:documentation>Classification taken from the International Classification of Standards.
178
129
  ICS is defined by ISO here -- https://www.iso.org/publication/PUB100033.html</a:documentation>
@@ -242,6 +242,8 @@ Detailed in https://www.relaton.org/model/creator/</a:documentation>
242
242
  </choice>
243
243
  </define>
244
244
  <define name="roledescription">
245
+ <a:documentation>A more detailed description of the role of the contributor
246
+ Some descriptions are reserved words; in particular, the editorial committee of a standard has the role description "committee"</a:documentation>
245
247
  <element name="description">
246
248
  <ref name="LocalizedMarkedUpString"/>
247
249
  </element>
@@ -443,7 +445,10 @@ real names (if the person is named with a pseudonym or user name); previous lega
443
445
  </oneOrMore>
444
446
  <zeroOrMore>
445
447
  <ref name="subdivision">
446
- <a:documentation>The subdivision of the organization directly involved with the production of the bibliographic item</a:documentation>
448
+ <a:documentation>The subdivision of the organization directly involved with the production of the bibliographic item.
449
+ Multiple subdivisions can be specified for an organization, with no implication of hierarchical
450
+ relation between them
451
+ Editorial and advisory groups are represented as consecutive subdivisions of the SDO</a:documentation>
447
452
  </ref>
448
453
  </zeroOrMore>
449
454
  <optional>
@@ -485,6 +490,11 @@ real names (if the person is named with a pseudonym or user name); previous lega
485
490
  <a:documentation>The type of subdivision</a:documentation>
486
491
  </attribute>
487
492
  </optional>
493
+ <optional>
494
+ <attribute name="subtype">
495
+ <a:documentation>The subtype of subdivision; e.g. different types of technical committee</a:documentation>
496
+ </attribute>
497
+ </optional>
488
498
  <ref name="OrganizationType">
489
499
  <a:documentation>The subdivision, modelled recursively as an organization</a:documentation>
490
500
  </ref>
@@ -275,7 +275,7 @@ role::: Member
275
275
  [[boilerplate-participants-sb]]
276
276
  ==== {blank}
277
277
 
278
- When the IEEE SA Standards Board approved this {{ doctype }} on {{ issueddate }}, it had the following membership:
278
+ When the IEEE SA Standards Board approved this {{ doctype }} on {{ ieee_sasb_approveddate }}, it had the following membership:
279
279
 
280
280
  ++++
281
281
  <membership>
@@ -55,12 +55,22 @@ module Metanorma
55
55
  PARTICIPANT_BOILERPLATE_LOCATIONS.each do |k, v|
56
56
  populate_participants(xml, k.to_s, v)
57
57
  end
58
- p = xml.at(".//p[@type = 'emeritus_sign']")
59
- ul = xml.at("//clause[@anchor = 'boilerplate-participants-sb']//ul")
60
- p && ul and ul.next = p
58
+ emeritus_sign(xml)
61
59
  xml.at("//sections//clause[@type = 'participants']")&.remove
62
60
  end
63
61
 
62
+ def emeritus_sign(xml)
63
+ p = xml.at(".//p[@type = 'emeritus_sign']") or return
64
+ ul = xml.at("//clause[@anchor = 'boilerplate-participants-sb']//ul") or
65
+ return
66
+ has_asterisk = ul.xpath(".//p")&.any? do |li|
67
+ li.text.strip.end_with?("*")
68
+ end
69
+ if has_asterisk then ul.next = p
70
+ else p.remove
71
+ end
72
+ end
73
+
64
74
  def populate_participants(xml, target, subtitle)
65
75
  t = xml.at("//clause[@anchor = '#{target}']/membership") or return
66
76
  s = xml.xpath("//clause[@type = 'participants']/clause").detect do |x|
@@ -98,9 +108,10 @@ module Metanorma
98
108
  dl.children = ret.keys.map do |k|
99
109
  "<dt>#{k}</dt><dd #{add_id_text}><p>#{ret[k]}</p></dd>"
100
110
  end.join
101
- else list.children =
102
- "<dl><dt>name</dt><dd #{add_id_text}><p>#{curr.children.to_xml}" \
103
- "</p></dd><dt>role</dt><dd #{add_id_text}><p>member</p></dd></dl>"
111
+ else list.children = <<~XML
112
+ <dl><dt>name</dt><dd #{add_id_text}><p>#{curr.children.to_xml}
113
+ </p></dd><dt>role</dt><dd #{add_id_text}><p>member</p></dd></dl>
114
+ XML
104
115
  end
105
116
  end
106
117
 
@@ -239,12 +239,20 @@ module Metanorma
239
239
 
240
240
  def insert_availability_note(bib, msg)
241
241
  bib or return
242
- note = %(<note type="Availability"><p>#{msg}</p></note>)
242
+ Array(msg).each do |msg1|
243
+ note = %(<note type="Availability"><p>#{msg1}</p></note>)
244
+ if b = insert_availability_note_ins(bib)
245
+ b.next = note
246
+ end
247
+ end
248
+ end
249
+
250
+ def insert_availability_note_ins(bib)
243
251
  if b = bib.at("./language | ./script | ./abstract | ./status")
244
- b.previous = note
245
- else b = bib.at("./contributor") || bib.at("./date") ||
252
+ b.previous
253
+ else bib.at("./contributor") || bib.at("./date") ||
246
254
  bib.at("./docnumber") || bib.at("./docidentifier") ||
247
- bib.at("./title") and b.next = note
255
+ bib.at("./title")
248
256
  end
249
257
  end
250
258
  end
@@ -4,16 +4,6 @@ require "pubid-ieee"
4
4
  module Metanorma
5
5
  module Ieee
6
6
  class Converter < Standoc::Converter
7
- def metadata_committee(node, xml)
8
- metadata_committee_prep(node) or return
9
- xml.editorialgroup do |a|
10
- committee_component("society", node, a)
11
- committee_component("balloting-group", node, a)
12
- committee_component("working-group", node, a)
13
- committee_component("committee", node, a)
14
- end
15
- end
16
-
17
7
  def metadata_committee_prep(node)
18
8
  node.attr("doctype") == "whitepaper" &&
19
9
  node.attr("docsubtype") == "industry-connection-report" and
@@ -26,6 +16,41 @@ module Metanorma
26
16
  true
27
17
  end
28
18
 
19
+ def metadata_committee_types(_node)
20
+ %w(society balloting-group working-group committee)
21
+ end
22
+
23
+ def committee_contributors(node, xml, agency, opt)
24
+ metadata_committee_prep(node) or return
25
+ super
26
+ end
27
+
28
+ def org_attrs_add_committees(node, ret, opts, opts_orig)
29
+ opts_orig[:groups]&.each_with_index do |g, i|
30
+ i.zero? and next
31
+ opts = committee_contrib_org_prep(node, g, nil, opts_orig)
32
+ ret << org_attrs_parse_core(node, opts).map do |x|
33
+ x.merge(subdivtype: opts[:subdivtype])
34
+ end
35
+ end
36
+ contributors_committees_nest1(ret)
37
+ end
38
+
39
+ def contributors_committees_nest1(committees)
40
+ committees.empty? and return committees
41
+ committees = committees.map(&:reverse).reverse.flatten
42
+ committees.each_with_index do |m, i|
43
+ i.zero? and next
44
+ m[:subdiv] = committees[i - 1]
45
+ end
46
+ committees[-1].nil? and return []
47
+ [committees[-1]]
48
+ end
49
+
50
+ def committee_contrib_org_prep(node, type, agency, _opts)
51
+ super.merge(role: "authorizer")
52
+ end
53
+
29
54
  def metadata_other_id(node, xml)
30
55
  a = node.attr("isbn-pdf") and
31
56
  xml.docidentifier a, type: "ISBN", scope: "PDF"
@@ -121,7 +146,7 @@ module Metanorma
121
146
  end
122
147
 
123
148
  def datetypes
124
- super + %w{feedback-ended}
149
+ super + %w{feedback-ended ieee-sasb-approved}
125
150
  end
126
151
 
127
152
  def metadata_subdoctype(node, xml)
@@ -1,28 +1,27 @@
1
1
  ---
2
- ieee: |
3
- IEEE publications are available from The Institute of Electrical and
4
- Electronics Engineers (http://standards.ieee.org/).
2
+ ieee:
3
+ - The IEEE standards or products referred to in this clause are trademarks owned by The Institute of Electrical and Electronics Engineers, Incorporated.
4
+ - IEEE publications are available from The Institute of Electrical and
5
+ Electronics Engineers (http://standards.ieee.org/).
5
6
 
6
7
  iec: |
7
8
  IEC publications are available from the International Electrotechnical
8
- Commission (http://www.iec.ch/). IEC publications are also available in
9
- the United States from the American National Standards Institute
10
- (http://www.ansi.org/).
9
+ Commission (https://www.iec.ch) and the American National Standards Institute
10
+ (https://www.ansi.org/).
11
11
 
12
12
  cispr: |
13
13
  CISPR documents are available from the International Electrotechnical
14
- Commission (http://www.iec.ch/). CISPR documents are also available in
15
- the United States from the American National Standards Institute
16
- (http://www.ansi.org)
14
+ Commission (https://www.iec.ch/) and the American National Standards Institute
15
+ (https://www.ansi.org/).
17
16
 
18
17
  ietf: |
19
- IETF documents (e.g., RFCs) are available from the Internet Engineering Task Force (http://www.ietf.org/).
18
+ IETF documents (e.g., RFCs) are available from the Internet Engineering Task
19
+ Force (http://www.ietf.org/).
20
20
 
21
21
  iso: |
22
- ISO publications are available from the ISO Central Secretariat
23
- (http://www.iso.org/). ISO publications are also available in the United
24
- States from the American National Standards Institute
25
- (http://www.ansi.org/).
22
+ ISO publications are available from the International Organization for
23
+ Standardization (https://www.iso.org/) and the American National Standards
24
+ Institute (https://www.ansi.org/).
26
25
 
27
26
  iso-iec: |
28
27
  ISO/IEC documents are available from the International Organization for
@@ -65,13 +64,14 @@ w3c: |
65
64
  (https://www.w3.org).
66
65
 
67
66
  oasis: |
68
- OASIS publications are available from the Organization for the
69
- Organization for the Advancement of Structured Information Standards
70
- (http://www.oasis-open.org)
67
+ OASIS publications are available from the Organization for the Advancement
68
+ of Structured Information Standards (http://www.oasis-open.org)
71
69
 
72
70
  3gpp: |
73
71
  3GPP(TM) documents are available from the 3rd Generation Partnership
74
72
  Project Web site (http://www.3gpp.org).
75
73
 
76
74
  ieee-withdrawn: |
77
- % has been withdrawn; however, copies can be obtained from Global Engineering, 15 Inverness Way East, Englewood, CO 80112-5704, USA, tel. (303) 792-2181 (http://global.ihs.com/).
75
+ % has been withdrawn; however, copies can be obtained from Global Engineering,
76
+ 15 Inverness Way East, Englewood, CO 80112-5704, USA, tel. (303) 792-2181
77
+ (http://global.ihs.com/).
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <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">
3
- <!-- VERSION v2.1.0 -->
3
+ <!-- VERSION v2.1.1 -->
4
4
 
5
5
  <!--
6
6
  ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
@@ -2233,6 +2233,11 @@ used in document amendments</a:documentation>
2233
2233
  <ref name="RequiredId"/>
2234
2234
  <ref name="NumberingAttributes"/>
2235
2235
  <ref name="BlockAttributes"/>
2236
+ <optional>
2237
+ <attribute name="type">
2238
+ <a:documentation>Semantic classification of note</a:documentation>
2239
+ </attribute>
2240
+ </optional>
2236
2241
  <oneOrMore>
2237
2242
  <choice>
2238
2243
  <a:documentation>Content of the term note</a:documentation>
@@ -21,22 +21,6 @@
21
21
  </choice>
22
22
  </element>
23
23
  </define>
24
- <define name="editorialgroup">
25
- <element name="editorialgroup">
26
- <optional>
27
- <ref name="society"/>
28
- </optional>
29
- <optional>
30
- <ref name="balloting-group"/>
31
- </optional>
32
- <optional>
33
- <ref name="working-group"/>
34
- </optional>
35
- <oneOrMore>
36
- <ref name="committee"/>
37
- </oneOrMore>
38
- </element>
39
- </define>
40
24
  <define name="DocumentSubtype">
41
25
  <choice>
42
26
  <value>amendment</value>
@@ -121,37 +105,16 @@ https://standards.ieee.org/about/policies/opman/sect5/</a:documentation>
121
105
  </element>
122
106
  </define>
123
107
  <define name="BibliographicDateType" combine="choice">
124
- <value>feedback-ended</value>
108
+ <choice>
109
+ <value>feedback-ended</value>
110
+ <a:documentation>Date on which feedback on the document must be received by</a:documentation>
111
+ <value>ieee-sasb-approved</value>
112
+ <a:documentation>Date that the document was approved by the IEEE SA Standards Body</a:documentation>
113
+ </choice>
125
114
  </define>
126
115
  <define name="trialuse">
127
116
  <element name="trial-use">
128
117
  <data type="boolean"/>
129
118
  </element>
130
119
  </define>
131
- <define name="balloting-group">
132
- <element name="balloting-group">
133
- <attribute name="type">
134
- <choice>
135
- <value>individual</value>
136
- <value>entity</value>
137
- </choice>
138
- </attribute>
139
- <text/>
140
- </element>
141
- </define>
142
- <define name="working-group">
143
- <element name="working-group">
144
- <text/>
145
- </element>
146
- </define>
147
- <define name="committee">
148
- <element name="committee">
149
- <text/>
150
- </element>
151
- </define>
152
- <define name="society">
153
- <element name="society">
154
- <text/>
155
- </element>
156
- </define>
157
120
  </grammar>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ieee
3
- VERSION = "1.5.2".freeze
3
+ VERSION = "1.5.3".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ieee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-08-04 00:00:00.000000000 Z
11
+ date: 2025-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc