summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorShaun McCance <shaunm@src.gnome.org>2004-05-05 23:05:36 +0000
committerShaun McCance <shaunm@src.gnome.org>2004-05-05 23:05:36 +0000
commit7196ed1130c782370608adf8878326e283503f8b (patch)
tree23b7b66496ec959835e2a264fa5f7d0a40a8327f /test
parentc3522264602737de6d3d772aec50b96a146fc473 (diff)
downloadgnome-doc-utils-7196ed1130c782370608adf8878326e283503f8b.tar.gz
- Added docbook-testdocs
* configure.in: * tests/Makefile.am: * tests/testdocs/*: - Added docbook-testdocs * xslt/docbook/html/Makefile.am: - Added db2html.xsl * xslt/docbook/html/db2html-cmdsynopsis.xsl: * xslt/docbook/html/db2html-info.xsl: * xslt/rngdoc/rngdoc.xsl: - Minor fixes and tab removal * xslt/xsldoc/xsldoc.xsl: - Avoiding use of default namespace, for #141532
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am1
-rw-r--r--test/testdocs/README5
-rw-r--r--test/testdocs/admonitions.001.xml40
-rw-r--r--test/testdocs/article.001.xml25
-rw-r--r--test/testdocs/article.002.xml25
-rw-r--r--test/testdocs/bibliography.001.xml193
-rw-r--r--test/testdocs/bibliography.002.xml182
-rw-r--r--test/testdocs/blockquote.001.xml35
-rw-r--r--test/testdocs/book.001.xml248
-rw-r--r--test/testdocs/book.002.xml56
-rw-r--r--test/testdocs/book.003.xml127
-rw-r--r--test/testdocs/bookinfo.001.xml84
-rw-r--r--test/testdocs/bridgehead.001.xml41
-rw-r--r--test/testdocs/calloutlist.001.xml50
-rw-r--r--test/testdocs/chapter.001.xml41
-rw-r--r--test/testdocs/classsynopsis.001.xml42
-rw-r--r--test/testdocs/draft.001.xml56
-rw-r--r--test/testdocs/emphasis.001.xml26
-rw-r--r--test/testdocs/epigraph.001.xml24
-rw-r--r--test/testdocs/equation.001.xml24
-rw-r--r--test/testdocs/equation.002.xml24
-rw-r--r--test/testdocs/equation.003.xml24
-rw-r--r--test/testdocs/example.001.xml19
-rw-r--r--test/testdocs/extensions.001.xml81
-rw-r--r--test/testdocs/extensions.002.xml23
-rw-r--r--test/testdocs/extensions.003.xml47
-rw-r--r--test/testdocs/extensions.004.xml35
-rw-r--r--test/testdocs/figure.001.xml48
-rw-r--r--test/testdocs/footnote.001.xml36
-rw-r--r--test/testdocs/footnote.002.xml42
-rw-r--r--test/testdocs/footnote.003.xml68
-rw-r--r--test/testdocs/formalpara.001.xml17
-rw-r--r--test/testdocs/formalpara.002.xml17
-rw-r--r--test/testdocs/glossary.001.xml274
-rw-r--r--test/testdocs/imagelib.001.xml61
-rw-r--r--test/testdocs/indexterm.001.xml110
-rw-r--r--test/testdocs/indexterm.002.xml700
-rw-r--r--test/testdocs/informalequation-mml.001.xml19
-rw-r--r--test/testdocs/informaltable.001.xml38
-rw-r--r--test/testdocs/informaltable.002.xml50
-rw-r--r--test/testdocs/informaltable.003.xml52
-rw-r--r--test/testdocs/informaltable.004.xml49
-rw-r--r--test/testdocs/informaltable.005.xml38
-rw-r--r--test/testdocs/informaltable.006.xml48
-rw-r--r--test/testdocs/informaltable.007.xml61
-rw-r--r--test/testdocs/informaltable.008.xml52
-rw-r--r--test/testdocs/informaltable.009.xml46
-rw-r--r--test/testdocs/informaltable.010.xml45
-rw-r--r--test/testdocs/informaltable.011.xml44
-rw-r--r--test/testdocs/informaltable.012.xml36
-rw-r--r--test/testdocs/informaltable.013.xml29
-rw-r--r--test/testdocs/informaltable.014.xml54
-rw-r--r--test/testdocs/inline.001.xml27
-rw-r--r--test/testdocs/itemizedlist.001.xml27
-rw-r--r--test/testdocs/itemizedlist.002.xml38
-rw-r--r--test/testdocs/itemizedlist.003.xml53
-rw-r--r--test/testdocs/link.001.xml36
-rw-r--r--test/testdocs/literallayout.001.xml19
-rw-r--r--test/testdocs/literallayout.002.xml21
-rw-r--r--test/testdocs/literallayout.003.xml19
-rw-r--r--test/testdocs/lot.001.xml56
-rw-r--r--test/testdocs/mathml.001.xml19
-rw-r--r--test/testdocs/mediaobject.001.xml56
-rw-r--r--test/testdocs/methodsynopsis.001.xml55
-rw-r--r--test/testdocs/note.001.xml18
-rw-r--r--test/testdocs/olink.001.xml22
-rw-r--r--test/testdocs/orderedlist.001.xml38
-rw-r--r--test/testdocs/orderedlist.002.xml38
-rw-r--r--test/testdocs/procedure.001.xml44
-rw-r--r--test/testdocs/procedure.002.xml45
-rw-r--r--test/testdocs/procedure.003.xml19
-rw-r--r--test/testdocs/productionset.001.xml66
-rw-r--r--test/testdocs/productionset.002.xml27
-rw-r--r--test/testdocs/productionset.003.xml30
-rw-r--r--test/testdocs/productionset.004.xml53
-rw-r--r--test/testdocs/productionset.005.xml89
-rw-r--r--test/testdocs/programlisting.001.xml19
-rw-r--r--test/testdocs/programlisting.002.xml19
-rw-r--r--test/testdocs/programlisting.003.xml45
-rw-r--r--test/testdocs/programlistingco.001.xml78
-rw-r--r--test/testdocs/programlistingco.002.xml34
-rw-r--r--test/testdocs/qandaset.001.xml45
-rw-r--r--test/testdocs/qandaset.002.xml35
-rw-r--r--test/testdocs/qandaset.003.xml92
-rw-r--r--test/testdocs/refentry.001.xml25
-rw-r--r--test/testdocs/refentry.002.xml29
-rw-r--r--test/testdocs/refentry.003.xml65
-rw-r--r--test/testdocs/refentry.004.xml68
-rw-r--r--test/testdocs/reference.001.xml59
-rw-r--r--test/testdocs/revhistory.001.xml41
-rw-r--r--test/testdocs/screen.001.xml19
-rw-r--r--test/testdocs/sect1.001.xml53
-rw-r--r--test/testdocs/sect1.002.xml56
-rw-r--r--test/testdocs/section.001.xml53
-rw-r--r--test/testdocs/section.002.xml56
-rw-r--r--test/testdocs/section.003.xml20
-rw-r--r--test/testdocs/segmentedlist.001.xml21
-rw-r--r--test/testdocs/segmentedlist.002.xml23
-rw-r--r--test/testdocs/set.001.xml31
-rw-r--r--test/testdocs/stamp.001.xml26
-rw-r--r--test/testdocs/stamp.002.xml31
-rw-r--r--test/testdocs/stamp.003.xml30
-rw-r--r--test/testdocs/stamp.004.xml30
-rw-r--r--test/testdocs/stamp.005.xml28
-rw-r--r--test/testdocs/stamp.006.xml29
-rw-r--r--test/testdocs/stamp.007.xml29
-rw-r--r--test/testdocs/stamp.008.xml27
-rw-r--r--test/testdocs/stamp.009.xml28
-rw-r--r--test/testdocs/stamp.010.xml28
-rw-r--r--test/testdocs/stamp.011.xml31
-rw-r--r--test/testdocs/stamp.012.xml41
-rw-r--r--test/testdocs/svg.001.xml38
-rw-r--r--test/testdocs/svg.002.xml31
-rw-r--r--test/testdocs/table.001.xml31
-rw-r--r--test/testdocs/table.002.xml37
-rw-r--r--test/testdocs/table.003.xml38
-rw-r--r--test/testdocs/table.004.xml30
-rw-r--r--test/testdocs/table.005.xml35
-rw-r--r--test/testdocs/table.006.xml207
-rw-r--r--test/testdocs/template.xml17
-rw-r--r--test/testdocs/toc.001.xml63
-rw-r--r--test/testdocs/ulink.001.xml23
-rw-r--r--test/testdocs/variablelist.001.xml64
-rw-r--r--test/testdocs/variablelist.002.xml35
-rw-r--r--test/testdocs/variablelist.003.xml26
-rw-r--r--test/testdocs/variablelist.004.xml26
-rw-r--r--test/testdocs/xref.001.xml98
-rw-r--r--test/testdocs/xrefstyle.001.xml19
128 files changed, 6689 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..1703d90
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = testdocs
diff --git a/test/testdocs/README b/test/testdocs/README
new file mode 100644
index 0000000..9637e3a
--- /dev/null
+++ b/test/testdocs/README
@@ -0,0 +1,5 @@
+These files are from docbook-testdocs 1.1. If you update the files
+to a newer version of docbook-testdocs, change this file to reflect
+the change. If you make a change to one of these files, note that
+change in this file so that change can be preserved when upgrading
+to newer versions of docbook-testdocs.
diff --git a/test/testdocs/admonitions.001.xml b/test/testdocs/admonitions.001.xml
new file mode 100644
index 0000000..e52d1ba
--- /dev/null
+++ b/test/testdocs/admonitions.001.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: admonitions.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>This article tests admonitions.</para>
+
+<tip>
+<para>This tip has no title.</para>
+</tip>
+
+<note>
+<para>This note has no title.</para>
+</note>
+
+<important>
+<para>This important has no title.</para>
+</important>
+
+<warning>
+<para>This warning has no title.</para>
+</warning>
+
+<caution>
+<para>This caution has no title.</para>
+</caution>
+
+<note>
+<title>Who can do this</title>
+<para>All operators</para>
+</note>
+
+</article>
diff --git a/test/testdocs/article.001.xml b/test/testdocs/article.001.xml
new file mode 100644
index 0000000..305244e
--- /dev/null
+++ b/test/testdocs/article.001.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article id="article">
+<articleinfo>
+<title>Unit Test: article.001.xml</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<authorgroup>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+<author><firstname>Jane</firstname><surname>Doe</surname></author>
+</authorgroup>
+<abstract>
+<para>This is the abstract.</para>
+<para>It has several paras.</para>
+<para>It has several paras.</para>
+</abstract>
+</articleinfo>
+
+<para>This is an article tests.</para>
+
+<ackno>I'd like to thank all the tests that came before me.</ackno>
+
+</article>
diff --git a/test/testdocs/article.002.xml b/test/testdocs/article.002.xml
new file mode 100644
index 0000000..ab4b378
--- /dev/null
+++ b/test/testdocs/article.002.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article id="article" status="draft">
+<articleinfo>
+<title>Unit Test: article.001.xml</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<authorgroup>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+<author><firstname>Jane</firstname><surname>Doe</surname></author>
+</authorgroup>
+<abstract>
+<para>This is the abstract.</para>
+<para>It has several paras.</para>
+<para>It has several paras.</para>
+</abstract>
+</articleinfo>
+
+<para>This is an article tests.</para>
+
+<ackno>I'd like to thank all the tests that came before me.</ackno>
+
+</article>
diff --git a/test/testdocs/bibliography.001.xml b/test/testdocs/bibliography.001.xml
new file mode 100644
index 0000000..dd235e1
--- /dev/null
+++ b/test/testdocs/bibliography.001.xml
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE bibliography PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<bibliography>
+<bibliographyinfo>
+<title>Unit Test: bibliography.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</bibliographyinfo>
+
+<biblioentry>
+ <abbrev>AhoSethiUllman96</abbrev>
+ <authorgroup>
+ <author><firstname>Alfred V.</firstname><surname>Aho</surname></author>
+ <author><firstname>Ravi</firstname><surname>Sethi</surname></author>
+ <author><firstname>Jeffrey D.</firstname><surname>Ullman</surname></author>
+ </authorgroup>
+ <title>Compilers, Principles, Techniques, and Tools</title>
+ <publisher>
+ <publishername>Addison-Wesley Publishing Company</publishername>
+ </publisher>
+ <copyright><year>1996</year>
+ <holder>Bell Telephone Laboratories, Inc.</holder></copyright>
+ <isbn>0-201-10088-6</isbn>
+ <editor><firstname>James T.</firstname><surname>DeWolf</surname></editor>
+</biblioentry>
+
+<biblioentry>
+ <abbrev>AhoSethiUllman96</abbrev>
+ <authorgroup>
+ <author><firstname>Alfred V.</firstname><surname>Aho</surname></author>
+ <author><firstname>Ravi</firstname><surname>Sethi</surname></author>
+ <author><firstname>Jeffrey D.</firstname><surname>Ullman</surname></author>
+ </authorgroup>
+ <citetitle>Compilers, Principles, Techniques, and Tools</citetitle>
+ <publisher>
+ <publishername>Addison-Wesley Publishing Company</publishername>
+ </publisher>
+ <copyright><year>1996</year>
+ <holder>Bell Telephone Laboratories, Inc.</holder></copyright>
+ <isbn>0-201-10088-6</isbn>
+ <editor><firstname>James T.</firstname><surname>DeWolf</surname></editor>
+</biblioentry>
+
+<biblioentry id="Walsh97">
+ <abbrev>Walsh97</abbrev>
+ <biblioset relation="article">
+ <title>A Guide to XML</title>
+ <author><surname>Walsh</surname><firstname>Norman</firstname></author>
+ <pubdate>1997</pubdate>
+ <copyright><year>1997</year><holder>ArborText, Inc.</holder></copyright>
+ <pagenums>97-108</pagenums>
+ </biblioset>
+ <biblioset relation="journal">
+ <title>XML: Principles, Tools, and Techniques</title>
+ <publisher>
+ <publishername>O'Reilly &amp; Associates, Inc.</publishername>
+ </publisher>
+ <issn>1085-2301</issn>
+ <editor><firstname>Dan</firstname><surname>Connolly</surname></editor>
+ </biblioset>
+</biblioentry>
+
+<biblioentry>
+<abbrev>Abbrev</abbrev>
+<title>A Really Full BiblioEntry</title>
+<subtitle>Subtitle</subtitle>
+<abstract><para>
+Abstract, abstract, abstract. Abstract, abstract, abstract.
+Abstract, abstract, abstract. Abstract, abstract, abstract.
+Abstract, abstract, abstract. Abstract, abstract, abstract.
+Abstract, abstract, abstract. Abstract, abstract, abstract.
+Abstract, abstract, abstract. Abstract, abstract, abstract.
+Abstract, abstract, abstract. Abstract, abstract, abstract.
+</para></abstract>
+<address>Any Street
+Anywhere, XX 99999
+USA</address>
+<affiliation>
+<shortaffil>shortaffil</shortaffil>
+<jobtitle>jobtitle</jobtitle>
+<orgname>orgname</orgname>
+<orgdiv>orgdiv</orgdiv>
+<address>Any Street
+Anywhere, XX 99999
+USA</address>
+</affiliation>
+<artpagenums>ArtPageNums</artpagenums>
+<author><firstname>AuthorFirstname</firstname><surname>AuthorSurname</surname></author>
+<authorblurb>
+<para>
+AuthorBlurb, authorblurb, authorblurb. AuthorBlurb, authorblurb, authorblurb.
+AuthorBlurb, authorblurb, authorblurb. AuthorBlurb, authorblurb, authorblurb.
+AuthorBlurb, authorblurb, authorblurb. AuthorBlurb, authorblurb, authorblurb.
+AuthorBlurb, authorblurb, authorblurb. AuthorBlurb, authorblurb, authorblurb.
+AuthorBlurb, authorblurb, authorblurb. AuthorBlurb, authorblurb, authorblurb.
+</para></authorblurb>
+<!--<authorgroup>AuthorGroup</authorgroup>-->
+<authorinitials>AuthorInitials</authorinitials>
+<collab><collabname>The names of some collaborators</collabname>
+<affiliation>
+<shortaffil>shortaffil</shortaffil>
+<jobtitle>jobtitle</jobtitle>
+<orgname>orgname</orgname>
+<orgdiv>orgdiv</orgdiv>
+<address>Any Street
+Anywhere, XX 99999
+USA</address>
+</affiliation></collab>
+<confgroup>
+<confdates>confdates</confdates>
+<conftitle>conftitle</conftitle>
+<confnum>confnum</confnum>
+<address>Any Street
+Anywhere, XX 99999
+USA</address>
+<confsponsor>confsponsor</confsponsor>
+</confgroup>
+<contractnum>ContractNum</contractnum>
+<contractsponsor>ContractSponsor</contractsponsor>
+<contrib>Contrib</contrib>
+<copyright><year>1998</year><holder>Copyright holder</holder></copyright>
+<!--<corpauthor>CorpAuthor</corpauthor>-->
+<corpname>CorpName</corpname>
+<date>Date</date>
+<edition>Edition</edition>
+<editor><firstname>EditorFirstName</firstname><surname>EditorSurname</surname></editor>
+<firstname>FirstName</firstname>
+<honorific>Honorific</honorific>
+<isbn>ISBN</isbn>
+<issn>ISSN</issn>
+<invpartnumber>InvPartNumber</invpartnumber>
+<issuenum>IssueNum</issuenum>
+<lineage>Lineage</lineage>
+<orgname>OrgName</orgname>
+<othercredit><firstname>OCFirstName</firstname><surname>OCSurname</surname></othercredit>
+<othername>OtherName</othername>
+<pagenums>PageNums</pagenums>
+<printhistory>
+<para>
+PrintHistory, printhistory, printhistory. PrintHistory, printhistory.
+PrintHistory, printhistory, printhistory. PrintHistory, printhistory.
+PrintHistory, printhistory, printhistory. PrintHistory, printhistory.
+PrintHistory, printhistory, printhistory. PrintHistory, printhistory.
+</para></printhistory>
+<productname>ProductName</productname>
+<productnumber>ProductNumber</productnumber>
+<pubdate>PubDate</pubdate>
+<publisher><publishername>PubPublisherName</publishername>
+<address><street>Any Street</street>
+<city>Anywhere</city>, <state>XX</state> <postcode>99999</postcode>
+<country>USA</country></address>
+</publisher>
+<publishername>PublisherName</publishername>
+<pubsnumber>PubsNumber</pubsnumber>
+<releaseinfo>ReleaseInfo</releaseinfo>
+<revhistory>
+<revision>
+<revnumber>1.0</revnumber><date>20 Nov 1998</date>
+ <authorinitials>ndw</authorinitials>
+ <revremark>Some remark about the revision</revremark></revision>
+<revision>
+<revnumber>0.9</revnumber><date>19 Nov 1998</date>
+ <authorinitials>ndw</authorinitials>
+ <revremark>Some remark about the revision</revremark></revision>
+<revision>
+<revnumber>0.4</revnumber><date>18 Nov 1998</date>
+ <authorinitials>ndw</authorinitials>
+ <revremark>Some remark about the revision</revremark></revision>
+</revhistory>
+<seriesvolnums>SeriesVolNums</seriesvolnums>
+<surname>Surname</surname>
+<titleabbrev>TitleAbbrev</titleabbrev>
+<volumenum>VolumeNum</volumenum>
+</biblioentry>
+
+<bibliomixed id="Walsh96">
+ <bibliomset relation="article">
+ <surname>Walsh</surname>, <firstname>Norman</firstname>.
+ <title role="article">Introduction to Cascading Style Sheets</title>.
+ </bibliomset>
+ <bibliomset relation="journal">
+ <title>The World Wide Web Journal</title>.
+ <volumenum>2</volumenum>(<issuenum>1</issuenum>).
+ <publishername>O'Reilly &amp; Associates, Inc.</publishername> and
+ <corpname>The World Wide Web Consortium</corpname>.
+ <pubdate>Winter, 1996</pubdate></bibliomset>.
+</bibliomixed>
+
+</bibliography>
+
diff --git a/test/testdocs/bibliography.002.xml b/test/testdocs/bibliography.002.xml
new file mode 100644
index 0000000..cd55e4e
--- /dev/null
+++ b/test/testdocs/bibliography.002.xml
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE bibliography PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<bibliography>
+<bibliographyinfo>
+<title>Unit Test: bibliography.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</bibliographyinfo>
+
+<bibliodiv><title>Entries using biblioentry</title>
+
+<biblioentry>
+ <abbrev>AhoSethiUllman96</abbrev>
+ <authorgroup>
+ <author><firstname>Alfred V.</firstname><surname>Aho</surname></author>
+ <author><firstname>Ravi</firstname><surname>Sethi</surname></author>
+ <author><firstname>Jeffrey D.</firstname><surname>Ullman</surname></author>
+ </authorgroup>
+ <title>Compilers, Principles, Techniques, and Tools</title>
+ <publisher>
+ <publishername>Addison-Wesley Publishing Company</publishername>
+ </publisher>
+ <copyright><year>1996</year>
+ <holder>Bell Telephone Laboratories, Inc.</holder></copyright>
+ <isbn>0-201-10088-6</isbn>
+ <editor><firstname>James T.</firstname><surname>DeWolf</surname></editor>
+</biblioentry>
+
+<biblioentry id="Walsh97">
+ <abbrev>Walsh97</abbrev>
+ <biblioset relation="article">
+ <title>A Guide to XML</title>
+ <author><surname>Walsh</surname><firstname>Norman</firstname></author>
+ <pubdate>1997</pubdate>
+ <copyright><year>1997</year><holder>ArborText, Inc.</holder></copyright>
+ <pagenums>97-108</pagenums>
+ </biblioset>
+ <biblioset relation="journal">
+ <title>XML: Principles, Tools, and Techniques</title>
+ <publisher>
+ <publishername>O'Reilly &amp; Associates, Inc.</publishername>
+ </publisher>
+ <issn>1085-2301</issn>
+ <editor><firstname>Dan</firstname><surname>Connolly</surname></editor>
+ </biblioset>
+</biblioentry>
+
+<biblioentry>
+<abbrev>Abbrev</abbrev>
+<title>A Really Full BiblioEntry</title>
+<subtitle>Subtitle</subtitle>
+<abstract><para>
+Abstract, abstract, abstract. Abstract, abstract, abstract.
+Abstract, abstract, abstract. Abstract, abstract, abstract.
+Abstract, abstract, abstract. Abstract, abstract, abstract.
+Abstract, abstract, abstract. Abstract, abstract, abstract.
+Abstract, abstract, abstract. Abstract, abstract, abstract.
+Abstract, abstract, abstract. Abstract, abstract, abstract.
+</para></abstract>
+<address>Any Street
+Anywhere, XX 99999
+USA</address>
+<affiliation>
+<shortaffil>shortaffil</shortaffil>
+<jobtitle>jobtitle</jobtitle>
+<orgname>orgname</orgname>
+<orgdiv>orgdiv</orgdiv>
+<address>Any Street
+Anywhere, XX 99999
+USA</address>
+</affiliation>
+<artpagenums>ArtPageNums</artpagenums>
+<author><firstname>AuthorFirstname</firstname><surname>AuthorSurname</surname></author>
+<authorblurb>
+<para>
+AuthorBlurb, authorblurb, authorblurb. AuthorBlurb, authorblurb, authorblurb.
+AuthorBlurb, authorblurb, authorblurb. AuthorBlurb, authorblurb, authorblurb.
+AuthorBlurb, authorblurb, authorblurb. AuthorBlurb, authorblurb, authorblurb.
+AuthorBlurb, authorblurb, authorblurb. AuthorBlurb, authorblurb, authorblurb.
+AuthorBlurb, authorblurb, authorblurb. AuthorBlurb, authorblurb, authorblurb.
+</para></authorblurb>
+<!--<authorgroup>AuthorGroup</authorgroup>-->
+<authorinitials>AuthorInitials</authorinitials>
+<collab><collabname>The names of some collaborators</collabname>
+<affiliation>
+<shortaffil>shortaffil</shortaffil>
+<jobtitle>jobtitle</jobtitle>
+<orgname>orgname</orgname>
+<orgdiv>orgdiv</orgdiv>
+<address>Any Street
+Anywhere, XX 99999
+USA</address>
+</affiliation></collab>
+<confgroup>
+<confdates>confdates</confdates>
+<conftitle>conftitle</conftitle>
+<confnum>confnum</confnum>
+<address>Any Street
+Anywhere, XX 99999
+USA</address>
+<confsponsor>confsponsor</confsponsor>
+</confgroup>
+<contractnum>ContractNum</contractnum>
+<contractsponsor>ContractSponsor</contractsponsor>
+<contrib>Contrib</contrib>
+<copyright><year>1998</year><holder>Copyright holder</holder></copyright>
+<!--<corpauthor>CorpAuthor</corpauthor>-->
+<corpname>CorpName</corpname>
+<date>Date</date>
+<edition>Edition</edition>
+<editor><firstname>EditorFirstName</firstname><surname>EditorSurname</surname></editor>
+<firstname>FirstName</firstname>
+<honorific>Honorific</honorific>
+<isbn>ISBN</isbn>
+<issn>ISSN</issn>
+<invpartnumber>InvPartNumber</invpartnumber>
+<issuenum>IssueNum</issuenum>
+<lineage>Lineage</lineage>
+<orgname>OrgName</orgname>
+<othercredit><firstname>OCFirstName</firstname><surname>OCSurname</surname></othercredit>
+<othername>OtherName</othername>
+<pagenums>PageNums</pagenums>
+<printhistory>
+<para>
+PrintHistory, printhistory, printhistory. PrintHistory, printhistory.
+PrintHistory, printhistory, printhistory. PrintHistory, printhistory.
+PrintHistory, printhistory, printhistory. PrintHistory, printhistory.
+PrintHistory, printhistory, printhistory. PrintHistory, printhistory.
+</para></printhistory>
+<productname>ProductName</productname>
+<productnumber>ProductNumber</productnumber>
+<pubdate>PubDate</pubdate>
+<publisher><publishername>PubPublisherName</publishername>
+<address><street>Any Street</street>
+<city>Anywhere</city>, <state>XX</state> <postcode>99999</postcode>
+<country>USA</country></address>
+</publisher>
+<publishername>PublisherName</publishername>
+<pubsnumber>PubsNumber</pubsnumber>
+<releaseinfo>ReleaseInfo</releaseinfo>
+<revhistory>
+<revision>
+<revnumber>1.0</revnumber><date>20 Nov 1998</date>
+ <authorinitials>ndw</authorinitials>
+ <revremark>Some remark about the revision</revremark></revision>
+<revision>
+<revnumber>0.9</revnumber><date>19 Nov 1998</date>
+ <authorinitials>ndw</authorinitials>
+ <revremark>Some remark about the revision</revremark></revision>
+<revision>
+<revnumber>0.4</revnumber><date>18 Nov 1998</date>
+ <authorinitials>ndw</authorinitials>
+ <revremark>Some remark about the revision</revremark></revision>
+</revhistory>
+<seriesvolnums>SeriesVolNums</seriesvolnums>
+<surname>Surname</surname>
+<titleabbrev>TitleAbbrev</titleabbrev>
+<volumenum>VolumeNum</volumenum>
+</biblioentry>
+
+</bibliodiv>
+<bibliodiv><title>Entries using bibliomixed</title>
+
+<bibliomixed id="Walsh96">
+ <bibliomset relation="article">
+ <surname>Walsh</surname>, <firstname>Norman</firstname>.
+ <title role="article">Introduction to Cascading Style Sheets</title>.
+ </bibliomset>
+ <bibliomset relation="journal">
+ <title>The World Wide Web Journal</title>.
+ <volumenum>2</volumenum>(<issuenum>1</issuenum>).
+ <publishername>O'Reilly &amp; Associates, Inc.</publishername> and
+ <corpname>The World Wide Web Consortium</corpname>.
+ <pubdate>Winter, 1996</pubdate></bibliomset>.
+</bibliomixed>
+
+</bibliodiv>
+
+</bibliography>
diff --git a/test/testdocs/blockquote.001.xml b/test/testdocs/blockquote.001.xml
new file mode 100644
index 0000000..a4d4ee0
--- /dev/null
+++ b/test/testdocs/blockquote.001.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: blockquote.001.xml</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<!-- Change this: -->
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>This file tests block quotes:</para>
+
+<blockquote><para>If you understand: things are as they are. If you do not understand:
+things are as they are.</para>
+</blockquote>
+
+<blockquote><attribution>H. W. Longfellow</attribution>
+<para>If we could read the secret history
+of our enemies, we should find in in each one's life sorrow and
+suffering enough to disarm all hostility.</para>
+</blockquote>
+
+<para>The following block quotation occurs inside a paragraph.
+
+<blockquote>
+<para>Knowledge, sense, honesty, learning, good behavior are the chief
+things towards making a man's fortune, next to interest and opportunity.</para>
+</blockquote>
+
+This line of text occurs after the quote, but inside the same para.</para>
+
+</article>
diff --git a/test/testdocs/book.001.xml b/test/testdocs/book.001.xml
new file mode 100644
index 0000000..6d4f5b9
--- /dev/null
+++ b/test/testdocs/book.001.xml
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!ENTITY blah "<para>Blah blah blah blah. Blah blah blah blah. Blah blah blah blah.
+</para>">
+]>
+<book id="book">
+<bookinfo>
+<title>Unit Test: book.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<authorgroup>
+<corpauthor>SomeCorp</corpauthor>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+<editor><firstname>Jane</firstname><surname>Doe</surname></editor>
+</authorgroup>
+<legalnotice>
+<para>
+Some legal notice. Some legal notice. Some legal notice.
+Some legal notice. Some legal notice. Some legal notice.
+</para>
+</legalnotice>
+<copyright>
+<year>1998</year>
+<year>1999</year>
+<year>2000</year>
+<year>2001</year>
+<year>2002</year>
+<holder>Norman Walsh</holder>
+</copyright>
+<pubdate>18 January 2002</pubdate>
+<abstract>
+<para>Some abstract. Some abstract. Some abstract. Some abstract.
+</para>
+<para>Some abstract. Some abstract. Some abstract. Some abstract.
+Some abstract. Some abstract. Some abstract. Some abstract.
+</para>
+</abstract>
+<revhistory>
+<revision>
+<revnumber>1.1</revnumber>
+<date>18 Jan 2002</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Reworked.</revremark>
+</revision>
+<revision>
+<revnumber>1.0</revnumber>
+<date>20 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+<revision>
+<revnumber>0.9</revnumber>
+<date>19 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+<revision>
+<revnumber>0.4</revnumber>
+<date>18 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+</revhistory>
+</bookinfo>
+
+<dedication id="ded1"><title>First Dedication</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</dedication>
+
+<dedication id="ded2">
+
+<para>A second dedication without a title.</para>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</dedication>
+
+<preface id="forward"><title>Foreword</title>
+
+<para>A preface.</para>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</preface>
+
+<preface id="preface"><title>Preface</title>
+
+<para>Another preface.</para>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</preface>
+
+<part id="partI">
+<title>Part One Title</title>
+<partintro id="pIpintro">
+<title>PartIntro Title</title>
+
+<para>Partintro content<footnote>
+<para>This is a footnote in a partintro.</para>
+</footnote>.</para>
+
+&blah; &blah; &blah; &blah; &blah;
+
+<sect1 id="pIpis1">
+<title>PartIntro Section</title>
+<para>PartIntros can actually have section content as well.</para>
+&blah; &blah; &blah; &blah; &blah;
+</sect1>
+</partintro>
+
+<chapter id="chap1"><title>First Chapter</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+<section id="c1s1"><title>First Section</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</section>
+<section id="c1s2"><title>Second Section</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</section>
+<section id="c1s3"><title>Third Section</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</section>
+</chapter>
+
+<chapter id="chap2"><title>Second Chapter</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+<section id="c2s1"><title>First Section</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</section>
+<section id="c2s2"><title>Second Section</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</section>
+<section id="c2s3"><title>Third Section</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</section>
+</chapter>
+
+<chapter id="chap3"><title>Third Chapter</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</chapter>
+
+</part>
+<part id="partII"><title>Appendixes</title>
+
+<appendix id="app1"><title>First Appendix</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+<section id="a1s1"><title>First Section</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</section>
+<section id="a1s2"><title>Second Section</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</section>
+<section id="a1s3"><title>Third Section</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</section>
+</appendix>
+
+<appendix id="app2"><title>Second Appendix</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+<section id="a2s1"><title>First Section</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</section>
+<section id="a2s2"><title>Second Section</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</section>
+<section id="a2s3"><title>Third Section</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</section>
+</appendix>
+
+</part>
+</book>
diff --git a/test/testdocs/book.002.xml b/test/testdocs/book.002.xml
new file mode 100644
index 0000000..6389da9
--- /dev/null
+++ b/test/testdocs/book.002.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!ENTITY blah "<para>Blah blah blah blah. Blah blah blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+</para>">
+]>
+<book>
+<bookinfo>
+<title>Unit Test: book.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</bookinfo>
+
+<article><title>First Article</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</article>
+
+<article><title>Second Article</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</article>
+
+<article><title>Third Article</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</article>
+
+</book>
diff --git a/test/testdocs/book.003.xml b/test/testdocs/book.003.xml
new file mode 100644
index 0000000..fffb642
--- /dev/null
+++ b/test/testdocs/book.003.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!ENTITY blah "<para>Blah blah blah blah. Blah blah blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+</para>">
+]>
+<book id="book">
+<bookinfo>
+<title>Unit Test: book.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<authorgroup>
+<corpauthor>SomeCorp</corpauthor>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+<editor><firstname>Jane</firstname><surname>Doe</surname></editor>
+</authorgroup>
+<legalnotice>
+<para>
+Some legal notice. Some legal notice. Some legal notice.
+Some legal notice. Some legal notice. Some legal notice.
+Some legal notice. Some legal notice. Some legal notice.
+Some legal notice. Some legal notice. Some legal notice.
+Some legal notice. Some legal notice. Some legal notice.
+Some legal notice. Some legal notice. Some legal notice.
+Some legal notice. Some legal notice. Some legal notice.
+Some legal notice. Some legal notice. Some legal notice.
+Some legal notice. Some legal notice. Some legal notice.
+Some legal notice. Some legal notice. Some legal notice.
+</para>
+</legalnotice>
+<copyright>
+<year>1998</year>
+<year>1999</year>
+<year>2000</year>
+<year>2001</year>
+<year>2002</year>
+<holder>Norman Walsh</holder>
+</copyright>
+<pubdate>18 January 2002</pubdate>
+<abstract>
+<para>Some abstract. Some abstract. Some abstract. Some abstract.
+Some abstract. Some abstract. Some abstract. Some abstract.
+Some abstract. Some abstract. Some abstract. Some abstract.
+Some abstract. Some abstract. Some abstract. Some abstract.
+Some abstract. Some abstract. Some abstract. Some abstract.
+Some abstract. Some abstract. Some abstract. Some abstract.
+</para>
+<para>Some abstract. Some abstract. Some abstract. Some abstract.
+Some abstract. Some abstract. Some abstract. Some abstract.
+</para>
+</abstract>
+<revhistory>
+<revision>
+<revnumber>1.1</revnumber>
+<date>18 Jan 2002</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Reworked.</revremark>
+</revision>
+<revision>
+<revnumber>1.0</revnumber>
+<date>20 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+<revision>
+<revnumber>0.9</revnumber>
+<date>19 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+<revision>
+<revnumber>0.4</revnumber>
+<date>18 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+</revhistory>
+</bookinfo>
+
+<chapter id="chap1"><title>First Chapter</title>
+<chapterinfo>
+<abstract><para>bla in the first chapter</para>
+</abstract>
+</chapterinfo>
+
+&blah;
+
+<figure id="figduck"><title>A Test Figure</title>
+<programlisting>
+A figure. Just to test the numeration.</programlisting>
+</figure>
+
+<section><title>First Section</title>
+
+ &blah;
+
+<section><title>First Subsection</title>
+
+&blah;
+
+</section>
+</section>
+
+<section><title>Second Section</title>
+
+&blah;
+
+</section>
+</chapter>
+</book>
diff --git a/test/testdocs/bookinfo.001.xml b/test/testdocs/bookinfo.001.xml
new file mode 100644
index 0000000..b7be026
--- /dev/null
+++ b/test/testdocs/bookinfo.001.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book>
+<bookinfo>
+<title>Unit Test: bookinfo.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+
+<abstract>
+<para>Some abstract. Some abstract. Some abstract. Some abstract.
+Some abstract. Some abstract. Some abstract. Some abstract.
+Some abstract. Some abstract. Some abstract. Some abstract.
+Some abstract. Some abstract. Some abstract. Some abstract.
+Some abstract. Some abstract. Some abstract. Some abstract.
+Some abstract. Some abstract. Some abstract. Some abstract.
+</para>
+<para>Some abstract. Some abstract. Some abstract. Some abstract.
+Some abstract. Some abstract. Some abstract. Some abstract.
+</para>
+</abstract>
+
+<authorgroup id="authors">
+<author id="j.doe">
+<firstname>John</firstname>
+<surname>Doe</surname>
+</author>
+<author>
+<firstname>Jane</firstname>
+<surname>Doe</surname>
+<contrib>Some contribution</contrib>
+</author>
+<author>
+<firstname>A.</firstname>
+<surname>Nonymous</surname>
+</author>
+<author>
+<firstname>Janice</firstname>
+<surname>Doe</surname>
+</author>
+</authorgroup>
+
+<keywordset>
+<keyword>keyword1</keyword>
+<keyword>keyword2</keyword>
+</keywordset>
+
+<pubdate>18 January 2002</pubdate>
+
+<revhistory>
+<revision>
+<revnumber>2.0</revnumber>
+<date>18 Jan 2002</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+<revision>
+<revnumber>1.0</revnumber>
+<date>20 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+<revision>
+<revnumber>0.9</revnumber>
+<date>19 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+<revision>
+<revnumber>0.4</revnumber>
+<date>18 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+</revhistory>
+
+</bookinfo>
+
+<preface><title>Preface</title>
+
+<para>This book is really just a bookinfo test.</para>
+
+</preface>
+
+</book>
diff --git a/test/testdocs/bridgehead.001.xml b/test/testdocs/bridgehead.001.xml
new file mode 100644
index 0000000..e38be06
--- /dev/null
+++ b/test/testdocs/bridgehead.001.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: bridgehead.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>A test paragraph.</para>
+
+<sect1>
+ <title>sect1 title</title>
+ <subtitle>sect1 subtitle</subtitle>
+
+ <para>This is a test paragraph.</para>
+
+ <bridgehead renderas="sect1">This is a sect1 bridgehead</bridgehead>
+
+ <para>This is a test paragraph.</para>
+
+ <sect2>
+ <title>first sect2 title</title>
+ <para>Please read <xref linkend="sec-xrefMe"/></para>
+
+ <bridgehead>This is an implied sect3 bridgehead</bridgehead>
+
+ <para>This is a test paragraph.</para>
+
+ </sect2>
+
+ <sect2 id="sec-xrefMe">
+ <title>second sect2 title</title>
+ <para>This is a test paragraph.</para>
+ </sect2>
+</sect1>
+
+</article>
diff --git a/test/testdocs/calloutlist.001.xml b/test/testdocs/calloutlist.001.xml
new file mode 100644
index 0000000..9cbc269
--- /dev/null
+++ b/test/testdocs/calloutlist.001.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: calloutlist.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>Callouts using <sgmltag>co</sgmltag>:</para>
+
+<screen>
+(let <co id="dl1"/>loopvar <co id="dl2"/>((count 1))
+ <co id="dl3"/>(if (> count 10)
+ <co id="dl4"/>#t
+ (<co id="dl5"/>loopvar <co id="dl6"/>(+ count 1))))</screen>
+
+<calloutlist>
+<callout arearefs="dl1">
+<para>This variable controls the loop. It is declared without an
+initial value, immediately after the <literal>let</literal>
+operand.</para>
+</callout>
+<callout arearefs="dl2">
+<para>Any number of additional local variables can be defined after
+the loop variable, just as they can in any other
+<literal>let</literal> expression.</para>
+</callout>
+<callout arearefs="dl3">
+<para>If you ever want the loop to end, you have to put some sort of a
+test in it.</para>
+</callout>
+<callout arearefs="dl4">
+<para>This is the value that will be returned.</para>
+</callout>
+<callout arearefs="dl5">
+<para>Note that you iterate the loop by using the loop variable as if
+it was a function name.</para>
+</callout>
+<callout arearefs="dl6">
+<para>The arguments to this function are the values that
+you want the local variables declared in <xref linkend="dl2"/> to have
+in the next iteration.</para>
+</callout>
+</calloutlist>
+
+</article>
diff --git a/test/testdocs/chapter.001.xml b/test/testdocs/chapter.001.xml
new file mode 100644
index 0000000..0e5a599
--- /dev/null
+++ b/test/testdocs/chapter.001.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<chapter id="chapter">
+<chapterinfo>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+<revhistory>
+<revision>
+<revnumber>1.0</revnumber>
+<date>18 Mar 2002</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark.</revremark>
+</revision>
+<revision>
+<revnumber>0.9</revnumber>
+<date>20 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+<revision>
+<revnumber>0.8</revnumber>
+<date>19 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+<revision>
+<revnumber>0.7</revnumber>
+<date>18 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+</revhistory>
+</chapterinfo>
+<title>Unit Test: chapter.001.xml</title>
+
+<para>This is a chapter test.</para>
+
+</chapter>
diff --git a/test/testdocs/classsynopsis.001.xml b/test/testdocs/classsynopsis.001.xml
new file mode 100644
index 0000000..9c48d56
--- /dev/null
+++ b/test/testdocs/classsynopsis.001.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: classsynopsis.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<classsynopsis>
+<ooclass>
+<modifier>public</modifier>
+<classname>Catalog</classname>
+</ooclass>
+<fieldsynopsis>
+<modifier>public</modifier>
+<modifier>static</modifier>
+<modifier>final</modifier>
+<type>int</type>
+<varname>BASE</varname>
+<initializer>CatalogEntry.addEntryType("BASE", 1)</initializer>
+</fieldsynopsis>
+<constructorsynopsis>
+<modifier>public</modifier>
+<methodname>Catalog</methodname>
+<void/>
+</constructorsynopsis>
+<methodsynopsis>
+<modifier>protected</modifier>
+<void/>
+<methodname>copyReaders</methodname>
+<methodparam>
+<type>Catalog</type>
+<parameter>newCatalog</parameter>
+</methodparam>
+</methodsynopsis>
+</classsynopsis>
+
+</article>
diff --git a/test/testdocs/draft.001.xml b/test/testdocs/draft.001.xml
new file mode 100644
index 0000000..65502be
--- /dev/null
+++ b/test/testdocs/draft.001.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!ENTITY blah "<para>Blah blah blah blah. Blah blah blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+</para>">
+]>
+<book status="draft">
+<bookinfo>
+<title>Unit Test: draft.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</bookinfo>
+
+<article><title>First Article</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</article>
+
+<article><title>Second Article</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</article>
+
+<article><title>Third Article</title>
+
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+&blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah; &blah;
+
+</article>
+
+</book>
diff --git a/test/testdocs/emphasis.001.xml b/test/testdocs/emphasis.001.xml
new file mode 100644
index 0000000..cd1c2dd
--- /dev/null
+++ b/test/testdocs/emphasis.001.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: emphasis.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>This is <emphasis>emphasis</emphasis>.</para>
+
+<para>Should these variants, with role, be supported?</para>
+
+<para>This is <emphasis role="bold">bold emphasis</emphasis>.</para>
+
+<para>This is <emphasis role="strikethrough">strikethrough emphasis</emphasis>.</para>
+
+<para>This is <emphasis role="underline">underline emphasis</emphasis>.</para>
+
+<para>This is <emphasis>nested <emphasis>emphasis</emphasis> inside
+emphasis</emphasis>.</para>
+
+</article>
diff --git a/test/testdocs/epigraph.001.xml b/test/testdocs/epigraph.001.xml
new file mode 100644
index 0000000..a6e8ddd
--- /dev/null
+++ b/test/testdocs/epigraph.001.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<chapter>
+<chapterinfo>
+<title>Unit Test: article.001.xml</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<authorgroup>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+<author><firstname>Jane</firstname><surname>Doe</surname></author>
+</authorgroup>
+</chapterinfo>
+<title>Unit Test: article.001.xml</title>
+<epigraph><attribution>H. W. Longfellow</attribution>
+<para>If we could read the secret history
+of our enemies, we should find in in each one's life sorrow and
+suffering enough to disarm all hostility.</para>
+</epigraph>
+
+<para>This is an epigraph test.</para>
+
+</chapter>
diff --git a/test/testdocs/equation.001.xml b/test/testdocs/equation.001.xml
new file mode 100644
index 0000000..32cdfc4
--- /dev/null
+++ b/test/testdocs/equation.001.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: equation.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<equation><title>First Equation</title>
+<mediaobject>
+<imageobject>
+<imagedata fileref="emc2.png"/>
+</imageobject>
+<textobject>
+<phrase>e=mc^2</phrase>
+</textobject>
+</mediaobject>
+</equation>
+
+</article>
diff --git a/test/testdocs/equation.002.xml b/test/testdocs/equation.002.xml
new file mode 100644
index 0000000..677ca36
--- /dev/null
+++ b/test/testdocs/equation.002.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: equation.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<equation id="eq2"><title>Second Equation</title>
+<mediaobject>
+<imageobject>
+<imagedata fileref="emc2.png"/>
+</imageobject>
+<textobject>
+<phrase>e=mc^2</phrase>
+</textobject>
+</mediaobject>
+</equation>
+
+</article>
diff --git a/test/testdocs/equation.003.xml b/test/testdocs/equation.003.xml
new file mode 100644
index 0000000..ba26bf5
--- /dev/null
+++ b/test/testdocs/equation.003.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: equation.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<equation><title>Third Equation</title>
+<mediaobject>
+<imageobject>
+<imagedata fileref="emc2.png"/>
+</imageobject>
+<textobject>
+<phrase>e=mc^2</phrase>
+</textobject>
+</mediaobject>
+</equation>
+
+</article>
diff --git a/test/testdocs/example.001.xml b/test/testdocs/example.001.xml
new file mode 100644
index 0000000..20342cf
--- /dev/null
+++ b/test/testdocs/example.001.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: example.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<example><title>An Example</title>
+<programlisting>
+This is a programlisting in an example.
+</programlisting>
+</example>
+
+</article>
diff --git a/test/testdocs/extensions.001.xml b/test/testdocs/extensions.001.xml
new file mode 100644
index 0000000..2cccf3e
--- /dev/null
+++ b/test/testdocs/extensions.001.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: extensions.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>Callouts using <sgmltag>programlistingco</sgmltag>. The following program
+listing should be decorated with callout bullets:</para>
+
+<programlistingco>
+<areaspec>
+<area coords="1" id="prologue"/>
+<area coords="4" id="skipeof"/>
+<areaset coords="" id="xreq">
+<area coords="9" id="require1"/>
+<area coords="10" id="require2"/>
+</areaset>
+<area coords="11 12" id="use"/>
+<area coords="27" id="funccall"/>
+</areaspec>
+<programlisting>@rem = '--*-Perl-*--
+@echo off
+perl.exe %_batchname %$
+goto endofperl
+@rem ';
+
+# Compress mail...
+
+require 'n:/home/nwalsh/lib/cygnus.pl';
+require 'timelocal.pl';
+use Cwd;
+
+select (STDERR); $| = 1;
+select (STDOUT); $| = 1;
+
+@DIRS = ("/home/nwalsh/Mail");
+while (@DIRS) {
+ $dir = shift @DIRS;
+ opendir (DIR, $dir);
+ while ($fname = readdir(DIR)) {
+ $file = "$dir/$fname";
+ next if ! -d $file;
+ next if $fname =~ /^\.\.?$/;
+
+ print "$file\n";
+ push (@DIRS, $file);
+ &amp;compress ($file);
+ }
+}
+
+exit;</programlisting>
+<calloutlist>
+<callout arearefs="prologue">
+<para>The prologue handles embedding a Perl script in a DOS batch file.</para>
+</callout>
+<callout arearefs="skipeof">
+<para>The <literal>goto</literal> statement, interpreted by the DOS batch
+file interpreter, skips over the body of the Perl script.</para>
+</callout>
+<callout arearefs="require1">
+<para>The <literal>require</literal> statement sources in external program
+fragments.</para>
+</callout>
+<callout arearefs="use">
+<para>The <literal>use</literal> statement is similar, but has additional
+utility. It is a Perl5 function. (Note that this callout area specifies
+both a line and a column.)</para>
+</callout>
+<callout arearefs="funccall">
+<para>This is a user subroutine call.</para>
+</callout>
+</calloutlist>
+</programlistingco>
+
+</article>
diff --git a/test/testdocs/extensions.002.xml b/test/testdocs/extensions.002.xml
new file mode 100644
index 0000000..8ffe0ac
--- /dev/null
+++ b/test/testdocs/extensions.002.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: extensions.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>Text insert. The source of this document should appear between</para>
+
+<programlisting><inlinemediaobject>
+<imageobject>
+<imagedata format="linespecific" fileref="extensions.002.xml"/>
+</imageobject>
+</inlinemediaobject></programlisting>
+
+<para>these two lines.</para>
+
+</article>
diff --git a/test/testdocs/extensions.003.xml b/test/testdocs/extensions.003.xml
new file mode 100644
index 0000000..804b58d
--- /dev/null
+++ b/test/testdocs/extensions.003.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: extensions.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>This program listing should be numbered:</para>
+
+<programlisting linenumbering="numbered">@rem = '--*-Perl-*--
+@echo off
+perl.exe %_batchname %$
+goto endofperl
+@rem ';
+
+# Compress mail...
+
+require 'n:/home/nwalsh/lib/cygnus.pl';
+require 'timelocal.pl';
+use Cwd;
+
+select (STDERR); $| = 1;
+select (STDOUT); $| = 1;
+
+@DIRS = ("/home/nwalsh/Mail");
+while (@DIRS) {
+ $dir = shift @DIRS;
+ opendir (DIR, $dir);
+ while ($fname = readdir(DIR)) {
+ $file = "$dir/$fname";
+ next if ! -d $file;
+ next if $fname =~ /^\.\.?$/;
+
+ print "$file\n";
+ push (@DIRS, $file);
+ &amp;compress ($file);
+ }
+}
+
+exit;</programlisting>
+
+</article>
diff --git a/test/testdocs/extensions.004.xml b/test/testdocs/extensions.004.xml
new file mode 100644
index 0000000..1ad23d2
--- /dev/null
+++ b/test/testdocs/extensions.004.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: extensions.004</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>The following programlisting should contain the source for this
+document. The source should be numbered and decorated with callout marks.
+</para>
+
+<programlistingco>
+<areaspec>
+<area coords="13" id="plco"/>
+<area coords="15" id="areas"/>
+<area coords="21" id="pl"/>
+<area coords="22" id="pi"/>
+<area coords="26" id="textinsert"/>
+</areaspec>
+<programlisting linenumbering="numbered"
+><?dbhtml linenumbering.everyNth="2" linenumbering.separator=" >"
+?><?dbfo linenumbering.everyNth="2" linenumbering.separator=" >"
+?><inlinemediaobject>
+<imageobject>
+<imagedata format="linespecific" fileref="extensions.004.xml"/>
+</imageobject>
+</inlinemediaobject></programlisting>
+</programlistingco>
+
+</article>
diff --git a/test/testdocs/figure.001.xml b/test/testdocs/figure.001.xml
new file mode 100644
index 0000000..0660705
--- /dev/null
+++ b/test/testdocs/figure.001.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: figure.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<figure id="figduck">
+ <title>The Duck</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ align="center"
+ fileref="graphics/duck-small.bmp"
+ format="BMP"
+ srccredit="O'Reilly &amp; Associates/Dover Archives"/>
+ </imageobject>
+ <imageobject>
+ <imagedata
+ align="center"
+ fileref="graphics/duck-small.eps"
+ format="EPS"
+ srccredit="O'Reilly &amp; Associates/Dover Archives"/>
+ </imageobject>
+ <imageobject>
+ <imagedata
+ align="center"
+ fileref="graphics/duck-small.gif"
+ format="GIF"
+ srccredit="O'Reilly &amp; Associates/Dover Archives"/>
+ </imageobject>
+ <imageobject>
+ <imagedata
+ align="center"
+ fileref="graphics/duck-small.png"
+ format="PNG"
+ srccredit="O'Reilly &amp; Associates/Dover Archives"/>
+ </imageobject>
+ <textobject><phrase>The DocBook: TDG Duck</phrase></textobject>
+ </mediaobject>
+</figure>
+
+</article>
diff --git a/test/testdocs/footnote.001.xml b/test/testdocs/footnote.001.xml
new file mode 100644
index 0000000..0b308cc
--- /dev/null
+++ b/test/testdocs/footnote.001.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: footnote.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+ <para>This paragraph contains a footnote<footnote>
+<para>This is a footnote.</para></footnote>.</para>
+
+ <sect1><title>First Section</title>
+ <para>A paragraph.</para>
+ <para>This paragraph contains a footnote<footnote>
+<para>This is another footnote.</para></footnote>.</para>
+ </sect1>
+
+ <sect1>
+ <title>Section Title<footnote>
+ <para>Boring, I know, but it just tests the fact that a footnote
+can occur in a title.</para></footnote></title>
+ <para>A paragraph.</para>
+
+ <sect2>
+ <title>Subsection Title</title>
+ <para>This paragraph contains a footnote<footnote>
+<para>This is yet another footnote.</para></footnote>.</para>
+ </sect2>
+
+ </sect1>
+
+</article>
diff --git a/test/testdocs/footnote.002.xml b/test/testdocs/footnote.002.xml
new file mode 100644
index 0000000..89b8973
--- /dev/null
+++ b/test/testdocs/footnote.002.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: footnote.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>This paragraph contains a footnote<footnote>
+<para>This is a footnote.</para></footnote>.</para>
+
+<table><title>A table</title>
+<tgroup cols="3">
+<tbody>
+<row>
+ <entry>A Cell</entry>
+ <entry>A Cell<footnote><para>First footnote.</para></footnote></entry>
+ <entry>A Cell</entry>
+</row>
+<row>
+ <entry>A Cell<footnote><simpara>Second footnote.</simpara></footnote></entry>
+ <entry>A Cell</entry>
+ <entry>A Cell</entry>
+</row>
+<row>
+ <entry>A Cell</entry>
+ <entry>A Cell</entry>
+ <entry>A Cell<footnote><address>100 Any Street
+East Yahoo, XX</address></footnote></entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+
+<para>This paragraph contains a footnote<footnote>
+<para>This is a footnote.</para></footnote>.</para>
+
+</article>
diff --git a/test/testdocs/footnote.003.xml b/test/testdocs/footnote.003.xml
new file mode 100644
index 0000000..280790a
--- /dev/null
+++ b/test/testdocs/footnote.003.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: footnote.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>This paragraph contains a footnote<footnote>
+<para>This is a footnote.</para></footnote>.</para>
+
+<table><title>A table</title>
+<tgroup cols="3">
+<tbody>
+<row>
+ <entry>A Cell</entry>
+ <entry>A Cell<footnote><para>First footnote.</para></footnote></entry>
+ <entry>A Cell</entry>
+</row>
+<row>
+ <entry>A Cell<footnote><simpara>Second footnote.</simpara></footnote></entry>
+ <entry>A Cell</entry>
+ <entry>A Cell</entry>
+</row>
+<row>
+ <entry>A Cell</entry>
+ <entry>A Cell</entry>
+ <entry>A Cell<footnote><address>100 Any Street
+East Yahoo, XX</address></footnote></entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+
+<para>This paragraph contains a footnote<footnote>
+<para>This is a footnote.</para></footnote>.</para>
+
+<table><title>A table</title>
+<tgroup cols="3">
+<tbody>
+<row>
+ <entry>A Cell</entry>
+ <entry>A Cell<footnote><para>First footnote.</para></footnote></entry>
+ <entry>A Cell</entry>
+</row>
+<row>
+ <entry>A Cell<footnote><simpara>Second footnote.</simpara></footnote></entry>
+ <entry>A Cell</entry>
+ <entry>A Cell</entry>
+</row>
+<row>
+ <entry>A Cell</entry>
+ <entry>A Cell</entry>
+ <entry>A Cell<footnote><address>100 Any Street
+East Yahoo, XX</address></footnote></entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+
+<para>This paragraph contains a footnote<footnote>
+<para>This is a footnote.</para></footnote>.</para>
+
+</article>
diff --git a/test/testdocs/formalpara.001.xml b/test/testdocs/formalpara.001.xml
new file mode 100644
index 0000000..c452a55
--- /dev/null
+++ b/test/testdocs/formalpara.001.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: formalpara.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<formalpara><title>Test title</title>
+<para>Some para</para>
+</formalpara>
+
+</article>
diff --git a/test/testdocs/formalpara.002.xml b/test/testdocs/formalpara.002.xml
new file mode 100644
index 0000000..8e17635
--- /dev/null
+++ b/test/testdocs/formalpara.002.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: formalpara.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<formalpara><title>Test title:</title>
+<para>Some para</para>
+</formalpara>
+
+</article>
diff --git a/test/testdocs/glossary.001.xml b/test/testdocs/glossary.001.xml
new file mode 100644
index 0000000..e9762e4
--- /dev/null
+++ b/test/testdocs/glossary.001.xml
@@ -0,0 +1,274 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE glossary PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<glossary>
+<?dbfo glossterm-width="1in"?>
+<glossaryinfo>
+<title>Unit Test: glossary.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<editor><firstname>Eric</firstname><surname>Raymond</surname></editor>
+<subtitle>Jargon File 4.2.3 (abridged)</subtitle>
+<releaseinfo>Just some test data</releaseinfo>
+</glossaryinfo>
+
+<glossdiv><title>0</title>
+
+<glossentry>
+<glossterm>0</glossterm>
+<glossdef>
+<para>Numeric zero, as opposed to the letter `O' (the 15th letter of
+the English alphabet). In their unmodified forms they look a lot
+alike, and various kluges invented to make them visually distinct have
+compounded the confusion. If your zero is center-dotted and letter-O
+is not, or if letter-O looks almost rectangular but zero looks more
+like an American football stood on end (or the reverse), you're
+probably looking at a modern character display (though the dotted zero
+seems to have originated as an option on IBM 3270 controllers). If
+your zero is slashed but letter-O is not, you're probably looking at
+an old-style ASCII graphic set descended from the default typewheel on
+the venerable ASR-33 Teletype (Scandinavians, for whom /O is a letter,
+curse this arrangement). (Interestingly, the slashed zero long
+predates computers; Florian Cajori's monumental "A History of
+Mathematical Notations" notes that it was used in the twelfth and
+thirteenth centuries.) If letter-O has a slash across it and the zero
+does not, your display is tuned for a very old convention used at IBM
+and a few other early mainframe makers (Scandinavians curse <emphasis>this</emphasis>
+arrangement even more, because it means two of their letters collide).
+Some Burroughs/Unisys equipment displays a zero with a <emphasis>reversed</emphasis>
+slash. Old CDC computers rendered letter O as an unbroken oval and 0
+as an oval broken at upper right and lower left. And yet another
+convention common on early line printers left zero unornamented but
+added a tail or hook to the letter-O so that it resembled an inverted
+Q or cursive capital letter-O (this was endorsed by a draft ANSI
+standard for how to draw ASCII characters, but the final standard
+changed the distinguisher to a tick-mark in the upper-left corner).
+Are we sufficiently confused yet?</para>
+</glossdef>
+</glossentry>
+
+<glossentry>
+<glossterm>1TBS</glossterm>
+<glossdef>
+<para role="pos">
+<phrase role="pronounce"></phrase>
+<phrase role="partsofspeach">n</phrase>
+</para>
+<para>The "One True Brace Style"</para>
+<glossseealso>indent style</glossseealso>
+</glossdef>
+</glossentry>
+
+<glossentry>
+<glossterm>120 reset</glossterm>
+<glossdef>
+<para role="pos">
+<phrase role="pronounce">wuhn-twen'tee ree'set</phrase>
+<phrase role="partofspeach">n</phrase>
+</para>
+<para>[from 120 volts, U.S. wall voltage] To cycle power on a machine
+in order to reset or unjam it. Compare <glossterm>Big Red Switch</glossterm>,
+<glossterm>power cycle</glossterm>.</para>
+</glossdef>
+</glossentry>
+
+<glossentry>
+<glossterm>2</glossterm>
+<glossdef>
+<para>infix. In translation software written by hackers, infix 2 often
+represents the syllable <emphasis>to</emphasis> with the connotation
+<quote>translate to</quote>: as in dvi2ps (DVI to PostScript), int2string (integer
+to string), and texi2roff (Texinfo to [nt]roff). Several versions of a
+joke have floated around the internet in which some idiot programmer
+fixes the Y2K bug by changing all the Y's in something to K's, as in
+Januark, Februark, etc.</para>
+</glossdef>
+</glossentry>
+
+<glossentry>
+<glossterm>@-party</glossterm>
+<glossdef>
+<para role="pos">
+<phrase role="pronounce">at'par`tee</phrase>
+<phrase role="partofspeach">n</phrase>
+</para>
+<para>[from the @-sign in an Internet
+address] (alt. `@-sign party' <phrase role="pronounce">at'si:n
+par`tee</phrase>) A semi-closed party thrown for hackers at a
+science-fiction convention (esp. the annual World Science Fiction
+Convention or "Worldcon"); one must have a {network address} to get
+in, or at least be in company with someone who does. One of the most
+reliable opportunities for hackers to meet face to face with people
+who might otherwise be represented by mere phosphor dots on their
+screens. Compare <glossterm>boink</glossterm>.
+</para>
+<para>The first recorded @-party was held at the Westercon (a U.S.
+western regional SF convention) over the July 4th weekend in 1980.
+It is not clear exactly when the canonical @-party venue shifted to the
+Worldcon but it had certainly become established by Constellation in 1983.
+Sadly, the @-party tradition has been in decline since about 1996, mainly
+because having an @-address no longer functions as an effective lodge pin.
+</para>
+</glossdef>
+</glossentry>
+</glossdiv>
+
+<glossdiv><title>A</title>
+
+<glossentry>
+<glossterm>abbrev</glossterm>
+<glossdef>
+<para role="pos">
+<phrase role="pronounce">*-breev'</phrase>
+<phrase role="pronounce">*-brev'</phrase>
+<phrase role="partofspeach">n</phrase>
+</para>
+<para>Common abbreviation for <quote>abbreviation</quote>.</para>
+</glossdef>
+</glossentry>
+
+<glossentry>
+<glossterm>ABEND</glossterm>
+<glossdef>
+<para role="pos">
+<phrase role="pronounce">a'bend</phrase>
+<phrase role="pronounce">*-bend'</phrase>
+<phrase role="partofspeach">n</phrase>
+</para>
+<para>[ABnormal END] 1. Abnormal
+termination (of software); {crash}; {lossage}. Derives from an error
+message on the IBM 360; used jokingly by hackers but seriously mainly
+by {code grinder}s. Usually capitalized, but may appear as `abend'.
+Hackers will try to persuade you that ABEND is called `abend' because
+it is what system operators do to the machine late on Friday when
+they want to call it a day, and hence is from the German `Abend' =
+`Evening'. 2. [alt.callahans] Absent By Enforced Net Deprivation -
+used in the subject lines of postings warning friends of an imminent
+loss of Internet access. (This can be because of computer downtime,
+loss of provider, moving or illness.) Variants of this also appear:
+ABVND = `Absent By Voluntary Net Deprivation' and ABSEND = `Absent By
+Self-Enforced Net Deprivation' have been sighted.</para>
+</glossdef>
+</glossentry>
+
+<glossentry>
+<glossterm>ACK</glossterm>
+<glossdef>
+<para role="pos">
+<phrase role="pronounce">ak</phrase>
+<phrase role="partofspeach">interj</phrase>
+</para>
+<para>1. [common; from the ASCII mnemonic for
+0000110] Acknowledge. Used to register one's presence (compare
+mainstream <emphasis>Yo!</emphasis>emphasis>). An appropriate response
+to {ping} or {ENQ}. 2. [from the comic strip "Bloom County"] An
+exclamation of surprised disgust, esp. in "Ack pffft!" Semi-humorous.
+Generally this sense is not spelled in caps (ACK) and is distinguished
+by a following exclamation point. 3. Used to politely interrupt
+someone to tell them you understand their point (see {NAK}). Thus, for
+example, you might cut off an overly long explanation with "Ack. Ack.
+Ack. I get it now". 4. An affirmative. "Think we ought to ditch that
+damn NT server for a Linux box?" "ACK!"
+</para>
+<para>There is also a usage "ACK?" (from sense 1) meaning "Are you
+there?", often used in email when earlier mail has produced no reply,
+or during a lull in {talk mode} to see if the person has gone away
+(the standard humorous response is of course {NAK} (sense 1), i.e.,
+"I'm not here").</para>
+</glossdef>
+</glossentry>
+</glossdiv>
+
+<glossdiv><title>B</title>
+
+<glossentry>
+<glossterm>B5</glossterm>
+<glossdef>
+<para role="pos">
+<phrase role="pronounce"></phrase>
+</para>
+<para>[common] Abbreviation for "Babylon 5", a science-fiction
+TV series as revered among hackers as was the original Star Trek.
+</para>
+</glossdef>
+</glossentry>
+
+<glossentry>
+<glossterm>back door</glossterm>
+<glossdef>
+<para role="pos">
+<phrase role="partofspeach">n</phrase>
+</para>
+<para>[common] A hole in the security of a system
+deliberately left in place by designers or maintainers. The motivation
+for such holes is not always sinister; some operating systems, for
+example, come out of the box with privileged accounts intended for use
+by field service technicians or the vendor's maintenance programmers.
+Syn. {trap door}; may also be called a `wormhole'. See also {iron box},
+{cracker}, {worm}, {logic bomb}.
+</para>
+<para>Historically, back doors have often lurked in systems longer than
+anyone expected or planned, and a few have become widely known. Ken
+Thompson's 1983 Turing Award lecture to the ACM admitted the existence
+of a back door in early Unix versions that may have qualified as the
+most fiendishly clever security hack of all time. In this scheme, the
+C compiler contained code that would recognize when the `login' command
+was being recompiled and insert some code recognizing a password chosen
+by Thompson, giving him entry to the system whether or not an account
+had been created for him.
+</para>
+<para>Normally such a back door could be removed by removing it from the
+source code for the compiler and recompiling the compiler. But to
+recompile the compiler, you have to <emphasis>use</emphasis> the compiler -- so Thompson
+also arranged that the compiler would <emphasis>recognize when it was compiling a
+version of itself</emphasis>, and insert into the recompiled compiler the code to
+insert into the recompiled `login' the code to allow Thompson entry --
+and, of course, the code to recognize itself and do the whole thing again
+the next time around! And having done this once, he was then able to
+recompile the compiler from the original sources; the hack perpetuated
+itself invisibly, leaving the back door in place and active but with no
+trace in the sources.
+</para>
+<para>The talk that suggested this truly moby hack was published as
+"Reflections on Trusting Trust", "Communications of the ACM 27", 8 (August
+1984), pp. 761-763 (text available at `http://www.acm.org/classics').
+Ken Thompson has since confirmed that this hack was implemented and that
+the Trojan Horse code did appear in the login binary of a Unix Support
+group machine. Ken says the crocked compiler was never distributed.
+Your editor has heard two separate reports that suggest that the crocked
+login did make it out of Bell Labs, notably to BBN, and that it enabled
+at least one late-night login across the network by someone using the
+login name `kt'.
+</para>
+</glossdef>
+</glossentry>
+
+<glossentry>
+<glossterm>backbone cabal</glossterm>
+<glossdef>
+<para role="pos">
+<phrase role="partofspeach">n</phrase>
+</para>
+<para>A group of large-site administrators who
+pushed through the {Great Renaming} and reined in the chaos of {Usenet}
+during most of the 1980s. During most of its lifetime, the Cabal (as
+it was sometimes capitalized) steadfastly denied its own existence;
+it was almost obligatory for anyone privy to their secrets to respond
+"There is no Cabal" whenever the existence or activities of the group
+were speculated on in public.
+</para>
+<para>The result of this policy was an attractive aura of mystery. Even
+a decade after the cabal {mailing list} disbanded in late 1988 following
+a bitter internal catfight, many people believed (or claimed to believe)
+that it had not actually disbanded but only gone deeper underground with
+its power intact.</para>
+
+<para>This belief became a model for various paranoid theories about
+various Cabals with dark nefarious objectives beginning with taking over
+the Usenet or Internet. These paranoias were later satirized in ways
+that took on a life of their own. See {Eric Conspiracy} for one example.</para>
+
+<para>See {NANA} for the subsequent history of "the Cabal".</para>
+</glossdef>
+</glossentry>
+</glossdiv>
+</glossary>
diff --git a/test/testdocs/imagelib.001.xml b/test/testdocs/imagelib.001.xml
new file mode 100644
index 0000000..4ecca7e
--- /dev/null
+++ b/test/testdocs/imagelib.001.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article id="article">
+<articleinfo>
+<title>Unit Test: imagelib.001.xml</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>This is an image library test.</para>
+
+<!--
+<graphic fileref="graphics/duck-small.gif"/>
+-->
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ align="right"
+ width="50%"
+ fileref="graphics/duck-small.gif"
+ srccredit="O'Reilly &amp; Associates/Dover Archives"/>
+ </imageobject>
+ <imageobject>
+ <imagedata
+ align="right"
+ width="50%"
+ fileref="graphics/duck-small.png"
+ format="PNG"
+ srccredit="O'Reilly &amp; Associates/Dover Archives"/>
+ </imageobject>
+ <textobject><phrase>The DocBook: TDG Duck</phrase></textobject>
+ <textobject>
+<para>The bird on the cover of <citetitle>DocBook: The Definitive
+Guide</citetitle> is a wood duck. Often considered one of the most
+beautiful ducks in North America, the mail wood duck has a metallic
+purple and green head with white streaks extending from its bill
+around the eyes and down to its blue and green, gold-flecked
+wings. It has a white neck, chestnut-colored chest, a white or red
+bill, and yellow-orange legs and feet. Females have more brown, gray,
+and subdueed hues.
+</para>
+
+<para>Edie Freedman designed the cover of this book, using a
+19th-century engraving from the Dover Pictorial Archive. The
+cover layout was produced by Kathleen Wilson using QuarkXPress
+3.32 and Adobe's ITC Garamond font. The inside layout was
+designed by Alicia Cech, based on a series design by Nancy
+Priest. The text was formatted from SGML into FrameMaker 5.5
+with Jade, using a DSSSL conversion stylesheet written by
+Chris Maden. The interior fonts are ITC Garamond Light,
+Garamond Book, and ConstantWillison.
+</para>
+ </textobject>
+ <caption><para>The Duck</para></caption>
+ </mediaobject>
+
+</article>
diff --git a/test/testdocs/indexterm.001.xml b/test/testdocs/indexterm.001.xml
new file mode 100644
index 0000000..1efa0f1
--- /dev/null
+++ b/test/testdocs/indexterm.001.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book>
+<bookinfo>
+<title>Unit Test: indexterm.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</bookinfo>
+
+<chapter><title>First Chapter</title>
+
+<para>This is a test paragraph.
+<indexterm>
+<primary>@foo</primary>
+</indexterm>
+<indexterm>
+<primary>&gt; operator</primary>
+</indexterm>
+<indexterm>
+<primary>ap1</primary>
+</indexterm>
+
+<indexterm>
+<primary>ap1</primary>
+</indexterm>
+<indexterm>
+<primary>ap2</primary>
+</indexterm>
+
+<indexterm>
+<primary>bp1</primary>
+<secondary>bp1bs1</secondary>
+</indexterm>
+<indexterm>
+<primary>bp2</primary>
+</indexterm>
+
+<indexterm>
+<primary>cp1</primary>
+<secondary>cp1cs1</secondary>
+<tertiary>cp1cs1ct1</tertiary>
+</indexterm>
+
+<indexterm>
+<primary>cp2</primary>
+</indexterm>
+<indexterm>
+<primary>cp2see</primary><see>cp2</see>
+</indexterm>
+
+<indexterm>
+<primary>dp1</primary>
+<secondary>dp1ds1</secondary>
+</indexterm>
+<indexterm>
+<primary>dp1</primary>
+<secondary>dp1ds2</secondary>
+</indexterm>
+<indexterm>
+<primary>dp2</primary>
+</indexterm></para>
+
+</chapter>
+
+<appendix><title>First Appendix</title>
+
+<para>This is just a test.
+<indexterm>
+<primary>ap1</primary>
+</indexterm>
+<indexterm>
+<primary>ap2</primary>
+</indexterm>
+
+<indexterm>
+<primary>bp1</primary>
+<secondary>bp1bs1</secondary>
+</indexterm>
+<indexterm>
+<primary>bp2</primary>
+</indexterm>
+
+<indexterm>
+<primary>cp1</primary>
+<secondary>cp1cs1</secondary>
+<tertiary>cp1cs1ct1</tertiary>
+</indexterm>
+<indexterm>
+<primary>cp2</primary>
+</indexterm>
+
+<indexterm>
+<primary>dp1</primary>
+<secondary>dp1ds1</secondary>
+</indexterm>
+<indexterm>
+<primary>dp1</primary>
+<secondary>dp1ds2</secondary>
+</indexterm>
+<indexterm>
+<primary>dp2</primary>
+</indexterm></para>
+</appendix>
+
+<index id="idx"/>
+
+</book>
diff --git a/test/testdocs/indexterm.002.xml b/test/testdocs/indexterm.002.xml
new file mode 100644
index 0000000..e12b43d
--- /dev/null
+++ b/test/testdocs/indexterm.002.xml
@@ -0,0 +1,700 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book>
+<bookinfo>
+<title>Unit Test: indexterm.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</bookinfo>
+
+<chapter><title>First Chapter</title>
+
+<para>This is a test paragraph.
+<indexterm>
+<primary>ap1</primary>
+</indexterm>
+<indexterm>
+<primary>ap2</primary>
+</indexterm>
+
+<indexterm>
+<primary>bp1</primary>
+<secondary>bp1bs1</secondary>
+</indexterm>
+<indexterm>
+<primary>bp2</primary>
+</indexterm>
+
+<indexterm>
+<primary>cp1</primary>
+<secondary>cp1cs1</secondary>
+<tertiary>cp1cs1ct1</tertiary>
+</indexterm>
+
+<indexterm>
+<primary>cp2</primary>
+</indexterm>
+<indexterm>
+<primary>cp2see</primary><see>cp2</see>
+</indexterm>
+
+<indexterm>
+<primary>dp1</primary>
+<secondary>dp1ds1</secondary>
+</indexterm>
+<indexterm>
+<primary>dp1</primary>
+<secondary>dp1ds2</secondary>
+</indexterm>
+<indexterm>
+<primary>dp2</primary>
+</indexterm></para>
+
+</chapter>
+
+<appendix><title>First Appendix</title>
+
+<para>This is just a test.
+<indexterm>
+<primary>ap1</primary>
+</indexterm>
+<indexterm>
+<primary>ap2</primary>
+</indexterm>
+
+<indexterm>
+<primary>bp1</primary>
+<secondary>bp1bs1</secondary>
+</indexterm>
+<indexterm>
+<primary>bp2</primary>
+</indexterm>
+
+<indexterm>
+<primary>cp1</primary>
+<secondary>cp1cs1</secondary>
+<tertiary>cp1cs1ct1</tertiary>
+</indexterm>
+<indexterm>
+<primary>cp2</primary>
+</indexterm>
+
+<indexterm>
+<primary>dp1</primary>
+<secondary>dp1ds1</secondary>
+</indexterm>
+<indexterm>
+<primary>dp1</primary>
+<secondary>dp1ds2</secondary>
+</indexterm>
+<indexterm>
+<primary>dp2</primary>
+</indexterm></para>
+
+<para>This para contains a <emphasis>whole lotta</emphasis> index terms.
+<indexterm>
+ <primary>a</primary>
+</indexterm>
+<indexterm>
+ <primary>b</primary>
+</indexterm>
+<indexterm>
+ <primary>c</primary>
+</indexterm>
+<indexterm>
+ <primary>d</primary>
+</indexterm>
+<indexterm>
+ <primary>e</primary>
+</indexterm>
+<indexterm>
+ <primary>f</primary>
+</indexterm>
+<indexterm>
+ <primary>g</primary>
+</indexterm>
+<indexterm>
+ <primary>h</primary>
+</indexterm>
+<indexterm>
+ <primary>i</primary>
+</indexterm>
+<indexterm>
+ <primary>j</primary>
+</indexterm>
+<indexterm>
+ <primary>k</primary>
+</indexterm>
+<indexterm>
+ <primary>l</primary>
+</indexterm>
+<indexterm>
+ <primary>m</primary>
+</indexterm>
+<indexterm>
+ <primary>n</primary>
+</indexterm>
+<indexterm>
+ <primary>o</primary>
+</indexterm>
+<indexterm>
+ <primary>p</primary>
+</indexterm>
+<indexterm>
+ <primary>q</primary>
+</indexterm>
+<indexterm>
+ <primary>r</primary>
+</indexterm>
+<indexterm>
+ <primary>s</primary>
+</indexterm>
+<indexterm>
+ <primary>t</primary>
+</indexterm>
+<indexterm>
+ <primary>u</primary>
+</indexterm>
+<indexterm>
+ <primary>v</primary>
+</indexterm>
+<indexterm>
+ <primary>w</primary>
+</indexterm>
+<indexterm>
+ <primary>x</primary>
+</indexterm>
+<indexterm>
+ <primary>y</primary>
+</indexterm>
+<indexterm>
+ <primary>z</primary>
+</indexterm>
+<indexterm>
+ <primary>aa</primary>
+</indexterm>
+<indexterm>
+ <primary>ab</primary>
+</indexterm>
+<indexterm>
+ <primary>ac</primary>
+</indexterm>
+<indexterm>
+ <primary>ad</primary>
+</indexterm>
+<indexterm>
+ <primary>ae</primary>
+</indexterm>
+<indexterm>
+ <primary>af</primary>
+</indexterm>
+<indexterm>
+ <primary>ag</primary>
+</indexterm>
+<indexterm>
+ <primary>ah</primary>
+</indexterm>
+<indexterm>
+ <primary>ai</primary>
+</indexterm>
+<indexterm>
+ <primary>aj</primary>
+</indexterm>
+<indexterm>
+ <primary>ak</primary>
+</indexterm>
+<indexterm>
+ <primary>al</primary>
+</indexterm>
+<indexterm>
+ <primary>am</primary>
+</indexterm>
+<indexterm>
+ <primary>an</primary>
+</indexterm>
+<indexterm>
+ <primary>ao</primary>
+</indexterm>
+<indexterm>
+ <primary>ap</primary>
+</indexterm>
+<indexterm>
+ <primary>aq</primary>
+</indexterm>
+<indexterm>
+ <primary>ar</primary>
+</indexterm>
+<indexterm>
+ <primary>as</primary>
+</indexterm>
+<indexterm>
+ <primary>at</primary>
+</indexterm>
+<indexterm>
+ <primary>au</primary>
+</indexterm>
+<indexterm>
+ <primary>av</primary>
+</indexterm>
+<indexterm>
+ <primary>aw</primary>
+</indexterm>
+<indexterm>
+ <primary>ax</primary>
+</indexterm>
+<indexterm>
+ <primary>ay</primary>
+</indexterm>
+<indexterm>
+ <primary>az</primary>
+</indexterm>
+<indexterm>
+ <primary>ba</primary>
+</indexterm>
+<indexterm>
+ <primary>bb</primary>
+</indexterm>
+<indexterm>
+ <primary>bc</primary>
+</indexterm>
+<indexterm>
+ <primary>bd</primary>
+</indexterm>
+<indexterm>
+ <primary>be</primary>
+</indexterm>
+<indexterm>
+ <primary>bf</primary>
+</indexterm>
+<indexterm>
+ <primary>bg</primary>
+</indexterm>
+<indexterm>
+ <primary>bh</primary>
+</indexterm>
+<indexterm>
+ <primary>bi</primary>
+</indexterm>
+<indexterm>
+ <primary>bj</primary>
+</indexterm>
+<indexterm>
+ <primary>bk</primary>
+</indexterm>
+<indexterm>
+ <primary>bl</primary>
+</indexterm>
+<indexterm>
+ <primary>bm</primary>
+</indexterm>
+<indexterm>
+ <primary>bn</primary>
+</indexterm>
+<indexterm>
+ <primary>bo</primary>
+</indexterm>
+<indexterm>
+ <primary>bp</primary>
+</indexterm>
+<indexterm>
+ <primary>bq</primary>
+</indexterm>
+<indexterm>
+ <primary>br</primary>
+</indexterm>
+<indexterm>
+ <primary>bs</primary>
+</indexterm>
+<indexterm>
+ <primary>bt</primary>
+</indexterm>
+<indexterm>
+ <primary>bu</primary>
+</indexterm>
+<indexterm>
+ <primary>bv</primary>
+</indexterm>
+<indexterm>
+ <primary>bw</primary>
+</indexterm>
+<indexterm>
+ <primary>bx</primary>
+</indexterm>
+<indexterm>
+ <primary>by</primary>
+</indexterm>
+<indexterm>
+ <primary>bz</primary>
+</indexterm>
+<indexterm>
+ <primary>ca</primary>
+</indexterm>
+<indexterm>
+ <primary>cb</primary>
+</indexterm>
+<indexterm>
+ <primary>cc</primary>
+</indexterm>
+<indexterm>
+ <primary>cd</primary>
+</indexterm>
+<indexterm>
+ <primary>ce</primary>
+</indexterm>
+<indexterm>
+ <primary>cf</primary>
+</indexterm>
+<indexterm>
+ <primary>cg</primary>
+</indexterm>
+<indexterm>
+ <primary>ch</primary>
+</indexterm>
+<indexterm>
+ <primary>ci</primary>
+</indexterm>
+<indexterm>
+ <primary>cj</primary>
+</indexterm>
+<indexterm>
+ <primary>ck</primary>
+</indexterm>
+<indexterm>
+ <primary>cl</primary>
+</indexterm>
+<indexterm>
+ <primary>cm</primary>
+</indexterm>
+<indexterm>
+ <primary>cn</primary>
+</indexterm>
+<indexterm>
+ <primary>co</primary>
+</indexterm>
+<indexterm>
+ <primary>cp</primary>
+</indexterm>
+<indexterm>
+ <primary>cq</primary>
+</indexterm>
+<indexterm>
+ <primary>cr</primary>
+</indexterm>
+<indexterm>
+ <primary>cs</primary>
+</indexterm>
+<indexterm>
+ <primary>ct</primary>
+</indexterm>
+<indexterm>
+ <primary>cu</primary>
+</indexterm>
+<indexterm>
+ <primary>cv</primary>
+</indexterm>
+<indexterm>
+ <primary>cw</primary>
+</indexterm>
+<indexterm>
+ <primary>cx</primary>
+</indexterm>
+<indexterm>
+ <primary>cy</primary>
+</indexterm>
+<indexterm>
+ <primary>cz</primary>
+</indexterm>
+<indexterm>
+ <primary>da</primary>
+</indexterm>
+<indexterm>
+ <primary>db</primary>
+</indexterm>
+<indexterm>
+ <primary>dc</primary>
+</indexterm>
+<indexterm>
+ <primary>dd</primary>
+</indexterm>
+<indexterm>
+ <primary>de</primary>
+</indexterm>
+<indexterm>
+ <primary>df</primary>
+</indexterm>
+<indexterm>
+ <primary>dg</primary>
+</indexterm>
+<indexterm>
+ <primary>dh</primary>
+</indexterm>
+<indexterm>
+ <primary>di</primary>
+</indexterm>
+<indexterm>
+ <primary>dj</primary>
+</indexterm>
+<indexterm>
+ <primary>dk</primary>
+</indexterm>
+<indexterm>
+ <primary>dl</primary>
+</indexterm>
+<indexterm>
+ <primary>dm</primary>
+</indexterm>
+<indexterm>
+ <primary>dn</primary>
+</indexterm>
+<indexterm>
+ <primary>do</primary>
+</indexterm>
+<indexterm>
+ <primary>dp</primary>
+</indexterm>
+<indexterm>
+ <primary>dq</primary>
+</indexterm>
+<indexterm>
+ <primary>dr</primary>
+</indexterm>
+<indexterm>
+ <primary>ds</primary>
+</indexterm>
+<indexterm>
+ <primary>dt</primary>
+</indexterm>
+<indexterm>
+ <primary>du</primary>
+</indexterm>
+<indexterm>
+ <primary>dv</primary>
+</indexterm>
+<indexterm>
+ <primary>dw</primary>
+</indexterm>
+<indexterm>
+ <primary>dx</primary>
+</indexterm>
+<indexterm>
+ <primary>dy</primary>
+</indexterm>
+<indexterm>
+ <primary>dz</primary>
+</indexterm>
+<indexterm>
+ <primary>ea</primary>
+</indexterm>
+<indexterm>
+ <primary>eb</primary>
+</indexterm>
+<indexterm>
+ <primary>ec</primary>
+</indexterm>
+<indexterm>
+ <primary>ed</primary>
+</indexterm>
+<indexterm>
+ <primary>ee</primary>
+</indexterm>
+<indexterm>
+ <primary>ef</primary>
+</indexterm>
+<indexterm>
+ <primary>eg</primary>
+</indexterm>
+<indexterm>
+ <primary>eh</primary>
+</indexterm>
+<indexterm>
+ <primary>ei</primary>
+</indexterm>
+<indexterm>
+ <primary>ej</primary>
+</indexterm>
+<indexterm>
+ <primary>ek</primary>
+</indexterm>
+<indexterm>
+ <primary>el</primary>
+</indexterm>
+<indexterm>
+ <primary>em</primary>
+</indexterm>
+<indexterm>
+ <primary>en</primary>
+</indexterm>
+<indexterm>
+ <primary>eo</primary>
+</indexterm>
+<indexterm>
+ <primary>ep</primary>
+</indexterm>
+<indexterm>
+ <primary>eq</primary>
+</indexterm>
+<indexterm>
+ <primary>er</primary>
+</indexterm>
+<indexterm>
+ <primary>es</primary>
+</indexterm>
+<indexterm>
+ <primary>et</primary>
+</indexterm>
+<indexterm>
+ <primary>eu</primary>
+</indexterm>
+<indexterm>
+ <primary>ev</primary>
+</indexterm>
+<indexterm>
+ <primary>ew</primary>
+</indexterm>
+<indexterm>
+ <primary>ex</primary>
+</indexterm>
+<indexterm>
+ <primary>ey</primary>
+</indexterm>
+<indexterm>
+ <primary>ez</primary>
+</indexterm>
+<indexterm>
+ <primary>fa</primary>
+</indexterm>
+<indexterm>
+ <primary>fb</primary>
+</indexterm>
+<indexterm>
+ <primary>fc</primary>
+</indexterm>
+<indexterm>
+ <primary>fd</primary>
+</indexterm>
+<indexterm>
+ <primary>fe</primary>
+</indexterm>
+<indexterm>
+ <primary>ff</primary>
+</indexterm>
+<indexterm>
+ <primary>fg</primary>
+</indexterm>
+<indexterm>
+ <primary>fh</primary>
+</indexterm>
+<indexterm>
+ <primary>fi</primary>
+</indexterm>
+<indexterm>
+ <primary>fj</primary>
+</indexterm>
+<indexterm>
+ <primary>fk</primary>
+</indexterm>
+<indexterm>
+ <primary>fl</primary>
+</indexterm>
+<indexterm>
+ <primary>fm</primary>
+</indexterm>
+<indexterm>
+ <primary>fn</primary>
+</indexterm>
+<indexterm>
+ <primary>fo</primary>
+</indexterm>
+<indexterm>
+ <primary>fp</primary>
+</indexterm>
+<indexterm>
+ <primary>fq</primary>
+</indexterm>
+<indexterm>
+ <primary>fr</primary>
+</indexterm>
+<indexterm>
+ <primary>fs</primary>
+</indexterm>
+<indexterm>
+ <primary>ft</primary>
+</indexterm>
+<indexterm>
+ <primary>fu</primary>
+</indexterm>
+<indexterm>
+ <primary>fv</primary>
+</indexterm>
+<indexterm>
+ <primary>fw</primary>
+</indexterm>
+<indexterm>
+ <primary>fx</primary>
+</indexterm>
+<indexterm>
+ <primary>fy</primary>
+</indexterm>
+<indexterm>
+ <primary>fz</primary>
+</indexterm>
+<indexterm>
+ <primary>ga</primary>
+</indexterm>
+<indexterm>
+ <primary>gb</primary>
+</indexterm>
+<indexterm>
+ <primary>gc</primary>
+</indexterm>
+<indexterm>
+ <primary>gd</primary>
+</indexterm>
+<indexterm>
+ <primary>ge</primary>
+</indexterm>
+<indexterm>
+ <primary>gf</primary>
+</indexterm>
+<indexterm>
+ <primary>gg</primary>
+</indexterm>
+<indexterm>
+ <primary>gh</primary>
+</indexterm>
+<indexterm>
+ <primary>gi</primary>
+</indexterm>
+<indexterm>
+ <primary>gj</primary>
+</indexterm>
+<indexterm>
+ <primary>gk</primary>
+</indexterm>
+<indexterm>
+ <primary>gl</primary>
+</indexterm>
+<indexterm>
+ <primary>gm</primary>
+</indexterm>
+<indexterm>
+ <primary>gn</primary>
+</indexterm>
+<indexterm>
+ <primary>go</primary>
+</indexterm>
+<indexterm>
+ <primary>gp</primary>
+</indexterm>
+<indexterm>
+ <primary>gq</primary>
+</indexterm></para>
+
+</appendix>
+
+<index id="idx"/>
+
+</book>
diff --git a/test/testdocs/informalequation-mml.001.xml b/test/testdocs/informalequation-mml.001.xml
new file mode 100644
index 0000000..f2b2d65
--- /dev/null
+++ b/test/testdocs/informalequation-mml.001.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook MathML Module V1.0//EN"
+ "http://www.oasis-open.org/docbook/xml/mathml/1.0/dbmathml.dtd" [
+<!ENTITY % local.article.attrib "xmlns:mml CDATA #REQUIRED">
+]>
+<article xmlns:mml="http://www.w3.org/1998/Math/MathML">
+<articleinfo>
+<title>Unit Test: informalequation-mml.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<informalequation>
+<mml:math><mml:apply><mml:divide/></mml:apply></mml:math>
+</informalequation>
+
+</article>
diff --git a/test/testdocs/informaltable.001.xml b/test/testdocs/informaltable.001.xml
new file mode 100644
index 0000000..bdcf969
--- /dev/null
+++ b/test/testdocs/informaltable.001.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+........+
+| | B | | D |
++ A +........+ C +........+
+| | | | E |
++........+........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="4">
+<colspec colname="c4a" colnum="4"/>
+<tbody>
+<row>
+ <entry morerows="1">A</entry>
+ <entry>B</entry>
+ <entry morerows="1">C</entry>
+ <entry>D</entry>
+</row>
+<row>
+ <entry namest="c4a">E</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/informaltable.002.xml b/test/testdocs/informaltable.002.xml
new file mode 100644
index 0000000..beb2a29
--- /dev/null
+++ b/test/testdocs/informaltable.002.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+........+
+| A | B | C | D |
++........+........+ + +
+| E | F | | |
++ +........+ + +
+| | G | | |
++ +........+........+........+
+| | H | | I |
++........+........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="4">
+<colspec colname="c4b" colnum="4"/>
+<tbody>
+<row>
+ <entry>A</entry>
+ <entry>B</entry>
+ <entry morerows="2">C</entry>
+ <entry morerows="2">D</entry>
+</row>
+<row>
+ <entry morerows="2">E</entry>
+ <entry>F</entry>
+</row>
+<row>
+ <entry>G</entry>
+</row>
+<row>
+ <entry>H</entry>
+ <entry namest="c4b">I</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/informaltable.003.xml b/test/testdocs/informaltable.003.xml
new file mode 100644
index 0000000..773a798
--- /dev/null
+++ b/test/testdocs/informaltable.003.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+........+
+| A | B | C | D |
++........+ +........+ +
+| E | | F | |
++ + +........+........+
+| | | | G |
++........+........+........+........+
+| H | | I | J |
++........+........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="4">
+<colspec colname="c3c" colnum="3"/>
+<colspec colname="c4c" colnum="4"/>
+<tbody>
+<row>
+ <entry>A</entry>
+ <entry morerows="2">B</entry>
+ <entry>C</entry>
+ <entry morerows="1">D</entry>
+</row>
+<row>
+ <entry morerows="1">E</entry>
+ <entry>F</entry>
+</row>
+<row>
+ <entry namest="c4c">G</entry>
+</row>
+<row>
+ <entry>H</entry>
+ <entry namest="c3c">I</entry>
+ <entry>J</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/informaltable.004.xml b/test/testdocs/informaltable.004.xml
new file mode 100644
index 0000000..d6c3134
--- /dev/null
+++ b/test/testdocs/informaltable.004.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.004</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+........+........+
+| A | | | | |
++ +........+........+........+........+
+| | B | | C |
++ +........+........+........+........+
+| | | D | F | |
++........+........+ +........+........+
+| | | | | E |
++........+........+........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="5">
+<colspec colname="c3d" colnum="3"/>
+<colspec colname="c4d" colnum="4"/>
+<colspec colname="c5d" colnum="5"/>
+<tbody>
+<row>
+ <entry morerows="2">A</entry>
+</row>
+<row>
+ <entry>B</entry>
+ <entry namest="c4d" nameend="c5d">C</entry>
+</row>
+<row>
+ <entry namest="c3d" morerows="1">D</entry>
+ <entry>F</entry>
+</row>
+<row>
+ <entry namest="c5d">E</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/informaltable.005.xml b/test/testdocs/informaltable.005.xml
new file mode 100644
index 0000000..a85bddb
--- /dev/null
+++ b/test/testdocs/informaltable.005.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.005</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+........+
+| | B | | D |
++ A +........+ C +........+
+| | | | E |
++........+........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="4">
+<colspec colname="c4a" colnum="4"/>
+<tbody>
+<row>
+ <entry morerows="1">A</entry>
+ <entry>B</entry>
+ <entry morerows="1">C</entry>
+ <entry>D</entry>
+</row>
+<row>
+ <entry namest="c4a">E</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/informaltable.006.xml b/test/testdocs/informaltable.006.xml
new file mode 100644
index 0000000..f139e72
--- /dev/null
+++ b/test/testdocs/informaltable.006.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.006</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+........+
+| A | | | |
++ +........+........+........+
+| | B | | C |
++ +........+........+........+
+| | | D | F |
++........+........+ +........+
+| | | | E |
++........+........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="4">
+<colspec colname="c3d" colnum="3"/>
+<colspec colname="c4d" colnum="4"/>
+<tbody>
+<row>
+ <entry morerows="2">A</entry>
+</row>
+<row>
+ <entry>B</entry>
+ <entry namest="c4d">C</entry>
+</row>
+<row>
+ <entry namest="c3d" morerows="1">D</entry>
+ <entry>F</entry>
+</row>
+<row>
+ <entry namest="c4d">E</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/informaltable.007.xml b/test/testdocs/informaltable.007.xml
new file mode 100644
index 0000000..674e2ce
--- /dev/null
+++ b/test/testdocs/informaltable.007.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.007</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+........+........+
+| A | | B |
++........+........+........+........+........+
+| X | | |
++........+ C +........+
+| Y | | |
++........+........+........+........+........+
+| D | | E |
++........+........+........+........+........+
+| F | G | H | I | J |
++........+........+........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="5">
+<colspec colname="c1c"/>
+<colspec colname="c2c"/>
+<colspec colname="c3c"/>
+<colspec colname="c4c"/>
+<colspec colname="c5c"/>
+<tbody>
+<row>
+ <entry namest="c1c" nameend="c2c">A</entry>
+ <entry namest="c4c" nameend="c5c">B</entry>
+</row>
+<row>
+ <entry>X</entry>
+ <entry namest="c2c" nameend="c4c" morerows="1">C</entry>
+</row>
+<row>
+ <entry>Y</entry>
+</row>
+<row>
+ <entry namest="c1c" nameend="c2c">D</entry>
+ <entry namest="c4c" nameend="c5c">E</entry>
+</row>
+<row>
+ <entry>F</entry>
+ <entry>G</entry>
+ <entry>H</entry>
+ <entry>I</entry>
+ <entry>J</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/informaltable.008.xml b/test/testdocs/informaltable.008.xml
new file mode 100644
index 0000000..d4c0d9b
--- /dev/null
+++ b/test/testdocs/informaltable.008.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.008</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+........+........+
+| A | | B |
++........+........+........+........+........+
+| X | | |
++........+ C +........+
+| Y | | |
++........+........+........+........+........+
+| D | | E |
++........+........+........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="5">
+<colspec colname="c1c"/>
+<colspec colname="c2c"/>
+<colspec colname="c3c"/>
+<colspec colname="c4c"/>
+<colspec colname="c5c"/>
+<tbody>
+<row>
+ <entry namest="c1c" nameend="c2c">A</entry>
+ <entry namest="c4c" nameend="c5c">B</entry>
+</row>
+<row>
+ <entry>X</entry>
+ <entry namest="c2c" nameend="c4c" morerows="1">C</entry>
+</row>
+<row>
+ <entry>Y</entry>
+</row>
+<row>
+ <entry namest="c1c" nameend="c2c">D</entry>
+ <entry namest="c4c" nameend="c5c">E</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/informaltable.009.xml b/test/testdocs/informaltable.009.xml
new file mode 100644
index 0000000..91f8881
--- /dev/null
+++ b/test/testdocs/informaltable.009.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.009</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+........+........+
+| A | | B |
++........+........+........+........+........+
+| | C | |
++........+........+........+........+........+
+| D | | E |
++........+........+........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="5">
+<colspec colname="c1c"/>
+<colspec colname="c2c"/>
+<colspec colname="c3c"/>
+<colspec colname="c4c"/>
+<colspec colname="c5c"/>
+<tbody>
+<row>
+ <entry namest="c1c" nameend="c2c">A</entry>
+ <entry namest="c4c" nameend="c5c">B</entry>
+</row>
+<row>
+ <entry namest="c2c" nameend="c4c">C</entry>
+</row>
+<row>
+ <entry namest="c1c" nameend="c2c">D</entry>
+ <entry namest="c4c" nameend="c5c">E</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/informaltable.010.xml b/test/testdocs/informaltable.010.xml
new file mode 100644
index 0000000..7589d36
--- /dev/null
+++ b/test/testdocs/informaltable.010.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.010</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+........+
+| A | | | F |
++........+........+........+........+
+| | B | |
++........+........+ D +
+| C | | |
++........+........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="4">
+<colspec colname="c1a" colnum="1"/>
+<colspec colname="c2a" colnum="2"/>
+<colspec colname="c3a" colnum="3"/>
+<colspec colname="c4a" colnum="4"/>
+<tbody>
+<row>
+ <entry>A</entry>
+ <entry colname="c4a">F</entry>
+</row>
+<row>
+ <entry colname="c2a">B</entry>
+ <entry namest="c3a" nameend="c4a" morerows="1">D</entry>
+</row>
+<row>
+ <entry>C</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/informaltable.011.xml b/test/testdocs/informaltable.011.xml
new file mode 100644
index 0000000..789100d
--- /dev/null
+++ b/test/testdocs/informaltable.011.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.011</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+........+
+| | | | F |
++ A +........+........+........+
+| | B |
++........+ +
+| C | |
++........+........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="4">
+<colspec colname="c1a" colnum="1"/>
+<colspec colname="c2a" colnum="2"/>
+<colspec colname="c3a" colnum="3"/>
+<colspec colname="c4a" colnum="4"/>
+<tbody>
+<row>
+ <entry morerows="1">A</entry>
+ <entry colname="c4a">F</entry>
+</row>
+<row>
+ <entry namest="c2a" nameend="c4a" morerows="1">B</entry>
+</row>
+<row>
+ <entry>C</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/informaltable.012.xml b/test/testdocs/informaltable.012.xml
new file mode 100644
index 0000000..680ee26
--- /dev/null
+++ b/test/testdocs/informaltable.012.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.012</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+
+| A | | |
++........+........+........+
+| | B |
++........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="3">
+<colspec colname="c2a" colnum="2"/>
+<colspec colname="c3a" colnum="3"/>
+<tbody>
+<row>
+ <entry>A</entry>
+</row>
+<row>
+ <entry namest="c2a" nameend="c3a">B</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/informaltable.013.xml b/test/testdocs/informaltable.013.xml
new file mode 100644
index 0000000..e089504
--- /dev/null
+++ b/test/testdocs/informaltable.013.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.013</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+........+........+
+| A | | | | |
++........+........+........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="5">
+<tbody>
+<row>
+ <entry>A</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/informaltable.014.xml b/test/testdocs/informaltable.014.xml
new file mode 100644
index 0000000..6ec8ae7
--- /dev/null
+++ b/test/testdocs/informaltable.014.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: informaltable.014</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!--
++........+........+........+........+........+
+| A | | | | |
++ +........+........+........+........+
+| | B | | C |
++ +........+........+........+........+
+| | | D | G | |
++........+........+ +........+........+
+| | | | | E |
++........+........+........+........+........+
+| | | F |
++........+........+........+........+........+
+-->
+
+<informaltable frame="all">
+<tgroup cols="5">
+<colspec colname="c3d" colnum="3"/>
+<colspec colname="c4d" colnum="4"/>
+<colspec colname="c5d" colnum="5"/>
+<tbody>
+<row>
+ <entry morerows="2">A</entry>
+</row>
+<row>
+ <entry>B</entry>
+ <entry namest="c4d" nameend="c5d">C</entry>
+</row>
+<row>
+ <entry namest="c3d" morerows="1">D</entry>
+ <entry>G</entry>
+</row>
+<row>
+ <entry namest="c5d">E</entry>
+</row>
+<row>
+ <entry namest="c3d" nameend="c5d">F</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/inline.001.xml b/test/testdocs/inline.001.xml
new file mode 100644
index 0000000..732501e
--- /dev/null
+++ b/test/testdocs/inline.001.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article id="article">
+<articleinfo>
+<title>Unit Test: inline.001.xml</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>This article tests inline objects.</para>
+
+<para>This is a <phrase role="red">red phrase</phrase>.
+This <emphasis role="strong">emphasis is strong</emphasis>.
+</para>
+
+<section><title>Trademarks</title>
+
+<para><trademark>This is trademarked</trademark>.
+<trademark class="copyright">This is copyrighted</trademark>.
+<trademark class="registered">This is a registered trademark</trademark>.
+<trademark class="service">This is is a service mark</trademark>.</para>
+</section>
+
+</article>
diff --git a/test/testdocs/itemizedlist.001.xml b/test/testdocs/itemizedlist.001.xml
new file mode 100644
index 0000000..869e37a
--- /dev/null
+++ b/test/testdocs/itemizedlist.001.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: itemizedlist.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<itemizedlist><title>YE OLDE ITEMIZEDLIST</title>
+<listitem><para>Item 1</para></listitem>
+<listitem><para>Item 1</para>
+<variablelist termlength="3pc">
+<varlistentry>
+<term>A</term><listitem><para>xxxxx</para></listitem></varlistentry>
+<varlistentry>
+<term>B</term><listitem><para>xxxxx</para></listitem></varlistentry>
+</variablelist>
+</listitem>
+<listitem><para>Item 4</para>
+</listitem>
+</itemizedlist>
+
+</article>
diff --git a/test/testdocs/itemizedlist.002.xml b/test/testdocs/itemizedlist.002.xml
new file mode 100644
index 0000000..2740d76
--- /dev/null
+++ b/test/testdocs/itemizedlist.002.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: itemizedlist.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<itemizedlist>
+ <listitem><para>Level 1</para>
+ <itemizedlist>
+ <listitem><para>Level 2</para>
+ <itemizedlist>
+ <listitem id="someOtherILI"><para>Level 3</para>
+ <itemizedlist>
+ <listitem><para>Level 4</para>
+ <itemizedlist mark="disc">
+ <listitem><para>Level 5</para>
+ <itemizedlist mark="disc">
+ <listitem override="round"><para>Level 6, override=round</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
+</listitem>
+</itemizedlist>
+
+</article>
diff --git a/test/testdocs/itemizedlist.003.xml b/test/testdocs/itemizedlist.003.xml
new file mode 100644
index 0000000..2d3781b
--- /dev/null
+++ b/test/testdocs/itemizedlist.003.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: itemizedlist.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<itemizedlist>
+ <listitem><para>some text (not compact)</para></listitem>
+ <listitem><para>some text (not compact)</para></listitem>
+ <listitem><para>some text (not compact)</para></listitem>
+ <listitem><para>some text (not compact)</para></listitem>
+ <listitem><para>some text (not compact)</para></listitem>
+ <listitem><para>some text (not compact)</para></listitem>
+ <listitem><para>some text (not compact)</para></listitem>
+</itemizedlist>
+
+<orderedlist>
+ <listitem><para>some text (not compact)</para></listitem>
+ <listitem><para>some text (not compact)</para></listitem>
+ <listitem><para>some text (not compact)</para></listitem>
+ <listitem><para>some text (not compact)</para></listitem>
+ <listitem><para>some text (not compact)</para></listitem>
+ <listitem><para>some text (not compact)</para></listitem>
+ <listitem><para>some text (not compact)</para></listitem>
+</orderedlist>
+
+<itemizedlist spacing="compact">
+ <listitem><para>some text (compact)</para></listitem>
+ <listitem><para>some text (compact)</para></listitem>
+ <listitem><para>some text (compact)</para></listitem>
+ <listitem><para>some text (compact)</para></listitem>
+ <listitem><para>some text (compact)</para></listitem>
+ <listitem><para>some text (compact)</para></listitem>
+ <listitem><para>some text (compact)</para></listitem>
+</itemizedlist>
+
+<orderedlist spacing="compact">
+ <listitem><para>some text (compact)</para></listitem>
+ <listitem><para>some text (compact)</para></listitem>
+ <listitem><para>some text (compact)</para></listitem>
+ <listitem><para>some text (compact)</para></listitem>
+ <listitem><para>some text (compact)</para></listitem>
+ <listitem><para>some text (compact)</para></listitem>
+ <listitem><para>some text (compact)</para></listitem>
+</orderedlist>
+
+</article>
diff --git a/test/testdocs/link.001.xml b/test/testdocs/link.001.xml
new file mode 100644
index 0000000..3609afb
--- /dev/null
+++ b/test/testdocs/link.001.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: link.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<section id="section"><title>Section Title</title>
+
+<para>A <link linkend="section">self-referential link</link>.</para>
+
+<para>A link without content: <link linkend="section2"/>.</para>
+
+<para>A link without content, but with an xreflabel:
+<link linkend="section2" xreflabel="stb"/>.</para>
+
+<para>A link with content and an xreflabel:
+<link linkend="section2" xreflabel="stb">here</link>.</para>
+
+</section>
+
+<section id="section2">
+<title>A Very Long Section Title That I Don't Want To Use For My XRef</title>
+<titleabbrev id="stb">Long Section Title</titleabbrev>
+
+<para>Some text with a <link linkend="section">link back</link> to the
+first section.</para>
+
+</section>
+
+</article>
diff --git a/test/testdocs/literallayout.001.xml b/test/testdocs/literallayout.001.xml
new file mode 100644
index 0000000..3ed7d45
--- /dev/null
+++ b/test/testdocs/literallayout.001.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: literallayout.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<literallayout>LiteralLayout: This is a test
+ Only a test.
+Had this been a real emegency,
+ We would have fled in terror
+And you would not have been informed.</literallayout>
+
+</article>
diff --git a/test/testdocs/literallayout.002.xml b/test/testdocs/literallayout.002.xml
new file mode 100644
index 0000000..f5a50e7
--- /dev/null
+++ b/test/testdocs/literallayout.002.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: literallayout.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<literallayout>LiteralLayout: This is a test
+ This is a test with <emphasis> embedded
+ markup</emphasis>; but still
+ Only a test.
+Had this been a real emegency,
+ We would have fled in terror
+And you would not have been informed.</literallayout>
+
+</article>
diff --git a/test/testdocs/literallayout.003.xml b/test/testdocs/literallayout.003.xml
new file mode 100644
index 0000000..b287f3e
--- /dev/null
+++ b/test/testdocs/literallayout.003.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: literallayout.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<literallayout class="monospaced">LiteralLayout(monospaced): This is a test
+ Only a test.
+Had this been a real emegency,
+ We would have fled in terror
+And you would not have been informed.</literallayout>
+
+</article>
diff --git a/test/testdocs/lot.001.xml b/test/testdocs/lot.001.xml
new file mode 100644
index 0000000..5203bed
--- /dev/null
+++ b/test/testdocs/lot.001.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!ENTITY blah "<para>Blah blah blah blah. Blah blah blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+</para>">
+]>
+<book id="book">
+<bookinfo>
+<title>Unit Test: lot.001</title>
+<releaseinfo role="CVS">$Id$
+</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</bookinfo>
+
+<chapter id="chap1"><title>First Chapter</title>
+
+&blah;
+
+<figure id="figduck1"><title>A Test Figure</title>
+<programlisting>
+A figure. Just to test the numeration.</programlisting>
+</figure>
+
+<section><title>First Section</title>
+
+&blah;
+
+</section>
+</chapter>
+
+<chapter id="chap2"><title>Second Chapter</title>
+
+&blah;
+
+<figure id="figduck2"><title>A Test Figure</title>
+<programlisting>
+A figure. Just to test the numeration.</programlisting>
+</figure>
+
+<sidebar><title>A Sidebar</title>
+
+&blah;
+
+<figure id="figduck3"><title>A Test Figure</title>
+<programlisting>
+A figure. Just to test the numeration.</programlisting>
+</figure>
+
+&blah;
+
+</sidebar>
+</chapter>
+</book>
diff --git a/test/testdocs/mathml.001.xml b/test/testdocs/mathml.001.xml
new file mode 100644
index 0000000..f7169af
--- /dev/null
+++ b/test/testdocs/mathml.001.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook MathML Module V1.0//EN"
+ "http://www.oasis-open.org/docbook/xml/mathml/1.0/dbmathml.dtd">
+
+<article id="article">
+<articleinfo>
+<title>Unit Test: mathml.001.xml</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+</articleinfo>
+
+<para>The following equation is in MathML:</para>
+
+<informalequation>
+ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML">
+ <mml:apply><mml:divide/></mml:apply>
+ </mml:math>
+</informalequation>
+
+</article>
diff --git a/test/testdocs/mediaobject.001.xml b/test/testdocs/mediaobject.001.xml
new file mode 100644
index 0000000..6ea3e76
--- /dev/null
+++ b/test/testdocs/mediaobject.001.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<?dbhtml dir="html"?>
+<articleinfo>
+<title>Unit Test: mediaobject.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ align="right"
+ width="50%"
+ fileref="graphics/duck-small.gif"
+ srccredit="O'Reilly &amp; Associates/Dover Archives"/>
+ </imageobject>
+ <imageobject>
+ <imagedata
+ align="right"
+ width="50%"
+ fileref="graphics/duck-small.png"
+ format="PNG"
+ srccredit="O'Reilly &amp; Associates/Dover Archives"/>
+ </imageobject>
+ <textobject><phrase>The DocBook: TDG Duck</phrase></textobject>
+ <textobject>
+<para>The bird on the cover of <citetitle>DocBook: The Definitive
+Guide</citetitle> is a wood duck. Often considered one of the most
+beautiful ducks in North America, the mail wood duck has a metallic
+purple and green head with white streaks extending from its bill
+around the eyes and down to its blue and green, gold-flecked
+wings. It has a white neck, chestnut-colored chest, a white or red
+bill, and yellow-orange legs and feet. Females have more brown, gray,
+and subdueed hues.
+</para>
+
+<para>Edie Freedman designed the cover of this book, using a
+19th-century engraving from the Dover Pictorial Archive. The
+cover layout was produced by Kathleen Wilson using QuarkXPress
+3.32 and Adobe's ITC Garamond font. The inside layout was
+designed by Alicia Cech, based on a series design by Nancy
+Priest. The text was formatted from SGML into FrameMaker 5.5
+with Jade, using a DSSSL conversion stylesheet written by
+Chris Maden. The interior fonts are ITC Garamond Light,
+Garamond Book, and ConstantWillison.
+</para>
+ </textobject>
+ <caption><para>The Duck</para></caption>
+ </mediaobject>
+
+</article>
diff --git a/test/testdocs/methodsynopsis.001.xml b/test/testdocs/methodsynopsis.001.xml
new file mode 100644
index 0000000..0700938
--- /dev/null
+++ b/test/testdocs/methodsynopsis.001.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article id="article">
+<articleinfo>
+<title>Unit Test: methodsynopsis.001.xml</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>Here's a <sgmltag>methodsynopsis</sgmltag> in a <sgmltag>classsynopsis</sgmltag>:
+</para>
+
+<classsynopsis>
+<ooclass>
+<classname>Foo</classname>
+</ooclass>
+<methodsynopsis>
+<modifier>public</modifier>
+<modifier>static</modifier>
+<type>double</type>
+<methodname>getQuote</methodname>
+<methodparam>
+<type>String</type>
+<parameter>symbol</parameter>
+</methodparam>
+<methodparam>
+<type>double</type>
+<parameter>price</parameter>
+</methodparam>
+</methodsynopsis>
+</classsynopsis>
+
+<para>Here's a <sgmltag>methodsynopsis</sgmltag>
+<emphasis>outside</emphasis> a <sgmltag>classsynopsis</sgmltag>:
+</para>
+
+<methodsynopsis>
+<modifier>public</modifier>
+<modifier>static</modifier>
+<type>double</type>
+<methodname>getQuote</methodname>
+<methodparam>
+<type>String</type>
+<parameter>symbol</parameter>
+</methodparam>
+<methodparam>
+<type>double</type>
+<parameter>price</parameter>
+</methodparam>
+</methodsynopsis>
+
+</article>
diff --git a/test/testdocs/note.001.xml b/test/testdocs/note.001.xml
new file mode 100644
index 0000000..fa8a477
--- /dev/null
+++ b/test/testdocs/note.001.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: note.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<note>
+<title>Who can do this</title>
+<para>All operators</para>
+</note>
+
+</article>
diff --git a/test/testdocs/olink.001.xml b/test/testdocs/olink.001.xml
new file mode 100644
index 0000000..9c21c3d
--- /dev/null
+++ b/test/testdocs/olink.001.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!ENTITY olink.001.xml SYSTEM "olink.001.xml" NDATA SGML>
+]>
+<article>
+<articleinfo>
+<title>Unit Test: olink.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+<modespec id="olink">file:///sourceforge/projects/docbook/testdocs/tests/olink.001.html</modespec>
+</articleinfo>
+
+<para>This is an <olink targetdocent="olink.001.xml" linkmode="olink">OLink</olink>
+with a linkmode. (It is self-referential).</para>
+
+<para>This is an <olink targetdocent="olink.001.xml">OLink</olink>
+without a linkmode. (It is also self-referential).</para>
+
+</article>
diff --git a/test/testdocs/orderedlist.001.xml b/test/testdocs/orderedlist.001.xml
new file mode 100644
index 0000000..e1bf0bf
--- /dev/null
+++ b/test/testdocs/orderedlist.001.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: orderedlist.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<orderedlist>
+ <listitem><para>Level 1</para>
+ <orderedlist>
+ <listitem><para>Level 2</para>
+ <orderedlist>
+ <listitem id="someOLI"><para>Level 3</para>
+ <orderedlist>
+ <listitem><para>Level 4</para>
+ <orderedlist>
+ <listitem><para>Level 5</para>
+ <orderedlist>
+ <listitem override="13"><para>Level 6, override=13</para>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ </orderedlist>
+</listitem>
+</orderedlist>
+
+</article>
diff --git a/test/testdocs/orderedlist.002.xml b/test/testdocs/orderedlist.002.xml
new file mode 100644
index 0000000..454255d
--- /dev/null
+++ b/test/testdocs/orderedlist.002.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: orderedlist.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<orderedlist numeration="loweralpha">
+ <listitem><para>Level 1, numeration="loweralpha"</para>
+ <orderedlist>
+ <listitem><para>Level 2</para>
+ <orderedlist>
+ <listitem><para>Level 3</para>
+ <orderedlist>
+ <listitem><para>Level 4</para>
+ <orderedlist>
+ <listitem><para>Level 5</para>
+ <orderedlist>
+ <listitem><para>Level 6</para>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ </orderedlist>
+</listitem>
+</orderedlist>
+
+</article>
diff --git a/test/testdocs/procedure.001.xml b/test/testdocs/procedure.001.xml
new file mode 100644
index 0000000..c7d3bfc
--- /dev/null
+++ b/test/testdocs/procedure.001.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: procedure.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<procedure id="proc"><title>Procedure Title</title>
+<step><para>Press MENUS.</para>
+</step>
+<step id="step-x"><para>Press MENUS.</para>
+</step>
+<step><para>Press MENUS.</para>
+</step>
+<step><para>Press MENUS.</para>
+</step>
+<step><para>Select SETUP.</para>
+<substeps>
+<step><para>Should be an <quote>a</quote></para>
+</step>
+<step id="step-y"><para>Should be a <quote>b</quote></para>
+</step>
+<step><para>Should be a <quote>c</quote></para>
+</step>
+<step><para>Should be a <quote>d</quote></para>
+</step>
+<step><para>should be an <quote>e</quote></para>
+<substeps>
+<step><para>should be an <quote>i</quote></para>
+</step>
+<step id="step-z"><para>should be an <quote>ii</quote></para>
+</step>
+</substeps>
+</step>
+</substeps>
+</step>
+</procedure>
+
+</article>
diff --git a/test/testdocs/procedure.002.xml b/test/testdocs/procedure.002.xml
new file mode 100644
index 0000000..21be40f
--- /dev/null
+++ b/test/testdocs/procedure.002.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: procedure.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<procedure>
+<step><para>Press MENUS.</para>
+</step>
+<step><para>Press MENUS.</para>
+</step>
+<step><para>Press MENUS.</para>
+</step>
+<step><para>Press MENUS.</para>
+</step>
+<step><title>Setup</title>
+<para>Select SETUP.</para>
+<substeps>
+<step><para>Should be an &ldquo;a&rdquo;</para>
+</step>
+<step><para>Should be a &ldquo;b&rdquo;</para>
+</step>
+<step><para>Should be a &ldquo;c&rdquo;</para>
+</step>
+<step><para>Should be a &ldquo;d&rdquo;</para>
+</step>
+<step><para>should be an &ldquo;e&rdquo;</para>
+<substeps>
+<step><para>should be an &ldquo;i&rdquo;</para>
+</step>
+<step><para>should be an &ldquo;ii&rdquo;</para>
+</step>
+</substeps>
+</step>
+</substeps>
+</step>
+</procedure>
+
+</article>
diff --git a/test/testdocs/procedure.003.xml b/test/testdocs/procedure.003.xml
new file mode 100644
index 0000000..0760f8d
--- /dev/null
+++ b/test/testdocs/procedure.003.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: procedure.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<procedure>
+<para>Do the following:</para>
+<step><para>One step?</para>
+</step>
+</procedure>
+
+</article>
diff --git a/test/testdocs/productionset.001.xml b/test/testdocs/productionset.001.xml
new file mode 100644
index 0000000..6c8d43a
--- /dev/null
+++ b/test/testdocs/productionset.001.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook EBNF Module V1.0//EN"
+ "http://www.oasis-open.org/docbook/xml/ebnf/1.0/dbebnf.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: productionset.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<productionset><title>Arithemetic Expressions</title>
+<production id="ebnf.expression">
+ <lhs>Expression</lhs>
+ <rhs><nonterminal def="#ebnf.arith">ArithExpression</nonterminal> |
+ <nonterminal def="#ebnf.mult">MultExpression</nonterminal>
+ <lineannotation>Does this grammar actually get precedence right?
+ </lineannotation>
+ </rhs>
+</production>
+<production id="ebnf.arith">
+ <lhs>ArithExpression</lhs>
+ <rhs><nonterminal def="#ebnf.expression">Expression</nonterminal>
+ '+'
+ <nonterminal def="#ebnf.mult">MultExpression</nonterminal>
+ </rhs>
+<!--
+ <rhs><nonterminal def="#ebnf.expression">Expression</nonterminal>
+ '-'
+ <nonterminal def="#ebnf.mult">MultExpression</nonterminal>
+ </rhs>
+-->
+</production>
+<production id="ebnf.mult">
+ <lhs>MultExpression</lhs>
+ <rhs><nonterminal def="#ebnf.mult">MultExpression</nonterminal>
+ '*'
+ <nonterminal def="#ebnf.mult">MultExpression</nonterminal>
+ </rhs>
+<!--
+ <rhs>
+ <nonterminal def="#ebnf.mult">MultExpression</nonterminal>
+ '/'
+ <nonterminal def="#ebnf.mult">MultExpression</nonterminal>
+ </rhs>
+-->
+ <constraint linkend="div0"/>
+<!--
+ <rhs>
+ <nonterminal def="#ebnf.number">Number</nonterminal>
+ </rhs>
+-->
+</production>
+<production id="ebnf.number">
+ <lhs>Number</lhs>
+ <rhs>[0-9]+</rhs>
+</production>
+</productionset>
+
+<constraintdef id="div0" role="Err">
+<title>Division by Zero</title>
+<para>Division by zero is an error.</para>
+</constraintdef>
+
+</article>
diff --git a/test/testdocs/productionset.002.xml b/test/testdocs/productionset.002.xml
new file mode 100644
index 0000000..65e393c
--- /dev/null
+++ b/test/testdocs/productionset.002.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook EBNF Module V1.0//EN"
+ "http://www.oasis-open.org/docbook/xml/ebnf/1.0/dbebnf.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: productionset.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<productionset><title>Character Range</title>
+<production id="NT-Char">
+<lhs>Char</lhs>
+<rhs>#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
+<!-- The above line break in the source file has nothing to do with the
+line breaks in the output. -->
+| [#x10000-#x10FFFF]
+<lineannotation>any Unicode character, excluding the surrogate
+blocks, FFFE, and FFFF.
+</lineannotation>
+</rhs>
+</production>
+</productionset>
+
+</article>
diff --git a/test/testdocs/productionset.003.xml b/test/testdocs/productionset.003.xml
new file mode 100644
index 0000000..eeaddc3
--- /dev/null
+++ b/test/testdocs/productionset.003.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook EBNF Module V1.0//EN"
+ "http://www.oasis-open.org/docbook/xml/ebnf/1.0/dbebnf.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: productionset.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<productionset><title>Standalone Document Declaration</title>
+<production id="NT-SDDecl">
+<lhs>SDDecl</lhs>
+<rhs><nonterminal def="#NT-S">S</nonterminal> 'standalone' <nonterminal def="#NT-Eq">Eq</nonterminal>
+<!-- The above line break in the source file has nothing to do with the
+line breaks in the output. -->
+(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))
+</rhs>
+<constraint linkend="check-rmd"/>
+</production>
+</productionset>
+
+<constraintdef id="check-rmd" role="VC">
+<title>Standalone Document Declaration</title>
+<para>Some description...</para>
+</constraintdef>
+
+</article>
diff --git a/test/testdocs/productionset.004.xml b/test/testdocs/productionset.004.xml
new file mode 100644
index 0000000..2702a3d
--- /dev/null
+++ b/test/testdocs/productionset.004.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook EBNF Module V1.0//EN"
+ "http://www.oasis-open.org/docbook/xml/ebnf/1.0/dbebnf.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: productionset.004</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<productionset>
+<production id="NT-SDDecl">
+<lhs>SDDecl</lhs>
+<rhs><nonterminal def="#NT-S">S</nonterminal> 'standalone' <nonterminal def="#NT-Eq">Eq</nonterminal>
+<!-- The above line break in the source file has nothing to do with the
+line breaks in the output. -->
+(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))
+</rhs>
+<constraint linkend="check-rmd"/>
+</production>
+<production id="NT-element">
+<lhs>element</lhs>
+<rhs>
+<nonterminal def="#NT-EmptyElemTag">EmptyElemTag</nonterminal>
+<sbr/><!-- There will be a line break in the output because of the sbr. -->
+| <nonterminal def="#NT-STag">STag</nonterminal> <nonterminal def="#NT-content">content</nonterminal>
+<!-- The above line break has nothing to do with the output. -->
+<nonterminal def="#NT-SDDecl"/>
+</rhs>
+<constraint linkend="GIMatch"/>
+<constraint linkend="elementvalid"/>
+</production>
+<productionrecap linkend="NT-SDDecl"/>
+</productionset>
+
+<constraintdef id="GIMatch" role="WFC">
+<title>Element Type Match</title>
+<para>Some description...</para>
+</constraintdef>
+
+<constraintdef id="elementvalid" role="VC">
+<title>Element Valid</title>
+<para>Some description...</para>
+</constraintdef>
+
+<constraintdef id="check-rmd" role="VC">
+<title>Standalone Document Declaration</title>
+<para>Some description...</para>
+</constraintdef>
+
+</article>
diff --git a/test/testdocs/productionset.005.xml b/test/testdocs/productionset.005.xml
new file mode 100644
index 0000000..56a5339
--- /dev/null
+++ b/test/testdocs/productionset.005.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook EBNF Module V1.0//EN"
+ "http://www.oasis-open.org/docbook/xml/ebnf/1.0/dbebnf.dtd">
+<book>
+<bookinfo>
+<title>Unit Test: productionset.005</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</bookinfo>
+
+<preface><title>Preface</title>
+<para>This book tests EBNF constraint links that cross chunk boundaries.</para>
+</preface>
+
+<chapter><title>EBNF</title>
+
+<productionset>
+<production id="NT-SDDecl">
+<lhs>SDDecl</lhs>
+<rhs><nonterminal def="#NT-S">S</nonterminal> 'standalone' <nonterminal def="#NT-Eq">Eq</nonterminal>
+<!-- The above line break in the source file has nothing to do with the
+line breaks in the output. -->
+(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))
+</rhs>
+<constraint linkend="check-rmd"/>
+</production>
+<production id="NT-element">
+<lhs>element</lhs>
+<rhs>
+<nonterminal def="#NT-EmptyElemTag">EmptyElemTag</nonterminal>
+<sbr/><!-- There will be a line break in the output because of the sbr. -->
+| <nonterminal def="#NT-STag">STag</nonterminal> <nonterminal def="#NT-content">content</nonterminal>
+<!-- The above line break has nothing to do with the output. -->
+<nonterminal def="#NT-SDDecl"/>
+</rhs>
+<constraint linkend="GIMatch"/>
+<constraint linkend="elementvalid"/>
+</production>
+<productionrecap linkend="NT-SDDecl"/>
+</productionset>
+
+</chapter>
+
+<chapter><title>Constraints</title>
+
+<constraintdef id="GIMatch" role="WFC">
+<title>Element Type Match</title>
+<para>Some description...</para>
+</constraintdef>
+
+<constraintdef id="elementvalid" role="VC">
+<title>Element Valid</title>
+<para>Some description...</para>
+</constraintdef>
+
+<constraintdef id="check-rmd" role="VC">
+<title>Standalone Document Declaration</title>
+<para>Some description...</para>
+</constraintdef>
+
+<constraintdef id="NT-S">
+<title>NT-S</title>
+<para>Just for link integrity...</para>
+</constraintdef>
+
+<constraintdef id="NT-Eq">
+<title>NT-Eq</title>
+<para>Just for link integrity...</para>
+</constraintdef>
+
+<constraintdef id="NT-EmptyElemTag">
+<title>NT-EmptyElemTag</title>
+<para>Just for link integrity...</para>
+</constraintdef>
+
+<constraintdef id="NT-STag">
+<title>NT-STag</title>
+<para>Just for link integrity...</para>
+</constraintdef>
+
+<constraintdef id="NT-content">
+<title>NT-content</title>
+<para>Just for link integrity...</para>
+</constraintdef>
+
+</chapter>
+</book>
diff --git a/test/testdocs/programlisting.001.xml b/test/testdocs/programlisting.001.xml
new file mode 100644
index 0000000..1886ac3
--- /dev/null
+++ b/test/testdocs/programlisting.001.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: programlisting.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<programlisting linenumbering="numbered">ProgramListing: This is a test
+ Only a test.
+Had this been a real emegency,
+ We would have fled in terror
+And you would not have been informed.</programlisting>
+
+</article>
diff --git a/test/testdocs/programlisting.002.xml b/test/testdocs/programlisting.002.xml
new file mode 100644
index 0000000..1c7f4bb
--- /dev/null
+++ b/test/testdocs/programlisting.002.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: programlisting.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<programlisting><inlinemediaobject>
+<imageobject>
+<imagedata format="linespecific" fileref="tests/programlisting.002.xml"/>
+</imageobject>
+</inlinemediaobject></programlisting>
+
+</article>
diff --git a/test/testdocs/programlisting.003.xml b/test/testdocs/programlisting.003.xml
new file mode 100644
index 0000000..39cdf22
--- /dev/null
+++ b/test/testdocs/programlisting.003.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: programlisting.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<programlisting linenumbering="numbered">@rem = '--*-Perl-*--
+@echo off
+perl.exe %_batchname %$
+goto endofperl
+@rem ';
+
+# Compress mail...
+
+require 'n:/home/nwalsh/lib/cygnus.pl';
+require 'timelocal.pl';
+use Cwd;
+
+select (STDERR); $| = 1;
+select (STDOUT); $| = 1;
+
+@DIRS = ("/home/nwalsh/Mail");
+while (@DIRS) {
+ $dir = shift @DIRS;
+ opendir (DIR, $dir);
+ while ($fname = readdir(DIR)) {
+ $file = "$dir/$fname";
+ next if ! -d $file;
+ next if $fname =~ /^\.\.?$/;
+
+ print "$file\n";
+ push (@DIRS, $file);
+ &amp;compress ($file);
+ }
+}
+
+exit;</programlisting>
+
+</article>
diff --git a/test/testdocs/programlistingco.001.xml b/test/testdocs/programlistingco.001.xml
new file mode 100644
index 0000000..10735c7
--- /dev/null
+++ b/test/testdocs/programlistingco.001.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: programlistingco.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<programlistingco>
+<areaspec>
+<area coords="1" id="prologue"/>
+<area coords="4" id="skipeof"/>
+<areaset coords="" id="xreq">
+<area coords="9" id="require1"/>
+<area coords="10" id="require2"/>
+</areaset>
+<area coords="11 12" id="use"/>
+<area coords="27" id="funccall"/>
+</areaspec>
+<programlisting>@rem = '--*-Perl-*--
+@echo off
+perl.exe %_batchname %$
+goto endofperl
+@rem ';
+
+# Compress mail...
+
+require 'n:/home/nwalsh/lib/cygnus.pl';
+require 'timelocal.pl';
+use Cwd;
+
+select (STDERR); $| = 1;
+select (STDOUT); $| = 1;
+
+@DIRS = ("/home/nwalsh/Mail");
+while (@DIRS) {
+ $dir = shift @DIRS;
+ opendir (DIR, $dir);
+ while ($fname = readdir(DIR)) {
+ $file = "$dir/$fname";
+ next if ! -d $file;
+ next if $fname =~ /^\.\.?$/;
+
+ print "$file\n";
+ push (@DIRS, $file);
+ &amp;compress ($file);
+ }
+}
+
+exit;</programlisting>
+<calloutlist>
+<callout arearefs="prologue">
+<para>The prologue handles embedding a Perl script in a DOS batch file.</para>
+</callout>
+<callout arearefs="skipeof">
+<para>The <literal>goto</literal> statement, interpreted by the DOS batch
+file interpreter, skips over the body of the Perl script.</para>
+</callout>
+<callout arearefs="require1">
+<para>The <literal>require</literal> statement sources in external program
+fragments.</para>
+</callout>
+<callout arearefs="use">
+<para>The <literal>use</literal> statement is similar, but has additional
+utility. It is a Perl5 function. (Note that this callout area specifies
+both a line and a column.)</para>
+</callout>
+<callout arearefs="funccall">
+<para>This is a user subroutine call.</para>
+</callout>
+</calloutlist>
+</programlistingco>
+
+</article>
diff --git a/test/testdocs/programlistingco.002.xml b/test/testdocs/programlistingco.002.xml
new file mode 100644
index 0000000..972aa32
--- /dev/null
+++ b/test/testdocs/programlistingco.002.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: programlistingco.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<programlistingco>
+<areaspec>
+<area coords="1" id="prologue2"/>
+<area coords="4" id="skipeof2"/>
+<areaset coords="" id="xreq2">
+<area coords="9" id="require12"/>
+<area coords="10" id="require22"/>
+</areaset>
+<area coords="11 12" id="use2"/>
+<area coords="27" id="funccall2"/>
+</areaspec>
+<programlisting linenumbering="numbered"
+><?dbhtml linenumbering.everyNth="2" linenumbering.separator=" >"
+?><?dbfo linenumbering.everyNth="2" linenumbering.separator=" >"
+?><inlinemediaobject>
+<imageobject>
+<imagedata format="linespecific" fileref="sample.txt"/>
+</imageobject>
+</inlinemediaobject></programlisting>
+</programlistingco>
+
+</article>
diff --git a/test/testdocs/qandaset.001.xml b/test/testdocs/qandaset.001.xml
new file mode 100644
index 0000000..c217a25
--- /dev/null
+++ b/test/testdocs/qandaset.001.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: qandaset.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>What about <xref linkend="Two"/>?</para>
+
+ <qandaset defaultlabel='number'>
+ <?dbhtml table-summary="summary"?>
+ <qandaentry id="qa1">
+ <question id="q1"><para>Question one.</para></question>
+ <answer id="a1">
+ <para>Answer one.
+See <xref linkend="faq-Two"/></para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry id="Two">
+ <question id="faq-Two"><para>Question two.</para></question>
+ <answer id="faa-Two">
+ <para>Answer two.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry id="Twoc">
+ <question id="faq-Twoc"><para>Question two.</para></question>
+ <answer id="faa-Twoc">
+ <orderedlist>
+ <listitem><para>testing a list</para></listitem>
+ <listitem><para>testing a list</para></listitem>
+ <listitem><para>testing a list</para></listitem>
+ </orderedlist>
+ </answer>
+ </qandaentry>
+
+ </qandaset>
+
+</article>
diff --git a/test/testdocs/qandaset.002.xml b/test/testdocs/qandaset.002.xml
new file mode 100644
index 0000000..8fea46f
--- /dev/null
+++ b/test/testdocs/qandaset.002.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: qandaset.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+ <qandaset>
+ <?dbhtml toc="0"?>
+ <qandaentry id="qa1">
+ <question id="q1">
+ <para>Blah blah blah.</para>
+ </question>
+ <answer id="a1">
+ <example>
+ <title><filename
+ moreinfo="none">file.name</filename></title>
+ <programlisting format="linespecific">// Hello, World</programlisting>
+ </example>
+ <example>
+ <title><filename
+ moreinfo="none">file2.name</filename></title>
+ <programlisting format="linespecific">// Goodbye, World</programlisting>
+ </example>
+ </answer>
+ </qandaentry>
+ </qandaset>
+
+
+</article>
diff --git a/test/testdocs/qandaset.003.xml b/test/testdocs/qandaset.003.xml
new file mode 100644
index 0000000..30a628d
--- /dev/null
+++ b/test/testdocs/qandaset.003.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: qandaset.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+ <qandaset>
+ <title>QandA Title</title>
+<para>Some introductory preamble. Some introductory preamble.
+Some introductory preamble. Some introductory preamble.
+Some introductory preamble. Some introductory preamble.
+Some introductory preamble. Some introductory preamble.</para>
+<para>Some introductory preamble. Some introductory preamble.
+Some introductory preamble. Some introductory preamble.
+Some introductory preamble. Some introductory preamble.
+Some introductory preamble. Some introductory preamble.</para>
+ <qandadiv><title>Division 1</title>
+ <qandaentry>
+ <question>
+ <para>Blah blah blah.</para>
+ </question>
+ <answer>
+ <example>
+ <title><filename
+ moreinfo="none">file.name</filename></title>
+ <programlisting format="linespecific">// Hello, World</programlisting>
+ </example>
+ <example>
+ <title><filename
+ moreinfo="none">file2.name</filename></title>
+ <programlisting format="linespecific">// Goodbye, World</programlisting>
+ </example>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ <qandadiv><title>Division 2</title>
+<para>Some introductory preamble. Some introductory preamble.
+Some introductory preamble. Some introductory preamble.
+Some introductory preamble. Some introductory preamble.
+Some introductory preamble. Some introductory preamble.</para>
+<para>Some introductory preamble. Some introductory preamble.
+Some introductory preamble. Some introductory preamble.
+Some introductory preamble. Some introductory preamble.
+Some introductory preamble. Some introductory preamble.</para>
+ <qandadiv><title>Division 2.1</title>
+ <qandaentry>
+ <question>
+ <para>Blah blah blah.</para>
+ </question>
+ <answer>
+ <example>
+ <title><filename
+ moreinfo="none">file.name</filename></title>
+ <programlisting format="linespecific">// Hello, World</programlisting>
+ </example>
+ <example>
+ <title><filename
+ moreinfo="none">file2.name</filename></title>
+ <programlisting format="linespecific">// Goodbye, World</programlisting>
+ </example>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ <qandadiv><title>Division 2.2</title>
+ <qandaentry>
+ <question>
+ <para>Blah blah blah.</para>
+ </question>
+ <answer>
+ <example>
+ <title><filename
+ moreinfo="none">file.name</filename></title>
+ <programlisting format="linespecific">// Hello, World</programlisting>
+ </example>
+ <example>
+ <title><filename
+ moreinfo="none">file2.name</filename></title>
+ <programlisting format="linespecific">// Goodbye, World</programlisting>
+ </example>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ </qandadiv>
+ </qandaset>
+
+</article>
diff --git a/test/testdocs/refentry.001.xml b/test/testdocs/refentry.001.xml
new file mode 100644
index 0000000..050068b
--- /dev/null
+++ b/test/testdocs/refentry.001.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: refentry.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<refentry id="minimal">
+<refnamediv>
+<refname>Minimal</refname>
+<refpurpose>Test of a minimal RefEntry</refpurpose>
+</refnamediv>
+
+<refsect1>
+<title>Description</title>
+<para>This is a minimal RefEntry.</para>
+</refsect1>
+</refentry>
+
+</article>
diff --git a/test/testdocs/refentry.002.xml b/test/testdocs/refentry.002.xml
new file mode 100644
index 0000000..b7360d4
--- /dev/null
+++ b/test/testdocs/refentry.002.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: refentry.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<refentry id="lessminimal">
+<refmeta>
+<refentrytitle>Also Minimal Title</refentrytitle>
+<manvolnum>3</manvolnum>
+</refmeta>
+<refnamediv>
+<refname>Also Minimal</refname>
+<refpurpose>Another test of a minimal RefEntry</refpurpose>
+</refnamediv>
+
+<refsect1>
+<title>Description</title>
+<para>This is a minimal RefEntry.</para>
+</refsect1>
+</refentry>
+
+</article>
diff --git a/test/testdocs/refentry.003.xml b/test/testdocs/refentry.003.xml
new file mode 100644
index 0000000..d318e94
--- /dev/null
+++ b/test/testdocs/refentry.003.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: refentry.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<refentry id="evenlessminimal">
+<refmeta>
+<refentrytitle>Fred</refentrytitle>
+<manvolnum>3</manvolnum>
+</refmeta>
+<refnamediv>
+<refname>Less Minimal</refname>
+<refname>Even Less Minimal</refname>
+<refpurpose>Test of a minimal RefEntry</refpurpose>
+</refnamediv>
+<refsynopsisdiv><title>Synopsis</title>
+<cmdsynopsis>
+<command>command</command>
+<group><arg choice="plain">-a</arg><arg choice="plain">-alpha</arg>
+</group>
+</cmdsynopsis>
+<cmdsynopsis>
+<command>command</command>
+<group><arg choice="plain">-b</arg><arg choice="plain">-beta</arg>
+</group>
+</cmdsynopsis>
+<cmdsynopsis>
+<command>command</command>
+<group choice="plain"><arg choice="plain">-c</arg><arg choice="plain">
+-charlie</arg>
+</group>
+</cmdsynopsis>
+<cmdsynopsis>
+<command>command</command>
+<group choice="plain"><arg choice="plain">-d</arg><arg choice="plain">
+-delta</arg>
+</group>
+</cmdsynopsis>
+<cmdsynopsis>
+<command>command</command>
+<arg choice="plain">--help</arg>
+</cmdsynopsis>
+</refsynopsisdiv>
+
+<refsect1>
+<title>Description</title>
+<para>This is a less minimal RefEntry.</para>
+
+<figure><title>Some Program</title>
+<programlisting>Testing
+Some
+Text</programlisting>
+</figure>
+
+</refsect1>
+</refentry>
+
+</article>
diff --git a/test/testdocs/refentry.004.xml b/test/testdocs/refentry.004.xml
new file mode 100644
index 0000000..d175f16
--- /dev/null
+++ b/test/testdocs/refentry.004.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: refentry.004</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>Test an <sgmltag>xref</sgmltag> to <sgmltag>refnamediv</sgmltag>:
+<xref linkend="lm"/>.</para>
+
+<refentry id="evenlessminimal">
+<refmeta>
+<refentrytitle>Fred</refentrytitle>
+<manvolnum>3</manvolnum>
+</refmeta>
+<refnamediv id="lm">
+<refname>Less Minimal</refname>
+<refname>Even Less Minimal</refname>
+<refpurpose>Test of a minimal RefEntry</refpurpose>
+</refnamediv>
+<refsynopsisdiv><title>Synopsis</title>
+<cmdsynopsis>
+<command>command</command>
+<group><arg choice="plain">-a</arg><arg choice="plain">-alpha</arg>
+</group>
+</cmdsynopsis>
+<cmdsynopsis>
+<command>command</command>
+<group><arg choice="plain">-b</arg><arg choice="plain">-beta</arg>
+</group>
+</cmdsynopsis>
+<cmdsynopsis>
+<command>command</command>
+<group choice="plain"><arg choice="plain">-c</arg><arg choice="plain">
+-charlie</arg>
+</group>
+</cmdsynopsis>
+<cmdsynopsis>
+<command>command</command>
+<group choice="plain"><arg choice="plain">-d</arg><arg choice="plain">
+-delta</arg>
+</group>
+</cmdsynopsis>
+<cmdsynopsis>
+<command>command</command>
+<arg choice="plain">--help</arg>
+</cmdsynopsis>
+</refsynopsisdiv>
+
+<refsect1>
+<title>Description</title>
+<para>This is a less minimal RefEntry.</para>
+
+<figure><title>Some Program</title>
+<programlisting>Testing
+Some
+Text</programlisting>
+</figure>
+
+</refsect1>
+</refentry>
+
+</article>
diff --git a/test/testdocs/reference.001.xml b/test/testdocs/reference.001.xml
new file mode 100644
index 0000000..99f19b6
--- /dev/null
+++ b/test/testdocs/reference.001.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<reference>
+<referenceinfo>
+<title>Unit Test: reference.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</referenceinfo>
+
+<refentry id="minimal">
+<refnamediv>
+<refname>Minimal</refname>
+<refpurpose>Test of a minimal RefEntry</refpurpose>
+</refnamediv>
+
+<refsect1>
+<title>Description</title>
+<para>This is a minimal RefEntry.</para>
+</refsect1>
+</refentry>
+
+<refentry id="lessminimal">
+<refmeta>
+<refentrytitle>Also Minimal Title</refentrytitle>
+<manvolnum>3</manvolnum>
+</refmeta>
+<refnamediv>
+<refname>Also Minimal</refname>
+<refpurpose>Another test of a minimal RefEntry</refpurpose>
+</refnamediv>
+
+<refsect1>
+<title>Description</title>
+<para>This is a minimal RefEntry.</para>
+</refsect1>
+</refentry>
+
+<refentry id="evenlessminimal">
+<refmeta>
+<refentrytitle>Fred</refentrytitle>
+<manvolnum>3</manvolnum>
+</refmeta>
+<refnamediv>
+<refname>Less Minimal</refname>
+<refname>Even Less Minimal</refname>
+<refpurpose>Test of a minimal RefEntry</refpurpose>
+</refnamediv>
+
+<refsect1>
+<title>Description</title>
+<para>This is a minimal RefEntry.</para>
+</refsect1>
+</refentry>
+
+</reference>
+
diff --git a/test/testdocs/revhistory.001.xml b/test/testdocs/revhistory.001.xml
new file mode 100644
index 0000000..c50d72a
--- /dev/null
+++ b/test/testdocs/revhistory.001.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article id="article">
+<articleinfo>
+<title>Unit Test: revhistory.001.xml</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+<revhistory>
+<revision>
+<revnumber>1.0</revnumber>
+<date>13 Mar 2002</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark.</revremark>
+</revision>
+<revision>
+<revnumber>0.9</revnumber>
+<date>20 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+<revision>
+<revnumber>0.8</revnumber>
+<date>19 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+<revision>
+<revnumber>0.7</revnumber>
+<date>18 Nov 1998</date>
+<authorinitials>ndw</authorinitials>
+<revremark>Some remark about the revision</revremark>
+</revision>
+</revhistory>
+</articleinfo>
+
+<para>This article tests revhistory. It appears in the articleinfo.</para>
+
+</article>
diff --git a/test/testdocs/screen.001.xml b/test/testdocs/screen.001.xml
new file mode 100644
index 0000000..3e81fe4
--- /dev/null
+++ b/test/testdocs/screen.001.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: screen.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<screen>
+(let <co id="dl1"/>loopvar <co id="dl2"/>((count 1))
+ <co id="dl3"/>(if (> count 10)
+ <co id="dl4"/>#t
+ (<co id="dl5"/>loopvar <co id="dl6"/>(+ count 1))))</screen>
+
+</article>
diff --git a/test/testdocs/sect1.001.xml b/test/testdocs/sect1.001.xml
new file mode 100644
index 0000000..4dd328e
--- /dev/null
+++ b/test/testdocs/sect1.001.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: sect1.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+ <sect1 id="c1s1"><title>Section 1</title>
+ <para>blah.</para>
+ <sect2 id="c1s1s1"><title>Section 1.1</title>
+ <para>blah.</para>
+ <sect3 id="c1s1s1s1"><title>Section 1.1.1</title>
+ <para>blah.</para>
+ <sect4 id="c1s1s1s1s1"><title>Section 1.1.1.1</title>
+ <para>blah.</para>
+ <sect5 id="c1s1s1s1s1s1"><title>Section 1.1.1.1.1</title>
+ <para>blah.</para>
+ </sect5>
+ <sect5 id="c1s1s1s1s1s2"><title>Section 1.1.1.1.2</title>
+ <para>blah.</para>
+ </sect5>
+ <sect5 id="c1s1s1s1s1s3"><title>Section 1.1.1.1.3</title>
+ <para>blah.</para>
+ </sect5>
+ </sect4>
+ <sect4 id="c1s1s1s1s2"><title>Section 1.1.1.2</title>
+ <para>blah.</para>
+ </sect4>
+ <sect4 id="c1s1s1s1s3"><title>Section 1.1.1.3</title>
+ <para>blah.</para>
+ </sect4>
+ </sect3>
+ <sect3 id="c1s1s1s2"><title>Section 1.1.2</title>
+ <para>blah.</para>
+ </sect3>
+ <sect3 id="c1s1s1s3"><title>Section 1.1.3</title>
+ <para>blah.</para>
+ </sect3>
+ </sect2>
+ <sect2 id="c1s1s2"><title>Section 1.2</title>
+ <para>blah.</para>
+ </sect2>
+ <sect2 id="c1s1s3"><title>Section 1.3</title>
+ <para>blah.</para>
+ </sect2>
+ </sect1>
+
+</article>
diff --git a/test/testdocs/sect1.002.xml b/test/testdocs/sect1.002.xml
new file mode 100644
index 0000000..bfb4ace
--- /dev/null
+++ b/test/testdocs/sect1.002.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: sect1.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+ <sect1 id="c1s2"><title>Section 2</title>
+ <para>blah.</para>
+ <sect2 id="c1s2s1"><title>Section 2.1</title>
+ <para>blah.</para>
+ <sect3 id="c1s2s1s1"><title>Section 2.1.1</title>
+ <para>blah.</para>
+ <sect4 id="c1s2s1s1s1"><title>Section 2.1.1.1</title>
+ <para>blah.</para>
+ <sect5 id="c1s2s1s1s1s1s"><title>Section 2.1.1.1.1</title>
+ <para>blah.</para>
+ </sect5>
+ <sect5 id="c1s2s1s1s1s2"><title>Section 2.1.1.1.2</title>
+ <para>blah.</para>
+ </sect5>
+ <sect5 id="c1s2s1s1s1s3"><title>Section 2.1.1.1.3</title>
+ <para>blah.</para>
+ </sect5>
+ </sect4>
+ <sect4 id="c1s2s1s1s2"><title>Section 2.1.1.2</title>
+ <para>blah.</para>
+ </sect4>
+ <sect4 id="c1s2s1s1s3"><title>Section 2.1.1.3</title>
+ <para>blah.</para>
+ </sect4>
+ </sect3>
+ <sect3 id="c1s2s1s2"><title>Section 2.1.2</title>
+ <para>blah.</para>
+ </sect3>
+ <sect3 id="c1s2s1s3"><title>Section 2.1.3</title>
+ <para>blah.</para>
+ </sect3>
+ </sect2>
+ <sect2 id="c1s2s2"><title>Section 2.2</title>
+ <para>blah.</para>
+ </sect2>
+ <sect2 id="c1s2s3"><title>Section 2.3</title>
+ <para>blah.</para>
+ </sect2>
+ </sect1>
+ <sect1 id="c1s3"><title>Section 3</title>
+ <para>blah.</para>
+ </sect1>
+
+</article>
diff --git a/test/testdocs/section.001.xml b/test/testdocs/section.001.xml
new file mode 100644
index 0000000..e4fbe83
--- /dev/null
+++ b/test/testdocs/section.001.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: section.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+ <section id="c2s1"><title>Section 1</title>
+ <para>blah.</para>
+ <section id="c2s1s1"><title>Section 1.1</title>
+ <para>blah.</para>
+ <section id="c2s1s1s1"><title>Section 1.1.1</title>
+ <para>blah.</para>
+ <section id="c2s1s1s1s1"><title>Section 1.1.1.1</title>
+ <para>blah.</para>
+ <section id="c2s1s1s1s1s1"><title>Section 1.1.1.1.1</title>
+ <para>blah.</para>
+ </section>
+ <section id="c2s1s1s1s1s2"><title>Section 1.1.1.1.2</title>
+ <para>blah.</para>
+ </section>
+ <section id="c2s1s1s1s1s3"><title>Section 1.1.1.1.3</title>
+ <para>blah.</para>
+ </section>
+ </section>
+ <section id="c2s1s1s1s2"><title>Section 1.1.1.2</title>
+ <para>blah.</para>
+ </section>
+ <section id="c2s1s1s1s3"><title>Section 1.1.1.3</title>
+ <para>blah.</para>
+ </section>
+ </section>
+ <section id="c2s1s1s2"><title>Section 1.1.2</title>
+ <para>blah.</para>
+ </section>
+ <section id="c2s1s1s3"><title>Section 1.1.3</title>
+ <para>blah.</para>
+ </section>
+ </section>
+ <section id="c2s1s2"><title>Section 1.2</title>
+ <para>blah.</para>
+ </section>
+ <section id="c2s1s3"><title>Section 1.3</title>
+ <para>blah.</para>
+ </section>
+ </section>
+
+</article>
diff --git a/test/testdocs/section.002.xml b/test/testdocs/section.002.xml
new file mode 100644
index 0000000..b2eeb5a
--- /dev/null
+++ b/test/testdocs/section.002.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: section.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+ <section id="c2s2"><title>Section 2</title>
+ <para>blah.</para>
+ <section id="c2s2s1"><title>Section 2.1</title>
+ <para>blah.</para>
+ <section id="c2s2s1s1"><title>Section 2.1.1</title>
+ <para>blah.</para>
+ <section id="c2s2s1s1s1"><title>Section 2.1.1.1</title>
+ <para>blah.</para>
+ <section id="c2s2s1s1s1s1s"><title>Section 2.1.1.1.1</title>
+ <para>blah.</para>
+ </section>
+ <section id="c2s2s1s1s1s2"><title>Section 2.1.1.1.2</title>
+ <para>blah.</para>
+ </section>
+ <section id="c2s2s1s1s1s3"><title>Section 2.1.1.1.3</title>
+ <para>blah.</para>
+ </section>
+ </section>
+ <section id="c2s2s1s1s2"><title>Section 2.1.1.2</title>
+ <para>blah.</para>
+ </section>
+ <section id="c2s2s1s1s3"><title>Section 2.1.1.3</title>
+ <para>blah.</para>
+ </section>
+ </section>
+ <section id="c2s2s1s2"><title>Section 2.1.2</title>
+ <para>blah.</para>
+ </section>
+ <section id="c2s2s1s3"><title>Section 2.1.3</title>
+ <para>blah.</para>
+ </section>
+ </section>
+ <section id="c2s2s2"><title>Section 2.2</title>
+ <para>blah.</para>
+ </section>
+ <section id="c2s2s3"><title>Section 2.3</title>
+ <para>blah.</para>
+ </section>
+ </section>
+ <section id="c2s3"><title>Section 3</title>
+ <para>blah.</para>
+ </section>
+
+</article>
diff --git a/test/testdocs/section.003.xml b/test/testdocs/section.003.xml
new file mode 100644
index 0000000..44e09cb
--- /dev/null
+++ b/test/testdocs/section.003.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: section.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+ <section id="c2s1"><title>This is a Section Title.</title>
+ <para>blah.</para>
+ <section id="c2s1s1"><title>This is a Really Long Section Title That's Almost Certainly Bound to Wrap Around on the Page</title>
+ <para>blah.</para>
+ </section>
+ </section>
+
+</article>
diff --git a/test/testdocs/segmentedlist.001.xml b/test/testdocs/segmentedlist.001.xml
new file mode 100644
index 0000000..f7b4572
--- /dev/null
+++ b/test/testdocs/segmentedlist.001.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: segmentedlist.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<segmentedlist><title>State Capitals</title>
+<segtitle>State</segtitle>
+<segtitle>Capital</segtitle>
+<seglistitem><seg>Alabama</seg><seg>Montgomery</seg></seglistitem>
+<seglistitem><seg>Alaska</seg><seg>Anchorage</seg></seglistitem>
+<seglistitem><seg>Arkansas</seg><seg>Little Rock</seg></seglistitem>
+</segmentedlist>
+
+</article>
diff --git a/test/testdocs/segmentedlist.002.xml b/test/testdocs/segmentedlist.002.xml
new file mode 100644
index 0000000..1180b70
--- /dev/null
+++ b/test/testdocs/segmentedlist.002.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: segmentedlist.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<segmentedlist><title>State Capitals</title>
+<?dbhtml list-presentation='table' table-summary="testing summary"?>
+<?dbfo list-presentation='table'?>
+<segtitle>State</segtitle>
+<segtitle>Capital</segtitle>
+<seglistitem><seg>Alabama</seg><seg>Montgomery</seg></seglistitem>
+<seglistitem><seg>Alaska</seg><seg>Anchorage</seg></seglistitem>
+<seglistitem><seg>Arkansas</seg><seg>Little Rock</seg></seglistitem>
+</segmentedlist>
+
+</article>
diff --git a/test/testdocs/set.001.xml b/test/testdocs/set.001.xml
new file mode 100644
index 0000000..3d17612
--- /dev/null
+++ b/test/testdocs/set.001.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<set>
+<setinfo>
+<title>Unit Test: set.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</setinfo>
+
+<book><title>First Book</title>
+<chapter><title>Chapter</title>
+<para>Some test data</para>
+</chapter>
+</book>
+
+<book><title>Second Book</title>
+<chapter><title>Chapter</title>
+<para>Some test data</para>
+</chapter>
+</book>
+
+<book><title>Third Book</title>
+<chapter><title>Chapter</title>
+<para>Some test data</para>
+</chapter>
+</book>
+
+</set>
diff --git a/test/testdocs/stamp.001.xml b/test/testdocs/stamp.001.xml
new file mode 100644
index 0000000..bcd4fb5
--- /dev/null
+++ b/test/testdocs/stamp.001.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: stamp.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>The stamp image has a natural size of 200x128 pixels.</para>
+
+<para>The stamp image.</para>
+
+<mediaobject>
+ <imageobject>
+ <?dbhtml background-color="blue"?>
+ <imagedata
+ fileref="graphics/stamp.png"/>
+ </imageobject>
+ <textobject><phrase>The DocBook Stamp</phrase></textobject>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/stamp.002.xml b/test/testdocs/stamp.002.xml
new file mode 100644
index 0000000..1f7e7e6
--- /dev/null
+++ b/test/testdocs/stamp.002.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: stamp.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>The stamp image has a natural size of 200x128 pixels.</para>
+
+<para>The stamp image: width=400; depth=512; contentdepth=200; align=center; valign=bottom</para>
+
+<mediaobject>
+ <imageobject>
+ <?dbhtml background-color="green"?>
+ <imagedata
+ width="400"
+ depth="512"
+ contentdepth="200"
+ align="center"
+ valign="bottom"
+ fileref="graphics/stamp.png"/>
+ </imageobject>
+ <textobject><phrase>The DocBook Stamp</phrase></textobject>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/stamp.003.xml b/test/testdocs/stamp.003.xml
new file mode 100644
index 0000000..ce26882
--- /dev/null
+++ b/test/testdocs/stamp.003.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: stamp.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>The stamp image has a natural size of 200x128 pixels.</para>
+
+<para>The stamp image: width=512; depth=512; contentwidth=256; contentdepth=384</para>
+
+<mediaobject>
+ <imageobject>
+ <?dbhtml background-color="blue"?>
+ <imagedata
+ width="512"
+ depth="512"
+ contentwidth="256"
+ contentdepth="384"
+ fileref="graphics/stamp.png"/>
+ </imageobject>
+ <textobject><phrase>The DocBook Stamp</phrase></textobject>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/stamp.004.xml b/test/testdocs/stamp.004.xml
new file mode 100644
index 0000000..5908d81
--- /dev/null
+++ b/test/testdocs/stamp.004.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: stamp.004</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>The stamp image has a natural size of 200x128 pixels.</para>
+
+<para>The stamp image: width=512; depth=512; scale=125; align=center</para>
+
+<mediaobject>
+ <imageobject>
+ <?dbhtml background-color="blue"?>
+ <imagedata
+ width="512"
+ depth="512"
+ scale="125"
+ align="center"
+ fileref="graphics/stamp.png"/>
+ </imageobject>
+ <textobject><phrase>The DocBook Stamp</phrase></textobject>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/stamp.005.xml b/test/testdocs/stamp.005.xml
new file mode 100644
index 0000000..39ec55a
--- /dev/null
+++ b/test/testdocs/stamp.005.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: stamp.005</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>The stamp image has a natural size of 200x128 pixels.</para>
+
+<para>The stamp image: width=512; depth=512 (scalefit=1 by default in this case)</para>
+
+<mediaobject>
+ <imageobject>
+ <?dbhtml background-color="blue"?>
+ <imagedata
+ width="512"
+ depth="512"
+ fileref="graphics/stamp.png"/>
+ </imageobject>
+ <textobject><phrase>The DocBook Stamp</phrase></textobject>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/stamp.006.xml b/test/testdocs/stamp.006.xml
new file mode 100644
index 0000000..d5e20a1
--- /dev/null
+++ b/test/testdocs/stamp.006.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: stamp.006</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>The stamp image has a natural size of 200x128 pixels.</para>
+
+<para>The stamp image: width=512; depth=512; scalefit=0</para>
+
+<mediaobject>
+ <imageobject>
+ <?dbhtml background-color="blue"?>
+ <imagedata
+ width="512"
+ depth="512"
+ scalefit="0"
+ fileref="graphics/stamp.png"/>
+ </imageobject>
+ <textobject><phrase>The DocBook Stamp</phrase></textobject>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/stamp.007.xml b/test/testdocs/stamp.007.xml
new file mode 100644
index 0000000..519843a
--- /dev/null
+++ b/test/testdocs/stamp.007.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: stamp.007</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>The stamp image has a natural size of 200x128 pixels.</para>
+
+<para>The stamp image: width=512; depth=512; scale=75</para>
+
+<mediaobject>
+ <imageobject>
+ <?dbhtml background-color="blue"?>
+ <imagedata
+ width="512"
+ depth="512"
+ scale="75"
+ fileref="graphics/stamp.png"/>
+ </imageobject>
+ <textobject><phrase>The DocBook Stamp</phrase></textobject>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/stamp.008.xml b/test/testdocs/stamp.008.xml
new file mode 100644
index 0000000..1b3bdec
--- /dev/null
+++ b/test/testdocs/stamp.008.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: stamp.008</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>The stamp image has a natural size of 200x128 pixels.</para>
+
+<para>The stamp image: contentwidth=50%</para>
+
+<mediaobject>
+ <imageobject>
+ <?dbhtml background-color="blue"?>
+ <imagedata
+ contentwidth="50%"
+ fileref="graphics/stamp.png"/>
+ </imageobject>
+ <textobject><phrase>The DocBook Stamp</phrase></textobject>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/stamp.009.xml b/test/testdocs/stamp.009.xml
new file mode 100644
index 0000000..836df5b
--- /dev/null
+++ b/test/testdocs/stamp.009.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: stamp.009</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>The stamp image has a natural size of 200x128 pixels.</para>
+
+<para>The stamp image: contentwidth=50%; scale=125</para>
+
+<mediaobject>
+ <imageobject>
+ <?dbhtml background-color="blue"?>
+ <imagedata
+ contentwidth="50%"
+ scale="125"
+ fileref="graphics/stamp.png"/>
+ </imageobject>
+ <textobject><phrase>The DocBook Stamp</phrase></textobject>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/stamp.010.xml b/test/testdocs/stamp.010.xml
new file mode 100644
index 0000000..470b860
--- /dev/null
+++ b/test/testdocs/stamp.010.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: stamp.010</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>The stamp image has a natural size of 200x128 pixels.</para>
+
+<para>The stamp image: contentwidth=50%; contentdepth=50%</para>
+
+<mediaobject>
+ <imageobject>
+ <?dbhtml background-color="blue"?>
+ <imagedata
+ contentwidth="50%"
+ contentdepth="50%"
+ fileref="graphics/stamp.png"/>
+ </imageobject>
+ <textobject><phrase>The DocBook Stamp</phrase></textobject>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/stamp.011.xml b/test/testdocs/stamp.011.xml
new file mode 100644
index 0000000..8b19495
--- /dev/null
+++ b/test/testdocs/stamp.011.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: stamp.011</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>The stamp image has a natural size of 200x128 pixels.</para>
+
+<para>The stamp image: width=400; depth=512; scalefit=1; align=center; valign=bottom</para>
+
+<mediaobject>
+ <imageobject>
+ <?dbhtml background-color="green"?>
+ <imagedata
+ width="400"
+ depth="512"
+ scalefit="1"
+ align="center"
+ valign="bottom"
+ fileref="graphics/stamp.png"/>
+ </imageobject>
+ <textobject><phrase>The DocBook Stamp</phrase></textobject>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/stamp.012.xml b/test/testdocs/stamp.012.xml
new file mode 100644
index 0000000..22e9c80
--- /dev/null
+++ b/test/testdocs/stamp.012.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: stamp.012</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>The stamp image has a natural size of 200x128 pixels.</para>
+
+<para>The stamp image: width=75%; scalefit=1</para>
+
+<mediaobject>
+ <imageobject>
+ <?dbhtml background-color="green"?>
+ <imagedata
+ width="75%"
+ scalefit="1"
+ fileref="graphics/stamp.png"/>
+ </imageobject>
+ <textobject><phrase>The DocBook Stamp</phrase></textobject>
+</mediaobject>
+
+<para>The stamp image: depth=25%; scalefit=1</para>
+
+<mediaobject>
+ <imageobject>
+ <?dbhtml background-color="green"?>
+ <imagedata
+ depth="25%"
+ scalefit="1"
+ fileref="graphics/stamp.png"/>
+ </imageobject>
+ <textobject><phrase>The DocBook Stamp</phrase></textobject>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/svg.001.xml b/test/testdocs/svg.001.xml
new file mode 100644
index 0000000..719359e
--- /dev/null
+++ b/test/testdocs/svg.001.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook SVG Module V1.0beta2//EN"
+ "http://www.oasis-open.org/docbook/xml/svg/1.0beta2/dbsvg.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: svg.001.xml</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>This article contains an SVG diagram (inline).</para>
+
+<mediaobject>
+ <imageobject>
+ <svg:svg xmlns:svg="http://www.w3.org/2000/svg">
+ <svg:g transform="scale(0.5)">
+ <svg:polygon style="fill:red; stroke:blue; stroke-width:10"
+ points="350, 75 379,161 469,161 397,215
+ 423,301 350,250 277,301 303,215
+ 231,161 321,161" />
+ <svg:polygon style="fill:lime; stroke:blue; stroke-width:10"
+ points="850,75 958,137.5 958,262.5
+ 850,325 742,262.6 742,137.5"/>
+ </svg:g>
+ </svg:svg>
+ </imageobject>
+ <imageobject>
+ <imagedata
+ align="center"
+ fileref="graphics/svg-001-fallback.png"/>
+ </imageobject>
+ <textobject><phrase>Example SVG polygons</phrase></textobject>
+ <caption><para>Polygons</para></caption>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/svg.002.xml b/test/testdocs/svg.002.xml
new file mode 100644
index 0000000..b40c475
--- /dev/null
+++ b/test/testdocs/svg.002.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook SVG Module V1.0beta2//EN"
+ "http://www.oasis-open.org/docbook/xml/svg/1.0beta2/dbsvg.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: svg.002.xml</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>This article contains an SVG diagram (external).</para>
+
+<mediaobject>
+ <imageobject>
+ <imagedata
+ align="center"
+ format="SVG"
+ fileref="graphics/svg-001.xml"/>
+ </imageobject>
+ <imageobject>
+ <imagedata
+ align="center"
+ fileref="graphics/svg-001-fallback.png"/>
+ </imageobject>
+ <textobject><phrase>Example SVG polygons</phrase></textobject>
+ <caption><para>Polygons</para></caption>
+</mediaobject>
+
+</article>
diff --git a/test/testdocs/table.001.xml b/test/testdocs/table.001.xml
new file mode 100644
index 0000000..28cbd59
--- /dev/null
+++ b/test/testdocs/table.001.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: table.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<table frame="all">
+<title>TFoot Test</title>
+<tgroup cols="2">
+<tfoot>
+<row>
+<entry>Foot Left</entry>
+<entry>Foot Right</entry>
+</row>
+</tfoot>
+<tbody>
+<row>
+<entry>Body Left</entry>
+<entry>Body Right</entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+
+</article>
diff --git a/test/testdocs/table.002.xml b/test/testdocs/table.002.xml
new file mode 100644
index 0000000..8cc11cd
--- /dev/null
+++ b/test/testdocs/table.002.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: table.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<table id="width-test-1" frame="all">
+<title>Width Test 1</title>
+<tgroup cols="4" align="left">
+<colspec colnum="1" colname="c1" colwidth="1in"/>
+<colspec colnum="2" colname="c2" colwidth="1*"/>
+<colspec colnum="3" colname="c3" colwidth="5*"/>
+<colspec colnum="4" colname="c4" colwidth="1*+0.5in"/>
+<tbody>
+<row>
+<entry>1in</entry>
+<entry>1/7</entry>
+<entry>5/7</entry>
+<entry>1/7+0.5in</entry>
+</row>
+<row>
+<entry>some words to make the thing wrap around to test the width</entry>
+<entry>some words to make the thing wrap around to test the width</entry>
+<entry>some words to make the thing wrap around to test the width</entry>
+<entry>some words to make the thing wrap around to test the width</entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+
+</article>
diff --git a/test/testdocs/table.003.xml b/test/testdocs/table.003.xml
new file mode 100644
index 0000000..dbcbb66
--- /dev/null
+++ b/test/testdocs/table.003.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: table.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>Just a normal paragraph with a footnote<footnote><para>This is the
+footnote.</para></footnote>.</para>
+
+<table frame="none">
+<title>Server machine minimum required
+software<footnote><para>Table title footnote test.</para></footnote></title>
+<indexterm>
+<primary>System requirements</primary>
+<secondary>Software</secondary>
+</indexterm>
+<tgroup cols="1">
+<colspec colname="col1" colnum="1" colwidth="2.50in"/>
+<thead valign="top">
+<row>
+<entry>Foo<footnote><para>Table cell footnote test.</para></footnote></entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>foo</entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+
+</article>
diff --git a/test/testdocs/table.004.xml b/test/testdocs/table.004.xml
new file mode 100644
index 0000000..8b6d131
--- /dev/null
+++ b/test/testdocs/table.004.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: table.004</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<informaltable frame="none">
+<tgroup cols="2">
+<colspec colname="col2" colnum="2" rowsep="1"/>
+<tbody>
+<row>
+<entry>foo</entry>
+</row>
+<row>
+<entry>foo</entry><entry>bar</entry>
+</row>
+<row>
+<entry>foo</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/table.005.xml b/test/testdocs/table.005.xml
new file mode 100644
index 0000000..1b14c32
--- /dev/null
+++ b/test/testdocs/table.005.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: table.005</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>This is a "portrait" paragraph.</para>
+
+<table frame="none" orient="land">
+<title>This is a "landscape" table</title>
+<tgroup cols="2">
+<colspec colname="col2" colnum="2" rowsep="1"/>
+<tbody>
+<row>
+<entry>foo</entry>
+</row>
+<row>
+<entry>foo</entry><entry>bar</entry>
+</row>
+<row>
+<entry>foo</entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+
+<para>This is a "portrait" paragraph.</para>
+
+</article>
diff --git a/test/testdocs/table.006.xml b/test/testdocs/table.006.xml
new file mode 100644
index 0000000..764045f
--- /dev/null
+++ b/test/testdocs/table.006.xml
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: table.006</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>All frames:</para>
+
+<informaltable frame="all">
+<tgroup cols="3">
+<tbody>
+<row>
+<entry>a foo</entry>
+<entry>a bar</entry>
+<entry>a baz</entry>
+</row>
+<row>
+<entry>b foo</entry>
+<entry>b bar</entry>
+<entry>b baz</entry>
+</row>
+<row>
+<entry>c foo</entry>
+<entry>c foo</entry>
+<entry>c baz</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>No frames:</para>
+
+<informaltable frame="none">
+<tgroup cols="3">
+<tbody>
+<row>
+<entry>a foo</entry>
+<entry>a bar</entry>
+<entry>a baz</entry>
+</row>
+<row>
+<entry>b foo</entry>
+<entry>b bar</entry>
+<entry>b baz</entry>
+</row>
+<row>
+<entry>c foo</entry>
+<entry>c foo</entry>
+<entry>c baz</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>Outer edge:</para>
+
+<informaltable frame="all">
+<tgroup cols="3" rowsep="0" colsep="0">
+<tbody>
+<row>
+<entry>a foo</entry>
+<entry>a bar</entry>
+<entry>a baz</entry>
+</row>
+<row>
+<entry>b foo</entry>
+<entry>b bar</entry>
+<entry>b baz</entry>
+</row>
+<row>
+<entry>c foo</entry>
+<entry>c foo</entry>
+<entry>c baz</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>Rows:</para>
+
+<informaltable frame="topbot">
+<tgroup cols="3" rowsep="1" colsep="0">
+<tbody>
+<row>
+<entry>a foo</entry>
+<entry>a bar</entry>
+<entry>a baz</entry>
+</row>
+<row>
+<entry>b foo</entry>
+<entry>b bar</entry>
+<entry>b baz</entry>
+</row>
+<row>
+<entry>c foo</entry>
+<entry>c foo</entry>
+<entry>c baz</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>Columns:</para>
+
+<informaltable frame="sides">
+<tgroup cols="3" rowsep="0" colsep="1">
+<tbody>
+<row>
+<entry>a foo</entry>
+<entry>a bar</entry>
+<entry>a baz</entry>
+</row>
+<row>
+<entry>b foo</entry>
+<entry>b bar</entry>
+<entry>b baz</entry>
+</row>
+<row>
+<entry>c foo</entry>
+<entry>c foo</entry>
+<entry>c baz</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>Tic Tac Toe:</para>
+
+<informaltable frame="none">
+<tgroup cols="3" rowsep="0" colsep="0">
+<colspec colnum="1" colsep="1"/>
+<colspec colnum="2" colsep="1"/>
+<tbody>
+<row rowsep="1">
+<entry>a foo</entry>
+<entry>a bar</entry>
+<entry>a baz</entry>
+</row>
+<row rowsep="1">
+<entry>b foo</entry>
+<entry>b bar</entry>
+<entry>b baz</entry>
+</row>
+<row>
+<entry>c foo</entry>
+<entry>c foo</entry>
+<entry>c baz</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>Box in the middle:</para>
+
+<informaltable frame="none">
+<tgroup cols="3">
+<tbody>
+<row>
+<entry>a foo</entry>
+<entry rowsep="1">a bar</entry>
+<entry>a baz</entry>
+</row>
+<row>
+<entry colsep="1">b foo</entry>
+<entry colsep="1" rowsep="1">b bar</entry>
+<entry>b baz</entry>
+</row>
+<row>
+<entry>c foo</entry>
+<entry>c foo</entry>
+<entry>c baz</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>Jigsaw:</para>
+
+<informaltable frame="all">
+<tgroup cols="3" rowsep="0" colsep="0">
+<tbody>
+<row>
+<entry rowsep="1">a foo</entry>
+<entry colsep="1">a bar</entry>
+<entry>a baz</entry>
+</row>
+<row>
+<entry colsep="1">b foo</entry>
+<entry colsep="1" rowsep="1">b bar</entry>
+<entry>b baz</entry>
+</row>
+<row>
+<entry>c foo</entry>
+<entry>c foo</entry>
+<entry>c baz</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</article>
diff --git a/test/testdocs/template.xml b/test/testdocs/template.xml
new file mode 100644
index 0000000..2e7ba42
--- /dev/null
+++ b/test/testdocs/template.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: <!--FIXME-->
+</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<!-- Change this: -->
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<!-- put your test here -->
+
+</article>
diff --git a/test/testdocs/toc.001.xml b/test/testdocs/toc.001.xml
new file mode 100644
index 0000000..66c4963
--- /dev/null
+++ b/test/testdocs/toc.001.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book>
+<bookinfo>
+<title>Unit Test: toc.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</bookinfo>
+
+<toc>
+<tocchap>
+<tocentry>Preface</tocentry>
+<toclevel1>
+ <tocentry>Fake Entry</tocentry>
+ <tocentry pagenum="i">Why Read This Book?</tocentry>
+ <tocentry>This Book's Audience</tocentry>
+ <tocentry>Organization of This Book</tocentry>
+ <tocentry>Conventions Used in This Book</tocentry>
+ <tocentry>Getting This Book</tocentry>
+ <tocentry>Getting Examples from This Book</tocentry>
+ <tocentry>Getting DocBook</tocentry>
+ <tocentry>Request for Comments</tocentry>
+ <tocentry>Acknowledgements from Norm</tocentry>
+ <tocentry>Acknowledgements from Lenny</tocentry>
+ <tocentry>Acknowledgements from Norm and Lenny</tocentry>
+</toclevel1>
+</tocchap>
+<tocpart>
+<tocentry>Introduction</tocentry>
+<tocchap>
+<tocentry>Getting Started with SGML/XML</tocentry>
+<toclevel1>
+ <tocentry>HTML and SGML vs. XML</tocentry>
+ <tocentry>Basic SGML/XML Concepts</tocentry>
+ <tocentry>Elements and Attributes</tocentry>
+ <tocentry>Entities</tocentry>
+ <tocentry>How Does DocBook Fit In?</tocentry>
+ <toclevel2>
+ <tocentry>Testing a third level TOC</tocentry>
+ </toclevel2>
+</toclevel1>
+</tocchap>
+<tocchap>
+<tocentry>Creating DocBook Documents</tocentry>
+<toclevel1>
+ <tocentry>Making an SGML Document</tocentry>
+ <tocentry>Making an XML Document</tocentry>
+</toclevel1>
+</tocchap>
+</tocpart>
+</toc>
+
+<preface><title>Preface</title>
+
+<para>This book is really just a toc test.</para>
+
+</preface>
+
+</book>
+
diff --git a/test/testdocs/ulink.001.xml b/test/testdocs/ulink.001.xml
new file mode 100644
index 0000000..246ddf1
--- /dev/null
+++ b/test/testdocs/ulink.001.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!ENTITY dh "&#xAD;">
+]>
+<article>
+<articleinfo>
+<title>Unit Test: ulink.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<para>This article tests ULink hyphenation.</para>
+
+<para>This is a really long URI with explicit discretionary hyphens:
+<ulink url="http://www.example.com/this/is/really/long/for/no/good/reason/except/to/test/what/happens/with/really/long/URIs/-/because/they/are/a/good/test/for/discretionary/hyphens/">http:/&dh;/&dh;www.example.com/&dh;this/&dh;is/&dh;really/&dh;long/&dh;for/&dh;no/&dh;good/&dh;reason/&dh;except/&dh;to/&dh;test/&dh;what/&dh;happens/&dh;with/&dh;really/&dh;long/&dh;URIs/&dh;-/&dh;because/&dh;they/&dh;are/&dh;a/&dh;good/&dh;test/&dh;for/&dh;discretionary/&dh;hyphens/</ulink>.</para>
+
+<para>This is a really long URI without explicit discretionary hyphens:
+<ulink url="http://www.example.com/this/is/really/long/for/no/good/reason/except/to/test/what/happens/with/really/long/URIs/-/because/they/are/a/good/test/for/discretionary/hyphens/"/>.</para>
+
+</article>
diff --git a/test/testdocs/variablelist.001.xml b/test/testdocs/variablelist.001.xml
new file mode 100644
index 0000000..20b3783
--- /dev/null
+++ b/test/testdocs/variablelist.001.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: variablelist.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<variablelist>
+<?dbfo list-presentation="list" term-width="1.25in" ?>
+<varlistentry>
+<term>short</term>
+<listitem>
+<para>A single short term with a description.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>more</term>
+<listitem>
+<para>Another single short term with a description.
+</para>
+<para>Another paragraph of description.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>again</term>
+<listitem>
+<para>YASSTWAD.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>short</term>
+<listitem>
+<para>A single short term with a description.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>more</term>
+<term>more</term>
+<term>more</term>
+<term>more</term>
+<listitem>
+<para>Several short terms in the same VLE.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>I'm still not satisfied.</term>
+<listitem>
+<para>A single long term with a description.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</article>
diff --git a/test/testdocs/variablelist.002.xml b/test/testdocs/variablelist.002.xml
new file mode 100644
index 0000000..e8b04b4
--- /dev/null
+++ b/test/testdocs/variablelist.002.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: variablelist.002</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <methodsynopsis>
+ <modifier>static</modifier>
+ <modifier>public</modifier>
+
+ <type>void</type>
+ <methodname>import</methodname>
+
+ <methodparam>
+ <type>HttpServletRequest</type>
+ <parameter>req</parameter>
+ </methodparam>
+ </methodsynopsis>
+ </term>
+ <listitem>
+ <para>Foobar</para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</article>
diff --git a/test/testdocs/variablelist.003.xml b/test/testdocs/variablelist.003.xml
new file mode 100644
index 0000000..d4b2fc0
--- /dev/null
+++ b/test/testdocs/variablelist.003.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: variablelist.003</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<variablelist>
+<title>VariableList Title</title>
+<varlistentry><term>Term1</term>
+<listitem><para>Definition of Term1</para></listitem>
+</varlistentry>
+<varlistentry><term>Term2</term>
+<listitem><para>Definition of Term2</para></listitem>
+</varlistentry>
+<varlistentry id="someVLI"><term>Term3a</term><term>Term3b</term><term>Term3c</term>
+<listitem><para>Definition of Term3a,b,c</para></listitem>
+</varlistentry>
+</variablelist>
+
+</article>
diff --git a/test/testdocs/variablelist.004.xml b/test/testdocs/variablelist.004.xml
new file mode 100644
index 0000000..89b6b83
--- /dev/null
+++ b/test/testdocs/variablelist.004.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<article>
+<articleinfo>
+<title>Unit Test: variablelist.004</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</articleinfo>
+
+<variablelist termlength="30">
+<title>VariableList With Long Terms</title>
+<varlistentry><term>Term1 is very long</term>
+<listitem><para>Definition of Term1</para></listitem>
+</varlistentry>
+<varlistentry><term>Term2 is even longer than term1</term>
+<listitem><para>Definition of Term2</para></listitem>
+</varlistentry>
+<varlistentry><term>Term3a</term><term>Term3b is also long</term><term>Term3c</term>
+<listitem><para>Definition of Term3a,b,c</para></listitem>
+</varlistentry>
+</variablelist>
+
+</article>
diff --git a/test/testdocs/xref.001.xml b/test/testdocs/xref.001.xml
new file mode 100644
index 0000000..1cf07c4
--- /dev/null
+++ b/test/testdocs/xref.001.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!ENTITY blah "<para>Blah blah blah blah. Blah blah blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+Blah blah blah blah blah blah blah blah. Blah blah blah blah.
+Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
+</para>">
+]>
+<book>
+<bookinfo>
+<title>Unit Test: xref.001</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</bookinfo>
+
+<dedication id="dedication"><title>Dedication</title>
+
+&blah;
+
+<para>For no good reason, this dedication includes cross-references:</para>
+
+<itemizedlist>
+<listitem><para>dedication: <xref linkend="dedication"/>.</para>
+</listitem>
+<listitem><para>preface: <xref linkend="preface"/>.</para>
+</listitem>
+<listitem><para>part: <xref linkend="part"/>.</para>
+</listitem>
+<listitem><para>chapter: <xref linkend="chapter"/>.</para>
+</listitem>
+<listitem><para>appendix: <xref linkend="appendix"/>.</para>
+</listitem>
+<listitem><para>para: <xref linkend="para"/>.</para>
+</listitem>
+</itemizedlist>
+
+</dedication>
+
+<preface id="preface"><title>Preface</title>
+
+<para>A preface.</para>
+
+&blah;
+
+</preface>
+
+<part id="part">
+<title>Part One Title</title>
+<partintro>
+<title>PartIntro Title</title>
+
+<para>Partintro content<footnote>
+<para>This is a footnote in a partintro.</para>
+</footnote>.</para>
+
+&blah;
+
+<sect1>
+<title>PartIntro Section</title>
+<para>PartIntros can actually have section content as well.</para>
+&blah;
+</sect1>
+</partintro>
+
+<chapter id="chapter"><title>Chapter</title>
+
+&blah;
+<para id="para">This paragraph has an ID.</para>
+
+</chapter>
+
+</part>
+<part><title>Appendixes</title>
+
+<appendix id="appendix"><title>First Appendix</title>
+
+&blah;
+
+</appendix>
+
+</part>
+</book>
diff --git a/test/testdocs/xrefstyle.001.xml b/test/testdocs/xrefstyle.001.xml
new file mode 100644
index 0000000..32bc6c7
--- /dev/null
+++ b/test/testdocs/xrefstyle.001.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<chapter id="chapter">
+<chapterinfo>
+<title>Unit Test: xrefstyle.001.xml</title>
+<releaseinfo role="CVS">$Id$</releaseinfo>
+<author><firstname>Norman</firstname><surname>Walsh</surname>
+ <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
+</author>
+</chapterinfo>
+<title>Unit Test: xrefstyle.001.xml</title>
+
+<para>This is a test of xref styles.</para>
+
+<para>Short self-reference: <xref linkend="chapter"/>.</para>
+<para>Long self-reference: <xref role="title" linkend="chapter"/>.</para>
+
+</chapter>