metanorma-iso 1.9.2 → 1.9.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/iso/basicdoc.rng +21 -4
- data/lib/asciidoctor/iso/cleanup.rb +3 -4
- data/lib/asciidoctor/iso/front.rb +9 -1
- data/lib/asciidoctor/iso/front_id.rb +7 -2
- data/lib/asciidoctor/iso/isodoc.rng +241 -61
- data/lib/asciidoctor/iso/isostandard.rng +10 -23
- data/lib/asciidoctor/iso/reqt.rng +23 -2
- data/lib/asciidoctor/iso/section.rb +7 -1
- data/lib/asciidoctor/iso/validate_section.rb +18 -20
- data/lib/asciidoctor/iso/validate_style.rb +17 -9
- data/lib/isodoc/iso/html/isodoc.css +1 -2
- data/lib/isodoc/iso/html/isodoc.scss +1 -1
- data/lib/isodoc/iso/html/wordstyle.css +16 -4
- data/lib/isodoc/iso/html/wordstyle.scss +16 -4
- data/lib/isodoc/iso/index.rb +48 -24
- data/lib/isodoc/iso/iso.amendment.xsl +407 -123
- data/lib/isodoc/iso/iso.international-standard.xsl +407 -123
- data/lib/isodoc/iso/metadata.rb +28 -16
- data/lib/isodoc/iso/presentation_xml_convert.rb +30 -22
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +3 -1
- data/spec/asciidoctor/base_spec.rb +351 -177
- data/spec/asciidoctor/blank_spec.rb +38 -0
- data/spec/asciidoctor/blocks_spec.rb +39 -0
- data/spec/asciidoctor/refs_spec.rb +1 -1
- data/spec/isodoc/inline_spec.rb +306 -245
- data/spec/isodoc/terms_spec.rb +30 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/vcr_cassettes/docrels.yml +393 -0
- metadata +32 -2
@@ -5,60 +5,6 @@ RSpec.describe Asciidoctor::ISO do
|
|
5
5
|
expect(Metanorma::ISO::VERSION).not_to be nil
|
6
6
|
end
|
7
7
|
|
8
|
-
it "processes a blank document" do
|
9
|
-
input = <<~INPUT
|
10
|
-
#{ASCIIDOC_BLANK_HDR}
|
11
|
-
INPUT
|
12
|
-
output = <<~OUTPUT
|
13
|
-
#{BLANK_HDR}
|
14
|
-
<sections/>
|
15
|
-
</iso-standard>
|
16
|
-
OUTPUT
|
17
|
-
expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
|
18
|
-
.to be_equivalent_to xmlpp(output)
|
19
|
-
end
|
20
|
-
|
21
|
-
it "converts a blank document" do
|
22
|
-
input = <<~INPUT
|
23
|
-
= Document title
|
24
|
-
Author
|
25
|
-
:docfile: test.adoc
|
26
|
-
:novalid:
|
27
|
-
:no-isobib:
|
28
|
-
INPUT
|
29
|
-
output = <<~OUTPUT
|
30
|
-
#{BLANK_HDR}
|
31
|
-
<sections/>
|
32
|
-
</iso-standard>
|
33
|
-
OUTPUT
|
34
|
-
expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
|
35
|
-
.to be_equivalent_to xmlpp(output)
|
36
|
-
expect(File.exist?("test_alt.html")).to be true
|
37
|
-
expect(File.exist?("test.html")).to be true
|
38
|
-
expect(File.exist?("test.doc")).to be true
|
39
|
-
expect(File.exist?("test.pdf")).to be true
|
40
|
-
expect(File.exist?("htmlstyle.css")).to be false
|
41
|
-
end
|
42
|
-
|
43
|
-
it "converts a blank document in French" do
|
44
|
-
input = <<~INPUT
|
45
|
-
= Document title
|
46
|
-
Author
|
47
|
-
:docfile: test.adoc
|
48
|
-
:novalid:
|
49
|
-
:no-isobib:
|
50
|
-
:no-pdf:
|
51
|
-
:language: fr
|
52
|
-
INPUT
|
53
|
-
output = <<~OUTPUT
|
54
|
-
#{BLANK_HDR_FR}
|
55
|
-
<sections/>
|
56
|
-
</iso-standard>
|
57
|
-
OUTPUT
|
58
|
-
expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
|
59
|
-
.to be_equivalent_to xmlpp(output)
|
60
|
-
end
|
61
|
-
|
62
8
|
it "processes default metadata" do
|
63
9
|
output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
64
10
|
= Document title
|
@@ -212,132 +158,133 @@ RSpec.describe Asciidoctor::ISO do
|
|
212
158
|
:pub-fax: 4444444
|
213
159
|
:pub-email: x@example.com
|
214
160
|
:pub-uri: http://www.example.com
|
161
|
+
:docstage:
|
162
|
+
:docsubstage:
|
215
163
|
INPUT
|
216
164
|
expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
|
217
165
|
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
</iso-standard>
|
166
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
167
|
+
<iso-standard type="semantic" version="#{Metanorma::ISO::VERSION}" xmlns="https://www.metanorma.org/ns/iso">
|
168
|
+
<bibdata type="standard">
|
169
|
+
<docidentifier type="ISO">ISO/IEC/IETF/TR 1000-1-1:2001</docidentifier>
|
170
|
+
<docidentifier type="iso-with-lang">ISO/IEC/IETF/TR 1000-1-1:2001(X)</docidentifier>
|
171
|
+
<docidentifier type="iso-reference">ISO/IEC/IETF/TR 1000-1-1:2001(X)</docidentifier>
|
172
|
+
<docidentifier type="iso-tc">2000</docidentifier>
|
173
|
+
<docidentifier type="iso-tc">2003</docidentifier>
|
174
|
+
<docnumber>1000</docnumber>
|
175
|
+
<contributor>
|
176
|
+
<role type="author"/>
|
177
|
+
<organization>
|
178
|
+
<name>International Electrotechnical Commission</name>
|
179
|
+
<abbreviation>IEC</abbreviation>
|
180
|
+
</organization>
|
181
|
+
</contributor>
|
182
|
+
<contributor>
|
183
|
+
<role type="author"/>
|
184
|
+
<organization>
|
185
|
+
<name>IETF</name>
|
186
|
+
</organization>
|
187
|
+
</contributor>
|
188
|
+
<contributor>
|
189
|
+
<role type="author"/>
|
190
|
+
<organization>
|
191
|
+
<name>International Organization for Standardization</name>
|
192
|
+
<abbreviation>ISO</abbreviation>
|
193
|
+
</organization>
|
194
|
+
</contributor>
|
195
|
+
<contributor>
|
196
|
+
<role type="publisher"/>
|
197
|
+
<organization>
|
198
|
+
<name>International Electrotechnical Commission</name>
|
199
|
+
<abbreviation>IEC</abbreviation>
|
200
|
+
<address>
|
201
|
+
<formattedAddress>1 Infinity Loop + California</formattedAddress>
|
202
|
+
</address>
|
203
|
+
<phone>3333333</phone>
|
204
|
+
<phone type='fax'>4444444</phone>
|
205
|
+
<email>x@example.com</email>
|
206
|
+
<uri>http://www.example.com</uri>
|
207
|
+
</organization>
|
208
|
+
</contributor>
|
209
|
+
<contributor>
|
210
|
+
<role type="publisher"/>
|
211
|
+
<organization>
|
212
|
+
<name>IETF</name>
|
213
|
+
<address>
|
214
|
+
<formattedAddress>1 Infinity Loop + California</formattedAddress>
|
215
|
+
</address>
|
216
|
+
<phone>3333333</phone>
|
217
|
+
<phone type='fax'>4444444</phone>
|
218
|
+
<email>x@example.com</email>
|
219
|
+
<uri>http://www.example.com</uri>
|
220
|
+
</organization>
|
221
|
+
</contributor>
|
222
|
+
<contributor>
|
223
|
+
<role type="publisher"/>
|
224
|
+
<organization>
|
225
|
+
<name>International Organization for Standardization</name>
|
226
|
+
<abbreviation>ISO</abbreviation>
|
227
|
+
<address>
|
228
|
+
<formattedAddress>1 Infinity Loop + California</formattedAddress>
|
229
|
+
</address>
|
230
|
+
<phone>3333333</phone>
|
231
|
+
<phone type='fax'>4444444</phone>
|
232
|
+
<email>x@example.com</email>
|
233
|
+
<uri>http://www.example.com</uri>
|
234
|
+
</organization>
|
235
|
+
</contributor>
|
236
|
+
<language>el</language>
|
237
|
+
<script>Grek</script>
|
238
|
+
<status>
|
239
|
+
<stage abbreviation="IS">60</stage>
|
240
|
+
<substage>60</substage>
|
241
|
+
</status>
|
242
|
+
<copyright>
|
243
|
+
<from>2001</from>
|
244
|
+
<owner>
|
245
|
+
<organization>
|
246
|
+
<name>International Organization for Standardization</name>
|
247
|
+
<abbreviation>ISO</abbreviation>
|
248
|
+
<address>
|
249
|
+
<formattedAddress>1 Infinity Loop + California</formattedAddress>
|
250
|
+
</address>
|
251
|
+
<phone>3333333</phone>
|
252
|
+
<phone type='fax'>4444444</phone>
|
253
|
+
<email>x@example.com</email>
|
254
|
+
<uri>http://www.example.com</uri>
|
255
|
+
</organization>
|
256
|
+
</owner>
|
257
|
+
</copyright>
|
258
|
+
<copyright>
|
259
|
+
<from>2001</from>
|
260
|
+
<owner>
|
261
|
+
<organization>
|
262
|
+
<name>IETF</name>
|
263
|
+
<address>
|
264
|
+
<formattedAddress>1 Infinity Loop + California</formattedAddress>
|
265
|
+
</address>
|
266
|
+
<phone>3333333</phone>
|
267
|
+
<phone type='fax'>4444444</phone>
|
268
|
+
<email>x@example.com</email>
|
269
|
+
<uri>http://www.example.com</uri>
|
270
|
+
</organization>
|
271
|
+
</owner>
|
272
|
+
</copyright>
|
273
|
+
<ext>
|
274
|
+
<doctype>technical-report</doctype>
|
275
|
+
<editorialgroup>
|
276
|
+
<technical-committee/>
|
277
|
+
<subcommittee/>
|
278
|
+
<workgroup/>
|
279
|
+
</editorialgroup>
|
280
|
+
<structuredidentifier>
|
281
|
+
<project-number part="1" subpart="1">ISO/IEC/IETF 1000</project-number>
|
282
|
+
</structuredidentifier>
|
283
|
+
<stagename>International standard</stagename>
|
284
|
+
</ext>
|
285
|
+
</bibdata>
|
286
|
+
<sections/>
|
287
|
+
</iso-standard>
|
341
288
|
OUTPUT
|
342
289
|
end
|
343
290
|
|
@@ -720,6 +667,233 @@ RSpec.describe Asciidoctor::ISO do
|
|
720
667
|
OUTPUT
|
721
668
|
end
|
722
669
|
|
670
|
+
it "processes document relations" do
|
671
|
+
VCR.use_cassette "docrels" do
|
672
|
+
output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
673
|
+
= Document title
|
674
|
+
Author
|
675
|
+
:docfile: test.adoc
|
676
|
+
:nodoc:
|
677
|
+
:novalid:
|
678
|
+
:amends: ISO 123;ISO 124
|
679
|
+
:obsoletes: ISO 125;ISO 126
|
680
|
+
INPUT
|
681
|
+
expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
|
682
|
+
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
683
|
+
<iso-standard xmlns="https://www.metanorma.org/ns/iso" type="semantic" version="#{Metanorma::ISO::VERSION}">
|
684
|
+
<bibdata type='standard'>
|
685
|
+
<contributor>
|
686
|
+
<role type='author'/>
|
687
|
+
<organization>
|
688
|
+
<name>International Organization for Standardization</name>
|
689
|
+
<abbreviation>ISO</abbreviation>
|
690
|
+
</organization>
|
691
|
+
</contributor>
|
692
|
+
<contributor>
|
693
|
+
<role type='publisher'/>
|
694
|
+
<organization>
|
695
|
+
<name>International Organization for Standardization</name>
|
696
|
+
<abbreviation>ISO</abbreviation>
|
697
|
+
</organization>
|
698
|
+
</contributor>
|
699
|
+
<language>en</language>
|
700
|
+
<script>Latn</script>
|
701
|
+
<status>
|
702
|
+
<stage abbreviation='IS'>60</stage>
|
703
|
+
<substage>60</substage>
|
704
|
+
</status>
|
705
|
+
<copyright>
|
706
|
+
<from>2021</from>
|
707
|
+
<owner>
|
708
|
+
<organization>
|
709
|
+
<name>International Organization for Standardization</name>
|
710
|
+
<abbreviation>ISO</abbreviation>
|
711
|
+
</organization>
|
712
|
+
</owner>
|
713
|
+
</copyright>
|
714
|
+
<relation type='obsoletes'>
|
715
|
+
<bibitem type='standard'>
|
716
|
+
<fetched>2021-10-10</fetched>
|
717
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Natural rubber latex concentrate</title>
|
718
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Determination of alkalinity</title>
|
719
|
+
<title type='main' format='text/plain' language='en' script='Latn'>
|
720
|
+
Natural rubber latex concentrate — Determination of
|
721
|
+
alkalinity
|
722
|
+
</title>
|
723
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex concentré de caoutchouc naturel</title>
|
724
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Détermination de l’alcalinité</title>
|
725
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>
|
726
|
+
Latex concentré de caoutchouc
|
727
|
+
naturel — Détermination de
|
728
|
+
l’alcalinité
|
729
|
+
</title>
|
730
|
+
<uri type='src'>https://www.iso.org/standard/72849.html</uri>
|
731
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:72849:en</uri>
|
732
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/07/28/72849.detail.rss</uri>
|
733
|
+
<docidentifier type='ISO'>ISO 125:2020</docidentifier>
|
734
|
+
<docidentifier type='URN'>urn:iso:std:iso:125:stage-60.60:ed-7:en,fr</docidentifier>
|
735
|
+
<docnumber>125</docnumber>
|
736
|
+
<date type='published'>
|
737
|
+
<on>2020-02</on>
|
738
|
+
</date>
|
739
|
+
<contributor>
|
740
|
+
<role type='publisher'/>
|
741
|
+
<organization>
|
742
|
+
<name>International Organization for Standardization</name>
|
743
|
+
<abbreviation>ISO</abbreviation>
|
744
|
+
<uri>www.iso.org</uri>
|
745
|
+
</organization>
|
746
|
+
</contributor>
|
747
|
+
<edition>7</edition>
|
748
|
+
<language>en</language>
|
749
|
+
<language>fr</language>
|
750
|
+
<script>Latn</script>
|
751
|
+
<abstract format='text/plain' language='en' script='Latn'>
|
752
|
+
This document specifies a method for the determination of the
|
753
|
+
alkalinity of natural rubber latex concentrate. The method is not
|
754
|
+
necessarily suitable for latices from natural sources other than Hevea
|
755
|
+
brasiliensis or for synthetic rubber latices, compounded latex,
|
756
|
+
vulcanized latex or artificial dispersions of rubber. NOTE A method
|
757
|
+
for the determination of the alkalinity of polychloroprene latex is
|
758
|
+
specified in ISO 13773.
|
759
|
+
</abstract>
|
760
|
+
<abstract format='text/plain' language='fr' script='Latn'>
|
761
|
+
Le présent document spécifie une méthode de
|
762
|
+
détermination de l’alcalinité du latex concentré
|
763
|
+
de caoutchouc naturel. La méthode ne convient pas
|
764
|
+
nécessairement aux latex d’origine naturelle autres que
|
765
|
+
l’Hevea brasiliensis ou aux latex de caoutchouc de
|
766
|
+
synthèse, aux latex formulés, aux latex vulcanisés ou
|
767
|
+
aux dispersions artificielles de caoutchouc. NOTE Une méthode de
|
768
|
+
détermination de l’alcalinité du latex de
|
769
|
+
polychloroprène est spécifiée dans l’ISO 13773.
|
770
|
+
</abstract>
|
771
|
+
<status>
|
772
|
+
<stage>60</stage>
|
773
|
+
<substage>60</substage>
|
774
|
+
</status>
|
775
|
+
<copyright>
|
776
|
+
<from>2020</from>
|
777
|
+
<owner>
|
778
|
+
<organization>
|
779
|
+
<name>ISO</name>
|
780
|
+
</organization>
|
781
|
+
</owner>
|
782
|
+
</copyright>
|
783
|
+
<relation type='obsoletes'>
|
784
|
+
<bibitem type='standard'>
|
785
|
+
<formattedref format='text/plain'>ISO 125:2011</formattedref>
|
786
|
+
</bibitem>
|
787
|
+
</relation>
|
788
|
+
<place>Geneva</place>
|
789
|
+
</bibitem>
|
790
|
+
</relation>
|
791
|
+
<relation type='obsoletes'>
|
792
|
+
<bibitem type='standard'>
|
793
|
+
<fetched>2021-10-10</fetched>
|
794
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Natural rubber latex concentrate</title>
|
795
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Determination of dry rubber content</title>
|
796
|
+
<title type='main' format='text/plain' language='en' script='Latn'>
|
797
|
+
Natural rubber latex concentrate — Determination of
|
798
|
+
dry rubber content
|
799
|
+
</title>
|
800
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc naturel concentré</title>
|
801
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Détermination de la teneur en caoutchouc sec</title>
|
802
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>
|
803
|
+
Latex de caoutchouc naturel
|
804
|
+
concentré — Détermination de la teneur en
|
805
|
+
caoutchouc sec
|
806
|
+
</title>
|
807
|
+
<uri type='src'>https://www.iso.org/standard/35176.html</uri>
|
808
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:35176:en</uri>
|
809
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/03/51/35176.detail.rss</uri>
|
810
|
+
<docidentifier type='ISO'>ISO 126:2005</docidentifier>
|
811
|
+
<docidentifier type='URN'>urn:iso:std:iso:126:stage-90.93:ed-5:en,fr</docidentifier>
|
812
|
+
<docnumber>126</docnumber>
|
813
|
+
<date type='published'>
|
814
|
+
<on>2005-04</on>
|
815
|
+
</date>
|
816
|
+
<contributor>
|
817
|
+
<role type='publisher'/>
|
818
|
+
<organization>
|
819
|
+
<name>International Organization for Standardization</name>
|
820
|
+
<abbreviation>ISO</abbreviation>
|
821
|
+
<uri>www.iso.org</uri>
|
822
|
+
</organization>
|
823
|
+
</contributor>
|
824
|
+
<edition>5</edition>
|
825
|
+
<language>en</language>
|
826
|
+
<language>fr</language>
|
827
|
+
<script>Latn</script>
|
828
|
+
<abstract format='text/plain' language='en' script='Latn'>
|
829
|
+
ISO 126:2005 specifies a method for the determination of the dry
|
830
|
+
rubber content of natural rubber latex concentrate. The method is not
|
831
|
+
necessarily suitable for latices preserved with potassium hydroxide,
|
832
|
+
latices from natural sources other than Hevea brasiliensis, or for
|
833
|
+
compounded latex, vulcanized latex or artificial dispersions of rubber
|
834
|
+
and it is not applicable to synthetic rubber latices.
|
835
|
+
</abstract>
|
836
|
+
<abstract format='text/plain' language='fr' script='Latn'>
|
837
|
+
L’ISO 126:2005 spécifie une méthode de
|
838
|
+
détermination de la teneur en caoutchouc sec du latex de
|
839
|
+
caoutchouc naturel concentré. La méthode ne convient pas
|
840
|
+
nécessairement pour les latex conservés dans de
|
841
|
+
l’hydroxyde de potassium, pour les latex d’origine
|
842
|
+
naturelle autres que celui de l’Hevea brasiliensis ou pour des
|
843
|
+
mélanges de latex, pour les latex vulcanisés ou les
|
844
|
+
dispersions artificielles de caoutchouc, et elle n’est pas
|
845
|
+
applicable aux latex d’élastomères.
|
846
|
+
</abstract>
|
847
|
+
<status>
|
848
|
+
<stage>90</stage>
|
849
|
+
<substage>93</substage>
|
850
|
+
</status>
|
851
|
+
<copyright>
|
852
|
+
<from>2005</from>
|
853
|
+
<owner>
|
854
|
+
<organization>
|
855
|
+
<name>ISO</name>
|
856
|
+
</organization>
|
857
|
+
</owner>
|
858
|
+
</copyright>
|
859
|
+
<relation type='obsoletes'>
|
860
|
+
<bibitem type='standard'>
|
861
|
+
<formattedref format='text/plain'>ISO 126:1995</formattedref>
|
862
|
+
</bibitem>
|
863
|
+
</relation>
|
864
|
+
<place>Geneva</place>
|
865
|
+
</bibitem>
|
866
|
+
</relation>
|
867
|
+
<relation type='updates'>
|
868
|
+
<description>amends</description>
|
869
|
+
<bibitem>
|
870
|
+
<title>--</title>
|
871
|
+
<docidentifier>ISO 123</docidentifier>
|
872
|
+
</bibitem>
|
873
|
+
</relation>
|
874
|
+
<relation type='updates'>
|
875
|
+
<description>amends</description>
|
876
|
+
<bibitem>
|
877
|
+
<title>--</title>
|
878
|
+
<docidentifier>ISO 124</docidentifier>
|
879
|
+
</bibitem>
|
880
|
+
</relation>
|
881
|
+
<ext>
|
882
|
+
<doctype>article</doctype>
|
883
|
+
<editorialgroup>
|
884
|
+
<technical-committee/>
|
885
|
+
<subcommittee/>
|
886
|
+
<workgroup/>
|
887
|
+
</editorialgroup>
|
888
|
+
<stagename>International standard</stagename>
|
889
|
+
</ext>
|
890
|
+
</bibdata>
|
891
|
+
<sections> </sections>
|
892
|
+
</iso-standard>
|
893
|
+
OUTPUT
|
894
|
+
end
|
895
|
+
end
|
896
|
+
|
723
897
|
it "reads scripts into blank HTML document" do
|
724
898
|
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
725
899
|
= Document title
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Asciidoctor::ISO do
|
4
|
+
it "processes a blank document" do
|
5
|
+
input = <<~INPUT
|
6
|
+
#{ASCIIDOC_BLANK_HDR}
|
7
|
+
INPUT
|
8
|
+
output = <<~OUTPUT
|
9
|
+
#{BLANK_HDR}
|
10
|
+
<sections/>
|
11
|
+
</iso-standard>
|
12
|
+
OUTPUT
|
13
|
+
expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
|
14
|
+
.to be_equivalent_to xmlpp(output)
|
15
|
+
end
|
16
|
+
|
17
|
+
it "converts a blank document" do
|
18
|
+
input = <<~INPUT
|
19
|
+
= Document title
|
20
|
+
Author
|
21
|
+
:docfile: test.adoc
|
22
|
+
:novalid:
|
23
|
+
:no-isobib:
|
24
|
+
INPUT
|
25
|
+
output = <<~OUTPUT
|
26
|
+
#{BLANK_HDR}
|
27
|
+
<sections/>
|
28
|
+
</iso-standard>
|
29
|
+
OUTPUT
|
30
|
+
expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
|
31
|
+
.to be_equivalent_to xmlpp(output)
|
32
|
+
expect(File.exist?("test_alt.html")).to be true
|
33
|
+
expect(File.exist?("test.html")).to be true
|
34
|
+
expect(File.exist?("test.doc")).to be true
|
35
|
+
expect(File.exist?("test.pdf")).to be true
|
36
|
+
expect(File.exist?("htmlstyle.css")).to be false
|
37
|
+
end
|
38
|
+
end
|
@@ -586,4 +586,43 @@ RSpec.describe Asciidoctor::ISO do
|
|
586
586
|
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
587
587
|
.to be_equivalent_to xmlpp(output)
|
588
588
|
end
|
589
|
+
|
590
|
+
it "processes nested terms" do
|
591
|
+
input = <<~INPUT
|
592
|
+
#{ASCIIDOC_BLANK_HDR}
|
593
|
+
== Terms and Definitions
|
594
|
+
|
595
|
+
[.term]
|
596
|
+
=== Term1
|
597
|
+
|
598
|
+
definition
|
599
|
+
|
600
|
+
==== Term11
|
601
|
+
definition2
|
602
|
+
INPUT
|
603
|
+
output = <<~OUTPUT
|
604
|
+
#{BLANK_HDR}
|
605
|
+
<sections>
|
606
|
+
<terms id='_' obligation='normative'>
|
607
|
+
<title>Terms and definitions</title>
|
608
|
+
#{TERM_BOILERPLATE}
|
609
|
+
<term id='term-term1'>
|
610
|
+
<preferred>Term1</preferred>
|
611
|
+
<definition>
|
612
|
+
<p id='_'>definition</p>
|
613
|
+
</definition>
|
614
|
+
<term id='term-term11'>
|
615
|
+
<preferred>Term11</preferred>
|
616
|
+
<definition>
|
617
|
+
<p id='_'>definition2</p>
|
618
|
+
</definition>
|
619
|
+
</term>
|
620
|
+
</term>
|
621
|
+
</terms>
|
622
|
+
</sections>
|
623
|
+
</iso-standard>
|
624
|
+
OUTPUT
|
625
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
626
|
+
.to be_equivalent_to xmlpp(output)
|
627
|
+
end
|
589
628
|
end
|
@@ -26,7 +26,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
26
26
|
<title>Clause</title>
|
27
27
|
<p id="_">
|
28
28
|
<eref bibitemid="iso123" citeas="ISO 123:--" type="inline"/>
|
29
|
-
<fn reference="1">The standard is in press</fn>
|
29
|
+
<fn reference="1"><p id="_">The standard is in press</p></fn>
|
30
30
|
<eref bibitemid="iso123" citeas="ISO 123:--" type="inline"/>A.
|
31
31
|
<fn reference="2">
|
32
32
|
<p id="_">a footnote</p></fn>
|