]> granicus.if.org Git - docbook-dsssl/commitdiff
New and updated tests
authorNorman Walsh <ndw@nwalsh.com>
Wed, 1 Jan 2003 21:18:59 +0000 (21:18 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 1 Jan 2003 21:18:59 +0000 (21:18 +0000)
testdocs/tests/book.004.xml
testdocs/tests/book.005.xml [new file with mode: 0644]
testdocs/tests/figure.001.xml
testdocs/tests/figure.003.xml [new file with mode: 0644]
testdocs/tests/funcsynopsis.001.xml
testdocs/tests/lineannotation.001.xml [new file with mode: 0644]
testdocs/tests/mediaobject.001.xml
testdocs/tests/mediaobjectco.001.xml [new file with mode: 0644]
testdocs/tests/subtitle.001.xml [new file with mode: 0644]

index d972f3045ceffea566a047dc84d77e9312e36712..025b6a418b51914207a4790fb745bb7e4bb3c3ed 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
                "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 <book id="book">
-<title>Unit Test: book.003</title>
+<title>Unit Test: book.004</title>
 
 <chapter id="chap1">
 <chapterinfo>
diff --git a/testdocs/tests/book.005.xml b/testdocs/tests/book.005.xml
new file mode 100644 (file)
index 0000000..4611ece
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+               "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<book id="book">
+<bookinfo>
+<title>Unit Test: book.005</title>
+</bookinfo>
+
+<dedication><title>Dedication</title>
+<para>Some Dedication</para>
+</dedication>
+
+<preface><title>Preface</title>
+<para>Some Preface</para>
+</preface>
+
+<part><title>First Part</title>
+<partintro>
+<para>Some Part Intro</para>
+</partintro>
+
+<chapter><title>First Chapter</title>
+<para>Some Chapter</para>
+</chapter>
+
+<chapter><title>Second Chapter</title>
+<para>Some Chapter</para>
+</chapter>
+</part>
+
+<part><title>Second Part</title>
+<partintro>
+<para>Some Part Intro</para>
+</partintro>
+
+<chapter><title>Third Chapter</title>
+<para>Some Chapter</para>
+</chapter>
+
+<chapter><title>Fourth Chapter</title>
+<para>Some Chapter</para>
+</chapter>
+</part>
+
+<appendix><title>Appendix</title>
+<para>Some Appendix</para>
+</appendix>
+</book>
index 066070582be481ec5589b7caae674c27e21c9f45..3b1586845b893ea5d3ea68d0446e03eac96d8c8f 100644 (file)
     <imageobject>
       <imagedata
         align="center"
-        fileref="graphics/duck-small.bmp"
-        format="BMP"
+        fileref="graphics/duck-small.eps"
+        format="EPS"
         srccredit="O'Reilly &amp; Associates/Dover Archives"/>
     </imageobject>
     <imageobject>
       <imagedata
         align="center"
-        fileref="graphics/duck-small.eps"
-        format="EPS"
+        fileref="graphics/duck-small.png"
+        format="PNG"
         srccredit="O'Reilly &amp; Associates/Dover Archives"/>
     </imageobject>
     <imageobject>
@@ -37,8 +37,8 @@
     <imageobject>
       <imagedata
         align="center"
-        fileref="graphics/duck-small.png"
-        format="PNG"
+        fileref="graphics/duck-small.bmp"
+        format="BMP"
         srccredit="O'Reilly &amp; Associates/Dover Archives"/>
     </imageobject>
     <textobject><phrase>The DocBook: TDG Duck</phrase></textobject>
diff --git a/testdocs/tests/figure.003.xml b/testdocs/tests/figure.003.xml
new file mode 100644 (file)
index 0000000..5ae5e16
--- /dev/null
@@ -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" [
+<!ATTLIST xref
+  xrefstyle CDATA #IMPLIED
+>
+]>
+<article>
+<articleinfo>
+<title>Unit Test: figure.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>Cross reference to the figure: <xref linkend="figduck" xrefstyle="title"/>.</para>
+
+<figure id="figduck">
+  <title>The Wood Duck as seen on the Cover of DocBook: The Definitive Guide</title>
+  <titleabbrev>The Duck</titleabbrev>
+  <mediaobject>
+    <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.png"
+        format="PNG"
+        srccredit="O'Reilly &amp; Associates/Dover Archives"/>
+    </imageobject>
+    <textobject><phrase>The DocBook: TDG Duck</phrase></textobject>
+  </mediaobject>
+</figure>
+
+</article>
index b399ed30d811ad6e7dbe19fab4ab8b0615b1b892..0933274b572fb95aff3f6abccf056ef43fd17303 100644 (file)
@@ -9,6 +9,8 @@
 </author>
 </articleinfo>
 
+<section><title>"Default" rendering</title>
+
 <para>A funcsynopsis.</para>
 
 <funcsynopsis>
@@ -71,6 +73,9 @@
 </funcprototype>
 </funcsynopsis>
 
+</section>
+<section><title>ANSI Rendering</title>
+
 <para>Another.</para>
 
 <funcsynopsis><?dbhtml funcsynopsis-style="ansi"?>
 </funcprototype>
 </funcsynopsis>
 
+</section>
+<section><title>K&amp;R Rendering</title>
+
+<para>Another.</para>
+
+<funcsynopsis><?dbhtml funcsynopsis-style="kr"?>
+<funcsynopsisinfo>
+#include &lt;varargs.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+  <funcdef><type>float</type> <function>rand</function></funcdef>
+  <void/>
+</funcprototype>
+
+<funcprototype>
+  <funcdef>int <function>max</function></funcdef>
+  <varargs/>
+</funcprototype>
+
+<funcprototype>
+  <funcdef>int <function>idiv</function></funcdef>
+    <paramdef><type>int</type> <parameter>n</parameter></paramdef>
+    <paramdef><type>int</type> <parameter>m</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>Another.</para>
+
+<funcsynopsis><?dbhtml funcsynopsis-style="kr"?>
+<funcprototype>
+  <funcdef>void <function>qsort</function></funcdef>
+    <paramdef>void *<parameter>dataptr</parameter>[]</paramdef>
+    <paramdef>int <parameter>left</parameter></paramdef>
+    <paramdef>int <parameter>right</parameter></paramdef>
+    <paramdef><type>int</type> (*<parameter>comp</parameter>)
+      <funcparams>void *, void *</funcparams></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>Another.</para>
+
+<funcsynopsis><?dbhtml funcsynopsis-style="kr"?>
+<funcprototype>
+  <funcdef>int <function>foo_frob_something</function></funcdef>
+    <paramdef>foo_sometype1 <parameter>foo_frob_parm1</parameter></paramdef>
+    <paramdef>foo_sometype1 <parameter>foo_frob_parm2</parameter></paramdef>
+    <paramdef>foo_sometype1 <parameter>foo_frob_parm3</parameter></paramdef>
+    <paramdef>int (* <parameter>parm4</parameter> )
+      <funcparams>int a, int b, int c</funcparams></paramdef>
+    <paramdef>foo_sometype1 <parameter>foo_frob_parm5</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+</section>
+
 </article>
diff --git a/testdocs/tests/lineannotation.001.xml b/testdocs/tests/lineannotation.001.xml
new file mode 100644 (file)
index 0000000..fe896d0
--- /dev/null
@@ -0,0 +1,21 @@
+<?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 id="article">
+<articleinfo>
+<title>Unit Test: lineannotation.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 <sgmltag>lineannotation</sgmltag>.</para>
+
+<screen>This is a
+screen                  <lineannotation>annotation 1</lineannotation>
+with several
+lines that have no      <lineannotation>annotation 2</lineannotation>
+particular meaning</screen>
+
+</article>
index de6bbc31eeb0699de68e70dea3abf580f139a060..b2ad8bf73e0f3cfe9e6acbd91d2b5003bc791d5b 100644 (file)
     <imageobject>
       <imagedata
         align="right"
-        width="50%"
-        fileref="graphics/duck-small.gif"
+        width="6in"
+        fileref="graphics/duck-small.png"
+        format="PNG"
         srccredit="O'Reilly &amp; Associates/Dover Archives"/>
     </imageobject>
     <imageobject>
       <imagedata
         align="right"
-        width="50%"
-        fileref="graphics/duck-small.png"
-        format="PNG"
+        width="6in"
+        fileref="graphics/duck-small.gif"
         srccredit="O'Reilly &amp; Associates/Dover Archives"/>
     </imageobject>
     <textobject><phrase>The DocBook: TDG Duck</phrase></textobject>
diff --git a/testdocs/tests/mediaobjectco.001.xml b/testdocs/tests/mediaobjectco.001.xml
new file mode 100644 (file)
index 0000000..4918f7d
--- /dev/null
@@ -0,0 +1,33 @@
+<?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: mediaobjectco.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>
+
+  <mediaobjectco>
+    <imageobjectco>
+      <areaspec>
+        <area id="a1" units="calspair" coords="50,50,50,50"/>
+        <areaset id="s1" coords="">
+          <area id="a2" units="calspair" coords="25,25,25,25"/>
+          <area id="a3" units="calspair" coords="75,75,75,75"/>
+        </areaset>
+      </areaspec>
+      <imageobject>
+        <imagedata
+          fileref="graphics/duck.png"
+          contentwidth="400px"
+          contentdepth="400px"
+          srccredit="O'Reilly &amp; Associates/Dover Archives"/>
+      </imageobject>
+    </imageobjectco>
+    <textobject><phrase>alt text</phrase></textobject>
+  </mediaobjectco>
+
+</article>
diff --git a/testdocs/tests/subtitle.001.xml b/testdocs/tests/subtitle.001.xml
new file mode 100644 (file)
index 0000000..9c5f1cf
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+               "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<book>
+<title>Unit Test: subtitle.001</title>
+<subtitle>Book Subtitle</subtitle>
+
+<part><title>Part Title</title><subtitle>Part Subtitle</subtitle>
+
+<chapter><title>Chapter Title</title><subtitle>Chapter Subtitle</subtitle>
+  <sect1><title>Sect1 Title</title><subtitle>Sect1 Subtitle</subtitle>
+    <sect2><title>Sect2 Title</title><subtitle>Sect2 Subtitle</subtitle>
+      <sect3><title>Sect3 Title</title><subtitle>Sect3 Subtitle</subtitle>
+        <para>Spoon!</para>
+      </sect3>
+    </sect2>
+  </sect1>
+</chapter>
+
+<chapter><title>Chapter Title</title><subtitle>Chapter Subtitle</subtitle>
+  <section><title>Section Title</title><subtitle>Section Subtitle</subtitle>
+    <section><title>Subsection Title</title><subtitle>Subsection Subtitle</subtitle>
+      <section><title>Subsubsection Title</title><subtitle>Subsubsection Subtitle</subtitle>
+        <para>Fork?</para>
+      </section>
+    </section>
+  </section>
+</chapter>
+
+</part>
+
+</book>