isodoc 1.2.5 → 1.3.1
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/.github/workflows/rake.yml +69 -0
- data/README.adoc +1 -3
- data/isodoc.gemspec +3 -1
- data/lib/isodoc-yaml/i18n-en.yaml +1 -0
- data/lib/isodoc-yaml/i18n-fr.yaml +8 -7
- data/lib/isodoc-yaml/i18n-zh-Hans.yaml +1 -0
- data/lib/isodoc/base_style/all.css +5 -1
- data/lib/isodoc/base_style/blocks.scss +2 -2
- data/lib/isodoc/base_style/reset.css +5 -1
- data/lib/isodoc/base_style/reset.scss +6 -1
- data/lib/isodoc/base_style/typography.scss +1 -1
- data/lib/isodoc/convert.rb +12 -97
- data/lib/isodoc/css.rb +95 -0
- data/lib/isodoc/function/inline.rb +0 -33
- data/lib/isodoc/function/inline_simple.rb +4 -1
- data/lib/isodoc/function/lists.rb +2 -1
- data/lib/isodoc/function/references.rb +8 -13
- data/lib/isodoc/function/table.rb +10 -0
- data/lib/isodoc/function/to_word_html.rb +3 -2
- data/lib/isodoc/gem_tasks.rb +4 -0
- data/lib/isodoc/html_function/html.rb +1 -0
- data/lib/isodoc/html_function/postprocess.rb +12 -3
- data/lib/isodoc/i18n.rb +23 -51
- data/lib/isodoc/metadata.rb +42 -115
- data/lib/isodoc/metadata_contributor.rb +90 -0
- data/lib/isodoc/metadata_date.rb +11 -0
- data/lib/isodoc/presentation_function/bibdata.rb +79 -7
- data/lib/isodoc/presentation_function/block.rb +14 -9
- data/lib/isodoc/presentation_function/inline.rb +126 -22
- data/lib/isodoc/presentation_function/section.rb +6 -0
- data/lib/isodoc/presentation_xml_convert.rb +4 -0
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_convert.rb +0 -20
- data/lib/isodoc/word_function/body.rb +12 -0
- data/lib/isodoc/word_function/postprocess.rb +38 -80
- data/lib/isodoc/word_function/postprocess_cover.rb +55 -0
- data/lib/isodoc/word_function/table.rb +10 -0
- data/lib/isodoc/xref.rb +1 -0
- data/lib/isodoc/xref/xref_counter.rb +20 -9
- data/lib/isodoc/xref/xref_gen.rb +20 -2
- data/lib/isodoc/xslfo_convert.rb +6 -1
- data/spec/assets/html.scss +14 -0
- data/spec/assets/i18n.yaml +17 -9
- data/spec/isodoc/blocks_spec.rb +88 -240
- data/spec/isodoc/cleanup_spec.rb +0 -1
- data/spec/isodoc/footnotes_spec.rb +4 -5
- data/spec/isodoc/i18n_spec.rb +73 -38
- data/spec/isodoc/inline_spec.rb +177 -199
- data/spec/isodoc/lists_spec.rb +1 -1
- data/spec/isodoc/metadata_spec.rb +68 -20
- data/spec/isodoc/postproc_spec.rb +306 -8
- data/spec/isodoc/presentation_xml_spec.rb +584 -1
- data/spec/isodoc/ref_spec.rb +327 -12
- data/spec/isodoc/table_spec.rb +28 -0
- data/spec/isodoc/xref_spec.rb +162 -17
- data/spec/spec_helper.rb +6 -0
- metadata +35 -7
- data/.github/workflows/macos.yml +0 -42
- data/.github/workflows/ubuntu.yml +0 -62
- data/.github/workflows/windows.yml +0 -44
data/spec/assets/html.scss
CHANGED
@@ -3,4 +3,18 @@
|
|
3
3
|
|
4
4
|
p {
|
5
5
|
font-family: $bodyfont;
|
6
|
+
font-size: $normalfontsize;
|
7
|
+
}
|
8
|
+
code {
|
9
|
+
font-family: $monospacefont;
|
10
|
+
font-size: $monospacefontsize;
|
11
|
+
}
|
12
|
+
aside {
|
13
|
+
font-size: $footnotefontsize;
|
14
|
+
}
|
15
|
+
h1 {
|
16
|
+
font-family: $headerfont;
|
17
|
+
}
|
18
|
+
p.note {
|
19
|
+
font-size: $smallerfontsize;
|
6
20
|
}
|
data/spec/assets/i18n.yaml
CHANGED
@@ -1,25 +1,33 @@
|
|
1
|
-
foreword:
|
1
|
+
foreword: Antaŭparolo
|
2
2
|
introduction: Enkonduko
|
3
|
-
clause:
|
4
|
-
table:
|
3
|
+
clause: klaŭzo
|
4
|
+
table: tabelo
|
5
5
|
source: SOURCE
|
6
6
|
modified: modified
|
7
7
|
scope: Amplekso
|
8
8
|
symbols: Simboloj kai mallongigitaj terminoj
|
9
9
|
annex: Aldono
|
10
|
-
normref: Normaj
|
10
|
+
normref: Normaj citaĵoj
|
11
11
|
bibliography: Bibliografio
|
12
12
|
inform_annex: informa
|
13
|
-
all_parts:
|
13
|
+
all_parts: ĉiuj partoj
|
14
|
+
norm_annex: normative
|
15
|
+
note: NOTO
|
14
16
|
locality: {
|
15
17
|
table: Tabelo
|
16
|
-
|
18
|
+
}
|
17
19
|
doctype_dict: {
|
18
|
-
brochure:
|
19
|
-
|
20
|
+
brochure: broŝuro,
|
21
|
+
conference proceedings: konferencaktoj
|
22
|
+
}
|
20
23
|
stage_dict: {
|
21
24
|
published: publikigita
|
22
25
|
}
|
23
26
|
substage_dict: {
|
24
27
|
withdrawn: fortirita
|
25
|
-
|
28
|
+
}
|
29
|
+
array:
|
30
|
+
- elem1
|
31
|
+
- elem2
|
32
|
+
- {elem3: elem4, elem5: elem6}
|
33
|
+
void:
|
data/spec/isodoc/blocks_spec.rb
CHANGED
@@ -87,32 +87,18 @@ RSpec.describe IsoDoc do
|
|
87
87
|
<standard-document xmlns="https://www.metanorma.org/ns/standoc" type="presentation">
|
88
88
|
<bibdata type="standard">
|
89
89
|
<title language="en" format="text/plain">Document title</title>
|
90
|
-
<language>en</language>
|
91
|
-
<script>Latn</script>
|
90
|
+
<language current="true">en</language>
|
91
|
+
<script current="true">Latn</script>
|
92
92
|
<status>
|
93
|
-
<stage>published</stage>
|
93
|
+
<stage language="">published</stage>
|
94
94
|
</status>
|
95
95
|
<copyright>
|
96
96
|
<from>2020</from>
|
97
97
|
</copyright>
|
98
98
|
<ext>
|
99
|
-
<doctype>article</doctype>
|
99
|
+
<doctype language="">article</doctype>
|
100
100
|
</ext>
|
101
101
|
</bibdata>
|
102
|
-
<local_bibdata type='standard'>
|
103
|
-
<title language='en' format='text/plain'>Document title</title>
|
104
|
-
<language>en</language>
|
105
|
-
<script>Latn</script>
|
106
|
-
<status>
|
107
|
-
<stage>published</stage>
|
108
|
-
</status>
|
109
|
-
<copyright>
|
110
|
-
<from>2020</from>
|
111
|
-
</copyright>
|
112
|
-
<ext>
|
113
|
-
<doctype>article</doctype>
|
114
|
-
</ext>
|
115
|
-
</local_bibdata>
|
116
102
|
<sections>
|
117
103
|
<clause id="A" inline-header="false" obligation="normative">
|
118
104
|
<title depth="1">1.<tab/>Change Clause</title>
|
@@ -248,7 +234,7 @@ RSpec.describe IsoDoc do
|
|
248
234
|
</body>
|
249
235
|
</html>
|
250
236
|
OUTPUT
|
251
|
-
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
|
237
|
+
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", input, true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
|
252
238
|
expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
|
253
239
|
end
|
254
240
|
|
@@ -1469,6 +1455,7 @@ end
|
|
1469
1455
|
<div id='_be9158af-7e93-4ee2-90c5-26d31c181934' style='page-break-after: avoid;page-break-inside: avoid;'><div class='formula'>
|
1470
1456
|
<p>
|
1471
1457
|
<span class='stem'>(#(r = 1 %)#)</span>
|
1458
|
+
<span style='mso-tab-count:1'>  </span>
|
1472
1459
|
</p>
|
1473
1460
|
</div>
|
1474
1461
|
<p>where</p>
|
@@ -2240,8 +2227,8 @@ end
|
|
2240
2227
|
OUTPUT
|
2241
2228
|
end
|
2242
2229
|
|
2243
|
-
it "processes requirements in French
|
2244
|
-
|
2230
|
+
it "processes requirements in French" do
|
2231
|
+
input = <<~INPUT
|
2245
2232
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
2246
2233
|
<bibdata>
|
2247
2234
|
<language>fr</language>
|
@@ -2295,133 +2282,63 @@ end
|
|
2295
2282
|
</foreword></preface>
|
2296
2283
|
</iso-standard>
|
2297
2284
|
INPUT
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2301
|
-
<
|
2302
|
-
<
|
2303
|
-
|
2304
|
-
|
2305
|
-
|
2306
|
-
|
2307
|
-
</
|
2308
|
-
<
|
2309
|
-
|
2310
|
-
|
2311
|
-
|
2312
|
-
|
2313
|
-
|
2314
|
-
|
2315
|
-
|
2316
|
-
|
2317
|
-
|
2318
|
-
|
2319
|
-
|
2320
|
-
|
2321
|
-
|
2322
|
-
|
2323
|
-
|
2324
|
-
<
|
2325
|
-
|
2326
|
-
|
2327
|
-
|
2328
|
-
|
2329
|
-
|
2330
|
-
|
2331
|
-
|
2332
|
-
|
2333
|
-
|
2334
|
-
|
2335
|
-
|
2336
|
-
|
2337
|
-
|
2338
|
-
|
2339
|
-
|
2340
|
-
|
2341
|
-
|
2342
|
-
|
2343
|
-
|
2344
|
-
|
2345
|
-
|
2346
|
-
|
2347
|
-
|
2348
|
-
|
2349
|
-
|
2350
|
-
|
2351
|
-
|
2352
|
-
success-response) end
|
2353
|
-
</sourcecode>
|
2354
|
-
</verification>
|
2355
|
-
<import exclude='true'>
|
2356
|
-
<sourcecode id='_'>success-response()</sourcecode>
|
2357
|
-
</import>
|
2358
|
-
</requirement>
|
2359
|
-
</foreword>
|
2360
|
-
</preface>
|
2361
|
-
</iso-standard>
|
2285
|
+
|
2286
|
+
presxml = <<~OUTPUT
|
2287
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
|
2288
|
+
<bibdata>
|
2289
|
+
<language current="true">fr</language>
|
2290
|
+
<script current="true">Latn</script>
|
2291
|
+
</bibdata>
|
2292
|
+
<preface><foreword>
|
2293
|
+
<requirement id="A" unnumbered="true"><name>Exigence</name>
|
2294
|
+
<title>A New Requirement</title>
|
2295
|
+
<label>/ogc/recommendation/wfs/2</label>
|
2296
|
+
<inherit>/ss/584/2015/level/1</inherit>
|
2297
|
+
<subject>user</subject>
|
2298
|
+
<description>
|
2299
|
+
<p id="_">I recommend <em>this</em>.</p>
|
2300
|
+
</description>
|
2301
|
+
<specification exclude="true" type="tabular">
|
2302
|
+
<p id="_">This is the object of the recommendation:</p>
|
2303
|
+
<table id="_">
|
2304
|
+
<tbody>
|
2305
|
+
<tr>
|
2306
|
+
<td style="text-align:left;">Object</td>
|
2307
|
+
<td style="text-align:left;">Value</td>
|
2308
|
+
</tr>
|
2309
|
+
<tr>
|
2310
|
+
<td style="text-align:left;">Mission</td>
|
2311
|
+
<td style="text-align:left;">Accomplished</td>
|
2312
|
+
</tr>
|
2313
|
+
</tbody>
|
2314
|
+
</table>
|
2315
|
+
</specification>
|
2316
|
+
<description>
|
2317
|
+
<p id="_">As for the measurement targets,</p>
|
2318
|
+
</description>
|
2319
|
+
<measurement-target exclude="false">
|
2320
|
+
<p id="_">The measurement target shall be measured as:</p>
|
2321
|
+
<formula id="B"><name>1</name>
|
2322
|
+
<stem type="AsciiMath">r/1 = 0</stem>
|
2323
|
+
</formula>
|
2324
|
+
</measurement-target>
|
2325
|
+
<verification exclude="false">
|
2326
|
+
<p id="_">The following code will be run for verification:</p>
|
2327
|
+
<sourcecode id="_">CoreRoot(success): HttpResponse
|
2328
|
+
if (success)
|
2329
|
+
recommendation(label: success-response)
|
2330
|
+
end
|
2331
|
+
</sourcecode>
|
2332
|
+
</verification>
|
2333
|
+
<import exclude="true">
|
2334
|
+
<sourcecode id="_">success-response()</sourcecode>
|
2335
|
+
</import>
|
2336
|
+
</requirement>
|
2337
|
+
</foreword></preface>
|
2338
|
+
</iso-standard>
|
2362
2339
|
OUTPUT
|
2363
|
-
end
|
2364
2340
|
|
2365
|
-
|
2366
|
-
expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2367
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
2368
|
-
<bibdata>
|
2369
|
-
<language>fr</language>
|
2370
|
-
<script>Latn</script>
|
2371
|
-
</bibdata>
|
2372
|
-
<local_bibdata>
|
2373
|
-
<language>fr</language>
|
2374
|
-
<script>Latn</script>
|
2375
|
-
</local_bibdata>
|
2376
|
-
<preface><foreword>
|
2377
|
-
<requirement id="A" unnumbered="true">
|
2378
|
-
<name>Exigence</name>
|
2379
|
-
<title>A New Requirement</title>
|
2380
|
-
<label>/ogc/recommendation/wfs/2</label>
|
2381
|
-
<inherit>/ss/584/2015/level/1</inherit>
|
2382
|
-
<subject>user</subject>
|
2383
|
-
<description>
|
2384
|
-
<p id="_">I recommend <em>this</em>.</p>
|
2385
|
-
</description>
|
2386
|
-
<specification exclude="true" type="tabular">
|
2387
|
-
<p id="_">This is the object of the recommendation:</p>
|
2388
|
-
<table id="_">
|
2389
|
-
<tbody>
|
2390
|
-
<tr>
|
2391
|
-
<td style="text-align:left;">Object</td>
|
2392
|
-
<td style="text-align:left;">Value</td>
|
2393
|
-
</tr>
|
2394
|
-
<tr>
|
2395
|
-
<td style="text-align:left;">Mission</td>
|
2396
|
-
<td style="text-align:left;">Accomplished</td>
|
2397
|
-
</tr>
|
2398
|
-
</tbody>
|
2399
|
-
</table>
|
2400
|
-
</specification>
|
2401
|
-
<description>
|
2402
|
-
<p id="_">As for the measurement targets,</p>
|
2403
|
-
</description>
|
2404
|
-
<measurement-target exclude="false">
|
2405
|
-
<p id="_">The measurement target shall be measured as:</p>
|
2406
|
-
<formula id="B">
|
2407
|
-
<stem type="AsciiMath">r/1 = 0</stem>
|
2408
|
-
</formula>
|
2409
|
-
</measurement-target>
|
2410
|
-
<verification exclude="false">
|
2411
|
-
<p id="_">The following code will be run for verification:</p>
|
2412
|
-
<sourcecode id="_">CoreRoot(success): HttpResponse
|
2413
|
-
if (success)
|
2414
|
-
recommendation(label: success-response)
|
2415
|
-
end
|
2416
|
-
</sourcecode>
|
2417
|
-
</verification>
|
2418
|
-
<import exclude="true">
|
2419
|
-
<sourcecode id="_">success-response()</sourcecode>
|
2420
|
-
</import>
|
2421
|
-
</requirement>
|
2422
|
-
</foreword></preface>
|
2423
|
-
</iso-standard>
|
2424
|
-
INPUT
|
2341
|
+
html = <<~OUTPUT
|
2425
2342
|
#{HTML_HDR.gsub(/"en"/, '"fr"')}
|
2426
2343
|
<br/>
|
2427
2344
|
<div>
|
@@ -2454,6 +2371,7 @@ end
|
|
2454
2371
|
<div id='B'><div class='formula'>
|
2455
2372
|
<p>
|
2456
2373
|
<span class='stem'>(#(r/1 = 0)#)</span>
|
2374
|
+
  (1)
|
2457
2375
|
</p>
|
2458
2376
|
</div>
|
2459
2377
|
</div>
|
@@ -2463,14 +2381,12 @@ end
|
|
2463
2381
|
<pre id='_' class='prettyprint '>
|
2464
2382
|
CoreRoot(success): HttpResponse
|
2465
2383
|
<br/>
|
2466
|
-
 
|
2384
|
+
  if (success)
|
2467
2385
|
<br/>
|
2468
|
-
 
|
2469
|
-
success-response)
|
2386
|
+
  recommendation(label: success-response)
|
2470
2387
|
<br/>
|
2471
|
-
 
|
2388
|
+
  end
|
2472
2389
|
<br/>
|
2473
|
-
   
|
2474
2390
|
</pre>
|
2475
2391
|
</div>
|
2476
2392
|
</div>
|
@@ -2480,6 +2396,8 @@ end
|
|
2480
2396
|
</body>
|
2481
2397
|
</html>
|
2482
2398
|
OUTPUT
|
2399
|
+
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", input, true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
|
2400
|
+
expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
|
2483
2401
|
end
|
2484
2402
|
|
2485
2403
|
it "processes recommendation (Presentation XML)" do
|
@@ -2686,8 +2604,8 @@ end
|
|
2686
2604
|
OUTPUT
|
2687
2605
|
end
|
2688
2606
|
|
2689
|
-
it "processes pseudocode
|
2690
|
-
|
2607
|
+
it "processes pseudocode" do
|
2608
|
+
input = <<~INPUT
|
2691
2609
|
<itu-standard xmlns="http://riboseinc.com/isoxml">
|
2692
2610
|
<bibdata>
|
2693
2611
|
<language>en</language>
|
@@ -2698,65 +2616,22 @@ end
|
|
2698
2616
|
<p id="_"> <em>C</em></p></figure>
|
2699
2617
|
</preface></itu-standard>
|
2700
2618
|
INPUT
|
2701
|
-
|
2702
|
-
|
2703
|
-
|
2704
|
-
|
2705
|
-
|
2706
|
-
|
2707
|
-
|
2708
|
-
</
|
2709
|
-
|
2710
|
-
|
2711
|
-
|
2712
|
-
|
2713
|
-
|
2714
|
-
  
|
2715
|
-
<strong>A</strong>
|
2716
|
-
<br/>
|
2717
|
-
        
|
2718
|
-
<smallcap>B</smallcap>
|
2719
|
-
</p>
|
2720
|
-
<p id='_'>
|
2721
|
-
  
|
2722
|
-
<em>C</em>
|
2723
|
-
</p>
|
2724
|
-
</figure>
|
2725
|
-
</foreword>
|
2726
|
-
</preface>
|
2727
|
-
</itu-standard>
|
2619
|
+
|
2620
|
+
presxml = <<~OUTPUT
|
2621
|
+
<itu-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
|
2622
|
+
<bibdata>
|
2623
|
+
<language current="true">en</language>
|
2624
|
+
</bibdata>
|
2625
|
+
<preface><foreword>
|
2626
|
+
<figure id="_" class="pseudocode" keep-with-next="true" keep-lines-together="true"><name>Figure 1 — Label</name><p id="_">  <strong>A</strong><br/>
|
2627
|
+
        <smallcap>B</smallcap></p>
|
2628
|
+
<p id="_">  <em>C</em></p></figure>
|
2629
|
+
</foreword></preface>
|
2630
|
+
</itu-standard>
|
2631
|
+
|
2728
2632
|
OUTPUT
|
2729
|
-
end
|
2730
2633
|
|
2731
|
-
|
2732
|
-
expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2733
|
-
<itu-standard xmlns='http://riboseinc.com/isoxml'>
|
2734
|
-
<bibdata>
|
2735
|
-
<language>en</language>
|
2736
|
-
</bibdata>
|
2737
|
-
<local_bibdata>
|
2738
|
-
<language>en</language>
|
2739
|
-
</local_bibdata>
|
2740
|
-
<preface>
|
2741
|
-
<foreword>
|
2742
|
-
<figure id='_' class='pseudocode' keep-with-next='true' keep-lines-together='true'>
|
2743
|
-
<name>Figure 1 — Label</name>
|
2744
|
-
<p id='_'>
|
2745
|
-
  
|
2746
|
-
<strong>A</strong>
|
2747
|
-
<br/>
|
2748
|
-
        
|
2749
|
-
<smallcap>B</smallcap>
|
2750
|
-
</p>
|
2751
|
-
<p id='_'>
|
2752
|
-
  
|
2753
|
-
<em>C</em>
|
2754
|
-
</p>
|
2755
|
-
</figure>
|
2756
|
-
</foreword>
|
2757
|
-
</preface>
|
2758
|
-
</itu-standard>
|
2759
|
-
INPUT
|
2634
|
+
html = <<~OUTPUT
|
2760
2635
|
#{HTML_HDR}
|
2761
2636
|
<br/>
|
2762
2637
|
<div>
|
@@ -2770,38 +2645,11 @@ INPUT
|
|
2770
2645
|
</body>
|
2771
2646
|
</html>
|
2772
2647
|
OUTPUT
|
2773
|
-
end
|
2774
2648
|
|
2775
|
-
it "processes pseudocode (Word)" do
|
2776
2649
|
FileUtils.rm_f "test.doc"
|
2777
|
-
IsoDoc::
|
2778
|
-
|
2779
|
-
|
2780
|
-
<language>en</language>
|
2781
|
-
</bibdata>
|
2782
|
-
<local_bibdata>
|
2783
|
-
<language>en</language>
|
2784
|
-
</local_bibdata>
|
2785
|
-
<preface>
|
2786
|
-
<foreword>
|
2787
|
-
<figure id='_' class='pseudocode' keep-with-next='true' keep-lines-together='true'>
|
2788
|
-
<name>Figure 1 — Label</name>
|
2789
|
-
<p id='_'>
|
2790
|
-
  
|
2791
|
-
<strong>A</strong>
|
2792
|
-
<br/>
|
2793
|
-
        
|
2794
|
-
<smallcap>B</smallcap>
|
2795
|
-
</p>
|
2796
|
-
<p id='_'>
|
2797
|
-
  
|
2798
|
-
<em>C</em>
|
2799
|
-
</p>
|
2800
|
-
</figure>
|
2801
|
-
</foreword>
|
2802
|
-
</preface>
|
2803
|
-
</itu-standard>
|
2804
|
-
INPUT
|
2650
|
+
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", input, true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
|
2651
|
+
expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
|
2652
|
+
IsoDoc::WordConvert.new({}).convert("test", presxml, false)
|
2805
2653
|
expect(xmlpp( File.read("test.doc").gsub(%r{^.*<h1 class="ForewordTitle">Foreword</h1>}m, "").gsub(%r{</div>.*}m, "</div>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2806
2654
|
<div class="pseudocode" style='page-break-after: avoid;page-break-inside: avoid;'><a name="_" id="_"></a><p class="pseudocode"><a name="_" id="_"></a>  <b>A</b><br/>
|
2807
2655
|
        <span style="font-variant:small-caps;">B</span></p>
|