metanorma-iec 1.2.11 → 1.2.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 757f304ffb697a9e1ac4cbea8cb23bd97d1c84919c79330c850c185147e87dea
4
- data.tar.gz: c9abb1c90c14b852382dc58cceb438292a06221a027d00f50f7b10b234193db9
3
+ metadata.gz: f08c3f37c821f3bd1cb589899e6fc5a240cedea8314df63683c0983476c7d675
4
+ data.tar.gz: 481dd653b8771e900a9c073612920e61e62b9f7b2f985c1bdfd8a71cdd99100a
5
5
  SHA512:
6
- metadata.gz: '09f9d546277d03635c47c8ec61c2a19c3170605e0edd6e1632f62258d2d1d1f6e458bdf781bf95b3e9b0c8995072cb003f8c60ecf885b7d9f9b0fb1168c8210c'
7
- data.tar.gz: e327cf4c18dc4e20fe836829ac9428492edb163e46e4f864e67c42a1affb33d72e366a10c59cc750e1274eff26fde85ae9193a84b0941c94e9e6e054c08d253b
6
+ metadata.gz: 0c31775a8855a6841150ede2338969ac8d95aa99c930aebc00bc78c0ddf421082b0231a2cf17b53783099033c0f4d0aee510efeeda3da0057dc731927d90c3ef
7
+ data.tar.gz: e627ac800e2b2471f559d9f43354524293983477276ddb34e22b37e99a58bfbc8d7bc84b27d58b372a7009d277ad6bce4442b94faaa2d93c4021eb52d9661154
@@ -4,7 +4,7 @@ name: rake
4
4
 
5
5
  on:
6
6
  push:
7
- branches: [ master, main ]
7
+ branches: [ master, main ]
8
8
  tags: [ v* ]
9
9
  pull_request:
10
10
 
@@ -16,47 +16,27 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.6', '2.5', '2.4' ]
19
+ ruby: [ '2.7', '2.6', '2.5', '2.4' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
22
  include:
23
- - ruby: '2.7'
23
+ - ruby: '3.0'
24
24
  os: 'ubuntu-latest'
25
25
  experimental: true
26
- - ruby: '2.7'
26
+ - ruby: '3.0'
27
27
  os: 'windows-latest'
28
28
  experimental: true
29
- - ruby: '2.7'
29
+ - ruby: '3.0'
30
30
  os: 'macos-latest'
31
31
  experimental: true
32
32
  steps:
33
- - uses: actions/checkout@master
33
+ - uses: actions/checkout@v2
34
+ with:
35
+ submodules: true
34
36
 
35
37
  - uses: ruby/setup-ruby@v1
36
38
  with:
37
39
  ruby-version: ${{ matrix.ruby }}
38
-
39
- - uses: actions/cache@v2
40
- with:
41
- path: vendor/bundle
42
- key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
43
- restore-keys: bundle-${{ matrix.os }}-${{ matrix.ruby }}
44
-
45
- - run: bundle config set path 'vendor/bundle'
46
-
47
- - run: bundle install --jobs 4 --retry 3
40
+ bundler-cache: true
48
41
 
49
42
  - run: bundle exec rake
50
-
51
- tests-passed:
52
- needs: rake
53
- runs-on: ubuntu-latest
54
- steps:
55
- - name: Trigger tests passed event
56
- uses: Sibz/github-status-action@v1
57
- with:
58
- authToken: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
59
- context: 'tests-passed-successfully'
60
- description: 'Tests passed successfully'
61
- state: 'success'
62
- sha: ${{ github.event.pull_request.head.sha || github.sha }}
data/.rubocop.yml CHANGED
@@ -4,7 +4,3 @@
4
4
 
5
5
  inherit_from:
6
6
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
- AllCops:
8
- TargetRubyVersion: 2.3
9
- Rails:
10
- Enabled: true
@@ -729,9 +729,11 @@
729
729
  </define>
730
730
  <define name="index">
731
731
  <element name="index">
732
- <attribute name="to">
733
- <data type="IDREF"/>
734
- </attribute>
732
+ <optional>
733
+ <attribute name="to">
734
+ <data type="IDREF"/>
735
+ </attribute>
736
+ </optional>
735
737
  <element name="primary">
736
738
  <oneOrMore>
737
739
  <ref name="PureTextElement"/>
@@ -80,6 +80,26 @@ module Asciidoctor
80
80
  super
81
81
  @is_iev and replace_title(x, "//introduction", @i18n&.introduction_iev)
82
82
  end
83
+
84
+ def note(n)
85
+ if n.title == "Note from TC/SC Officers"
86
+ noko do |xml|
87
+ xml.tc_sc_officers_note do |c|
88
+ wrap_in_para(n, c)
89
+ end
90
+ end.join("\n")
91
+ else
92
+ super
93
+ end
94
+ end
95
+
96
+ def note_cleanup(xmldoc)
97
+ super
98
+ n = xmldoc.at("//tc-sc-officers-note") and xmldoc.at("//bibdata/ext").add_child(n.remove)
99
+ end
100
+
101
+ def image_name_validate(xmldoc)
102
+ end
83
103
  end
84
104
  end
85
105
  end
@@ -51,56 +51,17 @@ module Asciidoctor
51
51
  end
52
52
 
53
53
  STAGE_CODES = {
54
- "PNW" => "1000",
55
- "ANW" => "2000",
56
- "CAN" => "2098",
57
- "ACD" => "2099",
58
- "CD" => "3020",
59
- "BWG" => "3092",
60
- "A2CD" => "3099",
61
- "2CD" => "3520",
62
- "3CD" => "3520",
63
- "4CD" => "3520",
64
- "5CD" => "3520",
65
- "6CD" => "3520",
66
- "7CD" => "3520",
67
- "8CD" => "3520",
68
- "9CD" => "3520",
69
- "CDM" => "3591",
70
- "A3CD" => "3592",
71
- "A4CD" => "3592",
72
- "A5CD" => "3592",
73
- "A6CD" => "3592",
74
- "A7CD" => "3592",
75
- "A8CD" => "3592",
76
- "A9CD" => "3592",
77
- "ACDV" => "3599",
78
- "CCDV" => "4020",
79
- "CDVM" => "4091",
80
- "NCDV" => "4092",
81
- "NADIS" => "4093",
82
- "ADIS" => "4099",
83
- "ADTR" => "4099",
84
- "ADTS" => "4099",
85
- "RDISH" => "5000",
86
- "RFDIS" => "5000",
87
- "CDISH" => "5020",
88
- "CDPAS" => "5020",
89
- "CDTR" => "5020",
90
- "CDTS" => "5020",
91
- "CFDIS" => "5020",
92
- "DTRM" => "5092",
93
- "DTSM" => "5092",
94
- "NDTR" => "5092",
95
- "NDTS" => "5092",
96
- "NFDIS" => "5092",
97
- "APUB" => "5099",
98
- "BPUB" => "6000",
99
- "PPUB" => "6060",
100
- "RR" => "9092",
101
- "AMW" => "9220",
102
- "WPUB" => "9599",
103
- "DELPUB" => "9960",
54
+ "PNW" => "1000", "ANW" => "2000", "CAN" => "2098", "ACD" => "2099", "CD" => "3020",
55
+ "BWG" => "3092", "A2CD" => "3099", "2CD" => "3520", "3CD" => "3520", "4CD" => "3520",
56
+ "5CD" => "3520", "6CD" => "3520", "7CD" => "3520", "8CD" => "3520", "9CD" => "3520",
57
+ "CDM" => "3591", "A3CD" => "3592", "A4CD" => "3592", "A5CD" => "3592", "A6CD" => "3592",
58
+ "A7CD" => "3592", "A8CD" => "3592", "A9CD" => "3592", "ACDV" => "3599", "CCDV" => "4020",
59
+ "CDVM" => "4091", "NCDV" => "4092", "NADIS" => "4093", "ADIS" => "4099", "ADTR" => "4099",
60
+ "ADTS" => "4099", "RDISH" => "5000", "RFDIS" => "5000", "CDISH" => "5020", "CDPAS" => "5020",
61
+ "CDTR" => "5020", "CDTS" => "5020", "CFDIS" => "5020", "DTRM" => "5092", "DTSM" => "5092",
62
+ "NDTR" => "5092", "NDTS" => "5092", "NFDIS" => "5092", "APUB" => "5099", "BPUB" => "6000",
63
+ "PPUB" => "6060", "RR" => "9092", "AMW" => "9220", "WPUB" => "9599", "DELPUB" => "9960",
64
+ "PWI" => "0000", "NWIP" => "1000", "WD" => "2000", "CDV" => "4000", "FDIS" => "5000",
104
65
  }.freeze
105
66
 
106
67
  DOC_STAGE = {
@@ -123,7 +84,8 @@ module Asciidoctor
123
84
  "20" => {"00" => "ANW", "98" => "CAN", "99" => "ACD"},
124
85
  "30" => {"00" => "CD", "20" => "CD", "92" => "BWG", "97" => "MERGED", "98" => "DREJ", "99" => "A2CD"},
125
86
  "35" => {"00" => "CD", "20" => "CD", "91" => "CDM", "92" => "ACD", "99" => "ACDV"},
126
- "40" => {"00" => "CCDV", "20" => "CCDV", "91" => "CDVM", "92" => "NCDV", "93" => "NADIS", "95" => "ADISSB", "99" => "ADIS"},
87
+ "40" => {"00" => "CCDV", "20" => "CCDV", "91" => "CDVM", "92" => "NCDV", "93" => "NADIS",
88
+ "95" => "ADISSB", "99" => "ADIS"},
127
89
  "50" => {"00" => "RFDIS", "20" => "CFDIS", "92" => "NFDIS", "95" => "APUBSB", "99" => "APUB"},
128
90
  "60" => {"00" => "BPUB", "60" => "PPUB"},
129
91
  "90" => {"00" => "RR", "92" => "RR"},
@@ -183,8 +145,7 @@ module Asciidoctor
183
145
 
184
146
  def get_stage(node)
185
147
  stage = node.attr("status") || node.attr("docstage") || "60"
186
- m = /([0-9])CD$/.match(stage) and
187
- node.set_attr("iteration", m[1])
148
+ m = /([0-9])CD$/.match(stage) and node.set_attr("iteration", m[1])
188
149
  STAGE_CODES[stage] and stage = STAGE_CODES[stage][0..1]
189
150
  stage
190
151
  end
@@ -193,9 +154,7 @@ module Asciidoctor
193
154
  st = node.attr("status") || node.attr("docstage")
194
155
  stage = get_stage(node)
195
156
  node.attr("docsubstage") ||
196
- ( stage == "60" ? "60" :
197
- STAGE_CODES[st] ? STAGE_CODES[st][2..3] :
198
- "00" )
157
+ ( stage == "60" ? "60" : STAGE_CODES[st] ? STAGE_CODES[st][2..3] : "00" )
199
158
  end
200
159
 
201
160
  def id_stage_abbr(stage, substage, node)
@@ -211,8 +170,7 @@ module Asciidoctor
211
170
  xml.status do |s|
212
171
  s.stage stage, **attr_code(abbreviation: stage_abbr(stage, substage))
213
172
  s.substage substage,
214
- **attr_code(abbreviation: status_abbrev1(stage, substage,
215
- node.attr("iteration"),
173
+ **attr_code(abbreviation: status_abbrev1(stage, substage, node.attr("iteration"),
216
174
  doctype(node),node.attr("draft")))
217
175
  node.attr("iteration") && (s.iteration node.attr("iteration"))
218
176
  end
@@ -224,11 +182,17 @@ module Asciidoctor
224
182
  a = node.attr("function") and xml.function a
225
183
  end
226
184
 
185
+ def relaton_relations
186
+ super + %w(obsoletes)
187
+ end
188
+
227
189
  def metadata_ext(node, xml)
228
190
  super
229
191
  a = node.attr("accessibility-color-inside") and xml.accessibility_color_inside a
230
192
  a = node.attr("price-code") and xml.price_code a
231
193
  a = node.attr("cen-processing") and xml.cen_processing a
194
+ a = node.attr("secretary") and xml.secretary a
195
+ a = node.attr("interest-to-committees") and xml.interest_to_committees a
232
196
  end
233
197
  end
234
198
  end
@@ -43,6 +43,15 @@
43
43
  <optional>
44
44
  <ref name="cen-processing"/>
45
45
  </optional>
46
+ <optional>
47
+ <ref name="secretary"/>
48
+ </optional>
49
+ <optional>
50
+ <ref name="interest-to-committees"/>
51
+ </optional>
52
+ <optional>
53
+ <ref name="tc-sc-officers-note"/>
54
+ </optional>
46
55
  </define>
47
56
  </include>
48
57
  <!-- end overrides -->
@@ -71,6 +80,23 @@
71
80
  <data type="boolean"/>
72
81
  </element>
73
82
  </define>
83
+ <define name="secretary">
84
+ <element name="secretary">
85
+ <text/>
86
+ </element>
87
+ </define>
88
+ <define name="interest-to-committees">
89
+ <element name="interest-to-committees">
90
+ <text/>
91
+ </element>
92
+ </define>
93
+ <define name="tc-sc-officers-note">
94
+ <element name="tc-sc-officers-note">
95
+ <zeroOrMore>
96
+ <ref name="BasicBlock"/>
97
+ </zeroOrMore>
98
+ </element>
99
+ </define>
74
100
  <!--
75
101
  We display the Normative References between scope and terms; but to keep the
76
102
  grammar simple, we keep the references together
@@ -88,6 +114,9 @@
88
114
  <zeroOrMore>
89
115
  <ref name="termdocsource"/>
90
116
  </zeroOrMore>
117
+ <optional>
118
+ <ref name="misccontainer"/>
119
+ </optional>
91
120
  <optional>
92
121
  <ref name="boilerplate"/>
93
122
  </optional>
@@ -99,6 +128,14 @@
99
128
  <ref name="annex"/>
100
129
  </zeroOrMore>
101
130
  <ref name="bibliography"/>
131
+ <zeroOrMore>
132
+ <ref name="indexsect"/>
133
+ </zeroOrMore>
134
+ </element>
135
+ </define>
136
+ <define name="updates_document_type">
137
+ <element name="updates-document-type">
138
+ <ref name="DocumentType"/>
102
139
  </element>
103
140
  </define>
104
141
  </grammar>
@@ -1,6 +1,13 @@
1
1
  <boilerplate>
2
2
  <copyright-statement>
3
- <clause>
3
+ <clause>
4
+ {% if unpublished %}
5
+ <p><strong>Copyright © {{ docyear }} International Electrotechnical Commission, IEC.</strong>
6
+ All rights reserved. It is permitted to download this electronic file, to make a copy and to
7
+ print out the content for the sole purpose of preparing National Committee positions. You
8
+ may not copy or "mirror" the file or printed version of the document, or any part of it,
9
+ for any other purpose without permission in writing from IEC.
10
+ {% else %}
4
11
  <p id="boilerplate-year">
5
12
  © {{ agency }} {{ docyear }}, Published in Switzerland
6
13
  </p>
@@ -20,6 +27,7 @@
20
27
  Fax&#xa0;&#xa0;+ 41 22 919 03 00<br/>
21
28
  info@iec.ch<br/>
22
29
  www.iec.ch
30
+ {% endif %}
23
31
  </p>
24
32
  </clause>
25
33
  </copyright-statement>
@@ -41,21 +49,37 @@
41
49
  {% if unpublished %}
42
50
  <license-statement>
43
51
  <clause>
44
- <title>Warning for CDs, CDVs and FDISs</title>
45
-
46
- <p>This
47
- document is not an IEC International Standard. It is distributed for review and
48
- comment. It is subject to change without notice and may not be referred to as
49
- an International Standard.</p>
50
-
51
- <p>Recipients
52
- of this draft are invited to submit, with their comments, notification of any
53
- relevant patent rights of which they are aware and to provide supporting
54
- documentation.</p>
52
+ {% if stage_int < 50 %}
53
+ <p>This document is still under study and subject to change. It should not be used for reference purposes.</p>
54
+ until published as such.</p>
55
+ {% endif %}
56
+ {% if stage_int >= 50 %}
57
+ <p>This document is a draft distributed for approval. It may not be referred to as an International Standard
58
+ until published as such.</p>
59
+ {% endif %}
60
+ {% if stage_int >= 50 %}
61
+ <p>In addition to their evaluation as being acceptable for industrial, technological, commercial and user
62
+ purposes, Final Draft International Standards may on occasion have to be considered in the light of their
63
+ potential to become standards to which reference may be made in national regulations.</p>
64
+ {% endif %}
65
+ <p>Recipients of this document are invited to submit, with their comments, notification of any relevant
66
+ patent rights of which they are aware and to provide supporting documentation.</p>
55
67
  </clause>
56
68
  </license-statement>
57
69
  {% endif %}
58
70
  <feedback-statement>
71
+ {% if unpublished %}
72
+ <clause id="boilerplate-cenelec-attention">
73
+ <title>Attention IEC-CENELEC parallel voting</title>
74
+ <p>The attention of IEC National Committees, members of CENELEC, is drawn to the fact that this
75
+ {% if stage_int >= 30 and stage_int < 40 %}Committee Draft{% endif %}
76
+ {% if stage_int >= 40 and stage_int < 50 %}Committee Draft For Vote{% endif %}
77
+ {% if stage_int >= 50 and stage_int < 60 %}Final Draft International Standard{% endif %}
78
+ ({{ stageabbr }})
79
+ is submitted for parallel voting.</p>
80
+ <p>The CENELEC members are invited to vote through the CENELEC voting system.</p>
81
+ </clause>
82
+ {% else %}
59
83
  <clause>
60
84
  <title>About the IEC</title>
61
85
  <p>The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes International Standards for all electrical, electronic and related technologies.</p>
@@ -85,6 +109,7 @@
85
109
  <p>If you wish to give us your feedback on this publication or need further assistance, please contact the Customer Service Centre: <link target="mailto://csc@iec.ch">csc@iec.ch</link>.</p>
86
110
  </clause>
87
111
  </clause>
112
+ {% endif %}
88
113
  </feedback-statement>
89
114
  </boilerplate>
90
115
 
@@ -1,6 +1,13 @@
1
1
  <boilerplate>
2
2
  <copyright-statement>
3
3
  <clause>
4
+ {% if unpublished %}
5
+ <p><strong>Copyright © {{ docyear }} International Electrotechnical Commission, IEC.</strong>
6
+ All rights reserved. It is permitted to download this electronic file, to make a copy and to
7
+ print out the content for the sole purpose of preparing National Committee positions. You
8
+ may not copy or "mirror" the file or printed version of the document, or any part of it,
9
+ for any other purpose without permission in writing from IEC.
10
+ {% else %}
4
11
  <p id="boilerplate-year">
5
12
  © {{ agency }} {{ docyear }}, Publié en Suisse
6
13
  </p>
@@ -23,6 +30,7 @@ l’adresse ci-après ou au comité membre de l’IEC dans le pays du demandeur.
23
30
  info@iec.ch<br/>
24
31
  www.iec.ch
25
32
  </p>
33
+ {% endif %}
26
34
  </clause>
27
35
  </copyright-statement>
28
36
  <legal-statement>
@@ -42,15 +50,38 @@ l’adresse ci-après ou au comité membre de l’IEC dans le pays du demandeur.
42
50
  </legal-statement>
43
51
  {% if unpublished %}
44
52
  <license-statement>
45
- <clause>
46
- <title>Avertissement</title>
47
-
48
- <p>Ce document n'est pas une Norme internationale de l'ISO. Il est distribué pour examen et observations. Il est susceptible de modification sans préavis et ne peut être cité comme Norme internationale.</p>
49
- <p>Les destinataires du présent projet sont invités à présenter, avec leurs observations, notification des droits de propriété dont ils auraient éventuellement connaissance et à fournir une documentation explicative.</p>
50
- </clause>
53
+ <clause>
54
+ {% if stage_int < 40 %}
55
+ <p>This document is still under study and subject to change. It should not be used for reference purposes.</p>
56
+ until published as such.</p>
57
+ {% endif %}
58
+ {% if stage_int >= 40 %}
59
+ <p>This document is a draft distributed for approval. It may not be referred to as an International Standard
60
+ until published as such.</p>
61
+ {% endif %}
62
+ {% if stage_int >= 50 %}
63
+ <p>In addition to their evaluation as being acceptable for industrial, technological, commercial and user
64
+ purposes, Final Draft International Standards may on occasion have to be considered in the light of their
65
+ potential to become standards to which reference may be made in national regulations.</p>
66
+ {% endif %}
67
+ <p>Recipients of this document are invited to submit, with their comments, notification of any relevant
68
+ patent rights of which they are aware and to provide supporting documentation.</p>
69
+ </clause>
51
70
  </license-statement>
52
71
  {% endif %}
53
72
  <feedback-statement>
73
+ {% if unpublished %}
74
+ <clause id="boilerplate-cenelec-attention">
75
+ <title>Attention IEC-CENELEC parallel voting</title>
76
+ <p>The attention of IEC National Committees, members of CENELEC, is drawn to the fact that this
77
+ {% if stage_int >= 30 and stage_int < 40 %}Committee Draft{% endif %}
78
+ {% if stage_int >= 40 and stage_int < 50 %}Committee Draft For Vote{% endif %}
79
+ {% if stage_int >= 50 and stage_int < 60 %}Final Draft International Standard{% endif %}
80
+ ({{ stageabbr }})
81
+ is submitted for parallel voting.</p>
82
+ <p>The CENELEC members are invited to vote through the CENELEC voting system.</p>
83
+ </clause>
84
+ {% else %}
54
85
  <clause>
55
86
  <title>A propos de l'IEC</title>
56
87
  <p>La Commission Electrotechnique Internationale (IEC) est la première organisation mondiale qui élabore et publie des Normes internationales pour tout ce qui a trait à l'électricité, à l'électronique et aux technologies apparentées.</p>
@@ -80,6 +111,7 @@ l’adresse ci-après ou au comité membre de l’IEC dans le pays du demandeur.
80
111
  <p>Si vous désirez nous donner des commentaires sur cette publication ou si vous avez des questions contactez-nous: <link target="mailto://csc@iec.ch">csc@iec.ch</link>.</p>
81
112
  </clause>
82
113
  </clause>
114
+ {% endif %}
83
115
  </feedback-statement>
84
116
  </boilerplate>
85
117