]> granicus.if.org Git - docbook-dsssl/commitdiff
Updated test documents
authoruid48421 <uid48421>
Wed, 4 Jul 2001 15:53:15 +0000 (15:53 +0000)
committeruid48421 <uid48421>
Wed, 4 Jul 2001 15:53:15 +0000 (15:53 +0000)
testdocs/authors.xml [new file with mode: 0644]
testdocs/book.xml
testdocs/ebnf.xml [new file with mode: 0644]
testdocs/equation.xml [new file with mode: 0644]
testdocs/glossary.xml
testdocs/mediaobject.xml [new file with mode: 0644]
testdocs/mlang.pl
testdocs/xref.xml [new file with mode: 0644]

diff --git a/testdocs/authors.xml b/testdocs/authors.xml
new file mode 100644 (file)
index 0000000..b6917be
--- /dev/null
@@ -0,0 +1,79 @@
+<?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>
index 6a2097460eea3f5613b1e64cb45986bd986c4ced..a3d6e89f296e8591aa9b91c9723ddc4b497ba927 100644 (file)
@@ -6,6 +6,7 @@
 <book>
 <bookinfo>
 <title>Book Title</title>
+<subtitle>Book Subtitle</subtitle>
 <keywordset>
 <keyword>book keyword1</keyword>
 <keyword>book keyword2</keyword>
diff --git a/testdocs/ebnf.xml b/testdocs/ebnf.xml
new file mode 100644 (file)
index 0000000..a07dfd7
--- /dev/null
@@ -0,0 +1,134 @@
+<!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>
diff --git a/testdocs/equation.xml b/testdocs/equation.xml
new file mode 100644 (file)
index 0000000..fa44e8d
--- /dev/null
@@ -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" [
+<!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>
+
index 8763cb6416f7539ac5df07001a5019f26a2af0c9..a0eba0d36949dc8309edf6310a39a48c52b554b0 100644 (file)
@@ -5,6 +5,12 @@
 <!-- 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>
@@ -33,7 +39,7 @@ variables used in syntax examples.</para>
 <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
diff --git a/testdocs/mediaobject.xml b/testdocs/mediaobject.xml
new file mode 100644 (file)
index 0000000..441818a
--- /dev/null
@@ -0,0 +1,33 @@
+<?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 &amp; Associates/Dover Archives"/>
+    </imageobject>
+    <imageobject>
+      <imagedata
+        align="right"
+        fileref="graphics/duck-small.png"
+        format="PNG"
+        srccredit="O'Reilly &amp; Associates/Dover Archives"/>
+    </imageobject>
+    <textobject><phrase>The DocBook: TDG Duck</phrase></textobject>
+    <caption><para>The Duck</para></caption>
+  </mediaobject>
+
+</article>
+
index f3dede07b16ce9325c737e644aedc9f400aca49f..fb5af8f31380a4c746c5a5e16cbf5429017b068a 100644 (file)
@@ -26,7 +26,8 @@ foreach my $key (keys %option) {
     $option{$key} = $opt{$key} if exists($opt{$key});
 }
 
-my %languages = ('ca' => 'Catalan',
+my %languages = ('af' => 'Afrikaans',
+                'ca' => 'Catalan',
                 'cs' => 'Czech',
                 'da' => 'Danish',
                 'de' => 'German',
@@ -52,6 +53,7 @@ my %languages = ('ca' => 'Catalan',
                 'sl' => 'Slovenian',
                 'sr' => 'Serbian',
                 'sv' => 'Swedish',
+                'tr' => 'Turkish',
                 'zh_cn' => 'Chinese (Continental)',
                 'zh_tw' => 'Chinese (Traditional)');
 
diff --git a/testdocs/xref.xml b/testdocs/xref.xml
new file mode 100644 (file)
index 0000000..0f63647
--- /dev/null
@@ -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" [
+<!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 &ldquo;a&rdquo;</para>
+</step>
+<step id="step-y"><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 id="step-z"><para>should be an &ldquo;ii&rdquo;</para>
+</step>
+</substeps>
+</step>
+</substeps>
+</step>
+</procedure>
+
+</article>
+