metanorma-iec 1.2.0 → 1.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iec/basicdoc.rng +23 -0
- data/lib/asciidoctor/iec/front.rb +9 -7
- data/lib/asciidoctor/iec/iec.rng +7 -0
- data/lib/asciidoctor/iec/isodoc.rng +124 -15
- data/lib/asciidoctor/iec/isostandard.rng +8 -1
- data/lib/isodoc/iec/base_convert.rb +0 -20
- data/lib/isodoc/iec/html/htmlstyle.css +1 -1
- data/lib/isodoc/iec/html/isodoc.css +16 -4
- data/lib/isodoc/iec/html/isodoc.scss +19 -4
- data/lib/isodoc/iec/html/wordstyle.css +10 -10
- data/lib/isodoc/iec/html/wordstyle.scss +15 -10
- data/lib/isodoc/iec/iec.international-standard.xsl +2462 -1555
- data/lib/metanorma/iec/version.rb +1 -1
- data/metanorma-iec.gemspec +1 -1
- data/spec/asciidoctor-iec/base_spec.rb +5 -5
- data/spec/asciidoctor-iec/cleanup_spec.rb +30 -6
- data/spec/asciidoctor-iec/iev_spec.rb +3 -3
- data/spec/asciidoctor-iec/inline_spec.rb +7 -1
- data/spec/asciidoctor-iec/validate_spec.rb +21 -1
- data/spec/assets/xref_error.adoc +7 -0
- data/spec/isodoc/blocks_spec.rb +1 -1
- data/spec/isodoc/i18n_spec.rb +13 -3
- data/spec/isodoc/iev_spec.rb +60 -8
- data/spec/isodoc/inline_spec.rb +1 -1
- data/spec/isodoc/metadata_spec.rb +2 -21
- data/spec/isodoc/ref_spec.rb +16 -13
- data/spec/isodoc/section_spec.rb +2 -2
- data/spec/isodoc/terms_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -1
- metadata +5 -4
data/spec/isodoc/ref_spec.rb
CHANGED
@@ -126,10 +126,13 @@ RSpec.describe IsoDoc::Iec do
|
|
126
126
|
INPUT
|
127
127
|
|
128
128
|
presxml = <<~OUTPUT
|
129
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
129
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
|
130
130
|
<bibdata>
|
131
131
|
<language>en</language>
|
132
132
|
</bibdata>
|
133
|
+
<local_bibdata>
|
134
|
+
<language>en</language>
|
135
|
+
</local_bibdata>
|
133
136
|
<preface><foreword>
|
134
137
|
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
|
135
138
|
<eref bibitemid="ISO712">[110]</eref>
|
@@ -314,12 +317,12 @@ RSpec.describe IsoDoc::Iec do
|
|
314
317
|
<br/>
|
315
318
|
<div>
|
316
319
|
<h1 class='Section3'>Bibliography</h1>
|
317
|
-
<p id='ISBN' class='
|
318
|
-
[1]
|
320
|
+
<p id='ISBN' class='Biblio'>
|
321
|
+
[1] 
|
319
322
|
<i>Chemicals for analytical laboratory use</i>
|
320
323
|
</p>
|
321
|
-
<p id='ISSN' class='
|
322
|
-
[2]
|
324
|
+
<p id='ISSN' class='Biblio'>
|
325
|
+
[2] 
|
323
326
|
<i>Instruments for analytical laboratory use</i>
|
324
327
|
</p>
|
325
328
|
<div class='Note'>
|
@@ -334,12 +337,12 @@ RSpec.describe IsoDoc::Iec do
|
|
334
337
|
  This is another annotation of document ISSN.
|
335
338
|
</p>
|
336
339
|
</div>
|
337
|
-
<p id='ISO3696' class='
|
338
|
-
ISO 3696,
|
340
|
+
<p id='ISO3696' class='Biblio'>
|
341
|
+
[3]  ISO 3696,
|
339
342
|
<i>Water for analytical laboratory use</i>
|
340
343
|
</p>
|
341
|
-
<p id='ref10' class='
|
342
|
-
[10]
|
344
|
+
<p id='ref10' class='Biblio'>
|
345
|
+
[10] 
|
343
346
|
<span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
|
344
347
|
.
|
345
348
|
<i>
|
@@ -351,12 +354,12 @@ RSpec.describe IsoDoc::Iec do
|
|
351
354
|
<a href='http://www.icc.or.at'>http://www.icc.or.at</a>
|
352
355
|
)
|
353
356
|
</p>
|
354
|
-
<p id='ref11' class='
|
355
|
-
IETF RFC 10,
|
357
|
+
<p id='ref11' class='Biblio'>
|
358
|
+
[5]  IETF RFC 10,
|
356
359
|
<i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
|
357
360
|
</p>
|
358
|
-
<p id='ref12' class='
|
359
|
-
Citn
|
361
|
+
<p id='ref12' class='Biblio'>
|
362
|
+
Citn  IETF RFC 20, CitationWorks. 2019.
|
360
363
|
<i>How to cite a reference</i>
|
361
364
|
.
|
362
365
|
</p>
|
data/spec/isodoc/section_spec.rb
CHANGED
@@ -69,7 +69,7 @@ RSpec.describe IsoDoc do
|
|
69
69
|
INPUT
|
70
70
|
|
71
71
|
presxml = <<~OUTPUT
|
72
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
72
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
|
73
73
|
<preface>
|
74
74
|
<foreword obligation="informative">
|
75
75
|
<title>Foreword</title>
|
@@ -327,7 +327,7 @@ OUTPUT
|
|
327
327
|
</sections>
|
328
328
|
</iso-standard>
|
329
329
|
INPUT
|
330
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
330
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
331
331
|
<sections>
|
332
332
|
<clause id='D' obligation='normative'>
|
333
333
|
<title depth='1'>
|
data/spec/isodoc/terms_spec.rb
CHANGED
@@ -54,7 +54,7 @@ RSpec.describe IsoDoc do
|
|
54
54
|
</iso-standard>
|
55
55
|
INPUT
|
56
56
|
presxml = <<~INPUT
|
57
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
57
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
|
58
58
|
<sections>
|
59
59
|
<terms id="_terms_and_definitions" obligation="normative"><title depth="1">1<tab/>Terms and definitions</title>
|
60
60
|
|
data/spec/spec_helper.rb
CHANGED
@@ -25,6 +25,10 @@ RSpec.configure do |config|
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
+
def metadata(x)
|
29
|
+
Hash[x.sort].delete_if{ |k, v| v.nil? || v.respond_to?(:empty?) && v.empty? }
|
30
|
+
end
|
31
|
+
|
28
32
|
def strip_guid(x)
|
29
33
|
x.gsub(%r{ id="_[^"]+"}, ' id="_"').gsub(%r{ target="_[^"]+"}, ' target="_"')
|
30
34
|
end
|
@@ -141,7 +145,7 @@ UNPUBLISHED_BOILERPLATE = BOILERPLATE.sub(/<\/boilerplate>/, "#{BOILERPLATE_LICE
|
|
141
145
|
|
142
146
|
BLANK_HDR = <<~"HDR"
|
143
147
|
<?xml version="1.0" encoding="UTF-8"?>
|
144
|
-
<iec-standard xmlns="https://www.metanorma.org/ns/iec">
|
148
|
+
<iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
|
145
149
|
<bibdata type="standard">
|
146
150
|
<contributor>
|
147
151
|
<role type="author"/>
|
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: 1.2.
|
4
|
+
version: 1.2.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-
|
11
|
+
date: 2020-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-jing
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.5.
|
47
|
+
version: 1.5.10
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.5.
|
54
|
+
version: 1.5.10
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: byebug
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -282,6 +282,7 @@ files:
|
|
282
282
|
- spec/assets/rice_image1.png
|
283
283
|
- spec/assets/word.css
|
284
284
|
- spec/assets/wordintro.html
|
285
|
+
- spec/assets/xref_error.adoc
|
285
286
|
- spec/examples/rice.adoc
|
286
287
|
- spec/examples/rice.doc
|
287
288
|
- spec/examples/rice.html
|