spec/isodoc/xref_spec.rb in isodoc-0.5.9 vs spec/isodoc/xref_spec.rb in isodoc-0.6.0
- old
+ new
@@ -53,20 +53,12 @@
</note>
</clause>
</annex>
</iso-standard>
INPUT
-<html xmlns:epub="http://www.idpf.org/2007/ops">
- <head>
- <title>test</title>
- <body lang="EN-US" link="blue" vlink="#954F72">
- <div class="WordSection1">
- <p> </p>
- </div>
- <br/>
- <div class="WordSection2">
- <br/>
+ #{HTML_HDR}
+ <br/>
<div>
<h1 class="ForewordTitle">Foreword</h1>
<p>
<a href="#N">Clause 1, Note</a>
<a href="#note1">3.1, Note 1</a>
@@ -74,14 +66,10 @@
<a href="#AN">A.1, Note</a>
<a href="#Anote1">A.2, Note 1</a>
<a href="#Anote2">A.2, Note 2</a>
</p>
</div>
- <p> </p>
- </div>
- <br/>
- <div class="WordSection3">
<p class="zzSTDTitle1"/>
<div id="scope">
<h1>1.  Scope</h1>
<div id="N" class="Note">
<p class="Note"><span class="note_label">NOTE</span>  These results are based on a study carried out on three different types of kernel.</p>
@@ -120,11 +108,10 @@
<div id="Anote2" class="Note"><p class="Note"><span class="note_label">NOTE 2</span>  These results are based on a study carried out on three different types of kernel.</p></div>
</div>
</div>
</div>
</body>
- </head>
</html>
OUTPUT
end
it "cross-references figures" do
@@ -183,20 +170,12 @@
</figure>
</clause>
</annex>
</iso-standard>
INPUT
- <html xmlns:epub="http://www.idpf.org/2007/ops">
- <head>
- <title>test</title>
- <body lang="EN-US" link="blue" vlink="#954F72">
- <div class="WordSection1">
- <p> </p>
- </div>
- <br/>
- <div class="WordSection2">
- <br/>
+ #{HTML_HDR}
+ <br/>
<div id="fwd">
<h1 class="ForewordTitle">Foreword</h1>
<p>
<a href="#N">Figure 1</a>
<a href="#note1">Figure 2</a>
@@ -204,14 +183,10 @@
<a href="#AN">Figure A.1</a>
<a href="#Anote1">Figure A.2</a>
<a href="#Anote2">Figure A.3</a>
</p>
</div>
- <p> </p>
- </div>
- <br/>
- <div class="WordSection3">
<p class="zzSTDTitle1"/>
<div id="scope">
<h1>1.  Scope</h1>
<div id="N" class="figure">
@@ -265,11 +240,10 @@
<p class="FigureTitle" align="center">Figure A.3 — Split-it-right sample divider</p></div>
</div>
</div>
</div>
</body>
- </head>
</html>
OUTPUT
end
it "cross-references subfigures" do
@@ -323,20 +297,12 @@
</figure>
</clause>
</annex>
</iso-standard>
INPUT
- <html xmlns:epub="http://www.idpf.org/2007/ops">
- <head>
- <title>test</title>
- <body lang="EN-US" link="blue" vlink="#954F72">
- <div class="WordSection1">
- <p> </p>
- </div>
- <br/>
- <div class="WordSection2">
- <br/>
+ #{HTML_HDR}
+ <br/>
<div id="fwd">
<h1 class="ForewordTitle">Foreword</h1>
<p>
<a href="#N">Figure 1</a>
<a href="#note1">Figure 1-1</a>
@@ -344,14 +310,10 @@
<a href="#AN">Figure A.1</a>
<a href="#Anote1">Figure A.1-1</a>
<a href="#Anote2">Figure A.1-2</a>
</p>
</div>
- <p> </p>
- </div>
- <br/>
- <div class="WordSection3">
<p class="zzSTDTitle1"/>
<div id="scope">
<h1>1.  Scope</h1>
</div>
<div id="terms"><h1>2.  Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
@@ -398,11 +360,10 @@
</div>
</div>
</div>
</div>
</body>
- </head>
</html>
OUTPUT
end
it "cross-references examples" do
@@ -455,20 +416,12 @@
</example>
</clause>
</annex>
</iso-standard>
INPUT
- <html xmlns:epub="http://www.idpf.org/2007/ops">
- <head>
- <title>test</title>
- <body lang="EN-US" link="blue" vlink="#954F72">
- <div class="WordSection1">
- <p> </p>
- </div>
- <br/>
- <div class="WordSection2">
- <br/>
+ #{HTML_HDR}
+ <br/>
<div>
<h1 class="ForewordTitle">Foreword</h1>
<p>
<a href="#N">Clause 1, Example</a>
<a href="#note1">3.1, Example 1</a>
@@ -476,14 +429,10 @@
<a href="#AN">A.1, Example</a>
<a href="#Anote1">A.2, Example 1</a>
<a href="#Anote2">A.2, Example 2</a>
</p>
</div>
- <p> </p>
- </div>
- <br/>
- <div class="WordSection3">
<p class="zzSTDTitle1"/>
<div id="scope">
<h1>1.  Scope</h1>
<table id="N" class="example">
<tr>
@@ -536,11 +485,10 @@
</td></tr></table>
</div>
</div>
</div>
</body>
- </head>
</html>
OUTPUT
end
it "cross-references formulae" do
@@ -607,20 +555,12 @@
</dl></formula>
</foreword>
</preface>
</iso-standard>
INPUT
- <html xmlns:epub="http://www.idpf.org/2007/ops">
- <head>
- <title>test</title>
- <body lang="EN-US" link="blue" vlink="#954F72">
- <div class="WordSection1">
- <p> </p>
- </div>
- <br/>
- <div class="WordSection2">
- <br/>
+ #{HTML_HDR}
+ <br/>
<div>
<h1 class="ForewordTitle">Foreword</h1>
<p>
<a href="#N">Clause 1, Formula (1)</a>
<a href="#note1">3.1, Formula (2)</a>
@@ -628,14 +568,10 @@
<a href="#AN">A.1, Formula (A.1)</a>
<a href="#Anote1">A.2, Formula (A.2)</a>
<a href="#Anote2">A.2, Formula (A.3)</a>
</p>
</div>
- <p> </p>
- </div>
- <br/>
- <div class="WordSection3">
<p class="zzSTDTitle1"/>
<div id="scope">
<h1>1.  Scope</h1>
<div id="N" class="formula"><span class="stem">(#(r = 1 %)#)</span>  (1)</div>
<p>
@@ -671,11 +607,10 @@
<div id="Anote2" class="formula"><span class="stem">(#(r = 1 %)#)</span>  (A.3)</div>
</div>
</div>
</div>
</body>
- </head>
</html>
OUTPUT
end
it "cross-references tables" do
@@ -770,20 +705,12 @@
</table>
</clause>
</annex>
</iso-standard>
INPUT
- <html xmlns:epub="http://www.idpf.org/2007/ops">
- <head>
- <title>test</title>
- <body lang="EN-US" link="blue" vlink="#954F72">
- <div class="WordSection1">
- <p> </p>
- </div>
- <br/>
- <div class="WordSection2">
- <br/>
+ #{HTML_HDR}
+ <br/>
<div>
<h1 class="ForewordTitle">Foreword</h1>
<p>
<a href="#N">Table 1</a>
<a href="#note1">Table 2</a>
@@ -791,14 +718,10 @@
<a href="#AN">Table A.1</a>
<a href="#Anote1">Table A.2</a>
<a href="#Anote2">Table A.3</a>
</p>
</div>
- <p> </p>
- </div>
- <br/>
- <div class="WordSection3">
<p class="zzSTDTitle1"/>
<div id="scope">
<h1>1.  Scope</h1>
<p class="TableTitle" align="center">
Table 1 — Repeatability and reproducibility of husked rice yield
@@ -845,11 +768,10 @@
<p class="TableTitle" align="center">Table A.3 — Repeatability and reproducibility of husked rice yield</p><table id="Anote2" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td><td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td></tr></tbody></table>
</div>
</div>
</div>
</body>
- </head>
</html>
OUTPUT
end
it "cross-references term notes" do
@@ -881,32 +803,20 @@
</termnote></term>
</terms>
</iso-standard>
INPUT
- <html xmlns:epub="http://www.idpf.org/2007/ops">
- <head>
- <title>test</title>
- <body lang="EN-US" link="blue" vlink="#954F72">
- <div class="WordSection1">
- <p> </p>
- </div>
- <br/>
- <div class="WordSection2">
- <br/>
+ #{HTML_HDR}
+ <br/>
<div>
<h1 class="ForewordTitle">Foreword</h1>
<p>
<a href="#note1">2.1, Note 1</a>
<a href="#note2">2.2, Note 1</a>
<a href="#note3">2.2, Note 2</a>
</p>
</div>
- <p> </p>
- </div>
- <br/>
- <div class="WordSection3">
<p class="zzSTDTitle1"/>
<div id="scope">
<h1>1.  Scope</h1>
</div>
<div id="terms"><h1>2.  Terms and Definitions</h1><p>For the purposes of this document,
@@ -924,11 +834,10 @@
<div class="Note"><p class="Note">Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div><p class="TermNum" id="_nonwaxy_rice">2.2</p><p class="Terms" style="text-align:left;">nonwaxy rice</p>
<div class="Note"><p class="Note">Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
<div class="Note"><p class="Note">Note 2 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div></div>
</div>
</body>
- </head>
</html>
OUTPUT
end
it "cross-references sections" do
@@ -1013,20 +922,12 @@
</references>
</clause>
</bibliography>
</iso-standard>
INPUT
- <html xmlns:epub="http://www.idpf.org/2007/ops">
- <head>
- <title>test</title>
- <body lang="EN-US" link="blue" vlink="#954F72">
- <div class="WordSection1">
- <p> </p>
- </div>
+ #{HTML_HDR}
<br/>
- <div class="WordSection2">
- <br/>
<div>
<h1 class="ForewordTitle">Foreword</h1>
<p id="A">This is a preamble
<a href="#C">0.1</a>
<a href="#D">Clause 1</a>
@@ -1051,14 +952,10 @@
<div id="C">
<h2>0.1. Introduction Subsection</h2>
</div>
<p>This is patent boilerplate</p>
</div>
- <p> </p>
- </div>
- <br/>
- <div class="WordSection3">
<p class="zzSTDTitle1"/>
<div id="D">
<h1>1.  Scope</h1>
<p id="E">Text</p>
</div>
@@ -1123,11 +1020,10 @@
<h2 class="Section3">Bibliography Subsection</h2>
</div>
</div>
</div>
</body>
- </head>
</html>
OUTPUT
end
it "cross-references lists" do
@@ -1178,20 +1074,12 @@
</ol>
</clause>
</annex>
</iso-standard>
INPUT
- <html xmlns:epub="http://www.idpf.org/2007/ops">
- <head>
- <title>test</title>
- <body lang="EN-US" link="blue" vlink="#954F72">
- <div class="WordSection1">
- <p> </p>
- </div>
- <br/>
- <div class="WordSection2">
- <br/>
+ #{HTML_HDR}
+ <br/>
<div>
<h1 class="ForewordTitle">Foreword</h1>
<p>
<a href="#N">Clause 1, List</a>
<a href="#note1">3.1, List 1</a>
@@ -1199,14 +1087,10 @@
<a href="#AN">A.1, List</a>
<a href="#Anote1">A.2, List 1</a>
<a href="#Anote2">A.2, List 2</a>
</p>
</div>
- <p> </p>
- </div>
- <br/>
- <div class="WordSection3">
<p class="zzSTDTitle1"/>
<div id="scope">
<h1>1.  Scope</h1>
<ol type="a">
<li><p>A</p></li>
@@ -1250,11 +1134,10 @@
</ol>
</div>
</div>
</div>
</body>
- </head>
</html>
OUTPUT
end
it "cross-references list items" do
@@ -1305,20 +1188,12 @@
</ol>
</clause>
</annex>
</iso-standard>
INPUT
- <html xmlns:epub="http://www.idpf.org/2007/ops">
- <head>
- <title>test</title>
- <body lang="EN-US" link="blue" vlink="#954F72">
- <div class="WordSection1">
- <p> </p>
- </div>
- <br/>
- <div class="WordSection2">
- <br/>
+ #{HTML_HDR}
+ <br/>
<div>
<h1 class="ForewordTitle">Foreword</h1>
<p>
<a href="#N">Clause 1, a)</a>
<a href="#note1">3.1, List 1 a)</a>
@@ -1326,14 +1201,10 @@
<a href="#AN">A.1, a)</a>
<a href="#Anote1">A.2, List 1 a)</a>
<a href="#Anote2">A.2, List 2 a)</a>
</p>
</div>
- <p> </p>
- </div>
- <br/>
- <div class="WordSection3">
<p class="zzSTDTitle1"/>
<div id="scope">
<h1>1.  Scope</h1>
<ol type="a">
<li><p>A</p></li>
@@ -1377,11 +1248,10 @@
</ol>
</div>
</div>
</div>
</body>
- </head>
</html>
OUTPUT
end
it "cross-references nested list items" do
@@ -1421,20 +1291,12 @@
</ol>
</clause>
</sections>
</iso-standard>
INPUT
- <html xmlns:epub="http://www.idpf.org/2007/ops">
- <head>
- <title>test</title>
- <body lang="EN-US" link="blue" vlink="#954F72">
- <div class="WordSection1">
- <p> </p>
- </div>
- <br/>
- <div class="WordSection2">
- <br/>
+ #{HTML_HDR}
+ <br/>
<div>
<h1 class="ForewordTitle">Foreword</h1>
<p>
<a href="#N">Clause 1, a)</a>
<a href="#note1">Clause 1, a.1)</a>
@@ -1442,14 +1304,10 @@
<a href="#AN">Clause 1, a.1.i.A)</a>
<a href="#Anote1">Clause 1, a.1.i.A.I)</a>
<a href="#Anote2">Clause 1, a.1.i.A.I.a)</a>
</p>
</div>
- <p> </p>
- </div>
- <br/>
- <div class="WordSection3">
<p class="zzSTDTitle1"/>
<div id="scope">
<h1>1.  Scope</h1>
<ol type="a">
<li><p>A</p>
@@ -1470,10 +1328,9 @@
</ol></li>
</ol>
</div>
</div>
</body>
- </head>
</html>
OUTPUT
end
end