metanorma-iso 1.9.5 → 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/front.rb +9 -1
- data/lib/asciidoctor/iso/isodoc.rng +192 -50
- data/lib/asciidoctor/iso/isostandard.rng +6 -22
- data/lib/asciidoctor/iso/reqt.rng +23 -2
- 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/iso.amendment.xsl +12 -2
- data/lib/isodoc/iso/iso.international-standard.xsl +12 -2
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +3 -1
- data/spec/asciidoctor/base_spec.rb +351 -124
- data/spec/spec_helper.rb +12 -0
- data/spec/vcr_cassettes/docrels.yml +393 -0
- metadata +31 -2
@@ -158,133 +158,133 @@ RSpec.describe Asciidoctor::ISO do
|
|
158
158
|
:pub-fax: 4444444
|
159
159
|
:pub-email: x@example.com
|
160
160
|
:pub-uri: http://www.example.com
|
161
|
-
:docstage:
|
162
|
-
:docsubstage:
|
161
|
+
:docstage:
|
162
|
+
:docsubstage:
|
163
163
|
INPUT
|
164
164
|
expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
|
165
165
|
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
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
|
-
|
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>
|
288
288
|
OUTPUT
|
289
289
|
end
|
290
290
|
|
@@ -667,6 +667,233 @@ RSpec.describe Asciidoctor::ISO do
|
|
667
667
|
OUTPUT
|
668
668
|
end
|
669
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
|
+
|
670
897
|
it "reads scripts into blank HTML document" do
|
671
898
|
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
672
899
|
= Document title
|
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
require "vcr"
|
2
|
+
|
3
|
+
VCR.configure do |config|
|
4
|
+
config.cassette_library_dir = "spec/vcr_cassettes"
|
5
|
+
config.hook_into :webmock
|
6
|
+
config.default_cassette_options = {
|
7
|
+
clean_outdated_http_interactions: true,
|
8
|
+
re_record_interval: 1512000,
|
9
|
+
record: :once,
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
1
13
|
require "simplecov"
|
2
14
|
SimpleCov.start do
|
3
15
|
add_filter "/spec/"
|