]> granicus.if.org Git - docbook-dsssl/commitdiff
My initial set of test documents
authorNorman Walsh <ndw@nwalsh.com>
Sat, 21 Apr 2001 20:29:54 +0000 (20:29 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sat, 21 Apr 2001 20:29:54 +0000 (20:29 +0000)
20 files changed:
testdocs/.cvsignore [new file with mode: 0644]
testdocs/Makefile [new file with mode: 0644]
testdocs/admon.xml [new file with mode: 0644]
testdocs/bibliography.xml [new file with mode: 0644]
testdocs/book.xml
testdocs/callouts.xml [new file with mode: 0644]
testdocs/faq.xml [new file with mode: 0644]
testdocs/footnotes.xml [new file with mode: 0644]
testdocs/formal.xml [new file with mode: 0644]
testdocs/glossary.xml [new file with mode: 0644]
testdocs/idx.xml [new file with mode: 0644]
testdocs/inline.xml [new file with mode: 0644]
testdocs/links.xml [new file with mode: 0644]
testdocs/lists.xml [new file with mode: 0644]
testdocs/mathml.xml [new file with mode: 0644]
testdocs/mlang.pl [new file with mode: 0644]
testdocs/sections.xml [new file with mode: 0644]
testdocs/set.xml [new file with mode: 0644]
testdocs/table.xml [new file with mode: 0644]
testdocs/toc.xml [new file with mode: 0644]

diff --git a/testdocs/.cvsignore b/testdocs/.cvsignore
new file mode 100644 (file)
index 0000000..eee8207
--- /dev/null
@@ -0,0 +1,2 @@
+mlang.sgm
+mlang.xml
diff --git a/testdocs/Makefile b/testdocs/Makefile
new file mode 100644 (file)
index 0000000..fca2507
--- /dev/null
@@ -0,0 +1,112 @@
+include ../cvstools/Makefile.incl
+
+XSLHTML=../xsl/html/docbook.xsl
+XSLFO=../xsl/fo/docbook.xsl
+XSLCHUNK=../xsl/html/chunk.xsl
+
+CHUNK=0
+STYLEOPT=
+
+
+FORMATTER=xep
+
+RESULT=html
+
+ifeq ($(RESULT),html)
+   STYLE=$(XSLHTML)
+   USETIDY=1
+else
+   STYLE=$(XSLFO)
+   USETIDY=0
+endif
+
+all:
+       @echo Select a target
+
+mlang.xml : mlang.pl
+       perl mlang.pl > $@
+
+no-toc.$(RESULT): toc.xml
+       $(XSLT) $< $(STYLE) $@ generate.book.toc=0 process.source.toc=0 process.empty.source.toc=0 $(STYLEOPT)
+ifeq ($(USETIDY),1)
+       $(TIDY) -iq -latin1 -mn $@
+endif
+
+auto-toc.$(RESULT): toc.xml
+       $(XSLT) $< $(STYLE) $@ generate.book.toc=1 process.source.toc=0 process.empty.source.toc=0 $(STYLEOPT)
+ifeq ($(USETIDY),1)
+       $(TIDY) -iq -latin1 -mn $@
+endif
+
+source-toc.$(RESULT): toc.xml
+       $(XSLT) $< $(STYLE) $@ generate.book.toc=0 process.source.toc=1 process.empty.source.toc=1 $(STYLEOPT)
+ifeq ($(USETIDY),1)
+       $(TIDY) -iq -latin1 -mn $@
+endif
+
+all-toc-dl.$(RESULT): toc.xml
+       $(XSLT) $< $(STYLE) $@ generate.book.toc=1 process.source.toc=1 process.empty.source.toc=1 toc.list.type=dl $(STYLEOPT)
+ifeq ($(USETIDY),1)
+       $(TIDY) -iq -latin1 -mn $@
+endif
+
+all-toc-ul.$(RESULT): toc.xml
+       $(XSLT) $< $(STYLE) $@ generate.book.toc=1 process.source.toc=1 process.empty.source.toc=1 toc.list.type=ul $(STYLEOPT)
+ifeq ($(USETIDY),1)
+       $(TIDY) -iq -latin1 -mn $@
+endif
+
+test-toc: all-toc-dl.$(RESULT) all-toc-ul.$(RESULT) auto-toc.$(RESULT) no-toc.$(RESULT) source-toc.$(RESULT)
+
+%.html : %.xml
+ifeq ($(CHUNK),1)
+       $(XSLT) $< $(XSLCHUNK) $@ $(STYLEOPT)
+ifeq ($(USETIDY),1)
+       $(TIDY) -iq -latin1 -mn *.html
+endif
+else
+       $(XSLT)  $< $(XSLHTML) $@ $(STYLEOPT)
+ifeq ($(USETIDY),1)
+       $(TIDY) -iq -latin1 -mn $@
+endif
+endif
+
+%.fo : %.xml
+ifeq ($(FORMATTER),tex)
+       $(XSLT) $< $(XSLFO) $@ passivetex.extensions=1 $(STYLEOPT)
+else
+ifeq ($(FORMATTER),fop)
+       $(XSLT) $< $(XSLFO) $@ fop.extensions=1 $(STYLEOPT)
+else
+       $(XSLT) $< $(XSLFO) $@ $(STYLEOPT)
+endif
+endif
+
+%.pdf : %.fo
+ifeq ($(FORMATTER),tex)
+       pdftex "&pdfxmltex" $<
+       @if [ `grep Rerun $(basename $@).log | wc -l` -gt 0 ]; then \
+               pdftex "&pdfxmltex" $< ; \
+       fi
+       @if [ `grep Rerun $(basename $@).log | wc -l` -gt 0 ]; then \
+               pdftex "&pdfxmltex" $< ; \
+       fi
+else
+ifeq ($(FORMATTER),fop)
+       fop $< $@
+else
+ifeq ($(FORMATTER),xep)
+       xep $<
+else
+       echo How would you like me to make the PDF file?
+endif
+endif
+endif
+
+clean:
+       rm -f *.html *.htm *.fo *.pdf *.ps *.rtf
+       rm -f *.log *.aux *.out
+       rm -f mlang.xml mlang.sgm
+       rm -f toc.hhc htmlhelp.hhp htmlhelp.chm Index.hhk
+       rm -f HTML.index
+       rm -f jhelpidx.xml jhelpmap.jhm jhelpset.hs jhelptoc.xml
diff --git a/testdocs/admon.xml b/testdocs/admon.xml
new file mode 100644 (file)
index 0000000..64485ef
--- /dev/null
@@ -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">
+<!-- test document -->
+<article>
+<articleinfo>
+<title>Admonitions</title>
+</articleinfo>
+
+<para>This article tests admonitions.</para>
+
+<note> 
+<title>Who can do this</title> 
+<para>All operators</para> 
+</note> 
+
+</article>
+
diff --git a/testdocs/bibliography.xml b/testdocs/bibliography.xml
new file mode 100644 (file)
index 0000000..6511c0b
--- /dev/null
@@ -0,0 +1,189 @@
+<?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">
+<!-- test document -->
+<book><title>Bibliography Tests</title>
+
+<bibliography id="bib1">
+<title>A Test Bibliography</title>
+
+<para>
+The stock stylesheet attempts to do a Bibliography.  It probably needs
+a lot of tweaking.  It probably doesn't conform to any specific style.
+</para>
+
+<bibliodiv><title>Books</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>
+
+</bibliodiv>
+<bibliodiv><title>Periodicals</title>
+
+<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>
+
+<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>
+
+<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>
+
+</bibliography>
+
+</book>
+
index dd5aa99b0323283e589165472da72b704db01ccc..6a2097460eea3f5613b1e64cb45986bd986c4ced 100644 (file)
@@ -3,20 +3,26 @@
   PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
 <!-- test document -->
-<book><title>Book Test Document Title</title>
+<book>
 <bookinfo>
-<title>Bookinfo Test Document Title</title>
-<subtitle>Book Subtitle</subtitle>
+<title>Book Title</title>
+<keywordset>
+<keyword>book keyword1</keyword>
+<keyword>book keyword2</keyword>
+</keywordset>
 <authorgroup>
-<author><firstname>Norman</firstname><surname>Walsh</surname></author>
-<author><firstname>John</firstname><surname>Doe</surname></author>
+<author>
+<firstname>John</firstname>
+<surname>Doe</surname>
+</author>
+<author>
+<firstname>Jane</firstname>
+<surname>Doe</surname>
+<contrib>Some contribution</contrib>
+</author>
 </authorgroup>
-<releaseinfo>Some releaseinfo</releaseinfo>
-<copyright><year>2000</year><holder>Norman Walsh</holder></copyright>
 <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.
+<para>
 Some legal notice. Some legal notice. Some legal notice.
 </para>
 </legalnotice>
@@ -93,6 +99,10 @@ Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
 <part>
 <partinfo>
 <title>Part One Title</title>
+<keywordset>
+<keyword>part keyword1</keyword>
+<keyword>part keyword2</keyword>
+</keywordset>
 <legalnotice>
 <para>Foo! A legal notice in a part!</para>
 </legalnotice>
@@ -156,7 +166,15 @@ Blah. Blah blah blah blah. Blah blah. Blah blah blah blah.
 </figure>
 </chapter>
 
-<chapter><title>Second <emphasis>Chapter</emphasis></title>
+<chapter>
+<chapterinfo>
+<keywordset>
+<keyword>chapter keyword1</keyword>
+<keyword>chapter keyword2</keyword>
+</keywordset>
+</chapterinfo>
+<title>Second <emphasis>Chapter</emphasis></title>
+
 <para>This is a test paragraph.
 <indexterm>
 <primary>ap1</primary>
diff --git a/testdocs/callouts.xml b/testdocs/callouts.xml
new file mode 100644 (file)
index 0000000..2222a2d
--- /dev/null
@@ -0,0 +1,111 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<chapter>
+<title>Callouts</title>
+
+<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>
+
+<para>Callouts using <sgmltag>programlistingco</sgmltag>:</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>
+
+</chapter>
diff --git a/testdocs/faq.xml b/testdocs/faq.xml
new file mode 100644 (file)
index 0000000..4987b63
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE article
+  PUBLIC "-//OASIS//DTD DocBook XML V4.1//EN"
+  "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" >
+<article class="faq">
+  <articleinfo>
+    <title>An xref to a Question</title>
+    <author>
+      <firstname>Jon</firstname>
+      <surname>Willeke</surname>
+    </author>
+  </articleinfo>
+
+  <qandaset defaultlabel='number'>
+    <qandaentry>
+      <question><para>Question one.</para></question>
+      <answer>
+       <para>Answer one.
+See <xref linkend="faq-Two"/></para>
+      </answer>
+    </qandaentry>
+
+    <qandaentry>
+      <question id="faq-Two"><para>Question two.</para></question>
+      <answer>
+       <para>Answer two.</para>
+      </answer>
+    </qandaentry>
+
+    <qandaentry>
+      <question id="faq-Two"><para>Question two.</para></question>
+      <answer>
+       <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/testdocs/footnotes.xml b/testdocs/footnotes.xml
new file mode 100644 (file)
index 0000000..d4554c3
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding="ISO-8859-1"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book>
+<title>foo</title>
+<chapter>
+ <title>Chapter Title</title>
+ <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>
+</chapter>
+</book>
diff --git a/testdocs/formal.xml b/testdocs/formal.xml
new file mode 100644 (file)
index 0000000..d0c434e
--- /dev/null
@@ -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">
+<!-- test document -->
+<article>
+<articleinfo>
+<title>Formal Objects</title>
+</articleinfo>
+
+<para>This article tests formal objects.</para>
+
+<formalpara id="fp"><title>Formal Paragraph</title>
+<para>This is a <sgmltag>formalpara</sgmltag>.</para>
+</formalpara>
+
+<example><title>An Example</title>
+<programlisting>
+This is a programlisting in an example.
+</programlisting>
+</example>
+
+
+
+</article>
+
diff --git a/testdocs/glossary.xml b/testdocs/glossary.xml
new file mode 100644 (file)
index 0000000..8763cb6
--- /dev/null
@@ -0,0 +1,89 @@
+<?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">
+<!-- test document -->
+<book><title>Glossary Tests</title>
+
+<glossary id="glossary">
+<glossentry>
+<glossterm>foo</glossterm>
+<glossdef>
+<para>1. interj. Term of disgust. 2. [very common] Used very generally
+as a sample name for absolutely anything, esp. programs and files
+(esp. scratch files). 3. First on the standard list of metasyntactic
+variables used in syntax examples.</para>
+<para>From the Jargon File</para>
+<glossseealso>bar</glossseealso>
+<glossseealso>baz</glossseealso>
+<glossseealso>qux</glossseealso>
+<glossseealso>quux</glossseealso>
+<glossseealso>corge</glossseealso>
+<glossseealso>grault</glossseealso>
+<glossseealso>garply</glossseealso>
+<glossseealso>waldo</glossseealso>
+<glossseealso>fred</glossseealso>
+<glossseealso>plugh</glossseealso>
+<glossseealso>xyzzy</glossseealso>
+<glossseealso>thud</glossseealso>
+</glossdef>
+</glossentry>
+</glossary>
+
+<glossary id="glossary-div">
+<glossdiv>
+<title>Glossary Division</title>
+<glossentry>
+<glossterm>foo</glossterm>
+<glossdef>
+<para>1. interj. Term of disgust. 2. [very common] Used very generally
+as a sample name for absolutely anything, esp. programs and files
+(esp. scratch files). 3. First on the standard list of metasyntactic
+variables used in syntax examples.</para>
+<para>From the Jargon File</para>
+<glossseealso>bar</glossseealso>
+<glossseealso>baz</glossseealso>
+<glossseealso>qux</glossseealso>
+<glossseealso>quux</glossseealso>
+<glossseealso>corge</glossseealso>
+<glossseealso>grault</glossseealso>
+<glossseealso>garply</glossseealso>
+<glossseealso>waldo</glossseealso>
+<glossseealso>fred</glossseealso>
+<glossseealso>plugh</glossseealso>
+<glossseealso>xyzzy</glossseealso>
+<glossseealso>thud</glossseealso>
+</glossdef>
+</glossentry>
+</glossdiv>
+</glossary>
+
+<glossary id="glossary-div-title"><title>Glossary With This Title</title>
+<glossdiv>
+<title>Glossary Division</title>
+<glossentry>
+<glossterm>foo</glossterm>
+<glossdef>
+<para>1. interj. Term of disgust. 2. [very common] Used very generally
+as a sample name for absolutely anything, esp. programs and files
+(esp. scratch files). 3. First on the standard list of metasyntactic
+variables used in syntax examples.</para>
+<para>From the Jargon File</para>
+<glossseealso>bar</glossseealso>
+<glossseealso>baz</glossseealso>
+<glossseealso>qux</glossseealso>
+<glossseealso>quux</glossseealso>
+<glossseealso>corge</glossseealso>
+<glossseealso>grault</glossseealso>
+<glossseealso>garply</glossseealso>
+<glossseealso>waldo</glossseealso>
+<glossseealso>fred</glossseealso>
+<glossseealso>plugh</glossseealso>
+<glossseealso>xyzzy</glossseealso>
+<glossseealso>thud</glossseealso>
+</glossdef>
+</glossentry>
+</glossdiv>
+</glossary>
+
+</book>
diff --git a/testdocs/idx.xml b/testdocs/idx.xml
new file mode 100644 (file)
index 0000000..67b02e1
--- /dev/null
@@ -0,0 +1,53 @@
+<?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><title>Book Test Index Document Title</title>
+
+<chapter id="chapter">
+<title>Title <ulink url="http://www.example.com/">Link Test</ulink></title>
+
+<indexterm zone="chapter">
+       <primary>chapter</primary>
+</indexterm>
+<indexterm zone="chapter">
+       <primary>something</primary>
+</indexterm>
+
+<para>Paragraph<indexterm>
+<primary>paragraph</primary></indexterm>.</para>
+
+<sect1 remap="h1 head 1"> 
+<title id="f_03connec_258635">Setting Up IPX/<!-- unused marker -->SPX 
+<indexterm><primary>TCP/IP communication protocol</primary> 
+<secondary>using</secondary> 
+</indexterm><indexterm><primary>Connection</primary> 
+<secondary>TCP/IP</secondary> 
+</indexterm>Support Files</title> 
+
+<qandaset>
+<qandadiv id="QADiv1"><title>Q&amp;A Div 1</title>
+<qandaentry id="Q1Entry">
+<question><label>Q1</label>
+<indexterm zone="QADiv1">
+       <primary>QandADiv1</primary>
+</indexterm>
+<indexterm zone="Q1Entry">
+       <primary>Q1 entry</primary>
+</indexterm>
+<para>Question para 1</para>
+<para>Question para 2</para>
+</question>
+<answer><label>A1</label>
+<para>Answer para 1</para>
+<para>Answer para 2</para>
+</answer>
+</qandaentry>
+</qandadiv>
+</qandaset>
+</sect1>
+</chapter>
+
+<index>
+</index>
+
+</book>
diff --git a/testdocs/inline.xml b/testdocs/inline.xml
new file mode 100644 (file)
index 0000000..495cecb
--- /dev/null
@@ -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">
+<!-- test document -->
+<article>
+<articleinfo>
+<title>Inline Objects</title>
+</articleinfo>
+
+<para>This article tests inline objects.</para>
+
+<section><title>Trademark</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/testdocs/links.xml b/testdocs/links.xml
new file mode 100644 (file)
index 0000000..e1887e2
--- /dev/null
@@ -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">
+<!-- test document -->
+<article id="article">
+<articleinfo>
+<title>Lists</title>
+</articleinfo>
+
+<section id="section"><title>Section Title</title>
+
+<para>Self-referencial xref: <xref linkend="section"/>.</para>
+<para>And a <link linkend="section">link, too</link>.</para>
+
+</section>
+
+</article>
+
diff --git a/testdocs/lists.xml b/testdocs/lists.xml
new file mode 100644 (file)
index 0000000..5851a05
--- /dev/null
@@ -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">
+<!-- test document -->
+<article>
+<articleinfo>
+<title>Lists</title>
+</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><term>Term3a</term><term>Term3b</term><term>Term3c</term>
+<listitem><para>Definition of Term3a,b,c</para></listitem>
+</varlistentry>
+</variablelist>
+
+</article>
+
diff --git a/testdocs/mathml.xml b/testdocs/mathml.xml
new file mode 100644 (file)
index 0000000..0207776
--- /dev/null
@@ -0,0 +1,11 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook MathML Module V1.0beta3//EN"
+              "../docbook/xml/mathml/dbmathml.dtd">
+<chapter><title>Chapter Title</title>
+<para>Content.</para>
+
+<informalequation>
+<mml:math><mml:apply><mml:divide/></mml:apply></mml:math>
+</informalequation>
+
+</chapter>
+
diff --git a/testdocs/mlang.pl b/testdocs/mlang.pl
new file mode 100644 (file)
index 0000000..7f4bc04
--- /dev/null
@@ -0,0 +1,154 @@
+#!/usr/bin/perl -- # -*- Perl -*-
+
+use strict;
+use Getopt::Long;
+
+my $usage = "$0 [--xml | --sgml ] [ --language lang ... ] [ --notlanguage lang ... ]\n";
+
+my %option = ('debug' => 0,
+             'verbose' => 0,
+             'xml' => 0,
+             'sgml' => 0,
+             'language' => undef,
+             'notlanguage' => undef);
+
+my %opt = ();
+
+&GetOptions(\%opt,
+           'debug+',
+           'verbose+',
+           'xml!',
+           'sgml!',
+           'language=s@',
+           'notlanguage=s@');
+
+foreach my $key (keys %option) {
+    $option{$key} = $opt{$key} if exists($opt{$key});
+}
+
+my %languages = ('ca' => 'Catalan',
+                'cs' => 'Czech',
+                'da' => 'Danish',
+                'de' => 'German',
+                'el' => 'Greek',
+                'en' => 'English',
+                'es' => 'Spanish',
+                'et' => 'Estonian',
+                'fi' => 'Finnish',
+                'fr' => 'French',
+                'hu' => 'Hungarian',
+                'id' => 'Indonesian',
+                'it' => 'Italian',
+                'ja' => 'Japanese',
+                'ko' => 'Korean',
+                'nl' => 'Dutch',
+                'no' => 'Norwegian',
+                'pl' => 'Polish',
+                'pt' => 'Portuguese',
+                'pt_br' => 'Portuguese (Brazil)',
+                'ro' => 'Romanian',
+                'ru' => 'Russian',
+                'sk' => 'Slovak',
+                'sl' => 'Slovenian',
+                'sv' => 'Swedish',
+                'zh_cn' => 'Chinese (Continental)',
+                'zh_tw' => 'Chinese (Traditional)');
+
+my %uselanguages = ();
+
+if ($option{'language'}) {
+    my @langs = @{$option{'language'}};
+    foreach my $lang (@langs) {
+       if ($languages{$lang}) {
+           print STDERR "Using ", $languages{$lang}, "\n"
+               if $option{'verbose'};
+           $uselanguages{$lang} = 1;
+       } else {
+           warn "Unrecognized language: $lang\n";
+       }
+    }
+} else {
+    %uselanguages = %languages;
+}
+
+if ($option{'notlanguage'}) {
+    my @langs = @{$option{'notlanguage'}};
+    foreach my $lang (@langs) {
+       if ($uselanguages{$lang}) {
+           print STDERR "Suppressing ", $languages{$lang}, "\n"
+               if $option{'verbose'};
+           delete($uselanguages{$lang});
+       } else {
+           warn "Unused language: $lang\n";
+       }
+    }
+}
+
+my $public_id = "-//OASIS//DTD DocBook XML V4.1.2//EN";
+my $system_id = "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd";
+
+if ($option{'sgml'}) {
+    $public_id = "-//OASIS//DTD DocBook V4.1//EN";
+    $system_id = "http://www.oasis-open.org/docbook/sgml/4.1/docbook.dtd";
+}
+
+print <<EOF3;
+<!DOCTYPE book PUBLIC "$public_id"
+               "$system_id">
+<book lang="de">
+<bookinfo>
+<title>Book Title</title>
+<abstract>
+<para>
+To test multilingual capability, this book claims to be in German.
+Of course, I don't know a word of German so it's really mostly
+English.
+</para>
+</abstract>
+</bookinfo>
+EOF3
+
+foreach my $lang (sort keys %uselanguages) {
+    my $langid = $lang;
+    $langid =~ s/_//g;
+
+    print <<EOF;
+<chapter lang='$lang' id='${langid}chap'>
+<chapterinfo>
+<author id='${langid}author'>
+  <surname>Surname</surname>
+  <firstname>Firstname</firstname>
+</author>
+</chapterinfo>
+<title>$languages{$lang}</title>
+<note>
+<para>
+This paragraph would be in $languages{$lang}, if I knew any.
+<quote>Quote test.</quote>
+</para>
+</note>
+<para>Author formatting test: <xref linkend='${langid}author'
+EOF
+
+    if ($option{'sgml'}) {
+       print ">.</para>\n<para>Cross reference tests:\n";
+    } else {
+       print "/>.</para>\n<para>Cross reference tests:\n";
+    }
+
+    foreach my $otherlang (sort keys %uselanguages) {
+       my $otherlangid = $otherlang;
+       $otherlangid =~ s/_//g;
+       if ($otherlang ne $lang) {
+           print "See <xref linkend='${otherlangid}chap'/>.\n";
+       }
+    }
+
+    print <<EOF2;
+</para>
+</chapter>
+
+EOF2
+}
+
+print "</book>\n";
diff --git a/testdocs/sections.xml b/testdocs/sections.xml
new file mode 100644 (file)
index 0000000..edda8a7
--- /dev/null
@@ -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">
+<!-- test document -->
+<article>
+<articleinfo>
+<title>Formal Objects</title>
+</articleinfo>
+
+<para>A test paragraph.</para>
+
+<sect1>
+  <title>sect1 title</title>
+
+  <sect2>
+    <title>first sect2 title</title>
+    <para>Please read <xref linkend="sec-xrefMe"/></para>
+  </sect2>
+
+  <sect2 id="sec-xrefMe">
+    <title>second sect2 title</title>
+  </sect2>
+</sect1>
+</article>
diff --git a/testdocs/set.xml b/testdocs/set.xml
new file mode 100644 (file)
index 0000000..82b74ef
--- /dev/null
@@ -0,0 +1,293 @@
+<?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>
+<book>
+<bookinfo>
+<title>Book One Title</title>
+</bookinfo>
+<chapter><title>First Chapter of First Book</title>
+<para>...</para>
+</chapter>
+<chapter><title>Second Chapter of First Book</title>
+<para>...</para>
+</chapter>
+<chapter><title>Third Chapter of First Book</title>
+<para>...</para>
+</chapter>
+<chapter><title>Fourth Chapter of First Book</title>
+<para>...</para>
+</chapter>
+</book>
+
+<book>
+<bookinfo>
+<title>Book Two Title</title>
+<keywordset>
+<keyword>book keyword1</keyword>
+<keyword>book keyword2</keyword>
+</keywordset>
+<authorgroup>
+<author>
+<firstname>John</firstname>
+<surname>Doe</surname>
+</author>
+<author>
+<firstname>Jane</firstname>
+<surname>Doe</surname>
+<contrib>Some contribution</contrib>
+</author>
+</authorgroup>
+<legalnotice>
+<para>
+Some legal notice. Some legal notice. Some legal notice.
+</para>
+</legalnotice>
+<pubdate>16 December 2000</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.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><title>First Dedication</title>
+<para>Just a test. &ldquo;What about&mdash;this?&rdquo;</para>
+<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>
+</dedication>
+
+<dedication>
+<para>Just a test dedication.</para>
+</dedication>
+
+<preface><title>Foreword</title>
+<?dbhtml filename="forward.htm"?>
+<para>This is a test paragraph.</para>
+</preface>
+
+<preface><title>Preface</title>
+<para>This is a test preface.</para>
+</preface>
+
+<part>
+<partinfo>
+<title>Part One Title</title>
+<keywordset>
+<keyword>part keyword1</keyword>
+<keyword>part keyword2</keyword>
+</keywordset>
+<legalnotice>
+<para>Foo! A legal notice in a part!</para>
+</legalnotice>
+</partinfo>
+<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>
+<sect1>
+<title>PartIntro Section</title>
+<para>PartIntros can actually have section content as well.</para>
+</sect1>
+</partintro>
+<chapter id="chapter">
+<title id="chaptertitle">Section <anchor id="stestfoo"/>Tests</title>
+
+<sect1><title>First Sect1</title>
+<para>Paragraph.</para>
+<figure id="testfig1"><title>Test Figure</title>
+<programlisting>This is a
+  ProgramListing
+</programlisting>
+</figure>
+</sect1>
+<sect1><title>Second Sect1</title>
+<para>Paragraph.</para>
+<sect2><title>Sect2</title>
+<para>Paragraph.</para>
+<sect3><title>Sect3</title>
+<para>Paragraph.</para>
+<sect4><title>Sect4</title>
+<para>Paragraph.</para>
+</sect4>
+</sect3>
+</sect2>
+</sect1>
+<sect1><title>Third Sect1</title>
+<para>Paragraph.</para>
+<figure id="testfig2"><title>Test Figure</title>
+<programlisting>This is a
+  ProgramListing
+</programlisting>
+</figure>
+</sect1>
+
+</chapter>
+</part>
+
+<chapter>
+  <chapterinfo><title>First Chapter</title>
+  <subtitle>Chapter Subtitle</subtitle>
+</chapterinfo>
+<title>First Chapter</title>
+<para>This is a test paragraph.</para>
+<figure id="testfig3"><title>Test Figure</title>
+<programlisting>This is a
+  ProgramListing
+</programlisting>
+</figure>
+</chapter>
+
+<chapter>
+<chapterinfo>
+<keywordset>
+<keyword>chapter keyword1</keyword>
+<keyword>chapter keyword2</keyword>
+</keywordset>
+</chapterinfo>
+<title>Second <emphasis>Chapter</emphasis></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>
+
+<chapter><title>Third Chapter</title>
+<para>This is a test paragraph.</para>
+</chapter>
+
+<appendix><title>First Appendix</title>
+<para>This is just a test.</para>
+<figure id="testfig4"><title>Test Figure</title>
+<programlisting>This is a
+  ProgramListing
+</programlisting>
+</figure>
+</appendix>
+
+<appendix><title>Second 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/>
+
+</book>
+</set>
diff --git a/testdocs/table.xml b/testdocs/table.xml
new file mode 100644 (file)
index 0000000..09cd20b
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<chapter>
+<title>Tables</title>
+<table id="ug-t3-2">
+<title>Slicing Options</title>
+<tgroup cols="4" align="left">
+<colspec colnum="2" colname="c2"/>
+<colspec colnum="4" colname="c4"/>
+<spanspec spanname="hspan" namest="c2" nameend="c4" align="center"/>
+<thead>
+<row>
+<entry morerows="1" valign="middle">Output</entry>
+<entry namest="c2" nameend="c4">Input</entry>
+</row>
+<row>
+<entry align="left">Uniform</entry>
+<entry>Perimeter</entry>
+<entry>Curvilinear</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>Uniform</entry>
+<entry>OrthoSlice, Slice</entry>
+<entry align="center">-</entry>
+<entry align="center">-</entry>
+
+</row>
+<row>
+<entry>Perimeter</entry>
+<entry align="center">-</entry>
+<entry>OrthoSlice</entry>
+<entry align="center">-</entry>
+</row>
+<row>
+<entry>Curvilinear</entry>
+<entry>OrthoSlice</entry>
+<entry>OrthoSlice</entry>
+<entry>OrthoSlice</entry>
+</row>
+<row>
+<entry>Pyramid</entry>
+<entry align="center">-</entry>
+<entry align="center">-</entry>
+<entry>ProbeLat</entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+</chapter>
diff --git a/testdocs/toc.xml b/testdocs/toc.xml
new file mode 100644 (file)
index 0000000..8528e75
--- /dev/null
@@ -0,0 +1,70 @@
+<?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">
+<!-- test document -->
+<book>
+<bookinfo>
+<title>ToC Test</title>
+</bookinfo>
+<chapter><title>Empty ToC</title>
+<para>First, an empty toc:</para>
+</chapter>
+<toc/>
+<chapter><title>Content-full ToC</title>
+<para>Now, an abbreviated ToC from
+<citetitle>DocBook: The Definitive Guide</citetitle>:
+</para>
+</chapter>
+<toc>
+<tocchap>
+<tocentry>Preface</tocentry>
+<toclevel1>
+  <tocentry linkend="foo">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>
+<chapter><title>First chapter</title>
+<para>This chapter tests the empty toc.</para>
+</chapter>
+<chapter id="foo"><title>Second chapter</title>
+<para>This chapter tests the empty toc.</para>
+</chapter>
+<chapter><title>Third chapter</title>
+<para>This chapter tests the empty toc.</para>
+</chapter>
+</book>