metanorma-iso 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitattributes +4 -0
- data/.gitignore +11 -0
- data/.hound.yml +3 -0
- data/.oss-guides.rubocop.yml +1077 -0
- data/.rubocop.ribose.yml +66 -0
- data/.rubocop.tb.yml +650 -0
- data/.rubocop.yml +15 -0
- data/.travis.yml +21 -0
- data/CODE_OF_CONDUCT.md +46 -0
- data/Gemfile +7 -0
- data/LICENSE +25 -0
- data/Makefile +39 -0
- data/README.adoc +882 -0
- data/Rakefile +6 -0
- data/asciidoctor-iso.gemspec.old +50 -0
- data/bin/rspec +18 -0
- data/docs/customisation.adoc +186 -0
- data/docs/guidance.adoc +436 -0
- data/docs/htmloutput.adoc +115 -0
- data/docs/quickstart.adoc +375 -0
- data/lib/asciidoctor-iso.rb +11 -0
- data/lib/asciidoctor/iso/base.rb +48 -0
- data/lib/asciidoctor/iso/biblio.rng +836 -0
- data/lib/asciidoctor/iso/cleanup.rb +39 -0
- data/lib/asciidoctor/iso/converter.rb +19 -0
- data/lib/asciidoctor/iso/front.rb +131 -0
- data/lib/asciidoctor/iso/isodoc.rng +1059 -0
- data/lib/asciidoctor/iso/isostandard.rnc +176 -0
- data/lib/asciidoctor/iso/isostandard.rng +1001 -0
- data/lib/asciidoctor/iso/section.rb +72 -0
- data/lib/asciidoctor/iso/validate.rb +190 -0
- data/lib/asciidoctor/iso/validate_requirements.rb +105 -0
- data/lib/asciidoctor/iso/validate_section.rb +214 -0
- data/lib/asciidoctor/iso/validate_style.rb +134 -0
- data/lib/asciidoctor/iso/version.rb +5 -0
- data/lib/isodoc/iso/html/header.html +206 -0
- data/lib/isodoc/iso/html/html_iso_intro.html +34 -0
- data/lib/isodoc/iso/html/html_iso_titlepage.html +34 -0
- data/lib/isodoc/iso/html/htmlstyle.scss +46 -0
- data/lib/isodoc/iso/html/isodoc.scss +696 -0
- data/lib/isodoc/iso/html/scripts.html +174 -0
- data/lib/isodoc/iso/html/style-human.scss +1277 -0
- data/lib/isodoc/iso/html/style-iso.scss +1257 -0
- data/lib/isodoc/iso/html/word_iso_intro.html +72 -0
- data/lib/isodoc/iso/html/word_iso_titlepage.html +62 -0
- data/lib/isodoc/iso/html/wordstyle.scss +1175 -0
- data/lib/isodoc/iso/html_convert.rb +118 -0
- data/lib/isodoc/iso/metadata.rb +107 -0
- data/lib/isodoc/iso/word_convert.rb +141 -0
- data/lib/metanorma/iso.rb +7 -0
- data/lib/metanorma/iso/processor.rb +44 -0
- data/spec/asciidoctor-iso/base_spec.rb +350 -0
- data/spec/asciidoctor-iso/blocks_spec.rb +469 -0
- data/spec/asciidoctor-iso/cleanup_spec.rb +765 -0
- data/spec/asciidoctor-iso/inline_spec.rb +162 -0
- data/spec/asciidoctor-iso/isobib_cache_spec.rb +332 -0
- data/spec/asciidoctor-iso/lists_spec.rb +190 -0
- data/spec/asciidoctor-iso/macros_spec.rb +111 -0
- data/spec/asciidoctor-iso/refs_spec.rb +643 -0
- data/spec/asciidoctor-iso/section_spec.rb +334 -0
- data/spec/asciidoctor-iso/table_spec.rb +307 -0
- data/spec/asciidoctor-iso/validate_spec.rb +907 -0
- data/spec/assets/header.html +7 -0
- data/spec/assets/html.css +2 -0
- data/spec/assets/htmlcover.html +4 -0
- data/spec/assets/htmlintro.html +5 -0
- data/spec/assets/i18n.yaml +2 -0
- data/spec/assets/iso.doc +1093 -0
- data/spec/assets/iso.headless.html +33 -0
- data/spec/assets/iso.html +278 -0
- data/spec/assets/iso.xml +8 -0
- data/spec/assets/rice_image1.png +0 -0
- data/spec/assets/scripts.html +3 -0
- data/spec/assets/std.css +2 -0
- data/spec/assets/word.css +2 -0
- data/spec/assets/wordcover.html +3 -0
- data/spec/assets/wordintro.html +4 -0
- data/spec/examples/103_01_02.html +247 -0
- data/spec/examples/english.yaml +69 -0
- data/spec/examples/iso_123_.xml +45 -0
- data/spec/examples/iso_123_all_parts.xml +45 -0
- data/spec/examples/iso_123_no_year_note.xml +46 -0
- data/spec/examples/iso_124_.xml +41 -0
- data/spec/examples/iso_216_.xml +47 -0
- data/spec/examples/iso_iec_12382_.xml +48 -0
- data/spec/examples/rice.adoc +715 -0
- data/spec/examples/rice.preview.html +1877 -0
- data/spec/examples/rice.sh +4 -0
- data/spec/examples/rice_images/rice_image1.png +0 -0
- data/spec/examples/rice_images/rice_image2.png +0 -0
- data/spec/examples/rice_images/rice_image3_1.png +0 -0
- data/spec/examples/rice_images/rice_image3_2.png +0 -0
- data/spec/examples/rice_images/rice_image3_3.png +0 -0
- data/spec/isodoc/i18n_spec.rb +642 -0
- data/spec/isodoc/iso_spec.rb +168 -0
- data/spec/isodoc/metadata_spec.rb +152 -0
- data/spec/isodoc/postproc_spec.rb +405 -0
- data/spec/isodoc/section_spec.rb +522 -0
- data/spec/isodoc/xref_spec.rb +1337 -0
- data/spec/metanorma/processor_spec.rb +70 -0
- data/spec/spec_helper.rb +227 -0
- metadata +402 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,642 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe IsoDoc do
|
4
|
+
it "processes English" do
|
5
|
+
expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
|
6
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
7
|
+
<bibdata>
|
8
|
+
<language>en</language>
|
9
|
+
</bibdata>
|
10
|
+
<preface>
|
11
|
+
<foreword obligation="informative">
|
12
|
+
<title>Foreword</title>
|
13
|
+
<p id="A">This is a preamble</p>
|
14
|
+
</foreword>
|
15
|
+
<introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
|
16
|
+
<title>Introduction Subsection</title>
|
17
|
+
</clause>
|
18
|
+
<patent-notice>
|
19
|
+
<p>This is patent boilerplate</p>
|
20
|
+
</patent-notice>
|
21
|
+
</introduction></preface><sections>
|
22
|
+
<clause id="D" obligation="normative">
|
23
|
+
<title>Scope</title>
|
24
|
+
<p id="E">Text</p>
|
25
|
+
</clause>
|
26
|
+
|
27
|
+
<clause id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
|
28
|
+
<title>Normal Terms</title>
|
29
|
+
<term id="J">
|
30
|
+
<preferred>Term2</preferred>
|
31
|
+
</term>
|
32
|
+
</terms>
|
33
|
+
<definitions id="K">
|
34
|
+
<dl>
|
35
|
+
<dt>Symbol</dt>
|
36
|
+
<dd>Definition</dd>
|
37
|
+
</dl>
|
38
|
+
</definitions>
|
39
|
+
</clause>
|
40
|
+
<definitions id="L">
|
41
|
+
<dl>
|
42
|
+
<dt>Symbol</dt>
|
43
|
+
<dd>Definition</dd>
|
44
|
+
</dl>
|
45
|
+
</definitions>
|
46
|
+
<clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
|
47
|
+
<title>Introduction</title>
|
48
|
+
</clause>
|
49
|
+
<clause id="O" inline-header="false" obligation="normative">
|
50
|
+
<title>Clause 4.2</title>
|
51
|
+
</clause></clause>
|
52
|
+
|
53
|
+
</sections><annex id="P" inline-header="false" obligation="normative">
|
54
|
+
<title>Annex</title>
|
55
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
56
|
+
<title>Annex A.1</title>
|
57
|
+
<clause id="Q1" inline-header="false" obligation="normative">
|
58
|
+
<title>Annex A.1a</title>
|
59
|
+
</clause>
|
60
|
+
</clause>
|
61
|
+
<appendix id="Q2" inline-header="false" obligation="normative">
|
62
|
+
<title>An Appendix</title>
|
63
|
+
</appendix>
|
64
|
+
</annex><bibliography><references id="R" obligation="informative">
|
65
|
+
<title>Normative References</title>
|
66
|
+
</references><clause id="S" obligation="informative">
|
67
|
+
<title>Bibliography</title>
|
68
|
+
<references id="T" obligation="informative">
|
69
|
+
<title>Bibliography Subsection</title>
|
70
|
+
</references>
|
71
|
+
</clause>
|
72
|
+
</bibliography>
|
73
|
+
</iso-standard>
|
74
|
+
INPUT
|
75
|
+
#{HTML_HDR}
|
76
|
+
<br/>
|
77
|
+
<div>
|
78
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
79
|
+
<p id="A">This is a preamble</p>
|
80
|
+
</div>
|
81
|
+
<br/>
|
82
|
+
<div class="Section3" id="B">
|
83
|
+
<h1 class="IntroTitle">0.  Introduction</h1>
|
84
|
+
<div id="C">
|
85
|
+
<h2>0.1. Introduction Subsection</h2>
|
86
|
+
</div>
|
87
|
+
<p>This is patent boilerplate</p>
|
88
|
+
</div>
|
89
|
+
<p class="zzSTDTitle1"/>
|
90
|
+
<div id="D">
|
91
|
+
<h1>1.  Scope</h1>
|
92
|
+
<p id="E">Text</p>
|
93
|
+
</div>
|
94
|
+
<div>
|
95
|
+
<h1>2.  Normative references</h1>
|
96
|
+
<p>There are no normative references in this document.</p>
|
97
|
+
</div>
|
98
|
+
<div id="H"><h1>3.  Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
|
99
|
+
the following terms and definitions apply.</p>
|
100
|
+
<p>ISO and IEC maintain terminological databases for use in
|
101
|
+
standardization at the following addresses:</p>
|
102
|
+
|
103
|
+
<ul>
|
104
|
+
<li> <p>ISO Online browsing platform: available at
|
105
|
+
<a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
|
106
|
+
<li> <p>IEC Electropedia: available at
|
107
|
+
<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
108
|
+
</p> </li> </ul>
|
109
|
+
<div id="I">
|
110
|
+
<h2>3.1. Normal Terms</h2>
|
111
|
+
<p class="TermNum" id="J">3.1.1</p>
|
112
|
+
<p class="Terms" style="text-align:left;">Term2</p>
|
113
|
+
|
114
|
+
</div><div id="K"><h2>3.2. Symbols and abbreviated terms</h2>
|
115
|
+
<dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
|
116
|
+
</div></div>
|
117
|
+
<div id="L" class="Symbols">
|
118
|
+
<h1>4.  Symbols and abbreviated terms</h1>
|
119
|
+
<dl>
|
120
|
+
<dt>
|
121
|
+
<p>Symbol</p>
|
122
|
+
</dt>
|
123
|
+
<dd>Definition</dd>
|
124
|
+
</dl>
|
125
|
+
</div>
|
126
|
+
<div id="M">
|
127
|
+
<h1>5.  Clause 4</h1>
|
128
|
+
<div id="N">
|
129
|
+
<h2>5.1. Introduction</h2>
|
130
|
+
</div>
|
131
|
+
<div id="O">
|
132
|
+
<h2>5.2. Clause 4.2</h2>
|
133
|
+
</div>
|
134
|
+
</div>
|
135
|
+
<br/>
|
136
|
+
<div id="P" class="Section3">
|
137
|
+
<h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
|
138
|
+
<div id="Q">
|
139
|
+
<h2>A.1. Annex A.1</h2>
|
140
|
+
<div id="Q1">
|
141
|
+
<h3>A.1.1. Annex A.1a</h3>
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
<div id="Q2">
|
145
|
+
<h2>Appendix 1. An Appendix</h2>
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
<br/>
|
149
|
+
<div>
|
150
|
+
<h1 class="Section3">Bibliography</h1>
|
151
|
+
<div>
|
152
|
+
<h2 class="Section3">Bibliography Subsection</h2>
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
</div>
|
156
|
+
</body>
|
157
|
+
</html>
|
158
|
+
OUTPUT
|
159
|
+
end
|
160
|
+
|
161
|
+
it "defaults to English" do
|
162
|
+
expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
|
163
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
164
|
+
<bibdata>
|
165
|
+
<language>tlh</language>
|
166
|
+
</bibdata>
|
167
|
+
<preface>
|
168
|
+
<foreword obligation="informative">
|
169
|
+
<title>Foreword</title>
|
170
|
+
<p id="A">This is a preamble</p>
|
171
|
+
</foreword>
|
172
|
+
<introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
|
173
|
+
<title>Introduction Subsection</title>
|
174
|
+
</clause>
|
175
|
+
<patent-notice>
|
176
|
+
<p>This is patent boilerplate</p>
|
177
|
+
</patent-notice>
|
178
|
+
</introduction></preface><sections>
|
179
|
+
<clause id="D" obligation="normative">
|
180
|
+
<title>Scope</title>
|
181
|
+
<p id="E">Text</p>
|
182
|
+
</clause>
|
183
|
+
|
184
|
+
<clause id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
|
185
|
+
<title>Normal Terms</title>
|
186
|
+
<term id="J">
|
187
|
+
<preferred>Term2</preferred>
|
188
|
+
</term>
|
189
|
+
</terms>
|
190
|
+
<definitions id="K">
|
191
|
+
<dl>
|
192
|
+
<dt>Symbol</dt>
|
193
|
+
<dd>Definition</dd>
|
194
|
+
</dl>
|
195
|
+
</definitions>
|
196
|
+
</clause>
|
197
|
+
<definitions id="L">
|
198
|
+
<dl>
|
199
|
+
<dt>Symbol</dt>
|
200
|
+
<dd>Definition</dd>
|
201
|
+
</dl>
|
202
|
+
</definitions>
|
203
|
+
<clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
|
204
|
+
<title>Introduction</title>
|
205
|
+
</clause>
|
206
|
+
<clause id="O" inline-header="false" obligation="normative">
|
207
|
+
<title>Clause 4.2</title>
|
208
|
+
</clause></clause>
|
209
|
+
|
210
|
+
</sections><annex id="P" inline-header="false" obligation="normative">
|
211
|
+
<title>Annex</title>
|
212
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
213
|
+
<title>Annex A.1</title>
|
214
|
+
<clause id="Q1" inline-header="false" obligation="normative">
|
215
|
+
<title>Annex A.1a</title>
|
216
|
+
</clause>
|
217
|
+
</clause>
|
218
|
+
<appendix id="Q2" inline-header="false" obligation="normative">
|
219
|
+
<title>An Appendix</title>
|
220
|
+
</appendix>
|
221
|
+
</annex><bibliography><references id="R" obligation="informative">
|
222
|
+
<title>Normative References</title>
|
223
|
+
</references><clause id="S" obligation="informative">
|
224
|
+
<title>Bibliography</title>
|
225
|
+
<references id="T" obligation="informative">
|
226
|
+
<title>Bibliography Subsection</title>
|
227
|
+
</references>
|
228
|
+
</clause>
|
229
|
+
</bibliography>
|
230
|
+
</iso-standard>
|
231
|
+
INPUT
|
232
|
+
#{HTML_HDR}
|
233
|
+
<br/>
|
234
|
+
<div>
|
235
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
236
|
+
<p id="A">This is a preamble</p>
|
237
|
+
</div>
|
238
|
+
<br/>
|
239
|
+
<div class="Section3" id="B">
|
240
|
+
<h1 class="IntroTitle">0.  Introduction</h1>
|
241
|
+
<div id="C">
|
242
|
+
<h2>0.1. Introduction Subsection</h2>
|
243
|
+
</div>
|
244
|
+
<p>This is patent boilerplate</p>
|
245
|
+
</div>
|
246
|
+
<p class="zzSTDTitle1"/>
|
247
|
+
<div id="D">
|
248
|
+
<h1>1.  Scope</h1>
|
249
|
+
<p id="E">Text</p>
|
250
|
+
</div>
|
251
|
+
<div>
|
252
|
+
<h1>2.  Normative references</h1>
|
253
|
+
<p>There are no normative references in this document.</p>
|
254
|
+
</div>
|
255
|
+
<div id="H"><h1>3.  Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
|
256
|
+
the following terms and definitions apply.</p>
|
257
|
+
<p>ISO and IEC maintain terminological databases for use in
|
258
|
+
standardization at the following addresses:</p>
|
259
|
+
|
260
|
+
<ul>
|
261
|
+
<li> <p>ISO Online browsing platform: available at
|
262
|
+
<a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
|
263
|
+
<li> <p>IEC Electropedia: available at
|
264
|
+
<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
265
|
+
</p> </li> </ul>
|
266
|
+
<div id="I">
|
267
|
+
<h2>3.1. Normal Terms</h2>
|
268
|
+
<p class="TermNum" id="J">3.1.1</p>
|
269
|
+
<p class="Terms" style="text-align:left;">Term2</p>
|
270
|
+
|
271
|
+
</div><div id="K"><h2>3.2. Symbols and abbreviated terms</h2>
|
272
|
+
<dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
|
273
|
+
</div></div>
|
274
|
+
<div id="L" class="Symbols">
|
275
|
+
<h1>4.  Symbols and abbreviated terms</h1>
|
276
|
+
<dl>
|
277
|
+
<dt>
|
278
|
+
<p>Symbol</p>
|
279
|
+
</dt>
|
280
|
+
<dd>Definition</dd>
|
281
|
+
</dl>
|
282
|
+
</div>
|
283
|
+
<div id="M">
|
284
|
+
<h1>5.  Clause 4</h1>
|
285
|
+
<div id="N">
|
286
|
+
<h2>5.1. Introduction</h2>
|
287
|
+
</div>
|
288
|
+
<div id="O">
|
289
|
+
<h2>5.2. Clause 4.2</h2>
|
290
|
+
</div>
|
291
|
+
</div>
|
292
|
+
<br/>
|
293
|
+
<div id="P" class="Section3">
|
294
|
+
<h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
|
295
|
+
<div id="Q">
|
296
|
+
<h2>A.1. Annex A.1</h2>
|
297
|
+
<div id="Q1">
|
298
|
+
<h3>A.1.1. Annex A.1a</h3>
|
299
|
+
</div>
|
300
|
+
</div>
|
301
|
+
<div id="Q2">
|
302
|
+
<h2>Appendix 1. An Appendix</h2>
|
303
|
+
</div>
|
304
|
+
</div>
|
305
|
+
<br/>
|
306
|
+
<div>
|
307
|
+
<h1 class="Section3">Bibliography</h1>
|
308
|
+
<div>
|
309
|
+
<h2 class="Section3">Bibliography Subsection</h2>
|
310
|
+
</div>
|
311
|
+
</div>
|
312
|
+
</div>
|
313
|
+
</body>
|
314
|
+
</html>
|
315
|
+
OUTPUT
|
316
|
+
end
|
317
|
+
|
318
|
+
it "processes French" do
|
319
|
+
expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
|
320
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
321
|
+
<bibdata>
|
322
|
+
<language>fr</language>
|
323
|
+
</bibdata>
|
324
|
+
<preface>
|
325
|
+
<foreword obligation="informative">
|
326
|
+
<title>Foreword</title>
|
327
|
+
<p id="A">This is a preamble</p>
|
328
|
+
</foreword>
|
329
|
+
<introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
|
330
|
+
<title>Introduction Subsection</title>
|
331
|
+
</clause>
|
332
|
+
<patent-notice>
|
333
|
+
<p>This is patent boilerplate</p>
|
334
|
+
</patent-notice>
|
335
|
+
</introduction></preface><sections>
|
336
|
+
<clause id="D" obligation="normative">
|
337
|
+
<title>Scope</title>
|
338
|
+
<p id="E">Text</p>
|
339
|
+
</clause>
|
340
|
+
|
341
|
+
<clause id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
|
342
|
+
<title>Normal Terms</title>
|
343
|
+
<term id="J">
|
344
|
+
<preferred>Term2</preferred>
|
345
|
+
</term>
|
346
|
+
</terms>
|
347
|
+
<definitions id="K">
|
348
|
+
<dl>
|
349
|
+
<dt>Symbol</dt>
|
350
|
+
<dd>Definition</dd>
|
351
|
+
</dl>
|
352
|
+
</definitions>
|
353
|
+
</clause>
|
354
|
+
<definitions id="L">
|
355
|
+
<dl>
|
356
|
+
<dt>Symbol</dt>
|
357
|
+
<dd>Definition</dd>
|
358
|
+
</dl>
|
359
|
+
</definitions>
|
360
|
+
<clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
|
361
|
+
<title>Introduction</title>
|
362
|
+
</clause>
|
363
|
+
<clause id="O" inline-header="false" obligation="normative">
|
364
|
+
<title>Clause 4.2</title>
|
365
|
+
</clause></clause>
|
366
|
+
|
367
|
+
</sections><annex id="P" inline-header="false" obligation="normative">
|
368
|
+
<title>Annex</title>
|
369
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
370
|
+
<title>Annex A.1</title>
|
371
|
+
<clause id="Q1" inline-header="false" obligation="normative">
|
372
|
+
<title>Annex A.1a</title>
|
373
|
+
</clause>
|
374
|
+
</clause>
|
375
|
+
<appendix id="Q2" inline-header="false" obligation="normative">
|
376
|
+
<title>An Appendix</title>
|
377
|
+
</appendix>
|
378
|
+
</annex><bibliography><references id="R" obligation="informative">
|
379
|
+
<title>Normative References</title>
|
380
|
+
</references><clause id="S" obligation="informative">
|
381
|
+
<title>Bibliography</title>
|
382
|
+
<references id="T" obligation="informative">
|
383
|
+
<title>Bibliography Subsection</title>
|
384
|
+
</references>
|
385
|
+
</clause>
|
386
|
+
</bibliography>
|
387
|
+
</iso-standard>
|
388
|
+
INPUT
|
389
|
+
#{HTML_HDR}
|
390
|
+
<br/>
|
391
|
+
<div>
|
392
|
+
<h1 class="ForewordTitle">Avant-propos</h1>
|
393
|
+
<p id="A">This is a preamble</p>
|
394
|
+
</div>
|
395
|
+
<br/>
|
396
|
+
<div class="Section3" id="B">
|
397
|
+
<h1 class="IntroTitle">0.  Introduction</h1>
|
398
|
+
<div id="C">
|
399
|
+
<h2>0.1. Introduction Subsection</h2>
|
400
|
+
</div>
|
401
|
+
<p>This is patent boilerplate</p>
|
402
|
+
</div>
|
403
|
+
<p class="zzSTDTitle1"/>
|
404
|
+
<div id="D">
|
405
|
+
<h1>1.  Domaine d'application</h1>
|
406
|
+
<p id="E">Text</p>
|
407
|
+
</div>
|
408
|
+
<div>
|
409
|
+
<h1>2.  Références normatives</h1>
|
410
|
+
<p>Le présent document ne contient aucune référence normative.</p>
|
411
|
+
</div>
|
412
|
+
<div id="H"><h1>3.  Terms, définitions, symboles et termes abrégés</h1><p>Pour les besoins du présent document, les termes et définitions suivants s'appliquent.</p>
|
413
|
+
<p>L'ISO et l'IEC tiennent à jour des bases de données terminologiques
|
414
|
+
destinées à être utilisées en normalisation, consultables aux adresses
|
415
|
+
suivantes:</p>
|
416
|
+
<ul>
|
417
|
+
<li> <p>ISO Online browsing platform: disponible à l'adresse
|
418
|
+
<a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
|
419
|
+
<li> <p>IEC Electropedia: disponible à l'adresse
|
420
|
+
<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
421
|
+
</p> </li> </ul>
|
422
|
+
<div id="I">
|
423
|
+
<h2>3.1. Normal Terms</h2>
|
424
|
+
<p class="TermNum" id="J">3.1.1</p>
|
425
|
+
<p class="Terms" style="text-align:left;">Term2</p>
|
426
|
+
|
427
|
+
</div><div id="K"><h2>3.2. Symboles et termes abrégés</h2>
|
428
|
+
<dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
|
429
|
+
</div></div>
|
430
|
+
<div id="L" class="Symbols">
|
431
|
+
<h1>4.  Symboles et termes abrégés</h1>
|
432
|
+
<dl>
|
433
|
+
<dt>
|
434
|
+
<p>Symbol</p>
|
435
|
+
</dt>
|
436
|
+
<dd>Definition</dd>
|
437
|
+
</dl>
|
438
|
+
</div>
|
439
|
+
<div id="M">
|
440
|
+
<h1>5.  Clause 4</h1>
|
441
|
+
<div id="N">
|
442
|
+
<h2>5.1. Introduction</h2>
|
443
|
+
</div>
|
444
|
+
<div id="O">
|
445
|
+
<h2>5.2. Clause 4.2</h2>
|
446
|
+
</div>
|
447
|
+
</div>
|
448
|
+
<br/>
|
449
|
+
<div id="P" class="Section3">
|
450
|
+
<h1 class="Annex"><b>Annexe A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
|
451
|
+
<div id="Q">
|
452
|
+
<h2>A.1. Annex A.1</h2>
|
453
|
+
<div id="Q1">
|
454
|
+
<h3>A.1.1. Annex A.1a</h3>
|
455
|
+
</div>
|
456
|
+
</div>
|
457
|
+
<div id="Q2">
|
458
|
+
<h2>Appendice 1. An Appendix</h2>
|
459
|
+
</div>
|
460
|
+
</div>
|
461
|
+
<br/>
|
462
|
+
<div>
|
463
|
+
<h1 class="Section3">Bibliographie</h1>
|
464
|
+
<div>
|
465
|
+
<h2 class="Section3">Bibliography Subsection</h2>
|
466
|
+
</div>
|
467
|
+
</div>
|
468
|
+
</div>
|
469
|
+
</body>
|
470
|
+
</html>
|
471
|
+
OUTPUT
|
472
|
+
end
|
473
|
+
|
474
|
+
it "processes Simplified Chinese" do
|
475
|
+
expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
|
476
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
477
|
+
<bibdata>
|
478
|
+
<language>zh</language>
|
479
|
+
<script>Hans</script>
|
480
|
+
</bibdata>
|
481
|
+
<preface>
|
482
|
+
<foreword obligation="informative">
|
483
|
+
<title>Foreword</title>
|
484
|
+
<p id="A">This is a preamble</p>
|
485
|
+
</foreword>
|
486
|
+
<introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
|
487
|
+
<title>Introduction Subsection</title>
|
488
|
+
</clause>
|
489
|
+
<patent-notice>
|
490
|
+
<p>This is patent boilerplate</p>
|
491
|
+
</patent-notice>
|
492
|
+
</introduction></preface><sections>
|
493
|
+
<clause id="D" obligation="normative">
|
494
|
+
<title>Scope</title>
|
495
|
+
<p id="E"><eref type="inline" bibitemid="ISO712"><locality type="table"><referenceFrom>1</referenceFrom><referenceTo>1</referenceTo></locality></eref></p>
|
496
|
+
</clause>
|
497
|
+
|
498
|
+
<clause id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
|
499
|
+
<title>Normal Terms</title>
|
500
|
+
<term id="J">
|
501
|
+
<preferred>Term2</preferred>
|
502
|
+
</term>
|
503
|
+
</terms>
|
504
|
+
<definitions id="K">
|
505
|
+
<dl>
|
506
|
+
<dt>Symbol</dt>
|
507
|
+
<dd>Definition</dd>
|
508
|
+
</dl>
|
509
|
+
</definitions>
|
510
|
+
</clause>
|
511
|
+
<definitions id="L">
|
512
|
+
<dl>
|
513
|
+
<dt>Symbol</dt>
|
514
|
+
<dd>Definition</dd>
|
515
|
+
</dl>
|
516
|
+
</definitions>
|
517
|
+
<clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
|
518
|
+
<title>Introduction</title>
|
519
|
+
</clause>
|
520
|
+
<clause id="O" inline-header="false" obligation="normative">
|
521
|
+
<title>Clause 4.2</title>
|
522
|
+
</clause></clause>
|
523
|
+
|
524
|
+
</sections><annex id="P" inline-header="false" obligation="normative">
|
525
|
+
<title>Annex</title>
|
526
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
527
|
+
<title>Annex A.1</title>
|
528
|
+
<clause id="Q1" inline-header="false" obligation="normative">
|
529
|
+
<title>Annex A.1a</title>
|
530
|
+
</clause>
|
531
|
+
</clause>
|
532
|
+
<appendix id="Q2" inline-header="false" obligation="normative">
|
533
|
+
<title>An Appendix</title>
|
534
|
+
</appendix>
|
535
|
+
</annex><bibliography><references id="R" obligation="informative">
|
536
|
+
<title>Normative References</title>
|
537
|
+
<bibitem id="ISO712" type="standard">
|
538
|
+
<title format="text/plain">Cereals and cereal products</title>
|
539
|
+
<docidentifier>ISO 712</docidentifier>
|
540
|
+
<contributor>
|
541
|
+
<role type="publisher"/>
|
542
|
+
<organization>
|
543
|
+
<abbreviation>ISO</abbreviation>
|
544
|
+
</organization>
|
545
|
+
</contributor>
|
546
|
+
</bibitem>
|
547
|
+
</references><clause id="S" obligation="informative">
|
548
|
+
<title>Bibliography</title>
|
549
|
+
<references id="T" obligation="informative">
|
550
|
+
<title>Bibliography Subsection</title>
|
551
|
+
</references>
|
552
|
+
</clause>
|
553
|
+
</bibliography>
|
554
|
+
</iso-standard>
|
555
|
+
INPUT
|
556
|
+
#{HTML_HDR}
|
557
|
+
<br/>
|
558
|
+
<div>
|
559
|
+
<h1 class="ForewordTitle">前言</h1>
|
560
|
+
<p id="A">This is a preamble</p>
|
561
|
+
</div>
|
562
|
+
<br/>
|
563
|
+
<div class="Section3" id="B">
|
564
|
+
<h1 class="IntroTitle">0.  引言</h1>
|
565
|
+
<div id="C">
|
566
|
+
<h2>0.1. Introduction Subsection</h2>
|
567
|
+
</div>
|
568
|
+
<p>This is patent boilerplate</p>
|
569
|
+
</div>
|
570
|
+
<p class="zzSTDTitle1"/>
|
571
|
+
<div id="D">
|
572
|
+
<h1>1.  范围</h1>
|
573
|
+
<p id="E">
|
574
|
+
<a href="#ISO712">ISO 712、第1–<referenceto>1</referenceto>表</a>
|
575
|
+
</p>
|
576
|
+
</div>
|
577
|
+
<div>
|
578
|
+
<h1>2.  规范性引用文件</h1>
|
579
|
+
<p>下列文件对于本文件的应用是必不可少的。 凡是注日期的引用文件,仅注日期的版本适用于本文件。 凡是不注日期的引用文件,其最新版本(包括所有的修改单)适用于本文件。</p>
|
580
|
+
<p id="ISO712" class="NormRef">ISO 712, <i> Cereals and cereal products</i></p>
|
581
|
+
</div>
|
582
|
+
<div id="H"><h1>3.  术语、定义、符号、代号和缩略语</h1><p>下列术语和定义适用于本文件。</p>
|
583
|
+
<p>ISO和IEC用于标准化的术语数据库地址如下:</p>
|
584
|
+
<ul>
|
585
|
+
<li> <p>ISO在线浏览平台:
|
586
|
+
位于<a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
|
587
|
+
<li> <p>IEC Electropedia:
|
588
|
+
位于<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
589
|
+
</p> </li> </ul>
|
590
|
+
<div id="I">
|
591
|
+
<h2>3.1. Normal Terms</h2>
|
592
|
+
<p class="TermNum" id="J">3.1.1</p>
|
593
|
+
<p class="Terms" style="text-align:left;">Term2</p>
|
594
|
+
|
595
|
+
</div><div id="K"><h2>3.2. 符号、代号和缩略语</h2>
|
596
|
+
<dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
|
597
|
+
</div></div>
|
598
|
+
<div id="L" class="Symbols">
|
599
|
+
<h1>4.  符号、代号和缩略语</h1>
|
600
|
+
<dl>
|
601
|
+
<dt>
|
602
|
+
<p>Symbol</p>
|
603
|
+
</dt>
|
604
|
+
<dd>Definition</dd>
|
605
|
+
</dl>
|
606
|
+
</div>
|
607
|
+
<div id="M">
|
608
|
+
<h1>5.  Clause 4</h1>
|
609
|
+
<div id="N">
|
610
|
+
<h2>5.1. Introduction</h2>
|
611
|
+
</div>
|
612
|
+
<div id="O">
|
613
|
+
<h2>5.2. Clause 4.2</h2>
|
614
|
+
</div>
|
615
|
+
</div>
|
616
|
+
<br/>
|
617
|
+
<div id="P" class="Section3">
|
618
|
+
<h1 class="Annex">附件A<br/>(规范性附录)<br/><br/><b>Annex</b></h1>
|
619
|
+
<div id="Q">
|
620
|
+
<h2>A.1. Annex A.1</h2>
|
621
|
+
<div id="Q1">
|
622
|
+
<h3>A.1.1. Annex A.1a</h3>
|
623
|
+
</div>
|
624
|
+
</div>
|
625
|
+
<div id="Q2">
|
626
|
+
<h2>附录1. An Appendix</h2>
|
627
|
+
</div>
|
628
|
+
</div>
|
629
|
+
<br/>
|
630
|
+
<div>
|
631
|
+
<h1 class="Section3">参考文献</h1>
|
632
|
+
<div>
|
633
|
+
<h2 class="Section3">Bibliography Subsection</h2>
|
634
|
+
</div>
|
635
|
+
</div>
|
636
|
+
</div>
|
637
|
+
</body>
|
638
|
+
</html>
|
639
|
+
OUTPUT
|
640
|
+
end
|
641
|
+
|
642
|
+
end
|