--- /dev/null
+<?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>Book Title</title>
+<keywordset>
+<keyword>book keyword1</keyword>
+<keyword>book keyword2</keyword>
+</keywordset>
+<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>
+<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>
+
+<chapter><title>Book Chapter</title>
+
+<para>What about <xref linkend="j.doe"/>, one of the authors:
+<xref linkend="authors"/>.</para>
+
+</chapter>
+
+</book>
<book>
<bookinfo>
<title>Book Title</title>
+<subtitle>Book Subtitle</subtitle>
<keywordset>
<keyword>book keyword1</keyword>
<keyword>book keyword2</keyword>
--- /dev/null
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook EBNF Module V1.0//EN"
+ "http://www.oasis-open.org/docbook/xml/ebnf/1.0/dbebnf.dtd">
+<book>
+<title>Book Title</title>
+<chapter><title>Chapter Title</title>
+<para>Content.</para>
+
+E = E + T | T
+T = T * F | F
+F = number
+
+E = a | m
+a = e + m | e - m
+m = m * f | m / f | f
+f = number
+
+3 * 4 + 5
+
+<productionset><title>Arithemetic Expressions</title>
+<production id="ebnf.expression">
+ <lhs>Expression</lhs>
+ <rhs><nonterminal>ArithExpression</nonterminal> |
+ <nonterminal>MultExpression</nonterminal>
+ <lineannotation>Does this grammar actually get precedence right?
+ </lineannotation>
+ </rhs>
+</production>
+<production id="ebnf.arith">
+ <lhs>ArithExpression</lhs>
+ <rhs><nonterminal>Expression</nonterminal>
+ '+'
+ <nonterminal>MultExpression</nonterminal>
+ </rhs>
+ <rhs><nonterminal>Expression</nonterminal>
+ '-'
+ <nonterminal>MultExpression</nonterminal>
+ </rhs>
+</production>
+<production id="ebnf.mult">
+ <lhs>MultExpression</lhs>
+ <rhs><nonterminal>MultExpression</nonterminal>
+ '*'
+ <nonterminal>MultExpression</nonterminal>
+ </rhs>
+ <rhs>
+ <nonterminal>MultExpression</nonterminal>
+ '/'
+ <nonterminal>MultExpression</nonterminal>
+ </rhs>
+ <constraint linkend="div0"/>
+ <rhs>
+ <nonterminal>Number</nonterminal>
+ </rhs>
+</production>
+<production id="ebnf.expression">
+ <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>
+
+
+<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>
+
+<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>
+
+<productionset>
+<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>
+
+<para>A bunch of anchors to make the preceding examples valid:
+<anchor id="NT-S"/>
+<anchor id="NT-Eq"/>
+<anchor id="NT-content"/>
+<anchor id="NT-ETag"/>
+<anchor id="NT-EmptyElemTag"/>
+<anchor id="NT-STag"/>
+</para>
+
+<constraintdef id="check-rmd" role="VC">
+<title>Standalone Document Declaration</title>
+<para>Some description...</para>
+</constraintdef>
+
+<constraintdef id="elementvalid" role="VC">
+<title>Element Valid</title>
+<para>Some description...</para>
+</constraintdef>
+
+<constraintdef id="GIMatch" role="WFC">
+<title>Element Type Match</title>
+<para>Some description...</para>
+</constraintdef>
+
+</chapter>
+</book>
--- /dev/null
+<?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 blah "blah blah blah. blah blah blah blah blah blah. And blah.">
+]>
+<!-- test document -->
+<article>
+<articleinfo>
+<title>Equations</title>
+</articleinfo>
+
+<para>This is a test. Look at <xref linkend="eq2"/>.</para>
+
+<equation><title>First Equation</title>
+<mediaobject>
+<imageobject>
+<imagedata fileref="emc2.png"/>
+</imageobject>
+<textobject>
+<phrase>e=mc^2</phrase>
+</textobject>
+</mediaobject>
+</equation>
+
+<equation id="eq2"><title>Second Equation</title>
+<mediaobject>
+<imageobject>
+<imagedata fileref="emc2.png"/>
+</imageobject>
+<textobject>
+<phrase>e=mc^2</phrase>
+</textobject>
+</mediaobject>
+</equation>
+
+<equation><title>Third Equation</title>
+<mediaobject>
+<imageobject>
+<imagedata fileref="emc2.png"/>
+</imageobject>
+<textobject>
+<phrase>e=mc^2</phrase>
+</textobject>
+</mediaobject>
+</equation>
+
+</article>
+
<!-- test document -->
<book><title>Glossary Tests</title>
+<chapter><title>Testing</title>
+
+<para>What about <glossterm linkend="foo">glossterm</glossterm>.</para>
+
+</chapter>
+
<glossary id="glossary">
<glossentry>
<glossterm>foo</glossterm>
<glossary id="glossary-div">
<glossdiv>
<title>Glossary Division</title>
-<glossentry>
+<glossentry id="foo">
<glossterm>foo</glossterm>
<glossdef>
<para>1. interj. Term of disgust. 2. [very common] Used very generally
--- /dev/null
+<?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 blah "blah blah blah. blah blah blah blah blah blah. And blah.">
+]>
+<!-- test document -->
+<article>
+<articleinfo>
+<title>Media Object</title>
+</articleinfo>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ align="right"
+ fileref="graphics/duck-small.gif"
+ format="GIF"
+ srccredit="O'Reilly & Associates/Dover Archives"/>
+ </imageobject>
+ <imageobject>
+ <imagedata
+ align="right"
+ fileref="graphics/duck-small.png"
+ format="PNG"
+ srccredit="O'Reilly & Associates/Dover Archives"/>
+ </imageobject>
+ <textobject><phrase>The DocBook: TDG Duck</phrase></textobject>
+ <caption><para>The Duck</para></caption>
+ </mediaobject>
+
+</article>
+
$option{$key} = $opt{$key} if exists($opt{$key});
}
-my %languages = ('ca' => 'Catalan',
+my %languages = ('af' => 'Afrikaans',
+ 'ca' => 'Catalan',
'cs' => 'Czech',
'da' => 'Danish',
'de' => 'German',
'sl' => 'Slovenian',
'sr' => 'Serbian',
'sv' => 'Swedish',
+ 'tr' => 'Turkish',
'zh_cn' => 'Chinese (Continental)',
'zh_tw' => 'Chinese (Traditional)');
--- /dev/null
+<?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 blah "blah blah blah. blah blah blah blah blah blah. And blah.">
+]>
+<!-- test document -->
+<article>
+<articleinfo>
+<title>Procedures</title>
+</articleinfo>
+
+<para>What about a cross reference to procedures
+(<xref linkend="proc"/>) and steps (<xref linkend="step-x"/>,
+<xref linkend="step-y"/>, <xref linkend="step-z"/>).
+</para>
+
+<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 “a”</para>
+</step>
+<step id="step-y"><para>Should be a “b”</para>
+</step>
+<step><para>Should be a “c”</para>
+</step>
+<step><para>Should be a “d”</para>
+</step>
+<step><para>should be an “e”</para>
+<substeps>
+<step><para>should be an “i”</para>
+</step>
+<step id="step-z"><para>should be an “ii”</para>
+</step>
+</substeps>
+</step>
+</substeps>
+</step>
+</procedure>
+
+</article>
+