metanorma-iec 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -2
- data/lib/isodoc/iec/html/htmlstyle.css +28 -22
- data/lib/isodoc/iec/html/htmlstyle.scss +23 -22
- data/lib/isodoc/iec/html/isodoc.css +19 -11
- data/lib/isodoc/iec/html/isodoc.scss +21 -12
- data/lib/isodoc/iec/i18n.rb +1 -1
- data/lib/isodoc/iec/iec.international-standard.xsl +218 -147
- data/lib/isodoc/iec/presentation_xml_convert.rb +6 -4
- data/lib/isodoc/iec/word_convert.rb +1 -1
- data/lib/metanorma/iec/biblio.rng +32 -34
- data/lib/metanorma/iec/converter.rb +5 -0
- data/lib/metanorma/iec/front.rb +2 -0
- data/lib/metanorma/iec/isodoc.rng +9 -0
- data/lib/metanorma/iec/isostandard.rng +35 -12
- data/lib/metanorma/iec/version.rb +1 -1
- data/spec/isodoc/blocks_spec.rb +37 -0
- data/spec/isodoc/iev_spec.rb +6 -4
- data/spec/isodoc/metadata_spec.rb +235 -261
- data/spec/isodoc/postproc_spec.rb +0 -4
- data/spec/isodoc/section_spec.rb +121 -91
- data/spec/metanorma/base_spec.rb +11 -4
- data/spec/metanorma/cleanup_spec.rb +1 -0
- data/spec/metanorma/iev_spec.rb +3 -0
- data/spec/spec_helper.rb +2 -1
- metadata +3 -3
@@ -614,12 +614,12 @@
|
|
614
614
|
<optional>
|
615
615
|
<ref name="fetched"/>
|
616
616
|
</optional>
|
617
|
-
<
|
618
|
-
<oneOrMore>
|
619
|
-
<ref name="btitle"/>
|
620
|
-
</oneOrMore>
|
617
|
+
<optional>
|
621
618
|
<ref name="formattedref"/>
|
622
|
-
</
|
619
|
+
</optional>
|
620
|
+
<oneOrMore>
|
621
|
+
<ref name="btitle"/>
|
622
|
+
</oneOrMore>
|
623
623
|
<zeroOrMore>
|
624
624
|
<ref name="bsource"/>
|
625
625
|
</zeroOrMore>
|
@@ -986,36 +986,34 @@
|
|
986
986
|
<ref name="SeriesType"/>
|
987
987
|
</attribute>
|
988
988
|
</optional>
|
989
|
-
<
|
989
|
+
<optional>
|
990
990
|
<ref name="formattedref"/>
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
</group>
|
1018
|
-
</choice>
|
991
|
+
</optional>
|
992
|
+
<ref name="btitle"/>
|
993
|
+
<optional>
|
994
|
+
<ref name="bplace"/>
|
995
|
+
</optional>
|
996
|
+
<optional>
|
997
|
+
<ref name="seriesorganization"/>
|
998
|
+
</optional>
|
999
|
+
<optional>
|
1000
|
+
<ref name="abbreviation"/>
|
1001
|
+
</optional>
|
1002
|
+
<optional>
|
1003
|
+
<ref name="seriesfrom"/>
|
1004
|
+
</optional>
|
1005
|
+
<optional>
|
1006
|
+
<ref name="seriesto"/>
|
1007
|
+
</optional>
|
1008
|
+
<optional>
|
1009
|
+
<ref name="seriesnumber"/>
|
1010
|
+
</optional>
|
1011
|
+
<optional>
|
1012
|
+
<ref name="seriespartnumber"/>
|
1013
|
+
</optional>
|
1014
|
+
<optional>
|
1015
|
+
<ref name="seriesrun"/>
|
1016
|
+
</optional>
|
1019
1017
|
</element>
|
1020
1018
|
</define>
|
1021
1019
|
<define name="SeriesType">
|
data/lib/metanorma/iec/front.rb
CHANGED
@@ -282,6 +282,9 @@
|
|
282
282
|
<ref name="MultilingualRenderingType"/>
|
283
283
|
</attribute>
|
284
284
|
</optional>
|
285
|
+
<optional>
|
286
|
+
<ref name="tname"/>
|
287
|
+
</optional>
|
285
288
|
<oneOrMore>
|
286
289
|
<ref name="ul_li"/>
|
287
290
|
</oneOrMore>
|
@@ -324,6 +327,9 @@
|
|
324
327
|
</choice>
|
325
328
|
</attribute>
|
326
329
|
</optional>
|
330
|
+
<optional>
|
331
|
+
<ref name="tname"/>
|
332
|
+
</optional>
|
327
333
|
<oneOrMore>
|
328
334
|
<ref name="li"/>
|
329
335
|
</oneOrMore>
|
@@ -360,6 +366,9 @@
|
|
360
366
|
<ref name="MultilingualRenderingType"/>
|
361
367
|
</attribute>
|
362
368
|
</optional>
|
369
|
+
<optional>
|
370
|
+
<ref name="tname"/>
|
371
|
+
</optional>
|
363
372
|
<oneOrMore>
|
364
373
|
<ref name="dt"/>
|
365
374
|
<ref name="dd"/>
|
@@ -45,6 +45,7 @@
|
|
45
45
|
<ref name="horizontal"/>
|
46
46
|
</optional>
|
47
47
|
<ref name="editorialgroup"/>
|
48
|
+
<ref name="approvalgroup"/>
|
48
49
|
<zeroOrMore>
|
49
50
|
<ref name="ics"/>
|
50
51
|
</zeroOrMore>
|
@@ -249,6 +250,7 @@
|
|
249
250
|
<value>warning</value>
|
250
251
|
<value>important</value>
|
251
252
|
<value>safety precautions</value>
|
253
|
+
<value>editorial</value>
|
252
254
|
</choice>
|
253
255
|
</define>
|
254
256
|
<define name="preface">
|
@@ -308,18 +310,7 @@
|
|
308
310
|
</define>
|
309
311
|
<define name="editorialgroup">
|
310
312
|
<element name="editorialgroup">
|
311
|
-
<
|
312
|
-
<ref name="technical-committee"/>
|
313
|
-
</oneOrMore>
|
314
|
-
<zeroOrMore>
|
315
|
-
<ref name="subcommittee"/>
|
316
|
-
</zeroOrMore>
|
317
|
-
<zeroOrMore>
|
318
|
-
<ref name="workgroup"/>
|
319
|
-
</zeroOrMore>
|
320
|
-
<optional>
|
321
|
-
<ref name="secretariat"/>
|
322
|
-
</optional>
|
313
|
+
<ref name="ISOProjectGroup"/>
|
323
314
|
</element>
|
324
315
|
</define>
|
325
316
|
<define name="Content-Section">
|
@@ -367,6 +358,33 @@
|
|
367
358
|
</define>
|
368
359
|
</include>
|
369
360
|
<!-- end overrides -->
|
361
|
+
<define name="ISOProjectGroup">
|
362
|
+
<zeroOrMore>
|
363
|
+
<ref name="agency"/>
|
364
|
+
</zeroOrMore>
|
365
|
+
<oneOrMore>
|
366
|
+
<ref name="technical-committee"/>
|
367
|
+
</oneOrMore>
|
368
|
+
<zeroOrMore>
|
369
|
+
<ref name="subcommittee"/>
|
370
|
+
</zeroOrMore>
|
371
|
+
<zeroOrMore>
|
372
|
+
<ref name="workgroup"/>
|
373
|
+
</zeroOrMore>
|
374
|
+
<optional>
|
375
|
+
<ref name="secretariat"/>
|
376
|
+
</optional>
|
377
|
+
</define>
|
378
|
+
<define name="approvalgroup">
|
379
|
+
<element name="approvalgroup">
|
380
|
+
<ref name="ISOProjectGroup"/>
|
381
|
+
</element>
|
382
|
+
</define>
|
383
|
+
<define name="agency">
|
384
|
+
<element name="agency">
|
385
|
+
<text/>
|
386
|
+
</element>
|
387
|
+
</define>
|
370
388
|
<!--
|
371
389
|
We display the Normative References between scope and terms; but to keep the
|
372
390
|
grammar simple, we keep the references together
|
@@ -428,6 +446,11 @@
|
|
428
446
|
<data type="int"/>
|
429
447
|
</element>
|
430
448
|
</define>
|
449
|
+
<define name="approvalgroup">
|
450
|
+
<element name="approvalgroup">
|
451
|
+
<ref name="IsoWorkgroup"/>
|
452
|
+
</element>
|
453
|
+
</define>
|
431
454
|
<define name="subcommittee">
|
432
455
|
<element name="subcommittee">
|
433
456
|
<ref name="IsoWorkgroup"/>
|
data/spec/isodoc/blocks_spec.rb
CHANGED
@@ -160,4 +160,41 @@ RSpec.describe IsoDoc::Iec do
|
|
160
160
|
.gsub(%r{</body>.*}m, "</body>")))
|
161
161
|
.to be_equivalent_to xmlpp(output)
|
162
162
|
end
|
163
|
+
|
164
|
+
it "does not ignore intervening ul in numbering ol" do
|
165
|
+
input = <<~INPUT
|
166
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
167
|
+
<preface><foreword>
|
168
|
+
<ul>
|
169
|
+
<li>A</li>
|
170
|
+
<li>
|
171
|
+
<ol>
|
172
|
+
<li>List</li>
|
173
|
+
</ol>
|
174
|
+
</li>
|
175
|
+
</ul>
|
176
|
+
</foreword></preface>
|
177
|
+
</iso-standard>
|
178
|
+
INPUT
|
179
|
+
presxml = <<~INPUT
|
180
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
|
181
|
+
<preface>
|
182
|
+
<foreword displayorder='1'>
|
183
|
+
<ul>
|
184
|
+
<li>A</li>
|
185
|
+
<li>
|
186
|
+
<ol type='arabic'>
|
187
|
+
<li>List</li>
|
188
|
+
</ol>
|
189
|
+
</li>
|
190
|
+
</ul>
|
191
|
+
</foreword>
|
192
|
+
</preface>
|
193
|
+
</iso-standard>
|
194
|
+
INPUT
|
195
|
+
expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
|
196
|
+
.convert("test", input, true)))
|
197
|
+
.to be_equivalent_to xmlpp(presxml)
|
198
|
+
|
199
|
+
end
|
163
200
|
end
|
data/spec/isodoc/iev_spec.rb
CHANGED
@@ -109,7 +109,7 @@ RSpec.describe IsoDoc do
|
|
109
109
|
</owner>
|
110
110
|
</copyright>
|
111
111
|
<ext>
|
112
|
-
<doctype>
|
112
|
+
<doctype>international-standard</doctype>
|
113
113
|
<editorialgroup>
|
114
114
|
<technical-committee/>
|
115
115
|
<subcommittee/>
|
@@ -170,7 +170,7 @@ RSpec.describe IsoDoc do
|
|
170
170
|
<status>
|
171
171
|
<stage language="">60</stage>
|
172
172
|
<stage language='fr'>Norme internationale</stage>
|
173
|
-
<stage language='en'>International
|
173
|
+
<stage language='en'>International Standard</stage>
|
174
174
|
<substage>60</substage>
|
175
175
|
</status>
|
176
176
|
<copyright>
|
@@ -183,8 +183,10 @@ RSpec.describe IsoDoc do
|
|
183
183
|
</owner>
|
184
184
|
</copyright>
|
185
185
|
<ext>
|
186
|
-
<doctype>
|
187
|
-
<
|
186
|
+
<doctype language=''>international-standard</doctype>
|
187
|
+
<doctype language='fr'>Norme internationale</doctype>
|
188
|
+
<doctype language='en'>International Standard</doctype>
|
189
|
+
<editorialgroup identifier=' / / '>
|
188
190
|
<technical-committee/>
|
189
191
|
<subcommittee/>
|
190
192
|
<workgroup/>
|