metanorma-standoc 1.1.9 → 1.2.0
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/Gemfile.lock +63 -64
- data/lib/asciidoctor/standoc/base.rb +9 -11
- data/lib/asciidoctor/standoc/biblio.rng +24 -3
- data/lib/asciidoctor/standoc/blocks.rb +16 -8
- data/lib/asciidoctor/standoc/cleanup.rb +1 -0
- data/lib/asciidoctor/standoc/cleanup_ref.rb +80 -1
- data/lib/asciidoctor/standoc/front.rb +22 -4
- data/lib/asciidoctor/standoc/isodoc.rng +45 -63
- data/lib/asciidoctor/standoc/ref.rb +4 -11
- data/lib/asciidoctor/standoc/reqt.rng +5 -0
- data/lib/asciidoctor/standoc/section.rb +1 -0
- data/lib/asciidoctor/standoc/table.rb +1 -0
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +9 -5
- data/spec/asciidoctor-standoc/base_spec.rb +14 -7
- data/spec/asciidoctor-standoc/blocks_spec.rb +26 -19
- data/spec/asciidoctor-standoc/cleanup_spec.rb +13 -31
- data/spec/asciidoctor-standoc/inline_spec.rb +0 -2
- data/spec/asciidoctor-standoc/isobib_cache_spec.rb +272 -62
- data/spec/asciidoctor-standoc/refs_dl_spec.rb +56 -0
- data/spec/asciidoctor-standoc/refs_spec.rb +139 -115
- data/spec/asciidoctor-standoc/table_spec.rb +2 -2
- data/spec/asciidoctor-standoc/validate_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -5
- data/spec/vcr_cassettes/isobib_get_123.yml +55 -43
- metadata +28 -16
- data/docs/customisation.adoc +0 -178
- data/docs/guidance.adoc +0 -436
- data/docs/htmloutput.adoc +0 -115
@@ -1,5 +1,5 @@
|
|
1
1
|
require "spec_helper"
|
2
|
-
require "
|
2
|
+
require "relaton_iec"
|
3
3
|
require "fileutils"
|
4
4
|
|
5
5
|
RSpec.describe Asciidoctor::Standoc do
|
@@ -973,9 +973,11 @@ r = 1 %</stem>
|
|
973
973
|
</termsource>
|
974
974
|
</term></terms></sections><bibliography><references id="_" obligation="informative">
|
975
975
|
<title>Normative References</title>
|
976
|
-
<bibitem type="
|
977
|
-
<
|
978
|
-
<title format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary
|
976
|
+
<bibitem type="standard" id="IEC60050-102">
|
977
|
+
<title type="title-main" format="text/plain" language="en" script="Latn">Part 102: Mathematics</title>
|
978
|
+
<title type="title-intro" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary</title>
|
979
|
+
<title type="title-part" format="text/plain" language="en" script="Latn">General concepts and linear algebra</title>
|
980
|
+
<title type="main" format="text/plain" language="en" script="Latn">Part 102: Mathematics - International Electrotechnical Vocabulary - General concepts and linear algebra</title>
|
979
981
|
<uri type="src">https://webstore.iec.ch/publication/160</uri>
|
980
982
|
<uri type="obp">/preview/info_iec60050-102%7Bed1.0%7Db.pdf</uri>
|
981
983
|
<docidentifier type="IEC">IEC 60050-102:2007</docidentifier>
|
@@ -993,7 +995,7 @@ r = 1 %</stem>
|
|
993
995
|
<edition>1.0</edition>
|
994
996
|
<language>en</language>
|
995
997
|
<script>Latn</script>
|
996
|
-
<abstract format="plain" language="en" script="Latn">This part of IEC 60050 gives the general mathematical terminology used in the fields of electricity, electronics and telecommunications, together with basic concepts in linear algebra. It maintains a clear distinction between mathematical concepts and physical concepts, even if some terms are used in both cases. Another part will deal with functions. It has the status of a horizontal standard in accordance with IEC Guide 108.</abstract>
|
998
|
+
<abstract format="text/plain" language="en" script="Latn">This part of IEC 60050 gives the general mathematical terminology used in the fields of electricity, electronics and telecommunications, together with basic concepts in linear algebra. It maintains a clear distinction between mathematical concepts and physical concepts, even if some terms are used in both cases. Another part will deal with functions. It has the status of a horizontal standard in accordance with IEC Guide 108.</abstract>
|
997
999
|
<status>
|
998
1000
|
<stage>60</stage>
|
999
1001
|
<substage>60</substage>
|
@@ -1008,20 +1010,11 @@ r = 1 %</stem>
|
|
1008
1010
|
</organization>
|
1009
1011
|
</owner>
|
1010
1012
|
</copyright>
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
<text>Natural and applied sciences (Vocabularies)</text>
|
1017
|
-
</ics>
|
1018
|
-
<ics>
|
1019
|
-
<code>07.020</code>
|
1020
|
-
<text>Mathematics</text>
|
1021
|
-
</ics>
|
1022
|
-
</bibitem><bibitem type="international-standard" id="IEC60050-103">
|
1023
|
-
<fetched>#{Date.today}</fetched>
|
1024
|
-
<title format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary — Part 103: Mathematics — Functions </title>
|
1013
|
+
</bibitem><bibitem type="standard" id="IEC60050-103">
|
1014
|
+
<title type="title-main" format="text/plain" language="en" script="Latn">Part 103: Mathematics</title>
|
1015
|
+
<title type="title-intro" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary</title>
|
1016
|
+
<title type="title-part" format="text/plain" language="en" script="Latn">Functions </title>
|
1017
|
+
<title type="main" format="text/plain" language="en" script="Latn">Part 103: Mathematics - International Electrotechnical Vocabulary - Functions </title>
|
1025
1018
|
<uri type="src">https://webstore.iec.ch/publication/161</uri>
|
1026
1019
|
<uri type="obp">/preview/info_iec60050-103%7Bed1.0%7Db.pdf</uri>
|
1027
1020
|
<docidentifier type="IEC">IEC 60050-103:2009</docidentifier>
|
@@ -1039,7 +1032,7 @@ r = 1 %</stem>
|
|
1039
1032
|
<edition>1.0</edition>
|
1040
1033
|
<language>en</language>
|
1041
1034
|
<script>Latn</script>
|
1042
|
-
<abstract format="plain" language="en" script="Latn">IEC 60050-103:2009 gives the terminology relative to functions of one or more variables. Together with IEC 60050-102, it covers the mathematical terminology used in the fields of electricity, electronics and telecommunications. It maintains a clear distinction between mathematical concepts and physical concepts, even if some terms are used in both cases. Mathematical symbols are generally in accordance with IEC 60027-1 and ISO 80000-2. This standard cancels and replaces Sections 101-13, 101-14 and 101-15 of International Standard IEC 60050-101:1998. It has the status of a horizontal standard in accordance with IEC Guide 108.</abstract>
|
1035
|
+
<abstract format="text/plain" language="en" script="Latn">IEC 60050-103:2009 gives the terminology relative to functions of one or more variables. Together with IEC 60050-102, it covers the mathematical terminology used in the fields of electricity, electronics and telecommunications. It maintains a clear distinction between mathematical concepts and physical concepts, even if some terms are used in both cases. Mathematical symbols are generally in accordance with IEC 60027-1 and ISO 80000-2. This standard cancels and replaces Sections 101-13, 101-14 and 101-15 of International Standard IEC 60050-101:1998. It has the status of a horizontal standard in accordance with IEC Guide 108.</abstract>
|
1043
1036
|
<status>
|
1044
1037
|
<stage>60</stage>
|
1045
1038
|
<substage>60</substage>
|
@@ -1054,17 +1047,6 @@ r = 1 %</stem>
|
|
1054
1047
|
</organization>
|
1055
1048
|
</owner>
|
1056
1049
|
</copyright>
|
1057
|
-
<editorialgroup>
|
1058
|
-
<technical-committee number="1" type="technicalCommittee">TC 1 - Terminology</technical-committee>
|
1059
|
-
</editorialgroup>
|
1060
|
-
<ics>
|
1061
|
-
<code>01.040.07</code>
|
1062
|
-
<text>Natural and applied sciences (Vocabularies)</text>
|
1063
|
-
</ics>
|
1064
|
-
<ics>
|
1065
|
-
<code>07.020</code>
|
1066
|
-
<text>Mathematics</text>
|
1067
|
-
</ics>
|
1068
1050
|
</bibitem>
|
1069
1051
|
</references></bibliography>
|
1070
1052
|
</standard-document>
|
@@ -13,7 +13,6 @@ RSpec.describe Asciidoctor::Standoc do
|
|
13
13
|
super^script^
|
14
14
|
sub~script~
|
15
15
|
sub~__scr__ipt~
|
16
|
-
stem:[a_90]
|
17
16
|
stem:[<mml:math><mml:msub xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"> <mml:mrow> <mml:mrow> <mml:mi mathvariant="bold-italic">F</mml:mi> </mml:mrow> </mml:mrow> <mml:mrow> <mml:mrow> <mml:mi mathvariant="bold-italic">Α</mml:mi> </mml:mrow> </mml:mrow> </mml:msub> </mml:math>]
|
18
17
|
[alt]#alt#
|
19
18
|
[deprecated]#deprecated#
|
@@ -32,7 +31,6 @@ RSpec.describe Asciidoctor::Standoc do
|
|
32
31
|
super<sup>script</sup>
|
33
32
|
sub<sub>script</sub>
|
34
33
|
sub<sub><em>scr</em>ipt</sub>
|
35
|
-
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>a</mi><mn>90</mn></msub></math></stem>
|
36
34
|
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub> <mrow> <mrow> <mi mathvariant="bold-italic">F</mi> </mrow> </mrow> <mrow> <mrow> <mi mathvariant="bold-italic">Α</mi> </mrow> </mrow> </msub> </math></stem>
|
37
35
|
<admitted>alt</admitted>
|
38
36
|
<deprecates>deprecated</deprecates>
|
@@ -1,39 +1,39 @@
|
|
1
1
|
require "spec_helper"
|
2
|
-
require "
|
2
|
+
require "relaton_iso"
|
3
3
|
require "fileutils"
|
4
4
|
|
5
5
|
RSpec.describe Asciidoctor::Standoc do
|
6
6
|
|
7
7
|
IETF_123_SHORT = <<~EOS
|
8
|
-
<bibitem type="
|
8
|
+
<bibitem type="standard" id="IETF123">
|
9
9
|
<title format="text/plain" language="en" script="Latn">Rubber latex -- Sampling</title>
|
10
10
|
<docidentifier type="IETF">RFC 123</docidentifier>
|
11
11
|
<contributor> <role type="publisher"/> <organization> <name>International Organization for Standardization</name> <abbreviation>ISO</abbreviation> <uri>www.iso.org</uri> </organization> </contributor>
|
12
|
-
<status>Published</status>
|
12
|
+
<status><stage>Published</stage></status>
|
13
13
|
</bibitem>
|
14
14
|
EOS
|
15
15
|
|
16
16
|
ISO_123_SHORT = <<~EOS
|
17
|
-
<bibitem type="
|
17
|
+
<bibitem type="standard" id="ISO123">
|
18
18
|
<title format="text/plain" language="en" script="Latn">Rubber latex -- Sampling</title>
|
19
19
|
<docidentifier type="ISO">ISO 123</docidentifier>
|
20
20
|
<contributor> <role type="publisher"/> <organization> <name>International Organization for Standardization</name> <abbreviation>ISO</abbreviation> <uri>www.iso.org</uri> </organization> </contributor>
|
21
|
-
<status>Published</status>
|
21
|
+
<status><stage>Published</stage></status>
|
22
22
|
</bibitem>
|
23
23
|
EOS
|
24
24
|
|
25
25
|
ISO_124_SHORT = <<~EOS
|
26
|
-
<bibitem type="
|
26
|
+
<bibitem type="standard" id="ISO124">
|
27
27
|
<fetched>#{Date.today}</fetched>
|
28
28
|
<title format="text/plain" language="en" script="Latn">Latex, rubber -- Determination of total solids content</title>
|
29
29
|
<docidentifier type="ISO">ISO 124</docidentifier>
|
30
30
|
<contributor> <role type="publisher"/> <organization> <name>International Organization for Standardization</name> <abbreviation>ISO</abbreviation> <uri>www.iso.org</uri> </organization> </contributor>
|
31
|
-
<status>Published</status>
|
31
|
+
<status><stage>Published</stage></status>
|
32
32
|
</bibitem>
|
33
33
|
EOS
|
34
34
|
|
35
35
|
ISO_124_SHORT_ALT = <<~EOS
|
36
|
-
<bibitem type="
|
36
|
+
<bibitem type="standard" id="ISO124">
|
37
37
|
<fetched>#{Date.today}</fetched>
|
38
38
|
<title format="text/plain" language="en" script="Latn">Latex, rubber -- Replacement</title>
|
39
39
|
<docidentifier type="ISO">ISO 124</docidentifier>
|
@@ -42,27 +42,248 @@ EOS
|
|
42
42
|
</bibitem>
|
43
43
|
EOS
|
44
44
|
|
45
|
-
|
46
|
-
|
45
|
+
ISO_124_DATED = <<~EOS
|
46
|
+
<bibdata type="standard">
|
47
|
+
<fetched>#{Date.today}</fetched>
|
48
|
+
<title type="title-main" format="text/plain" language="en" script="Latn">Determination of total solids content</title>
|
49
|
+
<title type="title-intro" format="text/plain" language="en" script="Latn">Latex, rubber</title>
|
50
|
+
<title type="main" format="text/plain" language="en" script="Latn">Determination of total solids content - Latex, rubber</title>
|
51
|
+
<title type="title-main" format="text/plain" language="fr" script="Latn">Détermination des matières solides totales</title>
|
52
|
+
<title type="title-intro" format="text/plain" language="fr" script="Latn">Latex de caoutchouc</title>
|
53
|
+
<title type="main" format="text/plain" language="fr" script="Latn">Détermination des matières solides totales - Latex de caoutchouc</title>
|
54
|
+
<uri type="src">https://www.iso.org/standard/61884.html</uri>
|
55
|
+
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
|
56
|
+
<uri type="rss">https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
57
|
+
<docidentifier type="ISO">ISO 124:2014</docidentifier>
|
58
|
+
<date type="published">
|
59
|
+
<on>2014</on>
|
60
|
+
</date>
|
61
|
+
<contributor>
|
62
|
+
<role type="publisher"/>
|
63
|
+
<organization>
|
64
|
+
<name>International Organization for Standardization</name>
|
65
|
+
<abbreviation>ISO</abbreviation>
|
66
|
+
<uri>www.iso.org</uri>
|
67
|
+
</organization>
|
68
|
+
</contributor>
|
69
|
+
<edition>7</edition>
|
70
|
+
<language>en</language>
|
71
|
+
<language>fr</language>
|
72
|
+
<script>Latn</script>
|
73
|
+
<abstract format="text/plain" language="en" script="Latn">ISO 124:2014 specifies methods for the determination of the total solids content of natural rubber field and concentrated latices and synthetic rubber latex. These methods are not necessarily suitable for latex from natural sources other than the Hevea brasiliensis, for vulcanized latex, for compounded latex, or for artificial dispersions of rubber.</abstract>
|
74
|
+
<abstract format="text/plain" language="fr" script="Latn">L'ISO 124:2014 spécifie des méthodes pour la détermination des matières solides totales dans le latex de plantation, le latex de concentré de caoutchouc naturel et le latex de caoutchouc synthétique. Ces méthodes ne conviennent pas nécessairement au latex d'origine naturelle autre que celui de l'Hevea brasiliensis, au latex vulcanisé, aux mélanges de latex, ou aux dispersions artificielles de caoutchouc.</abstract>
|
75
|
+
<status>
|
76
|
+
<stage>60</stage>
|
77
|
+
<substage>60</substage>
|
78
|
+
</status>
|
79
|
+
<copyright>
|
80
|
+
<from>2014</from>
|
81
|
+
<owner>
|
82
|
+
<organization>
|
83
|
+
<name>ISO</name>
|
84
|
+
</organization>
|
85
|
+
</owner>
|
86
|
+
</copyright>
|
87
|
+
<relation type="obsoletes">
|
88
|
+
<bibitem type="standard">
|
89
|
+
<formattedref format="text/plain">ISO 124:2011</formattedref>
|
90
|
+
</bibitem>
|
91
|
+
</relation>
|
92
|
+
<ext>
|
93
|
+
<doctype>international-standard</doctype>
|
94
|
+
<editorialgroup>
|
95
|
+
<technical_committee number="45" type="TC">ISO/TC 45/SC 3Raw materials (including latex) for use in the rubber industry</technical_committee>
|
96
|
+
</editorialgroup>
|
97
|
+
<ics>
|
98
|
+
<code>83.040.10</code>
|
99
|
+
<text>Latex and raw rubber</text>
|
100
|
+
</ics>
|
101
|
+
<structuredidentifier type="ISO">
|
102
|
+
<project-number>ISO 124</project-number>
|
103
|
+
</structuredidentifier>
|
104
|
+
</ext>
|
105
|
+
</bibdata>
|
47
106
|
EOS
|
48
107
|
|
49
108
|
ISO_123_UNDATED = <<~EOS
|
50
|
-
<
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
109
|
+
<bibdata type="standard">
|
110
|
+
<fetched>#{Date.today}</fetched>
|
111
|
+
<title type="title-main" format="text/plain" language="en" script="Latn">Sampling</title>
|
112
|
+
<title type="title-intro" format="text/plain" language="en" script="Latn">Rubber latex</title>
|
113
|
+
<title type="main" format="text/plain" language="en" script="Latn">Sampling - Rubber latex</title>
|
114
|
+
<title type="title-main" format="text/plain" language="fr" script="Latn">Échantillonnage</title>
|
115
|
+
<title type="title-intro" format="text/plain" language="fr" script="Latn">Latex de caoutchouc</title>
|
116
|
+
<title type="main" format="text/plain" language="fr" script="Latn">Échantillonnage - Latex de caoutchouc</title>
|
117
|
+
<uri type="src">https://www.iso.org/standard/23281.html</uri>
|
118
|
+
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
119
|
+
<uri type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
120
|
+
<docidentifier type="ISO">ISO 123</docidentifier>
|
121
|
+
<contributor>
|
122
|
+
<role type="publisher"/>
|
123
|
+
<organization>
|
124
|
+
<name>International Organization for Standardization</name>
|
125
|
+
<abbreviation>ISO</abbreviation>
|
126
|
+
<uri>www.iso.org</uri>
|
127
|
+
</organization>
|
128
|
+
</contributor>
|
129
|
+
<edition>3</edition>
|
130
|
+
<language>en</language>
|
131
|
+
<language>fr</language>
|
132
|
+
<script>Latn</script>
|
133
|
+
<status>
|
134
|
+
<stage>90</stage>
|
135
|
+
<substage>93</substage>
|
136
|
+
</status>
|
137
|
+
<copyright>
|
138
|
+
<from>2001</from>
|
139
|
+
<owner>
|
140
|
+
<organization>
|
141
|
+
<name>ISO</name>
|
142
|
+
</organization>
|
143
|
+
</owner>
|
144
|
+
</copyright>
|
145
|
+
<relation type="obsoletes">
|
146
|
+
<bibitem type="standard">
|
147
|
+
<formattedref format="text/plain">ISO 123:1985</formattedref>
|
148
|
+
</bibitem>
|
149
|
+
</relation>
|
150
|
+
<relation type="updates">
|
151
|
+
<bibitem type="standard">
|
152
|
+
<formattedref format="text/plain">ISO 123:2001</formattedref>
|
153
|
+
</bibitem>
|
154
|
+
</relation>
|
155
|
+
<relation type="instance">
|
156
|
+
<bibitem type="standard">
|
157
|
+
<fetched>#{Date.today}</fetched>
|
158
|
+
<title type="title-main" format="text/plain" language="en" script="Latn">Sampling</title>
|
159
|
+
<title type="title-intro" format="text/plain" language="en" script="Latn">Rubber latex</title>
|
160
|
+
<title type="main" format="text/plain" language="en" script="Latn">Sampling - Rubber latex</title>
|
161
|
+
<title type="title-main" format="text/plain" language="fr" script="Latn">Échantillonnage</title>
|
162
|
+
<title type="title-intro" format="text/plain" language="fr" script="Latn">Latex de caoutchouc</title>
|
163
|
+
<title type="main" format="text/plain" language="fr" script="Latn">Échantillonnage - Latex de caoutchouc</title>
|
164
|
+
<uri type="src">https://www.iso.org/standard/23281.html</uri>
|
165
|
+
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
166
|
+
<uri type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
167
|
+
<docidentifier type="ISO">ISO 123:2001</docidentifier>
|
168
|
+
<date type="published">
|
169
|
+
<on>2001</on>
|
170
|
+
</date>
|
171
|
+
<contributor>
|
172
|
+
<role type="publisher"/>
|
173
|
+
<organization>
|
174
|
+
<name>International Organization for Standardization</name>
|
175
|
+
<abbreviation>ISO</abbreviation>
|
176
|
+
<uri>www.iso.org</uri>
|
177
|
+
</organization>
|
178
|
+
</contributor>
|
179
|
+
<edition>3</edition>
|
180
|
+
<language>en</language>
|
181
|
+
<language>fr</language>
|
182
|
+
<script>Latn</script>
|
183
|
+
<status>
|
184
|
+
<stage>90</stage>
|
185
|
+
<substage>93</substage>
|
186
|
+
</status>
|
187
|
+
<copyright>
|
188
|
+
<from>2001</from>
|
189
|
+
<owner>
|
190
|
+
<organization>
|
191
|
+
<name>ISO</name>
|
192
|
+
</organization>
|
193
|
+
</owner>
|
194
|
+
</copyright>
|
195
|
+
<relation type="obsoletes">
|
196
|
+
<bibitem type="standard">
|
197
|
+
<formattedref format="text/plain">ISO 123:1985</formattedref>
|
198
|
+
</bibitem>
|
199
|
+
</relation>
|
200
|
+
<relation type="updates">
|
201
|
+
<bibitem type="standard">
|
202
|
+
<formattedref format="text/plain">ISO 123:2001</formattedref>
|
203
|
+
</bibitem>
|
204
|
+
</relation>
|
205
|
+
</bibitem>
|
206
|
+
</relation>
|
207
|
+
<ext>
|
208
|
+
<doctype>international-standard</doctype>
|
209
|
+
<editorialgroup>
|
210
|
+
<technical_committee number="45" type="TC">ISO/TC 45/SC 3Raw materials (including latex) for use in the rubber industry</technical_committee>
|
211
|
+
</editorialgroup>
|
212
|
+
<ics>
|
213
|
+
<code>83.040.10</code>
|
214
|
+
<text>Latex and raw rubber</text>
|
215
|
+
</ics>
|
216
|
+
<structuredidentifier type="ISO">
|
217
|
+
<project-number>ISO 123</project-number>
|
218
|
+
</structuredidentifier>
|
219
|
+
</ext>
|
220
|
+
</bibdata>
|
62
221
|
EOS
|
63
222
|
|
64
|
-
|
65
|
-
|
223
|
+
ISO_123_DATED = <<~EOS
|
224
|
+
<bibdata type="standard">
|
225
|
+
<fetched>#{Date.today}</fetched>
|
226
|
+
<title type="title-main" format="text/plain" language="en" script="Latn">Sampling</title>
|
227
|
+
<title type="title-intro" format="text/plain" language="en" script="Latn">Rubber latex</title>
|
228
|
+
<title type="main" format="text/plain" language="en" script="Latn">Sampling - Rubber latex</title>
|
229
|
+
<title type="title-main" format="text/plain" language="fr" script="Latn">Échantillonnage</title>
|
230
|
+
<title type="title-intro" format="text/plain" language="fr" script="Latn">Latex de caoutchouc</title>
|
231
|
+
<title type="main" format="text/plain" language="fr" script="Latn">Échantillonnage - Latex de caoutchouc</title>
|
232
|
+
<uri type="src">https://www.iso.org/standard/23281.html</uri>
|
233
|
+
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
234
|
+
<uri type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
235
|
+
<docidentifier type="ISO">ISO 123:2001</docidentifier>
|
236
|
+
<date type="published">
|
237
|
+
<on>2001</on>
|
238
|
+
</date>
|
239
|
+
<contributor>
|
240
|
+
<role type="publisher"/>
|
241
|
+
<organization>
|
242
|
+
<name>International Organization for Standardization</name>
|
243
|
+
<abbreviation>ISO</abbreviation>
|
244
|
+
<uri>www.iso.org</uri>
|
245
|
+
</organization>
|
246
|
+
</contributor>
|
247
|
+
<edition>3</edition>
|
248
|
+
<language>en</language>
|
249
|
+
<language>fr</language>
|
250
|
+
<script>Latn</script>
|
251
|
+
<status>
|
252
|
+
<stage>90</stage>
|
253
|
+
<substage>93</substage>
|
254
|
+
</status>
|
255
|
+
<copyright>
|
256
|
+
<from>2001</from>
|
257
|
+
<owner>
|
258
|
+
<organization>
|
259
|
+
<name>ISO</name>
|
260
|
+
</organization>
|
261
|
+
</owner>
|
262
|
+
</copyright>
|
263
|
+
<relation type="obsoletes">
|
264
|
+
<bibitem type="standard">
|
265
|
+
<formattedref format="text/plain">ISO 123:1985</formattedref>
|
266
|
+
</bibitem>
|
267
|
+
</relation>
|
268
|
+
<relation type="updates">
|
269
|
+
<bibitem type="standard">
|
270
|
+
<formattedref format="text/plain">ISO 123:2001</formattedref>
|
271
|
+
</bibitem>
|
272
|
+
</relation>
|
273
|
+
<ext>
|
274
|
+
<doctype>international-standard</doctype>
|
275
|
+
<editorialgroup>
|
276
|
+
<technical_committee number="45" type="TC">ISO/TC 45/SC 3Raw materials (including latex) for use in the rubber industry</technical_committee>
|
277
|
+
</editorialgroup>
|
278
|
+
<ics>
|
279
|
+
<code>83.040.10</code>
|
280
|
+
<text>Latex and raw rubber</text>
|
281
|
+
</ics>
|
282
|
+
<structuredidentifier type="ISO">
|
283
|
+
<project-number>ISO 123</project-number>
|
284
|
+
</structuredidentifier>
|
285
|
+
</ext>
|
286
|
+
</bibdata>
|
66
287
|
EOS
|
67
288
|
|
68
289
|
it "does not activate biblio caches if isobib disabled" do
|
@@ -159,7 +380,7 @@ EOS
|
|
159
380
|
|
160
381
|
db = Relaton::Db.new "#{Dir.home}/.relaton/cache", nil
|
161
382
|
entry = db.load_entry("ISO(ISO 123:2001)")
|
162
|
-
expect(
|
383
|
+
expect(entry).to include("<fetched>#{Date.today.to_s}</fetched>")
|
163
384
|
expect(entry).to be_equivalent_to(ISO_123_DATED)
|
164
385
|
|
165
386
|
FileUtils.rm_rf File.expand_path("~/.relaton/cache")
|
@@ -323,7 +544,7 @@ EOS
|
|
323
544
|
db.save_entry("ISO(ISO 123:2001)",
|
324
545
|
{
|
325
546
|
"fetched" => Date.today.to_s,
|
326
|
-
"bib" =>
|
547
|
+
"bib" => RelatonIsoBib::XMLParser.from_xml(ISO_123_DATED)
|
327
548
|
}
|
328
549
|
)
|
329
550
|
|
@@ -340,10 +561,12 @@ EOS
|
|
340
561
|
end
|
341
562
|
|
342
563
|
entry = db.load_entry("ISO(ISO 123:2001)")
|
343
|
-
expect(db.fetched("ISO(ISO 123:2001)")).to eq(Date.today.to_s)
|
564
|
+
#expect(db.fetched("ISO(ISO 123:2001)")).to eq(Date.today.to_s)
|
565
|
+
expect(entry).to include("<fetched>#{Date.today.to_s}</fetched>")
|
344
566
|
expect(entry).to be_equivalent_to(ISO_123_DATED)
|
345
567
|
entry = db.load_entry("ISO(ISO 124:2014)")
|
346
|
-
expect(db.fetched("ISO(ISO 124:2014)")).to eq(Date.today.to_s)
|
568
|
+
#expect(db.fetched("ISO(ISO 124:2014)")).to eq(Date.today.to_s)
|
569
|
+
expect(entry).to include("<fetched>#{Date.today.to_s}</fetched>")
|
347
570
|
expect(entry).to be_equivalent_to(ISO_124_DATED)
|
348
571
|
|
349
572
|
FileUtils.rm_rf File.expand_path("~/.relaton/cache")
|
@@ -358,7 +581,7 @@ EOS
|
|
358
581
|
db.save_entry("ISO 123",
|
359
582
|
{
|
360
583
|
"fetched" => (Date.today - 90),
|
361
|
-
"bib" =>
|
584
|
+
"bib" => RelatonIsoBib::XMLParser.from_xml(ISO_123_SHORT)
|
362
585
|
}
|
363
586
|
)
|
364
587
|
|
@@ -374,7 +597,8 @@ EOS
|
|
374
597
|
end
|
375
598
|
|
376
599
|
entry = db.load_entry("ISO(ISO 123)")
|
377
|
-
expect(db.fetched("ISO(ISO 123)")).to eq(Date.today.to_s)
|
600
|
+
#expect(db.fetched("ISO(ISO 123)")).to eq(Date.today.to_s)
|
601
|
+
expect(entry).to include("<fetched>#{Date.today.to_s}</fetched>")
|
378
602
|
expect(entry).to be_equivalent_to(ISO_123_UNDATED)
|
379
603
|
|
380
604
|
FileUtils.rm_rf File.expand_path("~/.relaton/cache")
|
@@ -385,14 +609,14 @@ EOS
|
|
385
609
|
FileUtils.rm_rf File.expand_path("~/.relaton-bib.pstore1")
|
386
610
|
FileUtils.mv File.expand_path("~/.relaton/cache"), File.expand_path("~/.relaton-bib.pstore1"), force: true
|
387
611
|
|
388
|
-
bibitem =
|
612
|
+
bibitem = RelatonIsoBib::XMLParser.from_xml ISO_123_DATED
|
389
613
|
bibitem.instance_variable_set :@fetched, (Date.today - 90)
|
390
614
|
|
391
615
|
db = Relaton::Db.new "#{Dir.home}/.relaton/cache", nil
|
392
616
|
db.save_entry("ISO(ISO 123:2001)", bibitem.to_xml)
|
393
617
|
# {
|
394
618
|
# "fetched" => (Date.today - 90),
|
395
|
-
# "bib" =>
|
619
|
+
# "bib" => RelatonIsoBib::XMLParser.from_xml(ISO_123_DATED)
|
396
620
|
# }
|
397
621
|
# )
|
398
622
|
|
@@ -405,7 +629,8 @@ EOS
|
|
405
629
|
INPUT
|
406
630
|
|
407
631
|
entry = db.load_entry("ISO(ISO 123:2001)")
|
408
|
-
expect(db.fetched("ISO(ISO 123:2001)")).to eq((Date.today - 90).to_s)
|
632
|
+
#expect(db.fetched("ISO(ISO 123:2001)")).to eq((Date.today - 90).to_s)
|
633
|
+
expect(entry).to include("<fetched>#{Date.today - 90}</fetched>")
|
409
634
|
# expect(entry).to be_equivalent_to(ISO_123_DATED) It can't be true since fetched date is changed
|
410
635
|
|
411
636
|
FileUtils.rm_rf File.expand_path("~/.relaton/cache")
|
@@ -418,24 +643,24 @@ EOS
|
|
418
643
|
FileUtils.rm_rf "relaton/cache"
|
419
644
|
|
420
645
|
db = Relaton::Db.new "#{Dir.home}/.relaton/cache", nil
|
421
|
-
db.save_entry("ISO(ISO 123:2001)",
|
646
|
+
db.save_entry("ISO(ISO 123:2001)", RelatonIsoBib::XMLParser.from_xml(ISO_123_DATED).to_xml)
|
422
647
|
# {
|
423
648
|
# "fetched" => Date.today,
|
424
|
-
# "bib" =>
|
649
|
+
# "bib" => RelatonIsoBib::XMLParser.from_xml(ISO_123_DATED)
|
425
650
|
# }
|
426
651
|
# )
|
427
|
-
db.save_entry("ISO(ISO 124)",
|
652
|
+
db.save_entry("ISO(ISO 124)", RelatonIsoBib::XMLParser.from_xml(ISO_124_SHORT).to_xml)
|
428
653
|
# {
|
429
654
|
# "fetched" => Date.today,
|
430
|
-
# "bib" =>
|
655
|
+
# "bib" => RelatonIsoBib::XMLParser.from_xml(ISO_124_SHORT)
|
431
656
|
# }
|
432
657
|
# )
|
433
658
|
|
434
659
|
localdb = Relaton::Db.new "relaton/cache", nil
|
435
|
-
localdb.save_entry("ISO(ISO 124)",
|
660
|
+
localdb.save_entry("ISO(ISO 124)", RelatonIsoBib::XMLParser.from_xml(ISO_124_SHORT_ALT).to_xml)
|
436
661
|
# {
|
437
662
|
# "fetched" => Date.today,
|
438
|
-
# "bib" =>
|
663
|
+
# "bib" => RelatonIsoBib::XMLParser.from_xml(ISO_124_SHORT_ALT)
|
439
664
|
# }
|
440
665
|
# )
|
441
666
|
|
@@ -448,26 +673,11 @@ EOS
|
|
448
673
|
* [[[ISO124,ISO 124]]] _Standard_
|
449
674
|
EOS
|
450
675
|
|
451
|
-
output = <<~EOS
|
452
|
-
#{BLANK_HDR}
|
453
|
-
<sections>
|
454
|
-
</sections>
|
455
|
-
<bibliography>
|
456
|
-
<references id="_" obligation="informative">
|
457
|
-
<title>Normative References</title>
|
458
|
-
#{ISO_123_DATED}
|
459
|
-
#{ISO_124_SHORT_ALT}
|
460
|
-
</references></bibliography>
|
461
|
-
</standard-document>
|
462
|
-
EOS
|
463
|
-
|
464
|
-
#expect(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true))).to be_equivalent_to(output)
|
465
676
|
Asciidoctor.convert(input, backend: :standoc, header_footer: true)
|
466
|
-
|
467
|
-
expect(db.load_entry("ISO(ISO
|
468
|
-
expect(
|
469
|
-
expect(localdb.load_entry("ISO(ISO
|
470
|
-
expect(localdb.load_entry("ISO(ISO 124)")).to be_equivalent_to(ISO_124_SHORT_ALT)
|
677
|
+
expect(db.load_entry("ISO(ISO 123:2001)")).to include("Sampling - Rubber latex")
|
678
|
+
expect(db.load_entry("ISO(ISO 124)")).to include("Latex, rubber -- Determination of total solids content")
|
679
|
+
expect(localdb.load_entry("ISO(ISO 123:2001)")).to include("Sampling - Rubber latex")
|
680
|
+
expect(localdb.load_entry("ISO(ISO 124)")).to include("Latex, rubber -- Replacement")
|
471
681
|
|
472
682
|
FileUtils.rm_rf File.expand_path("~/.relaton/cache")
|
473
683
|
FileUtils.mv File.expand_path("~/.relaton-bib.pstore1"), File.expand_path("~/.relaton/cache"), force: true
|
@@ -476,19 +686,19 @@ EOS
|
|
476
686
|
private
|
477
687
|
|
478
688
|
def mock_isobib_get_123
|
479
|
-
expect(
|
689
|
+
expect(RelatonIso::IsoBibliography).to receive(:get).with("ISO 123", "2001", {}).and_return(RelatonIsoBib::XMLParser.from_xml(ISO_123_DATED))
|
480
690
|
end
|
481
691
|
|
482
692
|
def mock_isobib_get_123_undated
|
483
|
-
expect(
|
693
|
+
expect(RelatonIso::IsoBibliography).to receive(:get).with("ISO 123", nil, {}).and_return(RelatonIsoBib::XMLParser.from_xml(ISO_123_UNDATED))
|
484
694
|
end
|
485
695
|
|
486
696
|
def mock_isobib_get_124
|
487
|
-
expect(
|
697
|
+
expect(RelatonIso::IsoBibliography).to receive(:get).with("ISO 124", "2014", {}).and_return(RelatonIsoBib::XMLParser.from_xml(ISO_124_DATED))
|
488
698
|
end
|
489
699
|
|
490
700
|
def mock_ietfbib_get_123
|
491
|
-
expect(
|
701
|
+
expect(RelatonIetf::IetfBibliography).to receive(:get).with("RFC 123", nil, {}).and_return(RelatonIsoBib::XMLParser.from_xml(IETF_123_SHORT))
|
492
702
|
end
|
493
703
|
|
494
704
|
end
|