isodoc 0.5.5 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +46 -0
- data/LICENSE +25 -0
- data/README.adoc +1 -1
- data/Rakefile +6 -0
- data/isodoc.gemspec +1 -0
- data/lib/isodoc.rb +4 -95
- data/lib/isodoc/cleanup.rb +14 -10
- data/lib/isodoc/{notes.rb → comments.rb} +0 -73
- data/lib/isodoc/convert.rb +97 -0
- data/lib/isodoc/footnotes.rb +74 -0
- data/lib/isodoc/html.rb +41 -4
- data/lib/isodoc/i18n-en.yaml +1 -0
- data/lib/isodoc/i18n-fr.yaml +1 -0
- data/lib/isodoc/i18n-zh-Hans.yaml +1 -0
- data/lib/isodoc/i18n.rb +1 -0
- data/lib/isodoc/inline.rb +4 -12
- data/lib/isodoc/iso2wordhtml.rb +26 -13
- data/lib/isodoc/metadata.rb +23 -10
- data/lib/isodoc/references.rb +20 -22
- data/lib/isodoc/section.rb +4 -3
- data/lib/isodoc/table.rb +0 -2
- data/lib/isodoc/terms.rb +2 -13
- data/lib/isodoc/utils.rb +24 -3
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/wordconvert/comments.rb +155 -0
- data/lib/isodoc/wordconvert/convert.rb +31 -0
- data/lib/isodoc/wordconvert/footnotes.rb +80 -0
- data/lib/isodoc/wordconvert/wordconvertmodule.rb +212 -0
- data/lib/isodoc/xref_gen.rb +50 -79
- data/lib/isodoc/xref_sect_gen.rb +82 -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.xml +8 -0
- data/spec/assets/rice_image1.png +0 -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/isodoc/blocks_spec.rb +130 -47
- data/spec/isodoc/cleanup_spec.rb +693 -0
- data/spec/isodoc/footnotes_spec.rb +282 -0
- data/spec/isodoc/i18n_spec.rb +662 -0
- data/spec/isodoc/inline_spec.rb +344 -0
- data/spec/isodoc/lists_spec.rb +81 -18
- data/spec/isodoc/metadata_spec.rb +141 -0
- data/spec/isodoc/postproc_spec.rb +444 -0
- data/spec/isodoc/ref_spec.rb +158 -0
- data/spec/isodoc/section_spec.rb +275 -112
- data/spec/isodoc/table_spec.rb +146 -8
- data/spec/isodoc/terms_spec.rb +118 -0
- data/spec/isodoc/xref_spec.rb +490 -114
- metadata +46 -4
- data/lib/isodoc/postprocessing.rb +0 -176
@@ -0,0 +1,282 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe IsoDoc do
|
4
|
+
it "processes IsoXML footnotes" do
|
5
|
+
expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
|
6
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
7
|
+
<foreword>
|
8
|
+
<p>A.<fn reference="2">
|
9
|
+
<p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
|
10
|
+
</fn></p>
|
11
|
+
<p>B.<fn reference="2">
|
12
|
+
<p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
|
13
|
+
</fn></p>
|
14
|
+
<p>C.<fn reference="1">
|
15
|
+
<p id="_1e228e29-baef-4f38-b048-b05a051747e4">Hello! denoted as 15 % (m/m).</p>
|
16
|
+
</fn></p>
|
17
|
+
</foreword>
|
18
|
+
</iso-standard>
|
19
|
+
INPUT
|
20
|
+
<html xmlns:epub="http://www.idpf.org/2007/ops">
|
21
|
+
<head>
|
22
|
+
<title>test</title>
|
23
|
+
<body lang="EN-US" link="blue" vlink="#954F72">
|
24
|
+
<div class="WordSection1">
|
25
|
+
<p> </p>
|
26
|
+
</div>
|
27
|
+
<br/>
|
28
|
+
<div class="WordSection2">
|
29
|
+
<br/>
|
30
|
+
<div>
|
31
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
32
|
+
<p>A.<a href="#ftn2" epub:type="footnote"><sup>2</sup></a></p>
|
33
|
+
<p>B.<a href="#ftn2" epub:type="footnote"><sup>2</sup></a></p>
|
34
|
+
<p>C.<a href="#ftn1" epub:type="footnote"><sup>1</sup></a></p>
|
35
|
+
</div>
|
36
|
+
<p> </p>
|
37
|
+
</div>
|
38
|
+
<br/>
|
39
|
+
<div class="WordSection3">
|
40
|
+
<p class="zzSTDTitle1"/>
|
41
|
+
<aside id="ftn2">
|
42
|
+
<p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
|
43
|
+
</aside>
|
44
|
+
<aside id="ftn1">
|
45
|
+
<p id="_1e228e29-baef-4f38-b048-b05a051747e4">Hello! denoted as 15 % (m/m).</p>
|
46
|
+
</aside>
|
47
|
+
</div>
|
48
|
+
</body>
|
49
|
+
</head>
|
50
|
+
</html>
|
51
|
+
OUTPUT
|
52
|
+
end
|
53
|
+
|
54
|
+
it "processes IsoXML footnotes (Word)" do
|
55
|
+
expect(IsoDoc::WordConvert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
|
56
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
57
|
+
<foreword>
|
58
|
+
<p>A.<fn reference="2">
|
59
|
+
<p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
|
60
|
+
</fn></p>
|
61
|
+
<p>B.<fn reference="2">
|
62
|
+
<p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
|
63
|
+
</fn></p>
|
64
|
+
<p>C.<fn reference="1">
|
65
|
+
<p id="_1e228e29-baef-4f38-b048-b05a051747e4">Hello! denoted as 15 % (m/m).</p>
|
66
|
+
</fn></p>
|
67
|
+
</foreword>
|
68
|
+
</iso-standard>
|
69
|
+
INPUT
|
70
|
+
<html xmlns:epub="http://www.idpf.org/2007/ops">
|
71
|
+
<head>
|
72
|
+
<title>test</title>
|
73
|
+
<body lang="EN-US" link="blue" vlink="#954F72">
|
74
|
+
<div class="WordSection1">
|
75
|
+
<p> </p>
|
76
|
+
</div>
|
77
|
+
<br clear="all" class="section"/>
|
78
|
+
<div class="WordSection2">
|
79
|
+
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
80
|
+
<div>
|
81
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
82
|
+
<p>A.<a href="#ftn2" epub:type="footnote"><sup>2</sup></a></p>
|
83
|
+
<p>B.<a href="#ftn2" epub:type="footnote"><sup>2</sup></a></p>
|
84
|
+
<p>C.<a href="#ftn1" epub:type="footnote"><sup>1</sup></a></p>
|
85
|
+
</div>
|
86
|
+
<p> </p>
|
87
|
+
</div>
|
88
|
+
<br clear="all" class="section"/>
|
89
|
+
<div class="WordSection3">
|
90
|
+
<p class="zzSTDTitle1"/>
|
91
|
+
<aside id="ftn2">
|
92
|
+
<p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
|
93
|
+
</aside>
|
94
|
+
<aside id="ftn1">
|
95
|
+
<p id="_1e228e29-baef-4f38-b048-b05a051747e4">Hello! denoted as 15 % (m/m).</p>
|
96
|
+
</aside>
|
97
|
+
</div>
|
98
|
+
</body>
|
99
|
+
</head>
|
100
|
+
</html>
|
101
|
+
OUTPUT
|
102
|
+
end
|
103
|
+
|
104
|
+
it "processes IsoXML reviewer notes" do
|
105
|
+
system "rm -f test.html"
|
106
|
+
IsoDoc::Convert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert_file(<<~"INPUT", "test", false)
|
107
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
108
|
+
<foreword>
|
109
|
+
<p id="A">A.</p>
|
110
|
+
<p id="B">B.</p>
|
111
|
+
<review reviewer="ISO" id="_4f4dff63-23c1-4ecb-8ac6-d3ffba93c711" date="20170101T0000" from="A" to="B"><p id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c07">A Foreword shall appear in each document. The generic text is shown here. It does not contain requirements, recommendations or permissions.</p>
|
112
|
+
<p id="_f1a8b9da-ca75-458b-96fa-d4af7328975e">For further information on the Foreword, see <strong>ISO/IEC Directives, Part 2, 2016, Clause 12.</strong></p></review>
|
113
|
+
<p id="C">C.</p>
|
114
|
+
<review reviewer="ISO" id="_4f4dff63-23c1-4ecb-8ac6-d3ffba93c712" date="20170108T0000" from="C" to="C"><p id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08">Second note.</p></review>
|
115
|
+
</foreword>
|
116
|
+
<introduction>
|
117
|
+
<review reviewer="ISO" id="_4f4dff63-23c1-4ecb-8ac6-d3ffba93c712" date="20170108T0000" from="A" to="C"><p id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08">Second note.</p></review>
|
118
|
+
</introduction>
|
119
|
+
</iso-standard>
|
120
|
+
INPUT
|
121
|
+
html = File.read("test.html").sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")
|
122
|
+
expect(html).to be_equivalent_to <<~"OUTPUT"
|
123
|
+
<body lang="EN-US" link="blue" vlink="#954F72" xml:lang="EN-US">
|
124
|
+
<div class="WordSection1">
|
125
|
+
<p> </p>
|
126
|
+
</div>
|
127
|
+
<br />
|
128
|
+
<div class="WordSection2">
|
129
|
+
<br />
|
130
|
+
<div>
|
131
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
132
|
+
<span style="MsoCommentReference" target="1" class="commentLink" from="A" to="B">
|
133
|
+
<span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
|
134
|
+
<a style="mso-comment-reference:SMC_1;mso-comment-date:20170101T0000"><span style="MsoCommentReference" target="3" class="commentLink" from="A" to="C">
|
135
|
+
<span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
|
136
|
+
<a style="mso-comment-reference:SMC_3;mso-comment-date:20170108T0000"><p id="A">A.</p></a>
|
137
|
+
<span style="mso-comment-continuation:3"><span style="mso-special-character:comment" target="3"></span></span>
|
138
|
+
</span>
|
139
|
+
</span></a>
|
140
|
+
<span style="mso-comment-continuation:3"><span style="mso-comment-continuation:1"><span style="mso-special-character:comment" target="1"></span></span></span>
|
141
|
+
</span>
|
142
|
+
</span>
|
143
|
+
<span style="mso-comment-continuation:3"><span style="mso-comment-continuation:1"><p id="B">B.</p></span></span>
|
144
|
+
|
145
|
+
<span style="MsoCommentReference" target="2" class="commentLink" from="C" to="C">
|
146
|
+
<span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
|
147
|
+
<a style="mso-comment-reference:SMC_2;mso-comment-date:20170108T0000"><span style="mso-comment-continuation:3"><p id="C">C.</p></span></a>
|
148
|
+
<span style="mso-special-character:comment" target="2"></span>
|
149
|
+
</span>
|
150
|
+
</span>
|
151
|
+
|
152
|
+
</div>
|
153
|
+
<br />
|
154
|
+
<div class="Section3" id="">
|
155
|
+
<h1 class="IntroTitle">Introduction</h1>
|
156
|
+
|
157
|
+
</div>
|
158
|
+
<p> </p>
|
159
|
+
</div>
|
160
|
+
<br />
|
161
|
+
<div class="WordSection3">
|
162
|
+
<p class="zzSTDTitle1"></p>
|
163
|
+
<div style="mso-element:comment-list"><div style="mso-element:comment" id="3">
|
164
|
+
<span style="mso-comment-author:"ISO""></span>
|
165
|
+
|
166
|
+
<p class="MsoCommentText" id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08"><span style="MsoCommentReference">
|
167
|
+
<span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
|
168
|
+
<span style="mso-special-character:comment"></span>
|
169
|
+
</span>
|
170
|
+
</span>Second note.</p>
|
171
|
+
</div>
|
172
|
+
<div style="mso-element:comment" id="1"><span style="mso-comment-author:"ISO""></span><p class="MsoCommentText" id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c07"><span style="MsoCommentReference"><span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB"><span style="mso-special-character:comment"></span></span></span>A Foreword shall appear in each document. The generic text is shown here. It does not contain requirements, recommendations or permissions.</p>
|
173
|
+
<p class="MsoCommentText" id="_f1a8b9da-ca75-458b-96fa-d4af7328975e">For further information on the Foreword, see <b>ISO/IEC Directives, Part 2, 2016, Clause 12.</b></p></div>
|
174
|
+
<div style="mso-element:comment" id="2">
|
175
|
+
<span style="mso-comment-author:"ISO""></span>
|
176
|
+
|
177
|
+
<p class="MsoCommentText" id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08"><span style="MsoCommentReference">
|
178
|
+
<span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
|
179
|
+
<span style="mso-special-character:comment"></span>
|
180
|
+
</span>
|
181
|
+
</span>Second note.</p>
|
182
|
+
</div></div>
|
183
|
+
</div>
|
184
|
+
<script type="text/x-mathjax-config">
|
185
|
+
MathJax.Hub.Config({
|
186
|
+
asciimath2jax: {
|
187
|
+
delimiters: [['(#(', ')#)']]
|
188
|
+
}
|
189
|
+
});
|
190
|
+
</script>
|
191
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=AM_HTMLorMML"></script>
|
192
|
+
</body>
|
193
|
+
</html>
|
194
|
+
OUTPUT
|
195
|
+
end
|
196
|
+
|
197
|
+
it "processes IsoXML reviewer notes (Word)" do
|
198
|
+
system "rm -f test.doc"
|
199
|
+
IsoDoc::WordConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert_file(<<~"INPUT", "test", false)
|
200
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
201
|
+
<foreword>
|
202
|
+
<p id="A">A.</p>
|
203
|
+
<p id="B">B.</p>
|
204
|
+
<review reviewer="ISO" id="_4f4dff63-23c1-4ecb-8ac6-d3ffba93c711" date="20170101T0000" from="A" to="B"><p id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c07">A Foreword shall appear in each document. The generic text is shown here. It does not contain requirements, recommendations or permissions.</p>
|
205
|
+
<p id="_f1a8b9da-ca75-458b-96fa-d4af7328975e">For further information on the Foreword, see <strong>ISO/IEC Directives, Part 2, 2016, Clause 12.</strong></p></review>
|
206
|
+
<p id="C">C.</p>
|
207
|
+
<review reviewer="ISO" id="_4f4dff63-23c1-4ecb-8ac6-d3ffba93c712" date="20170108T0000" from="C" to="C"><p id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08">Second note.</p></review>
|
208
|
+
</foreword>
|
209
|
+
<introduction>
|
210
|
+
<review reviewer="ISO" id="_4f4dff63-23c1-4ecb-8ac6-d3ffba93c712" date="20170108T0000" from="A" to="C"><p id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08">Second note.</p></review>
|
211
|
+
</introduction>
|
212
|
+
</iso-standard>
|
213
|
+
INPUT
|
214
|
+
html = File.read("test.doc").sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")
|
215
|
+
expect(html).to be_equivalent_to <<~"OUTPUT"
|
216
|
+
<body lang="EN-US" link="blue" vlink="#954F72" xml:lang="EN-US">
|
217
|
+
<div class="WordSection1">
|
218
|
+
<p class="MsoNormal"> </p>
|
219
|
+
</div>
|
220
|
+
<br clear="all" class="section"/>
|
221
|
+
<div class="WordSection2">
|
222
|
+
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
223
|
+
<div>
|
224
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
225
|
+
<span style="MsoCommentReference" target="1" class="commentLink" from="A" to="B">
|
226
|
+
<span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
|
227
|
+
<a style="mso-comment-reference:SMC_1;mso-comment-date:20170101T0000"><span style="MsoCommentReference" target="3" class="commentLink" from="A" to="C">
|
228
|
+
<span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
|
229
|
+
<a style="mso-comment-reference:SMC_3;mso-comment-date:20170108T0000"><p class="MsoNormal"><a name="A" id="A"></a>A.</p></a>
|
230
|
+
<span style="mso-comment-continuation:3"><span style="mso-special-character:comment" target="3"></span></span>
|
231
|
+
</span>
|
232
|
+
</span></a>
|
233
|
+
<span style="mso-comment-continuation:3"><span style="mso-comment-continuation:1"><span style="mso-special-character:comment" target="1"></span></span></span>
|
234
|
+
</span>
|
235
|
+
</span>
|
236
|
+
<span style="mso-comment-continuation:3"><span style="mso-comment-continuation:1"><p class="MsoNormal"><a name="B" id="B"></a>B.</p></span></span>
|
237
|
+
|
238
|
+
<span style="MsoCommentReference" target="2" class="commentLink" from="C" to="C">
|
239
|
+
<span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
|
240
|
+
<a style="mso-comment-reference:SMC_2;mso-comment-date:20170108T0000"><span style="mso-comment-continuation:3"><p class="MsoNormal"><a name="C" id="C"></a>C.</p></span></a>
|
241
|
+
<span style="mso-special-character:comment" target="2"></span>
|
242
|
+
</span>
|
243
|
+
</span>
|
244
|
+
|
245
|
+
</div>
|
246
|
+
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
247
|
+
<div class="Section3" id="">
|
248
|
+
<h1 class="IntroTitle">Introduction</h1>
|
249
|
+
|
250
|
+
</div>
|
251
|
+
<p class="MsoNormal"> </p>
|
252
|
+
</div>
|
253
|
+
<br clear="all" class="section"/>
|
254
|
+
<div class="WordSection3">
|
255
|
+
<p class="zzSTDTitle1"></p>
|
256
|
+
<div style="mso-element:comment-list"><div style="mso-element:comment"><a name="3" id="3"></a>
|
257
|
+
<span style="mso-comment-author:"ISO""></span>
|
258
|
+
|
259
|
+
<p class="MsoCommentText"><a name="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08" id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08"></a><span style="MsoCommentReference">
|
260
|
+
<span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
|
261
|
+
<span style="mso-special-character:comment"></span>
|
262
|
+
</span>
|
263
|
+
</span>Second note.</p>
|
264
|
+
</div>
|
265
|
+
<div style="mso-element:comment"><a name="1" id="1"></a><span style="mso-comment-author:"ISO""></span><p class="MsoCommentText"><a name="_c54b9549-369f-4f85-b5b2-9db3fd3d4c07" id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c07"></a><span style="MsoCommentReference"><span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB"><span style="mso-special-character:comment"></span></span></span>A Foreword shall appear in each document. The generic text is shown here. It does not contain requirements, recommendations or permissions.</p>
|
266
|
+
<p class="MsoCommentText"><a name="_f1a8b9da-ca75-458b-96fa-d4af7328975e" id="_f1a8b9da-ca75-458b-96fa-d4af7328975e"></a>For further information on the Foreword, see <b>ISO/IEC Directives, Part 2, 2016, Clause 12.</b></p></div>
|
267
|
+
<div style="mso-element:comment"><a name="2" id="2"></a>
|
268
|
+
<span style="mso-comment-author:"ISO""></span>
|
269
|
+
|
270
|
+
<p class="MsoCommentText"><a name="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08" id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08"></a><span style="MsoCommentReference">
|
271
|
+
<span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
|
272
|
+
<span style="mso-special-character:comment"></span>
|
273
|
+
</span>
|
274
|
+
</span>Second note.</p>
|
275
|
+
</div></div>
|
276
|
+
</div>
|
277
|
+
<div style="mso-element:footnote-list"/></body>
|
278
|
+
OUTPUT
|
279
|
+
end
|
280
|
+
|
281
|
+
|
282
|
+
end
|
@@ -0,0 +1,662 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe IsoDoc do
|
4
|
+
it "processes English" do
|
5
|
+
expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
|
6
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
7
|
+
<bibdata>
|
8
|
+
<language>en</language>
|
9
|
+
</bibdata>
|
10
|
+
<foreword obligation="informative">
|
11
|
+
<title>Foreword</title>
|
12
|
+
<p id="A">This is a preamble</p>
|
13
|
+
</foreword>
|
14
|
+
<introduction id="B" obligation="informative"><title>Introduction</title><subsection id="C" inline-header="false" obligation="informative">
|
15
|
+
<title>Introduction Subsection</title>
|
16
|
+
</subsection>
|
17
|
+
<patent-notice>
|
18
|
+
<p>This is patent boilerplate</p>
|
19
|
+
</patent-notice>
|
20
|
+
</introduction><sections>
|
21
|
+
<clause id="D" obligation="normative">
|
22
|
+
<title>Scope</title>
|
23
|
+
<p id="E">Text</p>
|
24
|
+
</clause>
|
25
|
+
|
26
|
+
<terms id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
|
27
|
+
<title>Normal Terms</title>
|
28
|
+
<term id="J">
|
29
|
+
<preferred>Term2</preferred>
|
30
|
+
</term>
|
31
|
+
</terms>
|
32
|
+
<symbols-abbrevs id="K">
|
33
|
+
<dl>
|
34
|
+
<dt>Symbol</dt>
|
35
|
+
<dd>Definition</dd>
|
36
|
+
</dl>
|
37
|
+
</symbols-abbrevs>
|
38
|
+
</terms>
|
39
|
+
<symbols-abbrevs id="L">
|
40
|
+
<dl>
|
41
|
+
<dt>Symbol</dt>
|
42
|
+
<dd>Definition</dd>
|
43
|
+
</dl>
|
44
|
+
</symbols-abbrevs>
|
45
|
+
<clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><subsection id="N" inline-header="false" obligation="normative">
|
46
|
+
<title>Introduction</title>
|
47
|
+
</subsection>
|
48
|
+
<subsection id="O" inline-header="false" obligation="normative">
|
49
|
+
<title>Clause 4.2</title>
|
50
|
+
</subsection></clause>
|
51
|
+
|
52
|
+
</sections><annex id="P" inline-header="false" obligation="normative">
|
53
|
+
<title>Annex</title>
|
54
|
+
<subsection id="Q" inline-header="false" obligation="normative">
|
55
|
+
<title>Annex A.1</title>
|
56
|
+
<subsection id="Q1" inline-header="false" obligation="normative">
|
57
|
+
<title>Annex A.1a</title>
|
58
|
+
</subsection>
|
59
|
+
</subsection>
|
60
|
+
</annex><references id="R" obligation="informative">
|
61
|
+
<title>Normative References</title>
|
62
|
+
</references><references id="S" obligation="informative">
|
63
|
+
<title>Bibliography</title>
|
64
|
+
<references id="T" obligation="informative">
|
65
|
+
<title>Bibliography Subsection</title>
|
66
|
+
</references>
|
67
|
+
</references>
|
68
|
+
</iso-standard>
|
69
|
+
INPUT
|
70
|
+
<html xmlns:epub="http://www.idpf.org/2007/ops">
|
71
|
+
<head>
|
72
|
+
<title>test</title>
|
73
|
+
<body lang="EN-US" link="blue" vlink="#954F72">
|
74
|
+
<div class="WordSection1">
|
75
|
+
<p> </p>
|
76
|
+
</div>
|
77
|
+
<br/>
|
78
|
+
<div class="WordSection2">
|
79
|
+
<br/>
|
80
|
+
<div>
|
81
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
82
|
+
<p id="A">This is a preamble</p>
|
83
|
+
</div>
|
84
|
+
<br/>
|
85
|
+
<div class="Section3" id="B">
|
86
|
+
<h1 class="IntroTitle">0.  Introduction</h1>
|
87
|
+
<div id="C">
|
88
|
+
<h2>0.1. Introduction Subsection</h2>
|
89
|
+
</div>
|
90
|
+
<p>This is patent boilerplate</p>
|
91
|
+
</div>
|
92
|
+
<p> </p>
|
93
|
+
</div>
|
94
|
+
<br/>
|
95
|
+
<div class="WordSection3">
|
96
|
+
<p class="zzSTDTitle1"/>
|
97
|
+
<div id="D">
|
98
|
+
<h1>1.  Scope</h1>
|
99
|
+
<p id="E">Text</p>
|
100
|
+
</div>
|
101
|
+
<div>
|
102
|
+
<h1>2.  Normative References</h1>
|
103
|
+
<p>There are no normative references in this document.</p>
|
104
|
+
</div>
|
105
|
+
<div id="H"><h1>3.  Terms and Definitions</h1><p>For the purposes of this document,
|
106
|
+
the following terms and definitions apply.</p>
|
107
|
+
<p>ISO and IEC maintain terminological databases for use in
|
108
|
+
standardization at the following addresses:</p>
|
109
|
+
|
110
|
+
<ul>
|
111
|
+
<li> <p>ISO Online browsing platform: available at
|
112
|
+
<a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
|
113
|
+
<li> <p>IEC Electropedia: available at
|
114
|
+
<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
115
|
+
</p> </li> </ul>
|
116
|
+
<div id="I">
|
117
|
+
<h2>3.1. Normal Terms</h2>
|
118
|
+
<p class="TermNum" id="J">3.1.1</p>
|
119
|
+
<p class="Terms">Term2</p>
|
120
|
+
|
121
|
+
</div><div id="K"><h2>3.2. Symbols and Abbreviated Terms</h2>
|
122
|
+
<dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
|
123
|
+
</div></div>
|
124
|
+
<div id="L" class="Symbols">
|
125
|
+
<h1>4.  Symbols and Abbreviated Terms</h1>
|
126
|
+
<dl>
|
127
|
+
<dt>
|
128
|
+
<p>Symbol</p>
|
129
|
+
</dt>
|
130
|
+
<dd>Definition</dd>
|
131
|
+
</dl>
|
132
|
+
</div>
|
133
|
+
<div id="M">
|
134
|
+
<h1>5.  Clause 4</h1>
|
135
|
+
<div id="N">
|
136
|
+
<h2>5.1. Introduction</h2>
|
137
|
+
</div>
|
138
|
+
<div id="O">
|
139
|
+
<h2>5.2. Clause 4.2</h2>
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
<br/>
|
143
|
+
<div id="P" class="Section3">
|
144
|
+
<h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
|
145
|
+
<div id="Q">
|
146
|
+
<h2>A.1. Annex A.1</h2>
|
147
|
+
<div id="Q1">
|
148
|
+
<h3>A.1.1. Annex A.1a</h3>
|
149
|
+
</div>
|
150
|
+
</div>
|
151
|
+
</div>
|
152
|
+
<br/>
|
153
|
+
<div>
|
154
|
+
<h1 class="Section3">Bibliography</h1>
|
155
|
+
<div>
|
156
|
+
<h2 class="Section3">Bibliography Subsection</h2>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
</div>
|
160
|
+
</body>
|
161
|
+
</head>
|
162
|
+
</html>
|
163
|
+
OUTPUT
|
164
|
+
end
|
165
|
+
|
166
|
+
it "defaults to English" do
|
167
|
+
expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
|
168
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
169
|
+
<bibdata>
|
170
|
+
<language>tlh</language>
|
171
|
+
</bibdata>
|
172
|
+
<foreword obligation="informative">
|
173
|
+
<title>Foreword</title>
|
174
|
+
<p id="A">This is a preamble</p>
|
175
|
+
</foreword>
|
176
|
+
<introduction id="B" obligation="informative"><title>Introduction</title><subsection id="C" inline-header="false" obligation="informative">
|
177
|
+
<title>Introduction Subsection</title>
|
178
|
+
</subsection>
|
179
|
+
<patent-notice>
|
180
|
+
<p>This is patent boilerplate</p>
|
181
|
+
</patent-notice>
|
182
|
+
</introduction><sections>
|
183
|
+
<clause id="D" obligation="normative">
|
184
|
+
<title>Scope</title>
|
185
|
+
<p id="E">Text</p>
|
186
|
+
</clause>
|
187
|
+
|
188
|
+
<terms id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
|
189
|
+
<title>Normal Terms</title>
|
190
|
+
<term id="J">
|
191
|
+
<preferred>Term2</preferred>
|
192
|
+
</term>
|
193
|
+
</terms>
|
194
|
+
<symbols-abbrevs id="K">
|
195
|
+
<dl>
|
196
|
+
<dt>Symbol</dt>
|
197
|
+
<dd>Definition</dd>
|
198
|
+
</dl>
|
199
|
+
</symbols-abbrevs>
|
200
|
+
</terms>
|
201
|
+
<symbols-abbrevs id="L">
|
202
|
+
<dl>
|
203
|
+
<dt>Symbol</dt>
|
204
|
+
<dd>Definition</dd>
|
205
|
+
</dl>
|
206
|
+
</symbols-abbrevs>
|
207
|
+
<clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><subsection id="N" inline-header="false" obligation="normative">
|
208
|
+
<title>Introduction</title>
|
209
|
+
</subsection>
|
210
|
+
<subsection id="O" inline-header="false" obligation="normative">
|
211
|
+
<title>Clause 4.2</title>
|
212
|
+
</subsection></clause>
|
213
|
+
|
214
|
+
</sections><annex id="P" inline-header="false" obligation="normative">
|
215
|
+
<title>Annex</title>
|
216
|
+
<subsection id="Q" inline-header="false" obligation="normative">
|
217
|
+
<title>Annex A.1</title>
|
218
|
+
<subsection id="Q1" inline-header="false" obligation="normative">
|
219
|
+
<title>Annex A.1a</title>
|
220
|
+
</subsection>
|
221
|
+
</subsection>
|
222
|
+
</annex><references id="R" obligation="informative">
|
223
|
+
<title>Normative References</title>
|
224
|
+
</references><references id="S" obligation="informative">
|
225
|
+
<title>Bibliography</title>
|
226
|
+
<references id="T" obligation="informative">
|
227
|
+
<title>Bibliography Subsection</title>
|
228
|
+
</references>
|
229
|
+
</references>
|
230
|
+
</iso-standard>
|
231
|
+
INPUT
|
232
|
+
<html xmlns:epub="http://www.idpf.org/2007/ops">
|
233
|
+
<head>
|
234
|
+
<title>test</title>
|
235
|
+
<body lang="EN-US" link="blue" vlink="#954F72">
|
236
|
+
<div class="WordSection1">
|
237
|
+
<p> </p>
|
238
|
+
</div>
|
239
|
+
<br/>
|
240
|
+
<div class="WordSection2">
|
241
|
+
<br/>
|
242
|
+
<div>
|
243
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
244
|
+
<p id="A">This is a preamble</p>
|
245
|
+
</div>
|
246
|
+
<br/>
|
247
|
+
<div class="Section3" id="B">
|
248
|
+
<h1 class="IntroTitle">0.  Introduction</h1>
|
249
|
+
<div id="C">
|
250
|
+
<h2>0.1. Introduction Subsection</h2>
|
251
|
+
</div>
|
252
|
+
<p>This is patent boilerplate</p>
|
253
|
+
</div>
|
254
|
+
<p> </p>
|
255
|
+
</div>
|
256
|
+
<br/>
|
257
|
+
<div class="WordSection3">
|
258
|
+
<p class="zzSTDTitle1"/>
|
259
|
+
<div id="D">
|
260
|
+
<h1>1.  Scope</h1>
|
261
|
+
<p id="E">Text</p>
|
262
|
+
</div>
|
263
|
+
<div>
|
264
|
+
<h1>2.  Normative References</h1>
|
265
|
+
<p>There are no normative references in this document.</p>
|
266
|
+
</div>
|
267
|
+
<div id="H"><h1>3.  Terms and Definitions</h1><p>For the purposes of this document,
|
268
|
+
the following terms and definitions apply.</p>
|
269
|
+
<p>ISO and IEC maintain terminological databases for use in
|
270
|
+
standardization at the following addresses:</p>
|
271
|
+
|
272
|
+
<ul>
|
273
|
+
<li> <p>ISO Online browsing platform: available at
|
274
|
+
<a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
|
275
|
+
<li> <p>IEC Electropedia: available at
|
276
|
+
<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
277
|
+
</p> </li> </ul>
|
278
|
+
<div id="I">
|
279
|
+
<h2>3.1. Normal Terms</h2>
|
280
|
+
<p class="TermNum" id="J">3.1.1</p>
|
281
|
+
<p class="Terms">Term2</p>
|
282
|
+
|
283
|
+
</div><div id="K"><h2>3.2. Symbols and Abbreviated Terms</h2>
|
284
|
+
<dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
|
285
|
+
</div></div>
|
286
|
+
<div id="L" class="Symbols">
|
287
|
+
<h1>4.  Symbols and Abbreviated Terms</h1>
|
288
|
+
<dl>
|
289
|
+
<dt>
|
290
|
+
<p>Symbol</p>
|
291
|
+
</dt>
|
292
|
+
<dd>Definition</dd>
|
293
|
+
</dl>
|
294
|
+
</div>
|
295
|
+
<div id="M">
|
296
|
+
<h1>5.  Clause 4</h1>
|
297
|
+
<div id="N">
|
298
|
+
<h2>5.1. Introduction</h2>
|
299
|
+
</div>
|
300
|
+
<div id="O">
|
301
|
+
<h2>5.2. Clause 4.2</h2>
|
302
|
+
</div>
|
303
|
+
</div>
|
304
|
+
<br/>
|
305
|
+
<div id="P" class="Section3">
|
306
|
+
<h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
|
307
|
+
<div id="Q">
|
308
|
+
<h2>A.1. Annex A.1</h2>
|
309
|
+
<div id="Q1">
|
310
|
+
<h3>A.1.1. Annex A.1a</h3>
|
311
|
+
</div>
|
312
|
+
</div>
|
313
|
+
</div>
|
314
|
+
<br/>
|
315
|
+
<div>
|
316
|
+
<h1 class="Section3">Bibliography</h1>
|
317
|
+
<div>
|
318
|
+
<h2 class="Section3">Bibliography Subsection</h2>
|
319
|
+
</div>
|
320
|
+
</div>
|
321
|
+
</div>
|
322
|
+
</body>
|
323
|
+
</head>
|
324
|
+
</html>
|
325
|
+
OUTPUT
|
326
|
+
end
|
327
|
+
|
328
|
+
it "processes French" do
|
329
|
+
expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
|
330
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
331
|
+
<bibdata>
|
332
|
+
<language>fr</language>
|
333
|
+
</bibdata>
|
334
|
+
<foreword obligation="informative">
|
335
|
+
<title>Foreword</title>
|
336
|
+
<p id="A">This is a preamble</p>
|
337
|
+
</foreword>
|
338
|
+
<introduction id="B" obligation="informative"><title>Introduction</title><subsection id="C" inline-header="false" obligation="informative">
|
339
|
+
<title>Introduction Subsection</title>
|
340
|
+
</subsection>
|
341
|
+
<patent-notice>
|
342
|
+
<p>This is patent boilerplate</p>
|
343
|
+
</patent-notice>
|
344
|
+
</introduction><sections>
|
345
|
+
<clause id="D" obligation="normative">
|
346
|
+
<title>Scope</title>
|
347
|
+
<p id="E">Text</p>
|
348
|
+
</clause>
|
349
|
+
|
350
|
+
<terms id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
|
351
|
+
<title>Normal Terms</title>
|
352
|
+
<term id="J">
|
353
|
+
<preferred>Term2</preferred>
|
354
|
+
</term>
|
355
|
+
</terms>
|
356
|
+
<symbols-abbrevs id="K">
|
357
|
+
<dl>
|
358
|
+
<dt>Symbol</dt>
|
359
|
+
<dd>Definition</dd>
|
360
|
+
</dl>
|
361
|
+
</symbols-abbrevs>
|
362
|
+
</terms>
|
363
|
+
<symbols-abbrevs id="L">
|
364
|
+
<dl>
|
365
|
+
<dt>Symbol</dt>
|
366
|
+
<dd>Definition</dd>
|
367
|
+
</dl>
|
368
|
+
</symbols-abbrevs>
|
369
|
+
<clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><subsection id="N" inline-header="false" obligation="normative">
|
370
|
+
<title>Introduction</title>
|
371
|
+
</subsection>
|
372
|
+
<subsection id="O" inline-header="false" obligation="normative">
|
373
|
+
<title>Clause 4.2</title>
|
374
|
+
</subsection></clause>
|
375
|
+
|
376
|
+
</sections><annex id="P" inline-header="false" obligation="normative">
|
377
|
+
<title>Annex</title>
|
378
|
+
<subsection id="Q" inline-header="false" obligation="normative">
|
379
|
+
<title>Annex A.1</title>
|
380
|
+
<subsection id="Q1" inline-header="false" obligation="normative">
|
381
|
+
<title>Annex A.1a</title>
|
382
|
+
</subsection>
|
383
|
+
</subsection>
|
384
|
+
</annex><references id="R" obligation="informative">
|
385
|
+
<title>Normative References</title>
|
386
|
+
</references><references id="S" obligation="informative">
|
387
|
+
<title>Bibliography</title>
|
388
|
+
<references id="T" obligation="informative">
|
389
|
+
<title>Bibliography Subsection</title>
|
390
|
+
</references>
|
391
|
+
</references>
|
392
|
+
</iso-standard>
|
393
|
+
INPUT
|
394
|
+
<html xmlns:epub="http://www.idpf.org/2007/ops">
|
395
|
+
<head>
|
396
|
+
<title>test</title>
|
397
|
+
<body lang="EN-US" link="blue" vlink="#954F72">
|
398
|
+
<div class="WordSection1">
|
399
|
+
<p> </p>
|
400
|
+
</div>
|
401
|
+
<br/>
|
402
|
+
<div class="WordSection2">
|
403
|
+
<br/>
|
404
|
+
<div>
|
405
|
+
<h1 class="ForewordTitle">Avant-propos</h1>
|
406
|
+
<p id="A">This is a preamble</p>
|
407
|
+
</div>
|
408
|
+
<br/>
|
409
|
+
<div class="Section3" id="B">
|
410
|
+
<h1 class="IntroTitle">0.  Introduction</h1>
|
411
|
+
<div id="C">
|
412
|
+
<h2>0.1. Introduction Subsection</h2>
|
413
|
+
</div>
|
414
|
+
<p>This is patent boilerplate</p>
|
415
|
+
</div>
|
416
|
+
<p> </p>
|
417
|
+
</div>
|
418
|
+
<br/>
|
419
|
+
<div class="WordSection3">
|
420
|
+
<p class="zzSTDTitle1"/>
|
421
|
+
<div id="D">
|
422
|
+
<h1>1.  Domaine d'application</h1>
|
423
|
+
<p id="E">Text</p>
|
424
|
+
</div>
|
425
|
+
<div>
|
426
|
+
<h1>2.  Références normatives</h1>
|
427
|
+
<p>Le présent document ne contient aucune référence normative.</p>
|
428
|
+
</div>
|
429
|
+
<div id="H"><h1>3.  Terms et définitions</h1><p>Pour les besoins du présent document, les termes et définitions suivants s'appliquent.</p>
|
430
|
+
<p>L'ISO et l'IEC tiennent à jour des bases de données terminologiques
|
431
|
+
destinées à être utilisées en normalisation, consultables aux adresses
|
432
|
+
suivantes:</p>
|
433
|
+
<ul>
|
434
|
+
<li> <p>ISO Online browsing platform: disponible à l'adresse
|
435
|
+
<a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
|
436
|
+
<li> <p>IEC Electropedia: disponible à l'adresse
|
437
|
+
<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
438
|
+
</p> </li> </ul>
|
439
|
+
<div id="I">
|
440
|
+
<h2>3.1. Normal Terms</h2>
|
441
|
+
<p class="TermNum" id="J">3.1.1</p>
|
442
|
+
<p class="Terms">Term2</p>
|
443
|
+
|
444
|
+
</div><div id="K"><h2>3.2. Symbols and Abbreviated Terms</h2>
|
445
|
+
<dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
|
446
|
+
</div></div>
|
447
|
+
<div id="L" class="Symbols">
|
448
|
+
<h1>4.  Symboles et termes abrégés</h1>
|
449
|
+
<dl>
|
450
|
+
<dt>
|
451
|
+
<p>Symbol</p>
|
452
|
+
</dt>
|
453
|
+
<dd>Definition</dd>
|
454
|
+
</dl>
|
455
|
+
</div>
|
456
|
+
<div id="M">
|
457
|
+
<h1>5.  Clause 4</h1>
|
458
|
+
<div id="N">
|
459
|
+
<h2>5.1. Introduction</h2>
|
460
|
+
</div>
|
461
|
+
<div id="O">
|
462
|
+
<h2>5.2. Clause 4.2</h2>
|
463
|
+
</div>
|
464
|
+
</div>
|
465
|
+
<br/>
|
466
|
+
<div id="P" class="Section3">
|
467
|
+
<h1 class="Annex"><b>Annexe A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
|
468
|
+
<div id="Q">
|
469
|
+
<h2>A.1. Annex A.1</h2>
|
470
|
+
<div id="Q1">
|
471
|
+
<h3>A.1.1. Annex A.1a</h3>
|
472
|
+
</div>
|
473
|
+
</div>
|
474
|
+
</div>
|
475
|
+
<br/>
|
476
|
+
<div>
|
477
|
+
<h1 class="Section3">then Bibliographie</h1>
|
478
|
+
<div>
|
479
|
+
<h2 class="Section3">Bibliography Subsection</h2>
|
480
|
+
</div>
|
481
|
+
</div>
|
482
|
+
</div>
|
483
|
+
</body>
|
484
|
+
</head>
|
485
|
+
</html>
|
486
|
+
OUTPUT
|
487
|
+
end
|
488
|
+
|
489
|
+
it "processes Simplified Chinese" do
|
490
|
+
expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
|
491
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
492
|
+
<bibdata>
|
493
|
+
<language>zh</language>
|
494
|
+
<script>Hans</script>
|
495
|
+
</bibdata>
|
496
|
+
<foreword obligation="informative">
|
497
|
+
<title>Foreword</title>
|
498
|
+
<p id="A">This is a preamble</p>
|
499
|
+
</foreword>
|
500
|
+
<introduction id="B" obligation="informative"><title>Introduction</title><subsection id="C" inline-header="false" obligation="informative">
|
501
|
+
<title>Introduction Subsection</title>
|
502
|
+
</subsection>
|
503
|
+
<patent-notice>
|
504
|
+
<p>This is patent boilerplate</p>
|
505
|
+
</patent-notice>
|
506
|
+
</introduction><sections>
|
507
|
+
<clause id="D" obligation="normative">
|
508
|
+
<title>Scope</title>
|
509
|
+
<p id="E"><eref type="inline" bibitemid="ISO712"><locality type="table"><referenceFrom>1</referenceFrom><referenceTo>1</referenceTo></locality></eref></p>
|
510
|
+
</clause>
|
511
|
+
|
512
|
+
<terms id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
|
513
|
+
<title>Normal Terms</title>
|
514
|
+
<term id="J">
|
515
|
+
<preferred>Term2</preferred>
|
516
|
+
</term>
|
517
|
+
</terms>
|
518
|
+
<symbols-abbrevs id="K">
|
519
|
+
<dl>
|
520
|
+
<dt>Symbol</dt>
|
521
|
+
<dd>Definition</dd>
|
522
|
+
</dl>
|
523
|
+
</symbols-abbrevs>
|
524
|
+
</terms>
|
525
|
+
<symbols-abbrevs id="L">
|
526
|
+
<dl>
|
527
|
+
<dt>Symbol</dt>
|
528
|
+
<dd>Definition</dd>
|
529
|
+
</dl>
|
530
|
+
</symbols-abbrevs>
|
531
|
+
<clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><subsection id="N" inline-header="false" obligation="normative">
|
532
|
+
<title>Introduction</title>
|
533
|
+
</subsection>
|
534
|
+
<subsection id="O" inline-header="false" obligation="normative">
|
535
|
+
<title>Clause 4.2</title>
|
536
|
+
</subsection></clause>
|
537
|
+
|
538
|
+
</sections><annex id="P" inline-header="false" obligation="normative">
|
539
|
+
<title>Annex</title>
|
540
|
+
<subsection id="Q" inline-header="false" obligation="normative">
|
541
|
+
<title>Annex A.1</title>
|
542
|
+
<subsection id="Q1" inline-header="false" obligation="normative">
|
543
|
+
<title>Annex A.1a</title>
|
544
|
+
</subsection>
|
545
|
+
</subsection>
|
546
|
+
</annex><references id="R" obligation="informative">
|
547
|
+
<title>Normative References</title>
|
548
|
+
<bibitem id="ISO712" type="standard">
|
549
|
+
<title format="text/plain">Cereals and cereal products</title>
|
550
|
+
<docidentifier>ISO 712</docidentifier>
|
551
|
+
<contributor>
|
552
|
+
<role type="publisher"/>
|
553
|
+
<organization>
|
554
|
+
<abbreviation>ISO</abbreviation>
|
555
|
+
</organization>
|
556
|
+
</contributor>
|
557
|
+
</bibitem>
|
558
|
+
</references><references id="S" obligation="informative">
|
559
|
+
<title>Bibliography</title>
|
560
|
+
<references id="T" obligation="informative">
|
561
|
+
<title>Bibliography Subsection</title>
|
562
|
+
</references>
|
563
|
+
</references>
|
564
|
+
</iso-standard>
|
565
|
+
INPUT
|
566
|
+
<html xmlns:epub="http://www.idpf.org/2007/ops">
|
567
|
+
<head>
|
568
|
+
<title>test</title>
|
569
|
+
<body lang="EN-US" link="blue" vlink="#954F72">
|
570
|
+
<div class="WordSection1">
|
571
|
+
<p> </p>
|
572
|
+
</div>
|
573
|
+
<br/>
|
574
|
+
<div class="WordSection2">
|
575
|
+
<br/>
|
576
|
+
<div>
|
577
|
+
<h1 class="ForewordTitle">前言</h1>
|
578
|
+
<p id="A">This is a preamble</p>
|
579
|
+
</div>
|
580
|
+
<br/>
|
581
|
+
<div class="Section3" id="B">
|
582
|
+
<h1 class="IntroTitle">0.  引言</h1>
|
583
|
+
<div id="C">
|
584
|
+
<h2>0.1. Introduction Subsection</h2>
|
585
|
+
</div>
|
586
|
+
<p>This is patent boilerplate</p>
|
587
|
+
</div>
|
588
|
+
<p> </p>
|
589
|
+
</div>
|
590
|
+
<br/>
|
591
|
+
<div class="WordSection3">
|
592
|
+
<p class="zzSTDTitle1"/>
|
593
|
+
<div id="D">
|
594
|
+
<h1>1.  范围</h1>
|
595
|
+
<p id="E">
|
596
|
+
<a href="#ISO712">ISO 712、第1–<referenceto>1</referenceto>表</a>
|
597
|
+
</p>
|
598
|
+
</div>
|
599
|
+
<div>
|
600
|
+
<h1>2.  规范性引用文件</h1>
|
601
|
+
<p>下列文件对于本文件的应用是必不可少的。 凡是注日期的引用文件,仅注日期的版本适用于本文件。 凡是不注日期的引用文件,其最新版本(包括所有的修改单)适用于本文件。</p>
|
602
|
+
<p id="ISO712">ISO 712, <i> Cereals and cereal products</i></p>
|
603
|
+
</div>
|
604
|
+
<div id="H"><h1>3.  术语和定义</h1><p>下列术语和定义适用于本文件。</p>
|
605
|
+
<p>ISO和IEC用于标准化的术语数据库地址如下:</p>
|
606
|
+
<ul>
|
607
|
+
<li> <p>ISO在线浏览平台:
|
608
|
+
位于<a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
|
609
|
+
<li> <p>IEC Electropedia:
|
610
|
+
位于<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
611
|
+
</p> </li> </ul>
|
612
|
+
<div id="I">
|
613
|
+
<h2>3.1. Normal Terms</h2>
|
614
|
+
<p class="TermNum" id="J">3.1.1</p>
|
615
|
+
<p class="Terms">Term2</p>
|
616
|
+
|
617
|
+
</div><div id="K"><h2>3.2. Symbols and Abbreviated Terms</h2>
|
618
|
+
<dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
|
619
|
+
</div></div>
|
620
|
+
<div id="L" class="Symbols">
|
621
|
+
<h1>4.  符号、代号和缩略语</h1>
|
622
|
+
<dl>
|
623
|
+
<dt>
|
624
|
+
<p>Symbol</p>
|
625
|
+
</dt>
|
626
|
+
<dd>Definition</dd>
|
627
|
+
</dl>
|
628
|
+
</div>
|
629
|
+
<div id="M">
|
630
|
+
<h1>5.  Clause 4</h1>
|
631
|
+
<div id="N">
|
632
|
+
<h2>5.1. Introduction</h2>
|
633
|
+
</div>
|
634
|
+
<div id="O">
|
635
|
+
<h2>5.2. Clause 4.2</h2>
|
636
|
+
</div>
|
637
|
+
</div>
|
638
|
+
<br/>
|
639
|
+
<div id="P" class="Section3">
|
640
|
+
<h1 class="Annex">附录A<br/>(规范性附录)<br/><br/><b>Annex</b></h1>
|
641
|
+
<div id="Q">
|
642
|
+
<h2>A.1. Annex A.1</h2>
|
643
|
+
<div id="Q1">
|
644
|
+
<h3>A.1.1. Annex A.1a</h3>
|
645
|
+
</div>
|
646
|
+
</div>
|
647
|
+
</div>
|
648
|
+
<br/>
|
649
|
+
<div>
|
650
|
+
<h1 class="Section3">参考文献</h1>
|
651
|
+
<div>
|
652
|
+
<h2 class="Section3">Bibliography Subsection</h2>
|
653
|
+
</div>
|
654
|
+
</div>
|
655
|
+
</div>
|
656
|
+
</body>
|
657
|
+
</head>
|
658
|
+
</html>
|
659
|
+
OUTPUT
|
660
|
+
end
|
661
|
+
|
662
|
+
end
|