metanorma-iec 0.1.5 → 0.1.6

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: 19285beedbcae1700e4ec82197bdf07285cc1be95470f658b5fa0ad167fbc48a
4
- data.tar.gz: 85c416c71046b648ea059293265fd9b685dde18965ff190f9bb459ffdb7f4634
3
+ metadata.gz: 763286864b1673ad7efbe9530c3e76365f16613c84c859c57cbb3ac5467e733e
4
+ data.tar.gz: 8070859546537d9e321c7cb9d70bed07b5ed9a815bc8e4ba4079e36c7b53b615
5
5
  SHA512:
6
- metadata.gz: 5762997aa1c39fd45aba1aece6943f121bbf82f1c18cfbb0a71f1d4c400a074b113d97e711cab12c8d299a133e1ce8231cc4a41a43943341259023bd576740eb
7
- data.tar.gz: d817e627c0f5f47a50836ec4b8cbf8bc976fb28fdb56ac94e8a3e152d7087abd8c6a2000da24adc975154d55f5f70e91eb8110653605da4bea7e8213614f4236
6
+ metadata.gz: cc1681c77b64959b79c00520ca145155d6344d76e7dab18e4810d33f6982cc27efdf913853956f2028a3031a8019bbf49382cdc037682a0132fb2e869be6a7d9
7
+ data.tar.gz: 149447762adb6eee1b36ada1db22e244702d5b176fb0a8ab58353b27dffeaba278050d02098de97098553fecfb56db5c3c57a5a8894ca0203098d21538d6417d
@@ -47,19 +47,20 @@ module Asciidoctor
47
47
  xml.docidentifier dn, **attr_code(type: "iso")
48
48
  end
49
49
 
50
+ =begin
50
51
  def make_preface(x, s)
51
52
  s.previous = boilerplate(x)
52
53
  super
53
54
  end
55
+ =end
54
56
 
55
- def boilerplate(x_orig)
57
+ def boilerplate_file(x_orig)
56
58
  lang = case x_orig&.at("//bibdata/language")&.text
57
59
  when "fr" then "fr"
58
60
  else
59
61
  "en"
60
62
  end
61
- file = File.join(File.dirname(__FILE__),"iec_intro_#{lang}.xml")
62
- File.read(file, encoding: "UTF-8")
63
+ File.join(@libdir, "iec_intro_#{lang}.xml")
63
64
  end
64
65
 
65
66
  def doctype_validate(xmldoc)
@@ -175,9 +176,6 @@ module Asciidoctor
175
176
  super.merge(y)
176
177
  end
177
178
 
178
- def initial_boilerplate(xmldoc)
179
- end
180
-
181
179
  def makexml1(node)
182
180
  result = ["<?xml version='1.0' encoding='UTF-8'?>\n<iec-standard>"]
183
181
  result << noko { |ixml| front node, ixml }
@@ -1,5 +1,33 @@
1
1
  <boilerplate>
2
- <legal-statement>
2
+ <copyright-statement>
3
+ <clause>
4
+ <p id="boilerplate-year">
5
+ &copy; {{ agency }} {{ docyear }}, Published in Switzerland
6
+ </p>
7
+
8
+ <p id="boilerplate-message">
9
+ All rights
10
+ reserved. Unless otherwise specified, no part of this publication may be
11
+ reproduced or utilized otherwise in any form or by any means, electronic or
12
+ mechanical, including photocopying, or posting on the internet or an intranet,
13
+ without prior written permission. Permission can be requested from either IEC
14
+ at the address below or IEC's member body in the country of the requester.
15
+ </p>
16
+
17
+ <p id="boilerplate-name">IEC Central Office</p>
18
+
19
+ <p id="boilerplate-address" align="left">
20
+ 3, rue de Varemb&eacute;<br/>
21
+ CH-1211 Geneva 20, Switzerland<br/>
22
+ Tel.&nbsp;&nbsp;+ 41 22 919 02 11<br/>
23
+ Fax&nbsp;&nbsp;+ 41 22 919 03 00<br/>
24
+ info@iec.ch<br/>
25
+ www.iec.ch
26
+ </p>
27
+ </clause>
28
+ </copyright-statement>
29
+ <legal-statement>
30
+ <clause>
3
31
  <ol>
4
32
  <li><p>The International Electrotechnical Commission (IEC) is a worldwide organization for standardization comprising all national electrotechnical committees (IEC National Committees). The object of IEC is to promote international co-operation on all questions concerning standardization in the electrical and electronic fields. To this end and in addition to other activities, IEC publishes International Standards, Technical Specifications, Technical Reports, Publicly Available Specifications (PAS) and Guides (hereafter referred to as “IEC Publication(s)”). Their preparation is entrusted to technical committees; any IEC National Committee interested in the subject dealt with may participate in this preparatory work. International, governmental and non-governmental organizations liaising with the IEC also participate in this preparation. IEC collaborates closely with the International Organization for Standardization (ISO) in accordance with conditions determined by agreement between the two organizations.</p></li>
5
33
  <li><p>The formal decisions or agreements of IEC on technical matters express, as nearly as possible, an international consensus of opinion on the relevant subjects since each technical committee has representation from all interested IEC National Committees.</p></li>
@@ -10,6 +38,24 @@
10
38
  <li><p>No liability shall attach to IEC or its directors, employees, servants or agents including individual experts and members of its technical committees and IEC National Committees for any personal injury, property damage or other damage of any nature whatsoever, whether direct or indirect, or for costs (including legal fees) and expenses arising out of the publication, use of, or reliance upon, this IEC Publication or any other IEC Publications.</p></li>
11
39
  <li><p>Attention is drawn to the Normative references cited in this publication. Use of the referenced publications is indispensable for the correct application of this publication.</p></li>
12
40
  <li><p>Attention is drawn to the possibility that some of the elements of this IEC Publication may be the subject of patent rights. IEC shall not be held responsible for identifying any or all such patent rights.</p></li>
13
- </ol>
41
+ </ol>
42
+ </clause>
14
43
  </legal-statement>
44
+ {% if unpublished %}
45
+ <license-statement>
46
+ <clause>
47
+ <title>Warning for CDs, CDVs and FDISs</title>
48
+
49
+ <p>This
50
+ document is not an IEC International Standard. It is distributed for review and
51
+ comment. It is subject to change without notice and may not be referred to as
52
+ an International Standard.</p>
53
+
54
+ <p>Recipients
55
+ of this draft are invited to submit, with their comments, notification of any
56
+ relevant patent rights of which they are aware and to provide supporting
57
+ documentation.</p>
58
+ </clause>
59
+ </license-statement>
60
+ {% endif %}
15
61
  </boilerplate>
@@ -1,5 +1,33 @@
1
1
  <boilerplate>
2
- <legal-statement>
2
+ <copyright-statement>
3
+ <clause>
4
+ <p id="boilerplate-year">
5
+ &copy; {{ agency }} {{ docyear }}, Published in Switzerland
6
+ </p>
7
+
8
+ <p id="boilerplate-message">
9
+ All rights
10
+ reserved. Unless otherwise specified, no part of this publication may be
11
+ reproduced or utilized otherwise in any form or by any means, electronic or
12
+ mechanical, including photocopying, or posting on the internet or an intranet,
13
+ without prior written permission. Permission can be requested from either IEC
14
+ at the address below or IEC's member body in the country of the requester.
15
+ </p>
16
+
17
+ <p id="boilerplate-name">IEC Central Office</p>
18
+
19
+ <p id="boilerplate-address" align="left">
20
+ 3, rue de Varemb&eacute;<br/>
21
+ CH-1211 Geneva 20, Switzerland<br/>
22
+ Tel.&nbsp;&nbsp;+ 41 22 919 02 11<br/>
23
+ Fax&nbsp;&nbsp;+ 41 22 919 03 00<br/>
24
+ info@iec.ch<br/>
25
+ www.iec.ch
26
+ </p>
27
+ </clause>
28
+ </copyright-statement>
29
+ <legal-statement>
30
+ <clause>
3
31
  <ol>
4
32
  <li><p>La Commission Electrotechnique Internationale (IEC) est une organisation mondiale de normalisation composée de l'ensemble des comités électrotechniques nationaux (Comités nationaux de l’IEC). L’IEC a pour objet de favoriser la coopération internationale pour toutes les questions de normalisation dans les domaines de l'électricité et de l'électronique. A cet effet, l’IEC – entre autres activités – publie des Normes internationales, des Spécifications techniques, des Rapports techniques, des Spécifications accessibles au public (PAS) et des Guides (ci-après dénommés "Publication(s) de l’IEC"). Leur élaboration est confiée à des comités d'études, aux travaux desquels tout Comité national intéressé par le sujet traité peut participer. Les organisations internationales, gouvernementales et non gouvernementales, en liaison avec l’IEC, participent également aux travaux. L’IEC collabore étroitement avec l'Organisation Internationale de Normalisation (ISO), selon des conditions fixées par accord entre les deux organisations.</p></li>
5
33
  <li><p>Les décisions ou accords officiels de l’IEC concernant les questions techniques représentent, dans la mesure du possible, un accord international sur les sujets étudiés, étant donné que les Comités nationaux de l’IEC intéressés sont représentés dans chaque comité d’études.</p></li>
@@ -10,6 +38,24 @@
10
38
  <li><p>Aucune responsabilité ne doit être imputée à l’IEC, à ses administrateurs, employés, auxiliaires ou mandataires, y compris ses experts particuliers et les membres de ses comités d'études et des Comités nationaux de l’IEC, pour tout préjudice causé en cas de dommages corporels et matériels, ou de tout autre dommage de quelque nature que ce soit, directe ou indirecte, ou pour supporter les coûts (y compris les frais de justice) et les dépenses découlant de la publication ou de l'utilisation de cette Publication de l’IEC ou de toute autre Publication de l’IEC, ou au crédit qui lui est accordé.</p></li>
11
39
  <li><p>L'attention est attirée sur les références normatives citées dans cette publication. L'utilisation de publications référencées est obligatoire pour une application correcte de la présente publication.</p></li>
12
40
  <li><p>L’attention est attirée sur le fait que certains des éléments de la présente Publication de l’IEC peuvent faire l’objet de droits de brevet. L’IEC ne saurait être tenue pour responsable de ne pas avoir identifié de tels droits de brevets et de ne pas avoir signalé leur existence.</p></li>
13
- </ol>
41
+ </ol>
42
+ </clause>
14
43
  </legal-statement>
44
+ {% if unpublished %}
45
+ <license-statement>
46
+ <clause>
47
+ <title>Warning for CDs, CDVs and FDISs</title>
48
+
49
+ <p>This
50
+ document is not an IEC International Standard. It is distributed for review and
51
+ comment. It is subject to change without notice and may not be referred to as
52
+ an International Standard.</p>
53
+
54
+ <p>Recipients
55
+ of this draft are invited to submit, with their comments, notification of any
56
+ relevant patent rights of which they are aware and to provide supporting
57
+ documentation.</p>
58
+ </clause>
59
+ </license-statement>
60
+ {% endif %}
15
61
  </boilerplate>
@@ -1,30 +1,4 @@
1
- <div class="copyright">
2
- <p class="year">
3
- &copy; {{ agency }} {{ docyear }}, Published in Switzerland
4
- </p>
5
-
6
- <p class="message">
7
- All rights
8
- reserved. Unless otherwise specified, no part of this publication may be
9
- reproduced or utilized otherwise in any form or by any means, electronic or
10
- mechanical, including photocopying, or posting on the internet or an intranet,
11
- without prior written permission. Permission can be requested from either IEC
12
- at the address below or IEC’s member body in the country of the requester.
13
- </p>
14
-
15
- <p class="name">IEC Central Office</p>
16
- <p class="address">
17
- 3, rue de Varemb&eacute;<br/>
18
- CH-1211 Geneva 20, Switzerland<br/>
19
- Tel.&nbsp;&nbsp;+ 41 22 919 02 11<br/>
20
- Fax&nbsp;&nbsp;+ 41 22 919 03 00<br/>
21
- info@iec.ch<br/>
22
- www.iec.ch
23
- </p>
24
- </div>
25
-
26
-
27
- </div>
1
+ <div id="boilerplate-copyright-destination"/>
28
2
 
29
3
  <nav>
30
4
 
@@ -40,23 +40,7 @@ name="CVP_Secretariat_Loca">Secretariat</a>: {{ secretariat }}</p>
40
40
  {% endif %}
41
41
  </div>
42
42
 
43
- {% if unpublished %}
44
43
  <div class="coverpage_warning">
45
-
46
- <p>Warning for CDs, CDVs
47
- and FDISs<o:p></o:p></span></b></p>
48
-
49
- <p>This
50
- document is not an IEC International Standard. It is distributed for review and
51
- comment. It is subject to change without notice and may not be referred to as
52
- an International Standard.</p>
53
-
54
- <p>Recipients
55
- of this draft are invited to submit, with their comments, notification of any
56
- relevant patent rights of which they are aware and to provide supporting
57
- documentation.</p>
58
-
44
+ <div id="boilerplate-license-destination"/>
59
45
  </div>
60
- {% endif %}
61
-
62
46
 
@@ -205,14 +205,13 @@ span.partlabel {
205
205
  padding-bottom: 1em;
206
206
  }
207
207
 
208
- .copyright .year, .copyright .message,
209
- .copyright .name, .copyright .address {
208
+ .boilerplate-copyright p {
210
209
  margin-top: 1em;
211
210
  display: block;
212
211
  }
213
212
 
214
- .copyright .message, .copyright .name,
215
- .copyright .address {
213
+ #boilerplate-message, #boilerplate-name,
214
+ #boilerplate-address {
216
215
  font-size: 0.9em;
217
216
  }
218
217
 
@@ -269,6 +269,29 @@ p.IntroTitle, li.IntroTitle, div.IntroTitle, h1.IntroTitle
269
269
  letter-spacing:.4pt;
270
270
  mso-ansi-language:EN-GB;
271
271
  mso-fareast-language:ZH-CN;}
272
+ p.TitlePageSubhead, li.TitlePageSubhead, div.TitlePageSubhead {
273
+ mso-style-unhide:no;
274
+ mso-style-qformat:yes;
275
+ mso-style-parent:Normal;
276
+ mso-style-next:Normal;
277
+ margin-top:0cm;
278
+ margin-right:0cm;
279
+ margin-bottom:10.0pt;
280
+ margin-left:0cm;
281
+ text-align:center;
282
+ text-indent:0pt;
283
+ mso-pagination:widow-orphan;
284
+ page-break-after:avoid;
285
+ mso-hyphenate:none;
286
+ layout-grid-mode:char;
287
+ font-size:12.0pt;
288
+ mso-bidi-font-size:10.0pt;
289
+ font-family:"Arial",sans-serif;
290
+ mso-fareast-font-family:"Times New Roman";
291
+ letter-spacing:.4pt;
292
+ mso-ansi-language:EN-GB;
293
+ mso-fareast-language:ZH-CN
294
+ }
272
295
  /* IEC: TERM */
273
296
  p.Terms, li.Terms, div.Terms
274
297
  {mso-style-name:"Term\(s\)";
@@ -1271,7 +1271,6 @@ p.MsoIndexHeading, li.MsoIndexHeading, div.MsoIndexHeading
1271
1271
  mso-endnote-separator:url("file:///C:/Doc/FILENAME_files/header.html") es;
1272
1272
  mso-endnote-continuation-separator:url("file:///C:/Doc/FILENAME_files/header.html") ecs;
1273
1273
  mso-facing-pages:yes;
1274
- mso-page-orientation: portrait;
1275
1274
  {% if stageabbr == "CD" or stageabbr == "CDV" %}
1276
1275
  mso-line-numbers-count-by:1;
1277
1276
  mso-line-numbers-restart:continuous;
@@ -1301,6 +1300,30 @@ div.WordSection1
1301
1300
  mso-first-header:url("file:///C:/Doc/FILENAME_files/header.html") fh2;
1302
1301
  mso-first-footer:url("file:///C:/Doc/FILENAME_files/header.html") ff2;
1303
1302
  mso-paper-source:0;}
1303
+ @page WordSection2L
1304
+ {size:841.9pt 595.3pt;
1305
+ margin:3.0cm 2.5cm 1.5cm 2.5cm;
1306
+ mso-header-margin:35.45pt;
1307
+ mso-footer-margin:14.2pt;
1308
+ mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1309
+ mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2;
1310
+ mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") ef2;
1311
+ mso-footer:url("file:///C:/Doc/FILENAME_files/header.html") f2;
1312
+ mso-first-header:url("file:///C:/Doc/FILENAME_files/header.html") fh2;
1313
+ mso-first-footer:url("file:///C:/Doc/FILENAME_files/header.html") ff2;
1314
+ mso-paper-source:0;}
1315
+ @page WordSection2P
1316
+ {size:595.3pt 841.9pt;
1317
+ margin:3.0cm 2.5cm 1.5cm 2.5cm;
1318
+ mso-header-margin:35.45pt;
1319
+ mso-footer-margin:14.2pt;
1320
+ mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1321
+ mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2;
1322
+ mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") ef2;
1323
+ mso-footer:url("file:///C:/Doc/FILENAME_files/header.html") f2;
1324
+ mso-first-header:url("file:///C:/Doc/FILENAME_files/header.html") fh2;
1325
+ mso-first-footer:url("file:///C:/Doc/FILENAME_files/header.html") ff2;
1326
+ mso-paper-source:0;}
1304
1327
  div.WordSection2
1305
1328
  {page:WordSection2;}
1306
1329
  @page WordSection3
@@ -1316,6 +1339,30 @@ div.WordSection2
1316
1339
  mso-first-header:url("file:///C:/Doc/FILENAME_files/header.html") fh3;
1317
1340
  mso-first-footer:url("file:///C:/Doc/FILENAME_files/header.html") ff3;
1318
1341
  mso-paper-source:0;}
1342
+ @page WordSection3L
1343
+ {size:841.9pt 595.3pt;
1344
+ margin:3.0cm 2.5cm 1.5cm 2.5cm;
1345
+ mso-header-margin:35.45pt;
1346
+ mso-footer-margin:14.2pt;
1347
+ mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1348
+ mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2;
1349
+ mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") ef3;
1350
+ mso-footer:url("file:///C:/Doc/FILENAME_files/header.html") f3;
1351
+ mso-first-header:url("file:///C:/Doc/FILENAME_files/header.html") fh3;
1352
+ mso-first-footer:url("file:///C:/Doc/FILENAME_files/header.html") ff3;
1353
+ mso-paper-source:0;}
1354
+ @page WordSection3P
1355
+ {size:595.3pt 841.9pt;
1356
+ margin:3.0cm 2.5cm 1.5cm 2.5cm;
1357
+ mso-header-margin:35.45pt;
1358
+ mso-footer-margin:14.2pt;
1359
+ mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1360
+ mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2;
1361
+ mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") ef3;
1362
+ mso-footer:url("file:///C:/Doc/FILENAME_files/header.html") f3;
1363
+ mso-first-header:url("file:///C:/Doc/FILENAME_files/header.html") fh3;
1364
+ mso-first-footer:url("file:///C:/Doc/FILENAME_files/header.html") ff3;
1365
+ mso-paper-source:0;}
1319
1366
  div.WordSection3
1320
1367
  {page:WordSection3;}
1321
1368
  @page WordSection4
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
6
6
 
@@ -161,7 +161,7 @@ RSpec.describe Asciidoctor::Iec do
161
161
  </structuredidentifier>
162
162
  </ext>
163
163
  </bibdata>
164
- #{BOILERPLATE}
164
+ #{UNPUBLISHED_BOILERPLATE}
165
165
  <sections/>
166
166
  </iec-standard>
167
167
  OUTPUT
@@ -276,7 +276,7 @@ RSpec.describe Asciidoctor::Iec do
276
276
  </structuredidentifier>
277
277
  </ext>
278
278
  </bibdata>
279
- #{BOILERPLATE}
279
+ #{UNPUBLISHED_BOILERPLATE.sub(/IEC #{Date.today.year}/, "ISO/IEC/IETF 2001")}
280
280
  <sections/>
281
281
  </iec-standard>
282
282
  OUTPUT
@@ -379,7 +379,7 @@ RSpec.describe Asciidoctor::Iec do
379
379
  </structuredidentifier>
380
380
  </ext>
381
381
  </bibdata>
382
- #{BOILERPLATE}
382
+ #{UNPUBLISHED_BOILERPLATE}
383
383
  <sections/>
384
384
  </iec-standard>
385
385
  OUTPUT
@@ -111,7 +111,7 @@ RSpec.describe Asciidoctor::Iec do
111
111
  <sections>
112
112
  <terms id="_" obligation="normative">
113
113
  <title>Terms and definitions</title>
114
- <p>For the purposes of this document, the following terms and definitions apply.</p>
114
+ <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
115
115
  #{TERMS_BOILERPLATE}
116
116
  <term id="_">
117
117
  <preferred>Term1</preferred>
@@ -222,7 +222,7 @@ RSpec.describe Asciidoctor::Iec do
222
222
  <sections>
223
223
  <terms id="_" obligation="normative">
224
224
  <title>Terms and definitions</title>
225
- <p>For the purposes of this document, the following terms and definitions apply.</p>
225
+ <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
226
226
  #{TERMS_BOILERPLATE}
227
227
  <term id="_">
228
228
  <preferred>Term1</preferred>
@@ -424,7 +424,7 @@ RSpec.describe Asciidoctor::Iec do
424
424
  <sections>
425
425
  <terms id="_" obligation="normative">
426
426
  <title>Terms and definitions</title>
427
- <p>For the purposes of this document, the following terms and definitions apply.</p>
427
+ <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
428
428
  #{TERMS_BOILERPLATE}
429
429
  <term id="_">
430
430
  <preferred>Term1</preferred>
@@ -452,7 +452,7 @@ RSpec.describe Asciidoctor::Iec do
452
452
  <sections>
453
453
  <terms id="_" obligation="normative">
454
454
  <title>Terms and definitions</title>
455
- <p>For the purposes of this document, the following terms and definitions apply.</p>
455
+ <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
456
456
  #{TERMS_BOILERPLATE}
457
457
  <term id="_">
458
458
  <preferred>Term1</preferred>
@@ -31,7 +31,7 @@ RSpec.describe Asciidoctor::Iec do
31
31
  <sections>
32
32
  <terms id="_" obligation="normative">
33
33
  <title>Terms and definitions</title>
34
- <p>For the purposes of this document,
34
+ <p id="_">For the purposes of this document,
35
35
  the following terms and definitions apply.</p>
36
36
  #{TERMS_BOILERPLATE}
37
37
  <term id="_"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>90</mn></msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>91</mn></msub></math></stem></admitted>
@@ -67,7 +67,7 @@ RSpec.describe Asciidoctor::Iec do
67
67
  <sections>
68
68
  <terms id="_" obligation="normative">
69
69
  <title>Terms and definitions</title>
70
- <p>For the purposes of this document,
70
+ <p id="_">For the purposes of this document,
71
71
  the following terms and definitions apply.</p>
72
72
  #{TERMS_BOILERPLATE}
73
73
  <term id="_"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>90</mn></msub></math></stem></preferred><definition><formula id="_">
@@ -96,7 +96,7 @@ RSpec.describe Asciidoctor::Iec do
96
96
  #{BLANK_HDR}
97
97
  <sections>
98
98
  <terms id="_" obligation="normative"><title>Terms and definitions</title>
99
- <p>For the purposes of this document,
99
+ <p id="_">For the purposes of this document,
100
100
  the following terms and definitions apply.</p>
101
101
  #{TERMS_BOILERPLATE}
102
102
 
@@ -158,7 +158,7 @@ RSpec.describe Asciidoctor::Iec do
158
158
  <sections>
159
159
  <terms id="_" obligation="normative">
160
160
  <title>Terms and definitions</title>
161
- <p>For the purposes of this document, the following terms and definitions apply.</p>
161
+ <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
162
162
  #{TERMS_BOILERPLATE}
163
163
  <term id="_">
164
164
  <preferred>Term1</preferred>
@@ -185,7 +185,7 @@ RSpec.describe Asciidoctor::Iec do
185
185
  #{BLANK_HDR}
186
186
  <sections></sections>
187
187
  <bibliography><references id="_" obligation="informative"><title>Normative References</title>
188
- <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
188
+ <p id="_">The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
189
189
  <bibitem id="iso216" type="standard">
190
190
  <title format="text/plain">Reference</title>
191
191
  <docidentifier>ISO 216</docidentifier>
@@ -129,7 +129,7 @@ RSpec.describe Asciidoctor::Iec do
129
129
 
130
130
  </sections><bibliography><references id="_" obligation="informative">
131
131
  <title>Normative References</title>
132
- <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
132
+ <p id="_">The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
133
133
  <bibitem id="ISO712">
134
134
  <formattedref format="application/x-isodoc+xml">Reference</formattedref>
135
135
  <docidentifier>x</docidentifier>
@@ -67,7 +67,7 @@ RSpec.describe Asciidoctor::Iec do
67
67
 
68
68
  <terms id="_" obligation="normative">
69
69
  <title>Terms and definitions</title>
70
- <p>For the purposes of this document, the following terms and definitions apply.</p>
70
+ <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
71
71
  #{TERMS_BOILERPLATE}
72
72
  <term id="_">
73
73
  <preferred>Term1</preferred>
@@ -100,7 +100,7 @@ RSpec.describe Asciidoctor::Iec do
100
100
  <appendix id="_" inline-header="false" obligation="normative">
101
101
  <title>Appendix 1</title>
102
102
  </appendix></annex><bibliography><references id="_" obligation="informative">
103
- <title>Normative References</title><p>There are no normative references in this document.</p>
103
+ <title>Normative References</title><p id="_">There are no normative references in this document.</p>
104
104
  </references><clause id="_" obligation="informative">
105
105
  <title>Bibliography</title>
106
106
  <references id="_" obligation="informative">
@@ -188,7 +188,7 @@ RSpec.describe Asciidoctor::Iec do
188
188
 
189
189
  <terms id="_" obligation="normative">
190
190
  <title>Terms and definitions</title>
191
- <p>For the purposes of this document, the following terms and definitions apply.</p>
191
+ <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
192
192
  #{TERMS_BOILERPLATE}
193
193
  <term id="_">
194
194
  <preferred>Term1</preferred>
@@ -231,7 +231,7 @@ RSpec.describe Asciidoctor::Iec do
231
231
  <bibliography>
232
232
  <references id='_' obligation='informative'>
233
233
  <title>Normative References</title>
234
- <p>There are no normative references in this document.</p>
234
+ <p id="_">There are no normative references in this document.</p>
235
235
  </references>
236
236
  <clause id='_' obligation='informative'>
237
237
  <title>Bibliography</title>
@@ -96,34 +96,47 @@ VALIDATING_BLANK_HDR = <<~"HDR"
96
96
  HDR
97
97
 
98
98
  TERMS_BOILERPLATE = <<~"BOILERPLATE"
99
- <p>ISO and IEC maintain terminological databases for use in
99
+ <p id="_">ISO and IEC maintain terminological databases for use in
100
100
  standardization at the following addresses:</p>
101
101
 
102
- <ul>
103
- <li> <p>ISO Online browsing platform: available at
102
+ <ul id="_">
103
+ <li> <p id="_">ISO Online browsing platform: available at
104
104
  <link target="http://www.iso.org/obp"/></p> </li>
105
- <li> <p>IEC Electropedia: available at
105
+ <li> <p id="_">IEC Electropedia: available at
106
106
  <link target="http://www.electropedia.org"/>
107
107
  </p> </li> </ul>
108
108
  BOILERPLATE
109
109
 
110
- BOILERPLATE = <<~"BOILERPLATE"
111
- <boilerplate>
112
- <legal-statement>
113
- <ol id="_">
114
- <li><p id="_">The International Electrotechnical Commission (IEC) is a worldwide organization for standardization comprising all national electrotechnical committees (IEC National Committees). The object of IEC is to promote international co-operation on all questions concerning standardization in the electrical and electronic fields. To this end and in addition to other activities, IEC publishes International Standards, Technical Specifications, Technical Reports, Publicly Available Specifications (PAS) and Guides (hereafter referred to as “IEC Publication(s)”). Their preparation is entrusted to technical committees; any IEC National Committee interested in the subject dealt with may participate in this preparatory work. International, governmental and non-governmental organizations liaising with the IEC also participate in this preparation. IEC collaborates closely with the International Organization for Standardization (ISO) in accordance with conditions determined by agreement between the two organizations.</p></li>
115
- <li><p id="_">The formal decisions or agreements of IEC on technical matters express, as nearly as possible, an international consensus of opinion on the relevant subjects since each technical committee has representation from all interested IEC National Committees.</p></li>
116
- <li><p id="_">IEC Publications have the form of recommendations for international use and are accepted by IEC National Committees in that sense. While all reasonable efforts are made to ensure that the technical content of IEC Publications is accurate, IEC cannot be held responsible for the way in which they are used or for any misinterpretation by any end user.</p></li>
117
- <li><p id="_">In order to promote international uniformity, IEC National Committees undertake to apply IEC Publications transparently to the maximum extent possible in their national and regional publications. Any divergence between any IEC Publication and the corresponding national or regional publication shall be clearly indicated in the latter.</p></li>
118
- <li><p id="_">IEC itself does not provide any attestation of conformity. Independent certification bodies provide conformity assessment services and, in some areas, access to IEC marks of conformity. IEC is not responsible for any services carried out by independent certification bodies.</p></li>
119
- <li><p id="_">All users should ensure that they have the latest edition of this publication.</p></li>
120
- <li><p id="_">No liability shall attach to IEC or its directors, employees, servants or agents including individual experts and members of its technical committees and IEC National Committees for any personal injury, property damage or other damage of any nature whatsoever, whether direct or indirect, or for costs (including legal fees) and expenses arising out of the publication, use of, or reliance upon, this IEC Publication or any other IEC Publications.</p></li>
121
- <li><p id="_">Attention is drawn to the Normative references cited in this publication. Use of the referenced publications is indispensable for the correct application of this publication.</p></li>
122
- <li><p id="_">Attention is drawn to the possibility that some of the elements of this IEC Publication may be the subject of patent rights. IEC shall not be held responsible for identifying any or all such patent rights.</p></li>
123
- </ol>
124
- </legal-statement>
125
- </boilerplate>
126
- BOILERPLATE
110
+ BOILERPLATE =
111
+ HTMLEntities.new.decode(
112
+ File.read(File.join(File.dirname(__FILE__), "..", "lib", "asciidoctor", "iec", "iec_intro_en.xml"), encoding: "utf-8").
113
+ gsub(/\{\{ agency \}\}/, "IEC").gsub(/\{\{ docyear \}\}/, Date.today.year.to_s).
114
+ gsub(/\{% if unpublished %\}.*\{% endif %\}/m, "").
115
+ gsub(/(?<=\p{Alnum})'(?=\p{Alpha})/, "").
116
+ gsub(/<p>/, "<p id='_'>").
117
+ gsub(/<ol>/, "<ol id='_'>")
118
+ )
119
+
120
+ BOILERPLATE_LICENSE = <<~END
121
+ <license-statement>
122
+ <clause>
123
+ <title>Warning for CDs, CDVs and FDISs</title>
124
+ <p id='_'>
125
+ This document is not an IEC International Standard. It is distributed
126
+ for review and comment. It is subject to change without notice and may
127
+ not be referred to as an International Standard.
128
+ </p>
129
+ <p id='_'>
130
+ Recipients of this draft are invited to submit, with their comments,
131
+ notification of any relevant patent rights of which they are aware and
132
+ to provide supporting documentation.
133
+ </p>
134
+ </clause>
135
+ </license-statement>
136
+ END
137
+
138
+ UNPUBLISHED_BOILERPLATE = BOILERPLATE.sub(/<\/boilerplate>/, "#{BOILERPLATE_LICENSE}</boilerplate>")
139
+
127
140
 
128
141
  BLANK_HDR = <<~"HDR"
129
142
  <?xml version="1.0" encoding="UTF-8"?>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.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: 2020-01-17 00:00:00.000000000 Z
11
+ date: 2020-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-jing