metanorma-iso 1.6.1 → 1.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +11 -41
  3. data/.gitignore +2 -0
  4. data/.rubocop.yml +6 -2
  5. data/lib/asciidoctor/iso/base.rb +13 -13
  6. data/lib/asciidoctor/iso/basicdoc.rng +5 -3
  7. data/lib/asciidoctor/iso/biblio.rng +4 -6
  8. data/lib/asciidoctor/iso/cleanup.rb +1 -1
  9. data/lib/asciidoctor/iso/front.rb +6 -6
  10. data/lib/asciidoctor/iso/front_id.rb +30 -25
  11. data/lib/asciidoctor/iso/isodoc.rng +108 -2
  12. data/lib/asciidoctor/iso/isostandard-amd.rng +3 -0
  13. data/lib/asciidoctor/iso/isostandard.rng +17 -97
  14. data/lib/asciidoctor/iso/validate.rb +68 -1
  15. data/lib/asciidoctor/iso/validate_title.rb +21 -13
  16. data/lib/isodoc/iso/base_convert.rb +11 -0
  17. data/lib/isodoc/iso/html/header.html +12 -12
  18. data/lib/isodoc/iso/html/html_iso_intro.html +1 -1
  19. data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
  20. data/lib/isodoc/iso/html/word_iso_intro.html +1 -1
  21. data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
  22. data/lib/isodoc/iso/html_convert.rb +2 -2
  23. data/lib/isodoc/iso/i18n-en.yaml +6 -0
  24. data/lib/isodoc/iso/i18n-fr.yaml +4 -0
  25. data/lib/isodoc/iso/i18n-zh-Hans.yaml +4 -0
  26. data/lib/isodoc/iso/index.rb +140 -0
  27. data/lib/isodoc/iso/iso.amendment.xsl +1009 -321
  28. data/lib/isodoc/iso/iso.international-standard.xsl +1009 -321
  29. data/lib/isodoc/iso/presentation_xml_convert.rb +1 -4
  30. data/lib/isodoc/iso/word_convert.rb +2 -2
  31. data/lib/isodoc/iso/xref.rb +5 -0
  32. data/lib/metanorma/iso/version.rb +1 -1
  33. data/metanorma-iso.gemspec +4 -4
  34. data/spec/asciidoctor/amd_spec.rb +696 -0
  35. data/spec/asciidoctor/base_spec.rb +704 -0
  36. data/spec/asciidoctor/blocks_spec.rb +527 -0
  37. data/spec/asciidoctor/cleanup_spec.rb +1134 -0
  38. data/spec/asciidoctor/inline_spec.rb +195 -0
  39. data/spec/asciidoctor/lists_spec.rb +197 -0
  40. data/spec/asciidoctor/refs_spec.rb +375 -0
  41. data/spec/asciidoctor/section_spec.rb +393 -0
  42. data/spec/asciidoctor/table_spec.rb +329 -0
  43. data/spec/asciidoctor/validate_spec.rb +1572 -0
  44. data/spec/isodoc/amd_spec.rb +967 -946
  45. data/spec/isodoc/blocks_spec.rb +530 -507
  46. data/spec/isodoc/i18n_spec.rb +953 -911
  47. data/spec/isodoc/inline_spec.rb +355 -293
  48. data/spec/isodoc/iso_spec.rb +340 -316
  49. data/spec/isodoc/metadata_spec.rb +392 -382
  50. data/spec/isodoc/postproc_spec.rb +834 -656
  51. data/spec/isodoc/ref_spec.rb +374 -331
  52. data/spec/isodoc/section_spec.rb +821 -519
  53. data/spec/isodoc/table_spec.rb +472 -411
  54. data/spec/isodoc/terms_spec.rb +209 -185
  55. data/spec/isodoc/xref_spec.rb +1370 -1236
  56. data/spec/metanorma/processor_spec.rb +28 -26
  57. data/spec/spec_helper.rb +186 -189
  58. metadata +26 -27
  59. data/.rubocop.ribose.yml +0 -66
  60. data/spec/asciidoctor-iso/amd_spec.rb +0 -694
  61. data/spec/asciidoctor-iso/base_spec.rb +0 -713
  62. data/spec/asciidoctor-iso/blocks_spec.rb +0 -482
  63. data/spec/asciidoctor-iso/cleanup_spec.rb +0 -1025
  64. data/spec/asciidoctor-iso/inline_spec.rb +0 -170
  65. data/spec/asciidoctor-iso/lists_spec.rb +0 -190
  66. data/spec/asciidoctor-iso/refs_spec.rb +0 -317
  67. data/spec/asciidoctor-iso/section_spec.rb +0 -362
  68. data/spec/asciidoctor-iso/table_spec.rb +0 -313
  69. data/spec/asciidoctor-iso/validate_spec.rb +0 -1550
  70. data/spec/assets/xref_error.adoc +0 -7
@@ -4,951 +4,993 @@ RSpec.describe IsoDoc do
4
4
  it "processes English" do
5
5
  input = <<~INPUT
6
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
- <p>This is patent boilerplate</p>
19
- </introduction></preface><sections>
20
- <clause id="D" obligation="normative" type="scope">
21
- <title>Scope</title>
22
- <p id="E">Text</p>
23
- </clause>
24
-
25
- <clause id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
26
- <title>Normal Terms</title>
27
- <term id="J">
28
- <preferred>Term2</preferred>
29
- </term>
30
- </terms>
31
- <definitions id="K">
32
- <dl>
33
- <dt>Symbol</dt>
34
- <dd>Definition</dd>
35
- </dl>
36
- </definitions>
37
- </clause>
38
- <definitions id="L">
39
- <dl>
40
- <dt>Symbol</dt>
41
- <dd>Definition</dd>
42
- </dl>
43
- </definitions>
44
- <clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
45
- <title>Introduction</title>
46
- </clause>
47
- <clause id="O" inline-header="false" obligation="normative">
48
- <title>Clause 4.2</title>
49
- </clause></clause>
50
-
51
- </sections><annex id="P" inline-header="false" obligation="normative">
52
- <title>Annex</title>
53
- <clause id="Q" inline-header="false" obligation="normative">
54
- <title>Annex A.1</title>
55
- <clause id="Q1" inline-header="false" obligation="normative">
56
- <title>Annex A.1a</title>
57
- </clause>
58
- </clause>
59
- <appendix id="Q2" inline-header="false" obligation="normative">
60
- <title>An Appendix</title>
61
- </appendix>
62
- </annex><bibliography><references id="R" obligation="informative" normative="true">
63
- <title>Normative References</title>
64
- </references><clause id="S" obligation="informative">
65
- <title>Bibliography</title>
66
- <references id="T" obligation="informative" normative="false">
67
- <title>Bibliography Subsection</title>
68
- </references>
69
- </clause>
70
- </bibliography>
71
- </iso-standard>
72
- INPUT
73
-
74
- presxml = <<~OUTPUT
75
- <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
76
- <bibdata>
77
- <language current="true">en</language>
78
- </bibdata>
79
- <preface>
80
- <foreword obligation='informative'>
81
- <title>Foreword</title>
82
- <p id='A'>This is a preamble</p>
83
- </foreword>
84
- <introduction id='B' obligation='informative'>
85
- <title depth='1'>0<tab/>Introduction</title>
86
- <clause id='C' inline-header='false' obligation='informative'>
87
- <title depth='2'>0.1<tab/>Introduction Subsection</title>
88
- </clause>
89
- <p>This is patent boilerplate</p>
90
- </introduction>
91
- </preface>
92
- <sections>
93
- <clause id='D' obligation='normative' type='scope'>
94
- <title depth='1'>1<tab/>Scope</title>
95
- <p id='E'>Text</p>
96
- </clause>
97
- <clause id='H' obligation='normative'>
98
- <title depth='1'>3<tab/>Terms, definitions, symbols and abbreviated terms</title>
99
- <terms id='I' obligation='normative'>
100
- <title depth='2'>3.1<tab/>Normal Terms</title>
101
- <term id='J'>
102
- <name>3.1.1</name>
103
- <preferred>Term2</preferred>
104
- </term>
105
- </terms>
106
- <definitions id='K' inline-header='true'>
107
- <title>3.2</title>
108
- <dl>
109
- <dt>Symbol</dt>
110
- <dd>Definition</dd>
111
- </dl>
112
- </definitions>
113
- </clause>
114
- <definitions id='L'>
115
- <title>4</title>
116
- <dl>
117
- <dt>Symbol</dt>
118
- <dd>Definition</dd>
119
- </dl>
120
- </definitions>
121
- <clause id='M' inline-header='false' obligation='normative'>
122
- <title depth='1'>5<tab/>Clause 4</title>
123
- <clause id='N' inline-header='false' obligation='normative'>
124
- <title depth='2'>5.1<tab/>Introduction</title>
125
- </clause>
126
- <clause id='O' inline-header='false' obligation='normative'>
127
- <title depth='2'>5.2<tab/>Clause 4.2</title>
128
- </clause>
129
- </clause>
130
- </sections>
131
- <annex id='P' inline-header='false' obligation='normative'>
132
- <title>
133
- <strong>Annex A</strong>
134
- <br/>
135
- (normative)
136
- <br/>
137
- <br/>
138
- <strong>Annex</strong>
139
- </title>
140
- <clause id='Q' inline-header='false' obligation='normative'>
141
- <title depth='2'>A.1<tab/>Annex A.1</title>
142
- <clause id='Q1' inline-header='false' obligation='normative'>
143
- <title depth='3'>A.1.1<tab/>Annex A.1a</title>
144
- </clause>
145
- </clause>
146
- <appendix id='Q2' inline-header='false' obligation='normative'>
147
- <title depth='2'>Appendix 1<tab/>An Appendix</title>
148
- </appendix>
149
- </annex>
150
- <bibliography>
151
- <references id='R' obligation='informative' normative='true'>
152
- <title depth='1'>2<tab/>Normative References</title>
153
- </references>
154
- <clause id='S' obligation='informative'>
155
- <title depth='1'>Bibliography</title>
156
- <references id='T' obligation='informative' normative='false'>
157
- <title depth='2'>Bibliography Subsection</title>
158
- </references>
159
- </clause>
160
- </bibliography>
161
- </iso-standard>
162
- OUTPUT
163
-
164
- html = <<~OUTPUT
165
- #{HTML_HDR}
166
- <br/>
167
- <div>
168
- <h1 class="ForewordTitle">Foreword</h1>
169
- <p id="A">This is a preamble</p>
170
- </div>
171
- <br/>
172
- <div class="Section3" id="B">
173
- <h1 class="IntroTitle">0&#160; Introduction</h1>
174
- <div id="C"><h2>0.1&#160; Introduction Subsection</h2>
175
-
176
- </div>
177
- <p>This is patent boilerplate</p>
178
- </div>
179
- <p class="zzSTDTitle1"/>
180
- <div id="D">
181
- <h1>1&#160; Scope</h1>
182
- <p id="E">Text</p>
183
- </div>
184
- <div>
185
- <h1>2&#160; Normative References</h1>
186
- </div>
187
- <div id="H"><h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1>
188
- <div id="I"><h2>3.1&#160; Normal Terms</h2>
189
-
190
- <p class="TermNum" id="J">3.1.1</p>
191
- <p class="Terms" style="text-align:left;">Term2</p>
192
-
193
- </div><div id="K">
194
- <span class='zzMoveToFollowing'>
195
- <b>3.2&#160; </b>
196
- </span>
197
- <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
198
- </div></div>
199
- <div id="L" class="Symbols">
200
- <h1>4</h1>
201
- <dl>
202
- <dt>
203
- <p>Symbol</p>
204
- </dt>
205
- <dd>Definition</dd>
206
- </dl>
207
- </div>
208
- <div id="M">
209
- <h1>5&#160; Clause 4</h1>
210
- <div id="N"><h2>5.1&#160; Introduction</h2>
211
-
212
- </div>
213
- <div id="O"><h2>5.2&#160; Clause 4.2</h2>
214
-
215
- </div>
216
- </div>
217
- <br/>
218
- <div id="P" class="Section3">
219
- <h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
220
- <div id="Q"><h2>A.1&#160; Annex A.1</h2>
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">
16
+ <title>Introduction</title>
17
+ <clause id="C" inline-header="false" obligation="informative">
18
+ <title>Introduction Subsection</title>
19
+ </clause>
20
+ <p>This is patent boilerplate</p>
21
+ </introduction>
22
+ </preface>
23
+ <sections>
24
+ <clause id="D" obligation="normative" type="scope">
25
+ <title>Scope</title>
26
+ <p id="E">Text</p>
27
+ </clause>
28
+ <clause id="H" obligation="normative">
29
+ <title>Terms, definitions, symbols and abbreviated terms</title>
30
+ <terms id="I" obligation="normative">
31
+ <title>Normal Terms</title>
32
+ <term id="J">
33
+ <preferred>Term2</preferred>
34
+ </term>
35
+ </terms>
36
+ <definitions id="K">
37
+ <dl>
38
+ <dt>Symbol</dt>
39
+ <dd>Definition</dd>
40
+ </dl>
41
+ </definitions>
42
+ </clause>
43
+ <definitions id="L">
44
+ <dl>
45
+ <dt>Symbol</dt>
46
+ <dd>Definition</dd>
47
+ </dl>
48
+ </definitions>
49
+ <clause id="M" inline-header="false" obligation="normative">
50
+ <title>Clause 4</title>
51
+ <clause id="N" inline-header="false" obligation="normative">
52
+ <title>Introduction</title>
53
+ </clause>
54
+ <clause id="O" inline-header="false" obligation="normative">
55
+ <title>Clause 4.2</title>
56
+ </clause>
57
+ </clause>
58
+ </sections>
59
+ <annex id="P" inline-header="false" obligation="normative">
60
+ <title>Annex</title>
61
+ <clause id="Q" inline-header="false" obligation="normative">
62
+ <title>Annex A.1</title>
63
+ <clause id="Q1" inline-header="false" obligation="normative">
64
+ <title>Annex A.1a</title>
65
+ </clause>
66
+ </clause>
67
+ <appendix id="Q2" inline-header="false" obligation="normative">
68
+ <title>An Appendix</title>
69
+ </appendix>
70
+ </annex>
71
+ <bibliography>
72
+ <references id="R" normative="true" obligation="informative">
73
+ <title>Normative References</title>
74
+ </references>
75
+ <clause id="S" obligation="informative">
76
+ <title>Bibliography</title>
77
+ <references id="T" normative="false" obligation="informative">
78
+ <title>Bibliography Subsection</title>
79
+ </references>
80
+ </clause>
81
+ </bibliography>
82
+ </iso-standard>
83
+ INPUT
84
+
85
+ presxml = <<~OUTPUT
86
+ <iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
87
+ <bibdata>
88
+ <language current="true">en</language>
89
+ </bibdata>
90
+ <preface>
91
+ <foreword obligation="informative">
92
+ <title>Foreword</title>
93
+ <p id="A">This is a preamble</p>
94
+ </foreword>
95
+ <introduction id="B" obligation="informative">
96
+ <title depth="1">0<tab/>Introduction</title>
97
+ <clause id="C" inline-header="false" obligation="informative">
98
+ <title depth="2">0.1<tab/>Introduction Subsection</title>
99
+ </clause>
100
+ <p>This is patent boilerplate</p>
101
+ </introduction>
102
+ </preface>
103
+ <sections>
104
+ <clause id="D" obligation="normative" type="scope">
105
+ <title depth="1">1<tab/>Scope</title>
106
+ <p id="E">Text</p>
107
+ </clause>
108
+ <clause id="H" obligation="normative">
109
+ <title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title>
110
+ <terms id="I" obligation="normative">
111
+ <title depth="2">3.1<tab/>Normal Terms</title>
112
+ <term id="J">
113
+ <name>3.1.1</name>
114
+ <preferred>Term2</preferred>
115
+ </term>
116
+ </terms>
117
+ <definitions id="K" inline-header="true">
118
+ <title>3.2</title>
119
+ <dl>
120
+ <dt>Symbol</dt>
121
+ <dd>Definition</dd>
122
+ </dl>
123
+ </definitions>
124
+ </clause>
125
+ <definitions id="L">
126
+ <title>4</title>
127
+ <dl>
128
+ <dt>Symbol</dt>
129
+ <dd>Definition</dd>
130
+ </dl>
131
+ </definitions>
132
+ <clause id="M" inline-header="false" obligation="normative">
133
+ <title depth="1">5<tab/>Clause 4</title>
134
+ <clause id="N" inline-header="false" obligation="normative">
135
+ <title depth="2">5.1<tab/>Introduction</title>
136
+ </clause>
137
+ <clause id="O" inline-header="false" obligation="normative">
138
+ <title depth="2">5.2<tab/>Clause 4.2</title>
139
+ </clause>
140
+ </clause>
141
+ </sections>
142
+ <annex id="P" inline-header="false" obligation="normative">
143
+ <title>
144
+ <strong>Annex A</strong>
145
+ <br/>(normative)
146
+ <br/>
147
+ <br/>
148
+ <strong>Annex</strong></title>
149
+ <clause id="Q" inline-header="false" obligation="normative">
150
+ <title depth="2">A.1<tab/>Annex A.1</title>
151
+ <clause id="Q1" inline-header="false" obligation="normative">
152
+ <title depth="3">A.1.1<tab/>Annex A.1a</title>
153
+ </clause>
154
+ </clause>
155
+ <appendix id="Q2" inline-header="false" obligation="normative">
156
+ <title depth="2">Appendix 1<tab/>An Appendix</title>
157
+ </appendix>
158
+ </annex>
159
+ <bibliography>
160
+ <references id="R" normative="true" obligation="informative">
161
+ <title depth="1">2<tab/>Normative References</title>
162
+ </references>
163
+ <clause id="S" obligation="informative">
164
+ <title depth="1">Bibliography</title>
165
+ <references id="T" normative="false" obligation="informative">
166
+ <title depth="2">Bibliography Subsection</title>
167
+ </references>
168
+ </clause>
169
+ </bibliography>
170
+ </iso-standard>
171
+ OUTPUT
221
172
 
222
- <div id="Q1"><h3>A.1.1&#160; Annex A.1a</h3>
173
+ html = <<~OUTPUT
174
+ #{HTML_HDR}
175
+ <br/>
176
+ <div>
177
+ <h1 class="ForewordTitle">Foreword</h1>
178
+ <p id="A">This is a preamble</p>
179
+ </div>
180
+ <br/>
181
+ <div class="Section3" id="B">
182
+ <h1 class="IntroTitle">0&#160; Introduction</h1>
183
+ <div id="C">
184
+ <h2>0.1&#160; Introduction Subsection</h2>
185
+ </div>
186
+ <p>This is patent boilerplate</p>
187
+ </div>
188
+ <p class="zzSTDTitle1"/>
189
+ <div id="D">
190
+ <h1>1&#160; Scope</h1>
191
+ <p id="E">Text</p>
192
+ </div>
193
+ <div>
194
+ <h1>2&#160; Normative References</h1>
195
+ </div>
196
+ <div id="H">
197
+ <h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1>
198
+ <div id="I">
199
+ <h2>3.1&#160; Normal Terms</h2>
223
200
 
201
+ <p class="TermNum" id="J">3.1.1</p>
202
+ <p class="Terms" style="text-align:left;">Term2</p>
203
+ </div>
204
+ <div id="K">
205
+ <span class="zzMoveToFollowing">
206
+ <b>3.2&#160; </b>
207
+ </span>
208
+ <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
209
+ </div>
210
+ </div>
211
+ <div id="L" class="Symbols">
212
+ <h1>4</h1>
213
+ <dl>
214
+ <dt>
215
+ <p>Symbol</p>
216
+ </dt>
217
+ <dd>Definition</dd>
218
+ </dl>
219
+ </div>
220
+ <div id="M">
221
+ <h1>5&#160; Clause 4</h1>
222
+ <div id="N">
223
+ <h2>5.1&#160; Introduction</h2>
224
+ </div>
225
+ <div id="O">
226
+ <h2>5.2&#160; Clause 4.2</h2>
227
+ </div>
228
+ </div>
229
+ <br/>
230
+ <div id="P" class="Section3">
231
+ <h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
232
+ <div id="Q"><h2>A.1&#160; Annex A.1</h2>
233
+ <div id="Q1">
234
+ <h3>A.1.1&#160; Annex A.1a</h3>
235
+ </div>
236
+ </div>
237
+ <div id="Q2">
238
+ <h2>Appendix 1&#160; An Appendix</h2>
239
+ </div>
240
+ </div>
241
+ <br/>
242
+ <div>
243
+ <h1 class="Section3">Bibliography</h1>
244
+ <div>
245
+ <h2 class="Section3">Bibliography Subsection</h2>
246
+ </div>
247
+ </div>
224
248
  </div>
225
- </div>
226
- <div id="Q2"><h2>Appendix 1&#160; An Appendix</h2>
227
-
228
- </div>
229
- </div>
230
- <br/>
231
- <div>
232
- <h1 class="Section3">Bibliography</h1>
233
- <div>
234
- <h2 class="Section3">Bibliography Subsection</h2>
235
- </div>
236
- </div>
237
- </div>
238
- </body>
239
- </html>
249
+ </body>
250
+ </html>
240
251
  OUTPUT
241
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
252
+ expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true))
253
+ .sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
242
254
  expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
243
255
  end
244
256
 
245
257
  it "defaults to English" do
246
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(<<~"OUTPUT")
258
+ output = IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true)
247
259
  <iso-standard xmlns="http://riboseinc.com/isoxml">
248
- <bibdata>
249
- <language>tlh</language>
250
- </bibdata>
251
- <preface>
252
- <foreword obligation="informative">
253
- <title>Foreword</title>
254
- <p id="A">This is a preamble</p>
255
- </foreword>
256
- <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
257
- <title>Introduction Subsection</title>
258
- </clause>
259
- <p>This is patent boilerplate</p>
260
- </introduction></preface><sections>
261
- <clause id="D" obligation="normative" type="scope">
262
- <title>Scope</title>
263
- <p id="E">Text</p>
264
- </clause>
265
-
266
- <clause id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
267
- <title>Normal Terms</title>
268
- <term id="J">
269
- <preferred>Term2</preferred>
270
- </term>
271
- </terms>
272
- <definitions id="K">
273
- <dl>
274
- <dt>Symbol</dt>
275
- <dd>Definition</dd>
276
- </dl>
277
- </definitions>
278
- </clause>
279
- <definitions id="L">
280
- <dl>
281
- <dt>Symbol</dt>
282
- <dd>Definition</dd>
283
- </dl>
284
- </definitions>
285
- <clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
286
- <title>Introduction</title>
287
- </clause>
288
- <clause id="O" inline-header="false" obligation="normative">
289
- <title>Clause 4.2</title>
290
- </clause></clause>
291
-
292
- </sections><annex id="P" inline-header="false" obligation="normative">
293
- <title>Annex</title>
294
- <clause id="Q" inline-header="false" obligation="normative">
295
- <title>Annex A.1</title>
296
- <clause id="Q1" inline-header="false" obligation="normative">
297
- <title>Annex A.1a</title>
298
- </clause>
299
- </clause>
300
- <appendix id="Q2" inline-header="false" obligation="normative">
301
- <title>An Appendix</title>
302
- </appendix>
303
- </annex><bibliography><references id="R" obligation="informative" normative="true">
304
- <title>Normative References</title>
305
- </references><clause id="S" obligation="informative">
306
- <title>Bibliography</title>
307
- <references id="T" obligation="informative" normative="false">
308
- <title>Bibliography Subsection</title>
309
- </references>
310
- </clause>
311
- </bibliography>
312
- </iso-standard>
313
- INPUT
314
- <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
315
- <bibdata>
316
- <language current="true">tlh</language>
317
- </bibdata>
318
- <preface>
319
- <foreword obligation='informative'>
320
- <title>Foreword</title>
321
- <p id='A'>This is a preamble</p>
322
- </foreword>
323
- <introduction id='B' obligation='informative'>
324
- <title depth='1'>
325
- 0
326
- <tab/>
327
- Introduction
328
- </title>
329
- <clause id='C' inline-header='false' obligation='informative'>
330
- <title depth='2'>
331
- 0.1
332
- <tab/>
333
- Introduction Subsection
334
- </title>
335
- </clause>
336
- <p>This is patent boilerplate</p>
337
- </introduction>
338
- </preface>
339
- <sections>
340
- <clause id='D' obligation='normative' type='scope'>
341
- <title depth='1'>
342
- 1
343
- <tab/>
344
- Scope
345
- </title>
346
- <p id='E'>Text</p>
347
- </clause>
348
- <clause id='H' obligation='normative'>
349
- <title depth='1'>
350
- 3
351
- <tab/>
352
- Terms, definitions, symbols and abbreviated terms
353
- </title>
354
- <terms id='I' obligation='normative'>
355
- <title depth='2'>
356
- 3.1
357
- <tab/>
358
- Normal Terms
359
- </title>
360
- <term id='J'>
361
- <name>3.1.1</name>
362
- <preferred>Term2</preferred>
363
- </term>
364
- </terms>
365
- <definitions id='K' inline-header='true'>
366
- <title>3.2</title>
367
- <dl>
368
- <dt>Symbol</dt>
369
- <dd>Definition</dd>
370
- </dl>
371
- </definitions>
372
- </clause>
373
- <definitions id='L'>
374
- <title>4</title>
375
- <dl>
376
- <dt>Symbol</dt>
377
- <dd>Definition</dd>
378
- </dl>
379
- </definitions>
380
- <clause id='M' inline-header='false' obligation='normative'>
381
- <title depth='1'>
382
- 5
383
- <tab/>
384
- Clause 4
385
- </title>
386
- <clause id='N' inline-header='false' obligation='normative'>
387
- <title depth='2'>
388
- 5.1
389
- <tab/>
390
- Introduction
391
- </title>
392
- </clause>
393
- <clause id='O' inline-header='false' obligation='normative'>
394
- <title depth='2'>
395
- 5.2
396
- <tab/>
397
- Clause 4.2
398
- </title>
399
- </clause>
400
- </clause>
401
- </sections>
402
- <annex id='P' inline-header='false' obligation='normative'>
403
- <title>
404
- <strong>Annex A</strong>
405
- <br/>
406
- (normative)
407
- <br/>
408
- <br/>
409
- <strong>Annex</strong>
410
- </title>
411
- <clause id='Q' inline-header='false' obligation='normative'>
412
- <title depth='2'>
413
- A.1
414
- <tab/>
415
- Annex A.1
416
- </title>
417
- <clause id='Q1' inline-header='false' obligation='normative'>
418
- <title depth='3'>
419
- A.1.1
420
- <tab/>
421
- Annex A.1a
422
- </title>
423
- </clause>
424
- </clause>
425
- <appendix id='Q2' inline-header='false' obligation='normative'>
426
- <title depth='2'>
427
- Appendix 1
428
- <tab/>
429
- An Appendix
430
- </title>
431
- </appendix>
432
- </annex>
433
- <bibliography>
434
- <references id='R' obligation='informative' normative='true'>
435
- <title depth='1'>
436
- 2
437
- <tab/>
438
- Normative References
439
- </title>
440
- </references>
441
- <clause id='S' obligation='informative'>
442
- <title depth='1'>Bibliography</title>
443
- <references id='T' obligation='informative' normative='false'>
444
- <title depth='2'>Bibliography Subsection</title>
445
- </references>
446
- </clause>
447
- </bibliography>
448
- </iso-standard>
449
- OUTPUT
260
+ <bibdata>
261
+ <language>tlh</language>
262
+ </bibdata>
263
+ <preface>
264
+ <foreword obligation="informative">
265
+ <title>Foreword</title>
266
+ <p id="A">This is a preamble</p>
267
+ </foreword>
268
+ <introduction id="B" obligation="informative">
269
+ <title>Introduction</title>
270
+ <clause id="C" inline-header="false" obligation="informative">
271
+ <title>Introduction Subsection</title>
272
+ </clause>
273
+ <p>This is patent boilerplate</p>
274
+ </introduction>
275
+ </preface>
276
+ <sections>
277
+ <clause id="D" obligation="normative" type="scope">
278
+ <title>Scope</title>
279
+ <p id="E">Text</p>
280
+ </clause>
281
+ <clause id="H" obligation="normative">
282
+ <title>Terms, definitions, symbols and abbreviated terms</title>
283
+ <terms id="I" obligation="normative">
284
+ <title>Normal Terms</title>
285
+ <term id="J">
286
+ <preferred>Term2</preferred>
287
+ </term>
288
+ </terms>
289
+ <definitions id="K">
290
+ <dl>
291
+ <dt>Symbol</dt>
292
+ <dd>Definition</dd>
293
+ </dl>
294
+ </definitions>
295
+ </clause>
296
+ <definitions id="L">
297
+ <dl>
298
+ <dt>Symbol</dt>
299
+ <dd>Definition</dd>
300
+ </dl>
301
+ </definitions>
302
+ <clause id="M" inline-header="false" obligation="normative">
303
+ <title>Clause 4</title>
304
+ <clause id="N" inline-header="false" obligation="normative">
305
+ <title>Introduction</title>
306
+ </clause>
307
+ <clause id="O" inline-header="false" obligation="normative">
308
+ <title>Clause 4.2</title>
309
+ </clause>
310
+ </clause>
311
+ </sections>
312
+ <annex id="P" inline-header="false" obligation="normative">
313
+ <title>Annex</title>
314
+ <clause id="Q" inline-header="false" obligation="normative">
315
+ <title>Annex A.1</title>
316
+ <clause id="Q1" inline-header="false" obligation="normative">
317
+ <title>Annex A.1a</title>
318
+ </clause>
319
+ </clause>
320
+ <appendix id="Q2" inline-header="false" obligation="normative">
321
+ <title>An Appendix</title>
322
+ </appendix>
323
+ </annex>
324
+ <bibliography>
325
+ <references id="R" normative="true" obligation="informative">
326
+ <title>Normative References</title>
327
+ </references>
328
+ <clause id="S" obligation="informative">
329
+ <title>Bibliography</title>
330
+ <references id="T" normative="false" obligation="informative">
331
+ <title>Bibliography Subsection</title>
332
+ </references>
333
+ </clause>
334
+ </bibliography>
335
+ </iso-standard>
336
+ INPUT
337
+ expect(xmlpp(output).sub(%r{<localized-strings>.*</localized-strings>}m, ""))
338
+ .to be_equivalent_to xmlpp(<<~"OUTPUT")
339
+ <iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
340
+ <bibdata>
341
+ <language current="true">tlh</language>
342
+ </bibdata>
343
+ <preface>
344
+ <foreword obligation="informative">
345
+ <title>Foreword</title>
346
+ <p id="A">This is a preamble</p>
347
+ </foreword>
348
+ <introduction id="B" obligation="informative">
349
+ <title depth="1">
350
+ 0
351
+ <tab/>
352
+ Introduction
353
+ </title>
354
+ <clause id="C" inline-header="false" obligation="informative">
355
+ <title depth="2">0.1<tab/>Introduction Subsection</title>
356
+ </clause>
357
+ <p>This is patent boilerplate</p>
358
+ </introduction>
359
+ </preface>
360
+ <sections>
361
+ <clause id="D" obligation="normative" type="scope">
362
+ <title depth="1">1<tab/>Scope</title>
363
+ <p id="E">Text</p>
364
+ </clause>
365
+ <clause id="H" obligation="normative">
366
+ <title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title>
367
+ <terms id="I" obligation="normative">
368
+ <title depth="2">3.1<tab/>Normal Terms</title>
369
+ <term id="J">
370
+ <name>3.1.1</name>
371
+ <preferred>Term2</preferred>
372
+ </term>
373
+ </terms>
374
+ <definitions id="K" inline-header="true">
375
+ <title>3.2</title>
376
+ <dl>
377
+ <dt>Symbol</dt>
378
+ <dd>Definition</dd>
379
+ </dl>
380
+ </definitions>
381
+ </clause>
382
+ <definitions id="L">
383
+ <title>4</title>
384
+ <dl>
385
+ <dt>Symbol</dt>
386
+ <dd>Definition</dd>
387
+ </dl>
388
+ </definitions>
389
+ <clause id="M" inline-header="false" obligation="normative">
390
+ <title depth="1">5<tab/>Clause 4</title>
391
+ <clause id="N" inline-header="false" obligation="normative">
392
+ <title depth="2">5.1<tab/>Introduction</title>
393
+ </clause>
394
+ <clause id="O" inline-header="false" obligation="normative">
395
+ <title depth="2">5.2<tab/>Clause 4.2</title>
396
+ </clause>
397
+ </clause>
398
+ </sections>
399
+ <annex id="P" inline-header="false" obligation="normative">
400
+ <title>
401
+ <strong>Annex A</strong>
402
+ <br/>(normative)
403
+ <br/>
404
+ <br/>
405
+ <strong>Annex</strong></title>
406
+ <clause id="Q" inline-header="false" obligation="normative">
407
+ <title depth="2">A.1<tab/>Annex A.1</title>
408
+ <clause id="Q1" inline-header="false" obligation="normative">
409
+ <title depth="3">A.1.1<tab/>Annex A.1a</title>
410
+ </clause>
411
+ </clause>
412
+ <appendix id="Q2" inline-header="false" obligation="normative">
413
+ <title depth="2">Appendix 1<tab/>An Appendix</title>
414
+ </appendix>
415
+ </annex>
416
+ <bibliography>
417
+ <references id="R" normative="true" obligation="informative">
418
+ <title depth="1">2<tab/>Normative References</title>
419
+ </references>
420
+ <clause id="S" obligation="informative">
421
+ <title depth="1">Bibliography</title>
422
+ <references id="T" normative="false" obligation="informative">
423
+ <title depth="2">Bibliography Subsection</title>
424
+ </references>
425
+ </clause>
426
+ </bibliography>
427
+ </iso-standard>
428
+ OUTPUT
450
429
  end
451
430
 
452
431
  it "processes French" do
453
432
  input = <<~INPUT
454
- <iso-standard xmlns="http://riboseinc.com/isoxml">
455
- <bibdata>
456
- <language>fr</language>
457
- </bibdata>
458
- <preface>
459
- <foreword obligation="informative">
460
- <title>Foreword</title>
461
- <p id="A">This is a preamble</p>
462
- </foreword>
463
- <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
464
- <title>Introduction Subsection</title>
465
- </clause>
466
- <p>This is patent boilerplate</p>
467
- </introduction></preface><sections>
468
- <clause id="D" obligation="normative" type="scope">
469
- <title>Scope</title>
470
- <p id="E">Text</p>
471
- </clause>
472
-
473
- <clause id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
474
- <title>Normal Terms</title>
475
- <term id="J">
476
- <preferred>Term2</preferred>
477
- </term>
478
- </terms>
479
- <definitions id="K">
480
- <dl>
481
- <dt>Symbol</dt>
482
- <dd>Definition</dd>
483
- </dl>
484
- </definitions>
485
- </clause>
486
- <definitions id="L">
487
- <dl>
488
- <dt>Symbol</dt>
489
- <dd>Definition</dd>
490
- </dl>
491
- </definitions>
492
- <clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
493
- <title>Introduction</title>
494
- </clause>
495
- <clause id="O" inline-header="false" obligation="normative">
496
- <title>Clause 4.2</title>
497
- </clause></clause>
498
-
499
- </sections><annex id="P" inline-header="false" obligation="normative">
500
- <title>Annex</title>
501
- <clause id="Q" inline-header="false" obligation="normative">
502
- <title>Annex A.1</title>
503
- <clause id="Q1" inline-header="false" obligation="normative">
504
- <title>Annex A.1a</title>
505
- </clause>
506
- </clause>
507
- <appendix id="Q2" inline-header="false" obligation="normative">
508
- <title>An Appendix</title>
509
- </appendix>
510
- </annex><bibliography><references id="R" obligation="informative" normative="true">
511
- <title>Normative References</title>
512
- </references><clause id="S" obligation="informative">
513
- <title>Bibliography</title>
514
- <references id="T" obligation="informative" normative="false">
515
- <title>Bibliography Subsection</title>
516
- </references>
517
- </clause>
518
- </bibliography>
519
- </iso-standard>
520
- INPUT
521
-
522
- presxml = <<~OUTPUT
523
- <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
524
- <bibdata>
525
- <language current="true">fr</language>
526
- </bibdata>
527
- <preface>
528
- <foreword obligation='informative'>
529
- <title>Foreword</title>
530
- <p id='A'>This is a preamble</p>
531
- </foreword>
532
- <introduction id='B' obligation='informative'>
533
- <title depth='1'>0<tab/>Introduction</title>
534
- <clause id='C' inline-header='false' obligation='informative'>
535
- <title depth='2'>0.1<tab/>Introduction Subsection</title>
536
- </clause>
537
- <p>This is patent boilerplate</p>
538
- </introduction>
539
- </preface>
540
- <sections>
541
- <clause id='D' obligation='normative' type='scope'>
542
- <title depth='1'>1<tab/>Scope</title>
543
- <p id='E'>Text</p>
544
- </clause>
545
- <clause id='H' obligation='normative'>
546
- <title depth='1'>3<tab/>Terms, definitions, symbols and abbreviated terms</title>
547
- <terms id='I' obligation='normative'>
548
- <title depth='2'>3.1<tab/>Normal Terms</title>
549
- <term id='J'>
550
- <name>3.1.1</name>
551
- <preferred>Term2</preferred>
552
- </term>
553
- </terms>
554
- <definitions id='K' inline-header='true'>
555
- <title>3.2</title>
556
- <dl>
557
- <dt>Symbol</dt>
558
- <dd>Definition</dd>
559
- </dl>
560
- </definitions>
561
- </clause>
562
- <definitions id='L'>
563
- <title>4</title>
564
- <dl>
565
- <dt>Symbol</dt>
566
- <dd>Definition</dd>
567
- </dl>
568
- </definitions>
569
- <clause id='M' inline-header='false' obligation='normative'>
570
- <title depth='1'>5<tab/>Clause 4</title>
571
- <clause id='N' inline-header='false' obligation='normative'>
572
- <title depth='2'>5.1<tab/>Introduction</title>
573
- </clause>
574
- <clause id='O' inline-header='false' obligation='normative'>
575
- <title depth='2'>5.2<tab/>Clause 4.2</title>
576
- </clause>
577
- </clause>
578
- </sections>
579
- <annex id='P' inline-header='false' obligation='normative'>
580
- <title>
581
- <strong>Annexe A</strong>
582
- <br/>
583
- (normative)
584
- <br/>
585
- <br/>
586
- <strong>Annex</strong>
587
- </title>
588
- <clause id='Q' inline-header='false' obligation='normative'>
589
- <title depth='2'>A.1<tab/>Annex A.1</title>
590
- <clause id='Q1' inline-header='false' obligation='normative'>
591
- <title depth='3'>A.1.1<tab/>Annex A.1a</title>
592
- </clause>
593
- </clause>
594
- <appendix id='Q2' inline-header='false' obligation='normative'>
595
- <title depth='2'>Appendice 1<tab/>An Appendix</title>
596
- </appendix>
597
- </annex>
598
- <bibliography>
599
- <references id='R' obligation='informative' normative='true'>
600
- <title depth='1'>2<tab/>Normative References</title>
601
- </references>
602
- <clause id='S' obligation='informative'>
603
- <title depth='1'>Bibliography</title>
604
- <references id='T' obligation='informative' normative='false'>
605
- <title depth='2'>Bibliography Subsection</title>
606
- </references>
607
- </clause>
608
- </bibliography>
609
- </iso-standard>
610
- OUTPUT
611
- html = <<~OUTPUT
612
- #{HTML_HDR.gsub(/"en"/, '"fr"')}
613
- <br/>
614
- <div>
615
- <h1 class="ForewordTitle">Foreword</h1>
616
- <p id="A">This is a preamble</p>
617
- </div>
618
- <br/>
619
- <div class="Section3" id="B">
620
- <h1 class="IntroTitle">0&#160; Introduction</h1>
621
- <div id="C"><h2>0.1&#160; Introduction Subsection</h2>
622
-
623
- </div>
624
- <p>This is patent boilerplate</p>
625
- </div>
626
- <p class="zzSTDTitle1"/>
627
- <div id="D">
628
- <h1>1&#160; Scope</h1>
629
- <p id="E">Text</p>
630
- </div>
631
- <div>
632
- <h1>2&#160; Normative References</h1>
633
- </div>
634
- <div id="H"><h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1>
635
- <div id="I"><h2>3.1&#160; Normal Terms</h2>
636
-
637
- <p class="TermNum" id="J">3.1.1</p>
638
- <p class="Terms" style="text-align:left;">Term2</p>
639
-
640
- </div><div id="K">
641
- <span class='zzMoveToFollowing'>
642
- <b>3.2&#160; </b>
643
- </span>
644
- <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
645
- </div></div>
646
- <div id="L" class="Symbols">
647
- <h1>4</h1>
648
- <dl>
649
- <dt>
650
- <p>Symbol</p>
651
- </dt>
652
- <dd>Definition</dd>
653
- </dl>
654
- </div>
655
- <div id="M">
656
- <h1>5&#160; Clause 4</h1>
657
- <div id="N"><h2>5.1&#160; Introduction</h2>
658
-
659
- </div>
660
- <div id="O"><h2>5.2&#160; Clause 4.2</h2>
661
-
662
- </div>
663
- </div>
664
- <br/>
665
- <div id="P" class="Section3">
666
- <h1 class="Annex"><b>Annexe A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
667
- <div id="Q"><h2>A.1&#160; Annex A.1</h2>
668
-
669
- <div id="Q1"><h3>A.1.1&#160; Annex A.1a</h3>
433
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
434
+ <bibdata>
435
+ <language>fr</language>
436
+ </bibdata>
437
+ <preface>
438
+ <foreword obligation="informative">
439
+ <title>Foreword</title>
440
+ <p id="A">This is a preamble</p>
441
+ </foreword>
442
+ <introduction id="B" obligation="informative">
443
+ <title>Introduction</title>
444
+ <clause id="C" inline-header="false" obligation="informative">
445
+ <title>Introduction Subsection</title>
446
+ </clause>
447
+ <p>This is patent boilerplate</p>
448
+ </introduction>
449
+ </preface>
450
+ <sections>
451
+ <clause id="D" obligation="normative" type="scope">
452
+ <title>Scope</title>
453
+ <p id="E">Text</p>
454
+ </clause>
455
+ <clause id="H" obligation="normative">
456
+ <title>Terms, definitions, symbols and abbreviated terms</title>
457
+ <terms id="I" obligation="normative">
458
+ <title>Normal Terms</title>
459
+ <term id="J">
460
+ <preferred>Term2</preferred>
461
+ </term>
462
+ </terms>
463
+ <definitions id="K">
464
+ <dl>
465
+ <dt>Symbol</dt>
466
+ <dd>Definition</dd>
467
+ </dl>
468
+ </definitions>
469
+ </clause>
470
+ <definitions id="L">
471
+ <dl>
472
+ <dt>Symbol</dt>
473
+ <dd>Definition</dd>
474
+ </dl>
475
+ </definitions>
476
+ <clause id="M" inline-header="false" obligation="normative">
477
+ <title>Clause 4</title>
478
+ <clause id="N" inline-header="false" obligation="normative">
479
+ <title>Introduction</title>
480
+ </clause>
481
+ <clause id="O" inline-header="false" obligation="normative">
482
+ <title>Clause 4.2</title>
483
+ </clause>
484
+ </clause>
485
+ </sections>
486
+ <annex id="P" inline-header="false" obligation="normative">
487
+ <title>Annex</title>
488
+ <clause id="Q" inline-header="false" obligation="normative">
489
+ <title>Annex A.1</title>
490
+ <clause id="Q1" inline-header="false" obligation="normative">
491
+ <title>Annex A.1a</title>
492
+ </clause>
493
+ </clause>
494
+ <appendix id="Q2" inline-header="false" obligation="normative">
495
+ <title>An Appendix</title>
496
+ </appendix>
497
+ </annex>
498
+ <bibliography>
499
+ <references id="R" normative="true" obligation="informative">
500
+ <title>Normative References</title>
501
+ </references>
502
+ <clause id="S" obligation="informative">
503
+ <title>Bibliography</title>
504
+ <references id="T" normative="false" obligation="informative">
505
+ <title>Bibliography Subsection</title>
506
+ </references>
507
+ </clause>
508
+ </bibliography>
509
+ </iso-standard>
510
+ INPUT
511
+
512
+ presxml = <<~OUTPUT
513
+ <iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
514
+ <bibdata>
515
+ <language current="true">fr</language>
516
+ </bibdata>
517
+ <preface>
518
+ <foreword obligation="informative">
519
+ <title>Foreword</title>
520
+ <p id="A">This is a preamble</p>
521
+ </foreword>
522
+ <introduction id="B" obligation="informative">
523
+ <title depth="1">0<tab/>Introduction</title>
524
+ <clause id="C" inline-header="false" obligation="informative">
525
+ <title depth="2">0.1<tab/>Introduction Subsection</title>
526
+ </clause>
527
+ <p>This is patent boilerplate</p>
528
+ </introduction>
529
+ </preface>
530
+ <sections>
531
+ <clause id="D" obligation="normative" type="scope">
532
+ <title depth="1">1<tab/>Scope</title>
533
+ <p id="E">Text</p>
534
+ </clause>
535
+ <clause id="H" obligation="normative">
536
+ <title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title>
537
+ <terms id="I" obligation="normative">
538
+ <title depth="2">3.1<tab/>Normal Terms</title>
539
+ <term id="J">
540
+ <name>3.1.1</name>
541
+ <preferred>Term2</preferred>
542
+ </term>
543
+ </terms>
544
+ <definitions id="K" inline-header="true">
545
+ <title>3.2</title>
546
+ <dl>
547
+ <dt>Symbol</dt>
548
+ <dd>Definition</dd>
549
+ </dl>
550
+ </definitions>
551
+ </clause>
552
+ <definitions id="L">
553
+ <title>4</title>
554
+ <dl>
555
+ <dt>Symbol</dt>
556
+ <dd>Definition</dd>
557
+ </dl>
558
+ </definitions>
559
+ <clause id="M" inline-header="false" obligation="normative">
560
+ <title depth="1">5<tab/>Clause 4</title>
561
+ <clause id="N" inline-header="false" obligation="normative">
562
+ <title depth="2">5.1<tab/>Introduction</title>
563
+ </clause>
564
+ <clause id="O" inline-header="false" obligation="normative">
565
+ <title depth="2">5.2<tab/>Clause 4.2</title>
566
+ </clause>
567
+ </clause>
568
+ </sections>
569
+ <annex id="P" inline-header="false" obligation="normative">
570
+ <title>
571
+ <strong>Annexe A</strong>
572
+ <br/>(normative)
573
+ <br/>
574
+ <br/>
575
+ <strong>Annex</strong></title>
576
+ <clause id="Q" inline-header="false" obligation="normative">
577
+ <title depth="2">A.1<tab/>Annex A.1</title>
578
+ <clause id="Q1" inline-header="false" obligation="normative">
579
+ <title depth="3">A.1.1<tab/>Annex A.1a</title>
580
+ </clause>
581
+ </clause>
582
+ <appendix id="Q2" inline-header="false" obligation="normative">
583
+ <title depth="2">Appendice 1<tab/>An Appendix</title>
584
+ </appendix>
585
+ </annex>
586
+ <bibliography>
587
+ <references id="R" normative="true" obligation="informative">
588
+ <title depth="1">2<tab/>Normative References</title>
589
+ </references>
590
+ <clause id="S" obligation="informative">
591
+ <title depth="1">Bibliography</title>
592
+ <references id="T" normative="false" obligation="informative">
593
+ <title depth="2">Bibliography Subsection</title>
594
+ </references>
595
+ </clause>
596
+ </bibliography>
597
+ </iso-standard>
598
+ OUTPUT
670
599
 
600
+ html = <<~OUTPUT
601
+ #{HTML_HDR.gsub(/"en"/, '"fr"')}
602
+ <br/>
603
+ <div>
604
+ <h1 class="ForewordTitle">Foreword</h1>
605
+ <p id="A">This is a preamble</p>
606
+ </div>
607
+ <br/>
608
+ <div class="Section3" id="B">
609
+ <h1 class="IntroTitle">0&#160; Introduction</h1>
610
+ <div id="C">
611
+ <h2>0.1&#160; Introduction Subsection</h2>
612
+ </div>
613
+ <p>This is patent boilerplate</p>
614
+ </div>
615
+ <p class="zzSTDTitle1"/>
616
+ <div id="D">
617
+ <h1>1&#160; Scope</h1>
618
+ <p id="E">Text</p>
619
+ </div>
620
+ <div>
621
+ <h1>2&#160; Normative References</h1>
622
+ </div>
623
+ <div id="H">
624
+ <h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1>
625
+ <div id="I">
626
+ <h2>3.1&#160; Normal Terms</h2>
627
+ <p class="TermNum" id="J">3.1.1</p>
628
+ <p class="Terms" style="text-align:left;">Term2</p>
629
+ </div>
630
+ <div id="K">
631
+ <span class="zzMoveToFollowing">
632
+ <b>3.2&#160; </b>
633
+ </span>
634
+ <dl>
635
+ <dt>
636
+ <p>Symbol</p>
637
+ </dt>
638
+ <dd>Definition</dd>
639
+ </dl>
640
+ </div>
641
+ </div>
642
+ <div class="Symbols" id="L">
643
+ <h1>4</h1>
644
+ <dl>
645
+ <dt>
646
+ <p>Symbol</p>
647
+ </dt>
648
+ <dd>Definition</dd>
649
+ </dl>
650
+ </div>
651
+ <div id="M">
652
+ <h1>5&#160; Clause 4</h1>
653
+ <div id="N">
654
+ <h2>5.1&#160; Introduction</h2>
655
+ </div>
656
+ <div id="O">
657
+ <h2>5.2&#160; Clause 4.2</h2>
658
+ </div>
659
+ </div>
660
+ <br/>
661
+ <div class="Section3" id="P">
662
+ <h1 class="Annex">
663
+ <b>Annexe A</b>
664
+ <br/>(normative)
665
+ <br/>
666
+ <br/>
667
+ <b>Annex</b></h1>
668
+ <div id="Q">
669
+ <h2>A.1&#160; Annex A.1</h2>
670
+ <div id="Q1">
671
+ <h3>A.1.1&#160; Annex A.1a</h3>
672
+ </div>
673
+ </div>
674
+ <div id="Q2">
675
+ <h2>Appendice 1&#160; An Appendix</h2>
676
+ </div>
677
+ </div>
678
+ <br/>
679
+ <div>
680
+ <h1 class="Section3">Bibliography</h1>
681
+ <div>
682
+ <h2 class="Section3">Bibliography Subsection</h2>
683
+ </div>
684
+ </div>
671
685
  </div>
672
- </div>
673
- <div id="Q2"><h2>Appendice 1&#160; An Appendix</h2>
674
-
675
- </div>
676
- </div>
677
- <br/>
678
- <div>
679
- <h1 class="Section3">Bibliography</h1>
680
- <div>
681
- <h2 class="Section3">Bibliography Subsection</h2>
682
- </div>
683
- </div>
684
- </div>
685
- </body>
686
- </html>
686
+ </body>
687
+ </html>
687
688
  OUTPUT
688
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
689
+ expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true))
690
+ .sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
689
691
  expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
690
692
  end
691
693
 
692
- it "processes Simplified Chinese" do
693
- input = <<~INPUT
694
+ it "processes Simplified Chinese" do
695
+ input = <<~INPUT
694
696
  <iso-standard xmlns="http://riboseinc.com/isoxml">
695
- <bibdata>
696
- <language>zh</language>
697
- <script>Hans</script>
698
- </bibdata>
699
- <preface>
700
- <foreword obligation="informative">
701
- <title>Foreword</title>
702
- <p id="A">This is a preamble</p>
703
- </foreword>
704
- <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
705
- <title>Introduction Subsection</title>
706
- </clause>
707
- <p>This is patent boilerplate</p>
708
- </introduction></preface><sections>
709
- <clause id="D" obligation="normative" type="scope">
710
- <title>Scope</title>
711
- <p id="E"><eref type="inline" bibitemid="ISO712"><locality type="table"><referenceFrom>1</referenceFrom><referenceTo>1</referenceTo></locality></eref></p>
712
- </clause>
713
-
714
- <clause id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
715
- <title>Normal Terms</title>
716
- <term id="J">
717
- <preferred>Term2</preferred>
718
- </term>
719
- </terms>
720
- <definitions id="K">
721
- <dl>
722
- <dt>Symbol</dt>
723
- <dd>Definition</dd>
724
- </dl>
725
- </definitions>
726
- </clause>
727
- <definitions id="L">
728
- <dl>
729
- <dt>Symbol</dt>
730
- <dd>Definition</dd>
731
- </dl>
732
- </definitions>
733
- <clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
734
- <title>Introduction</title>
735
- </clause>
736
- <clause id="O" inline-header="false" obligation="normative">
737
- <title>Clause 4.2</title>
738
- </clause></clause>
739
-
740
- </sections><annex id="P" inline-header="false" obligation="normative">
741
- <title>Annex</title>
742
- <clause id="Q" inline-header="false" obligation="normative">
743
- <title>Annex A.1</title>
744
- <clause id="Q1" inline-header="false" obligation="normative">
745
- <title>Annex A.1a</title>
746
- </clause>
747
- </clause>
748
- <appendix id="Q2" inline-header="false" obligation="normative">
749
- <title>An Appendix</title>
750
- </appendix>
751
- </annex><bibliography><references id="R" obligation="informative" normative="true">
752
- <title>Normative References</title>
753
- <bibitem id="ISO712" type="standard">
754
- <title format="text/plain">Cereals and cereal products</title>
755
- <docidentifier>ISO 712</docidentifier>
756
- <contributor>
757
- <role type="publisher"/>
758
- <organization>
759
- <abbreviation>ISO</abbreviation>
760
- </organization>
761
- </contributor>
762
- </bibitem>
763
- </references><clause id="S" obligation="informative">
764
- <title>Bibliography</title>
765
- <references id="T" obligation="informative" normative="false">
766
- <title>Bibliography Subsection</title>
767
- </references>
768
- </clause>
769
- </bibliography>
770
- </iso-standard>
771
- INPUT
772
- presxml = <<~OUTPUT
773
- <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
774
- <bibdata>
775
- <language current="true">zh</language>
776
- <script current="true">Hans</script>
777
- </bibdata>
778
- <preface>
779
- <foreword obligation='informative'>
780
- <title>Foreword</title>
781
- <p id='A'>This is a preamble</p>
782
- </foreword>
783
- <introduction id='B' obligation='informative'>
784
- <title depth='1'>0<tab/>Introduction</title>
785
- <clause id='C' inline-header='false' obligation='informative'>
786
- <title depth='2'>0.1<tab/>Introduction Subsection</title>
787
- </clause>
788
- <p>This is patent boilerplate</p>
789
- </introduction>
790
- </preface>
791
- <sections>
792
- <clause id='D' obligation='normative' type="scope">
793
- <title depth='1'>1<tab/>Scope</title>
794
- <p id='E'>
795
- <eref type='inline' bibitemid='ISO712'><locality type='table'><referenceFrom>1</referenceFrom><referenceTo>1</referenceTo></locality>ISO 712&#x3001;&#x7B2C;1&#x2013;1&#x8868;</eref>
796
- </p>
797
- </clause>
798
- <clause id='H' obligation='normative'>
799
- <title depth='1'>3<tab/>Terms, definitions, symbols and abbreviated terms</title>
800
- <terms id='I' obligation='normative'>
801
- <title depth='2'>3.1<tab/>Normal Terms</title>
802
- <term id='J'>
803
- <name>3.1.1</name>
804
- <preferred>Term2</preferred>
805
- </term>
806
- </terms>
807
- <definitions id='K' inline-header="true">
808
- <title>3.2</title>
809
- <dl>
810
- <dt>Symbol</dt>
811
- <dd>Definition</dd>
812
- </dl>
813
- </definitions>
814
- </clause>
815
- <definitions id='L'>
697
+ <bibdata>
698
+ <language>zh</language>
699
+ <script>Hans</script>
700
+ </bibdata>
701
+ <preface>
702
+ <foreword obligation="informative">
703
+ <title>Foreword</title>
704
+ <p id="A">This is a preamble</p>
705
+ </foreword>
706
+ <introduction id="B" obligation="informative">
707
+ <title>Introduction</title>
708
+ <clause id="C" inline-header="false" obligation="informative">
709
+ <title>Introduction Subsection</title>
710
+ </clause>
711
+ <p>This is patent boilerplate</p>
712
+ </introduction>
713
+ </preface>
714
+ <sections>
715
+ <clause id="D" obligation="normative" type="scope">
716
+ <title>Scope</title>
717
+ <p id="E">
718
+ <eref bibitemid="ISO712" type="inline">
719
+ <locality type="table">
720
+ <referenceFrom>1</referenceFrom>
721
+ <referenceTo>1</referenceTo>
722
+ </locality>
723
+ </eref>
724
+ </p>
725
+ </clause>
726
+ <clause id="H" obligation="normative">
727
+ <title>Terms, definitions, symbols and abbreviated terms</title>
728
+ <terms id="I" obligation="normative">
729
+ <title>Normal Terms</title>
730
+ <term id="J">
731
+ <preferred>Term2</preferred>
732
+ </term>
733
+ </terms>
734
+ <definitions id="K">
735
+ <dl>
736
+ <dt>Symbol</dt>
737
+ <dd>Definition</dd>
738
+ </dl>
739
+ </definitions>
740
+ </clause>
741
+ <definitions id="L">
742
+ <dl>
743
+ <dt>Symbol</dt>
744
+ <dd>Definition</dd>
745
+ </dl>
746
+ </definitions>
747
+ <clause id="M" inline-header="false" obligation="normative">
748
+ <title>Clause 4</title>
749
+ <clause id="N" inline-header="false" obligation="normative">
750
+ <title>Introduction</title>
751
+ </clause>
752
+ <clause id="O" inline-header="false" obligation="normative">
753
+ <title>Clause 4.2</title>
754
+ </clause>
755
+ </clause>
756
+ </sections>
757
+ <annex id="P" inline-header="false" obligation="normative">
758
+ <title>Annex</title>
759
+ <clause id="Q" inline-header="false" obligation="normative">
760
+ <title>Annex A.1</title>
761
+ <clause id="Q1" inline-header="false" obligation="normative">
762
+ <title>Annex A.1a</title>
763
+ </clause>
764
+ </clause>
765
+ <appendix id="Q2" inline-header="false" obligation="normative">
766
+ <title>An Appendix</title>
767
+ </appendix>
768
+ </annex>
769
+ <bibliography>
770
+ <references id="R" normative="true" obligation="informative">
771
+ <title>Normative References</title>
772
+ <bibitem id="ISO712" type="standard">
773
+ <title format="text/plain">Cereals and cereal products</title>
774
+ <docidentifier>ISO 712</docidentifier>
775
+ <contributor>
776
+ <role type="publisher"/>
777
+ <organization>
778
+ <abbreviation>ISO</abbreviation>
779
+ </organization>
780
+ </contributor>
781
+ </bibitem>
782
+ </references>
783
+ <clause id="S" obligation="informative">
784
+ <title>Bibliography</title>
785
+ <references id="T" normative="false" obligation="informative">
786
+ <title>Bibliography Subsection</title>
787
+ </references>
788
+ </clause>
789
+ </bibliography>
790
+ </iso-standard>
791
+ INPUT
792
+ presxml = <<~OUTPUT
793
+ <iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
794
+ <bibdata>
795
+ <language current="true">zh</language>
796
+ <script current="true">Hans</script>
797
+ </bibdata>
798
+ <preface>
799
+ <foreword obligation="informative">
800
+ <title>Foreword</title>
801
+ <p id="A">This is a preamble</p>
802
+ </foreword>
803
+ <introduction id="B" obligation="informative">
804
+ <title depth="1">0
805
+ <tab/>
806
+ Introduction</title>
807
+ <clause id="C" inline-header="false" obligation="informative">
808
+ <title depth="2">0.1
809
+ <tab/>
810
+ Introduction Subsection</title>
811
+ </clause>
812
+ <p>This is patent boilerplate</p>
813
+ </introduction>
814
+ </preface>
815
+ <sections>
816
+ <clause id="D" obligation="normative" type="scope">
817
+ <title depth="1">1
818
+ <tab/>
819
+ Scope</title>
820
+ <p id="E">
821
+ <eref bibitemid="ISO712" type="inline"><locality type="table"><referenceFrom>1</referenceFrom><referenceTo>1</referenceTo></locality>ISO 712、第1–1表</eref>
822
+ </p>
823
+ </clause>
824
+ <clause id="H" obligation="normative">
825
+ <title depth="1">3
826
+ <tab/>
827
+ Terms, definitions, symbols and abbreviated terms</title>
828
+ <terms id="I" obligation="normative">
829
+ <title depth="2">3.1
830
+ <tab/>
831
+ Normal Terms</title>
832
+ <term id="J">
833
+ <name>3.1.1</name>
834
+ <preferred>Term2</preferred>
835
+ </term>
836
+ </terms>
837
+ <definitions id="K" inline-header="true">
838
+ <title>3.2</title>
839
+ <dl>
840
+ <dt>Symbol</dt>
841
+ <dd>Definition</dd>
842
+ </dl>
843
+ </definitions>
844
+ </clause>
845
+ <definitions id="L">
816
846
  <title>4</title>
817
- <dl>
818
- <dt>Symbol</dt>
819
- <dd>Definition</dd>
820
- </dl>
821
- </definitions>
822
- <clause id='M' inline-header='false' obligation='normative'>
823
- <title depth='1'>5<tab/>Clause 4</title>
824
- <clause id='N' inline-header='false' obligation='normative'>
825
- <title depth='2'>5.1<tab/>Introduction</title>
826
- </clause>
827
- <clause id='O' inline-header='false' obligation='normative'>
828
- <title depth='2'>5.2<tab/>Clause 4.2</title>
829
- </clause>
830
- </clause>
831
- </sections>
832
- <annex id='P' inline-header='false' obligation='normative'>
833
- <title><strong>&#x9644;&#x4EF6;A</strong><br/>&#xFF08;&#x89C4;&#x8303;&#x6027;&#x9644;&#x5F55;&#xFF09;<br/><br/><strong>Annex</strong>
834
- </title>
835
- <clause id='Q' inline-header='false' obligation='normative'>
836
- <title depth='2'>A.1<tab/>Annex A.1</title>
837
- <clause id='Q1' inline-header='false' obligation='normative'>
838
- <title depth='3'>A.1.1<tab/>Annex A.1a</title>
839
- </clause>
840
- </clause>
841
- <appendix id='Q2' inline-header='false' obligation='normative'>
842
- <title depth='2'>&#x9644;&#x5F55;1<tab/>An Appendix</title>
843
- </appendix>
844
- </annex>
845
- <bibliography>
846
- <references id='R' obligation='informative' normative='true'>
847
- <title depth='1'>2<tab/>Normative References</title>
848
- <bibitem id='ISO712' type='standard'>
849
- <title format='text/plain'>Cereals and cereal products</title>
850
- <docidentifier>ISO 712</docidentifier>
851
- <contributor>
852
- <role type='publisher'/>
853
- <organization>
854
- <abbreviation>ISO</abbreviation>
855
- </organization>
856
- </contributor>
857
- </bibitem>
858
- </references>
859
- <clause id='S' obligation='informative'>
860
- <title depth='1'>Bibliography</title>
861
- <references id='T' obligation='informative' normative='false'>
862
- <title depth="2">Bibliography Subsection</title>
863
- </references>
864
- </clause>
865
- </bibliography>
866
- </iso-standard>
867
- OUTPUT
847
+ <dl>
848
+ <dt>Symbol</dt>
849
+ <dd>Definition</dd>
850
+ </dl>
851
+ </definitions>
852
+ <clause id="M" inline-header="false" obligation="normative">
853
+ <title depth="1">5
854
+ <tab/>
855
+ Clause 4</title>
856
+ <clause id="N" inline-header="false" obligation="normative">
857
+ <title depth="2">5.1
858
+ <tab/>
859
+ Introduction</title>
860
+ </clause>
861
+ <clause id="O" inline-header="false" obligation="normative">
862
+ <title depth="2">5.2
863
+ <tab/>
864
+ Clause 4.2</title>
865
+ </clause>
866
+ </clause>
867
+ </sections>
868
+ <annex id="P" inline-header="false" obligation="normative">
869
+ <title>
870
+ <strong>附件A</strong>
871
+ <br/>(规范性附录)
872
+ <br/>
873
+ <br/>
874
+ <strong>Annex</strong></title>
875
+ <clause id="Q" inline-header="false" obligation="normative">
876
+ <title depth="2">A.1
877
+ <tab/>
878
+ Annex A.1</title>
879
+ <clause id="Q1" inline-header="false" obligation="normative">
880
+ <title depth="3">A.1.1
881
+ <tab/>
882
+ Annex A.1a</title>
883
+ </clause>
884
+ </clause>
885
+ <appendix id="Q2" inline-header="false" obligation="normative">
886
+ <title depth="2">附录1
887
+ <tab/>
888
+ An Appendix</title>
889
+ </appendix>
890
+ </annex>
891
+ <bibliography>
892
+ <references id="R" normative="true" obligation="informative">
893
+ <title depth="1">2
894
+ <tab/>
895
+ Normative References</title>
896
+ <bibitem id="ISO712" type="standard">
897
+ <title format="text/plain">Cereals and cereal products</title>
898
+ <docidentifier>ISO 712</docidentifier>
899
+ <contributor>
900
+ <role type="publisher"/>
901
+ <organization>
902
+ <abbreviation>ISO</abbreviation>
903
+ </organization>
904
+ </contributor>
905
+ </bibitem>
906
+ </references>
907
+ <clause id="S" obligation="informative">
908
+ <title depth="1">Bibliography</title>
909
+ <references id="T" normative="false" obligation="informative">
910
+ <title depth="2">Bibliography Subsection</title>
911
+ </references>
912
+ </clause>
913
+ </bibliography>
914
+ </iso-standard>
915
+ OUTPUT
868
916
 
869
- html = <<~OUTPUT
870
- #{HTML_HDR.gsub(/"en"/, '"zh"')}
871
- <br/>
872
- <div>
873
- <h1 class="ForewordTitle">Foreword</h1>
874
- <p id="A">This is a preamble</p>
875
- </div>
876
- <br/>
877
- <div class="Section3" id="B">
878
- <h1 class="IntroTitle">0&#12288;Introduction</h1>
879
- <div id="C"><h2>0.1&#12288;Introduction Subsection</h2>
880
-
917
+ html = <<~OUTPUT
918
+ #{HTML_HDR.gsub(/"en"/, '"zh"')}
919
+ <br/>
920
+ <div>
921
+ <h1 class="ForewordTitle">Foreword</h1>
922
+ <p id="A">This is a preamble</p>
923
+ </div>
924
+ <br/>
925
+ <div class="Section3" id="B">
926
+ <h1 class="IntroTitle">0 &#12288; Introduction</h1>
927
+ <div id="C">
928
+ <h2>0.1 &#12288; Introduction Subsection</h2>
881
929
  </div>
882
- <p>This is patent boilerplate</p>
883
- </div>
884
- <p class="zzSTDTitle1"/>
885
- <div id="D">
886
- <h1>1&#12288;Scope</h1>
887
- <p id="E">
888
- <a href='#ISO712'>ISO 712&#12289;&#31532;1&#8211;1&#34920;</a>
889
- </p>
890
- </div>
891
- <div>
892
- <h1>2&#12288;Normative References</h1>
893
- <p id="ISO712" class="NormRef">ISO 712, <i>Cereals and cereal products</i></p>
894
- </div>
895
- <div id="H">
896
- <h1>3&#12288;Terms, definitions, symbols and abbreviated terms</h1>
897
- <div id="I"><h2>3.1&#12288;Normal Terms</h2>
898
-
930
+ <p>This is patent boilerplate</p>
931
+ </div>
932
+ <p class="zzSTDTitle1"/>
933
+ <div id="D">
934
+ <h1>1 &#12288; Scope</h1>
935
+ <p id="E"><a href='#ISO712'>ISO 712&#12289;&#31532;1&#8211;1&#34920;</a></p>
936
+ </div>
937
+ <div>
938
+ <h1>2 &#12288; Normative References</h1>
939
+ <p id="ISO712" class="NormRef">ISO 712, <i>Cereals and cereal products</i></p>
940
+ </div>
941
+ <div id="H">
942
+ <h1>3 &#12288; Terms, definitions, symbols and abbreviated terms</h1>
943
+ <div id="I"><h2>3.1 &#12288; Normal Terms</h2>
899
944
  <p class="TermNum" id="J">3.1.1</p>
900
945
  <p class="Terms" style="text-align:left;">Term2</p>
901
-
902
946
  </div><div id="K">
903
947
  <span class='zzMoveToFollowing'>
904
- <b>3.2&#12288;</b>
905
- </span>
948
+ <b>3.2&#12288;</b>
949
+ </span>
906
950
  <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
907
951
  </div></div>
908
- <div id="L" class="Symbols">
909
- <h1>4</h1>
910
- <dl>
911
- <dt>
912
- <p>Symbol</p>
913
- </dt>
914
- <dd>Definition</dd>
915
- </dl>
916
- </div>
917
- <div id="M">
918
- <h1>5&#12288;Clause 4</h1>
919
- <div id="N"><h2>5.1&#12288;Introduction</h2>
920
-
952
+ <div id="L" class="Symbols">
953
+ <h1>4</h1>
954
+ <dl>
955
+ <dt>
956
+ <p>Symbol</p>
957
+ </dt>
958
+ <dd>Definition</dd>
959
+ </dl>
960
+ </div>
961
+ <div id="M">
962
+ <h1>5 &#12288; Clause 4</h1>
963
+ <div id="N">
964
+ <h2>5.1 &#12288; Introduction</h2>
921
965
  </div>
922
- <div id="O"><h2>5.2&#12288;Clause 4.2</h2>
923
-
966
+ <div id="O">
967
+ <h2>5.2 &#12288; Clause 4.2</h2>
924
968
  </div>
925
- </div>
926
- <br/>
927
- <div id="P" class="Section3">
928
- <h1 class="Annex"><b>&#38468;&#20214;A</b><br/>&#65288;&#35268;&#33539;&#24615;&#38468;&#24405;&#65289;<br/><br/><b>Annex</b></h1>
929
- <div id="Q"><h2>A.1&#12288;Annex A.1</h2>
930
-
931
- <div id="Q1"><h3>A.1.1&#12288;Annex A.1a</h3>
932
-
933
- </div>
969
+ </div>
970
+ <br/>
971
+ <div id="P" class="Section3">
972
+ <h1 class="Annex"><b>&#38468;&#20214;A</b><br/>&#65288;&#35268;&#33539;&#24615;&#38468;&#24405;&#65289;<br/><br/><b>Annex</b></h1>
973
+ <div id="Q">
974
+ <h2>A.1 &#12288; Annex A.1</h2>
975
+ <div id="Q1"><h3>A.1.1 &#12288; Annex A.1a</h3></div>
934
976
  </div>
935
- <div id="Q2"><h2>&#38468;&#24405;1&#12288;An Appendix</h2>
936
-
977
+ <div id="Q2">
978
+ <h2>&#38468;&#24405;1 &#12288; An Appendix</h2>
937
979
  </div>
938
- </div>
939
- <br/>
940
- <div>
941
- <h1 class="Section3">Bibliography</h1>
942
- <div>
943
- <h2 class="Section3">Bibliography Subsection</h2>
944
- </div>
945
- </div>
946
- </div>
947
- </body>
948
- </html>
980
+ </div>
981
+ <br/>
982
+ <div>
983
+ <h1 class="Section3">Bibliography</h1>
984
+ <div>
985
+ <h2 class="Section3">Bibliography Subsection</h2>
986
+ </div>
987
+ </div>
988
+ </div>
989
+ </body>
990
+ </html>
949
991
  OUTPUT
950
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
992
+ expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true))
993
+ .sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
951
994
  expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
952
995
  end
953
-
954
996
  end