summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorShaun McCance <shaunm@src.gnome.org>2007-05-04 18:56:12 +0000
committerShaun McCance <shaunm@src.gnome.org>2007-05-04 18:56:12 +0000
commit3f20a9658b7c6b96c3e45327cb3b051ae04d3da3 (patch)
tree762aeb995995a1ff6dd8f819912a8fde10723521 /test
parentf0fdca97c120ecd09e09d68ee5e820ccb0e9e818 (diff)
downloadgnome-doc-utils-3f20a9658b7c6b96c3e45327cb3b051ae04d3da3.tar.gz
- More table tests
* test/testbook/testbook.xml: - More table tests * xslt/docbook/html/db2html-table.xsl: - Massively improved (and somewhat more documented) CALS tables * xslt/docbook/html/db2html-autotoc.xsl: * xslt/docbook/html/db2html-bibliography.xsl: * xslt/docbook/html/db2html-block.xsl: * xslt/docbook/html/db2html-callout.xsl: * xslt/docbook/html/db2html-classsynopsis.xsl: * xslt/docbook/html/db2html-cmdsynopsis.xsl: * xslt/docbook/html/db2html-css.xsl: * xslt/docbook/html/db2html-division.xsl: * xslt/docbook/html/db2html-ebnf.xsl: * xslt/docbook/html/db2html-footnote.xsl: * xslt/docbook/html/db2html-funcsynopsis.xsl: * xslt/docbook/html/db2html-info.xsl: * xslt/docbook/html/db2html-inline.xsl: * xslt/docbook/html/db2html-l10n.xsl: * xslt/docbook/html/db2html-list.xsl: * xslt/docbook/html/db2html-media.xsl: * xslt/docbook/html/db2html-qanda.xsl: * xslt/docbook/html/db2html-refentry.xsl: * xslt/docbook/html/db2html-title.xsl: * xslt/docbook/html/db2html-xref.xsl: - We don't need the html: prefix to do the namespace alias * doc/xslt/Makefile.am: * doc/xslt/C/gnome-doc-xslt.xml: - Keep xsldoc.awk output around, can do checks later svn path=/trunk/; revision=930
Diffstat (limited to 'test')
-rw-r--r--test/testbook/testbook.xml314
1 files changed, 308 insertions, 6 deletions
diff --git a/test/testbook/testbook.xml b/test/testbook/testbook.xml
index c30cf0f..ea093c9 100644
--- a/test/testbook/testbook.xml
+++ b/test/testbook/testbook.xml
@@ -596,12 +596,263 @@ procedure
</chapter> <!-- lists -->
-<chapter id="tables">
-<title>Table Elements</title>
+<chapter id="cals-tables">
+<title>CALS Tables</title>
-<table>
-<title>A Table</title>
-<tgroup>
+<informaltable>
+<tgroup cols="2">
+ <tbody>
+ <row><entry>fe</entry><entry>fi</entry></row>
+ <row><entry>fo</entry><entry>fum</entry></row>
+ </tbody>
+</tgroup>
+</informaltable>
+
+<para>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed risus dui,
+faucibus at, blandit eu, congue in, sem. Suspendisse nec mi. Sed vel augue.
+Cras egestas. Vivamus nisi. Fusce neque. Aenean posuere, orci non lacinia
+consectetuer, neque libero semper metus, ut ullamcorper eros lorem at tellus.
+Ut ante tellus, iaculis at, tincidunt quis, ultrices at, ligula. Pellentesque
+porttitor condimentum nulla.</para>
+
+<section id="cals-tables-span">
+<title>Spanning</title>
+
+<para>Here's some column spanning:</para>
+<informaltable frame="none">
+<tgroup cols="4" rowsep="1" colsep="1">
+ <colspec colname="one"/>
+ <colspec colname="two"/>
+ <colspec colname="three"/>
+ <colspec colname="four"/>
+ <spanspec spanname="two-four" namest="two" nameend="four"/>
+ <tbody>
+ <row>
+ <entry>one</entry>
+ <entry>two</entry>
+ <entry>three</entry>
+ <entry>four</entry>
+ </row>
+ <row>
+ <entry namest="one" nameend="two">one-two</entry>
+ <entry>three</entry>
+ <entry>four</entry>
+ </row>
+ <row>
+ <entry namest="two" nameend="three">two-three</entry>
+ <entry>four</entry>
+ </row>
+ <row>
+ <entry>one</entry>
+ <entry spanname="two-four">two-four</entry>
+ </row>
+ </tbody>
+</tgroup>
+</informaltable>
+
+<para>Here's some row spanning:</para>
+<informaltable frame="none">
+<tgroup cols="4" rowsep="1" colsep="1">
+ <tbody>
+ <row>
+ <entry morerows="1">one</entry>
+ <entry morerows="2">two</entry>
+ <entry>three</entry>
+ <entry>four</entry>
+ </row>
+ <row>
+ <entry>three</entry>
+ <entry morerows="1">four</entry>
+ </row>
+ <row>
+ <entry>one</entry>
+ <entry morerows="1">three</entry>
+ </row>
+ <row>
+ <entry>one</entry>
+ <entry>two</entry>
+ <entry>four</entry>
+ </row>
+ </tbody>
+</tgroup>
+</informaltable>
+
+<para>Here we test implicit entries:</para>
+<informaltable frame="none">
+<tgroup cols="4" rowsep="1" colsep="1">
+ <colspec colname="one"/>
+ <colspec colname="two"/>
+ <colspec colname="three"/>
+ <colspec colname="four"/>
+ <tbody>
+ <row>
+ <entry>one</entry>
+ <entry>two</entry>
+ <entry morerows="2">three</entry>
+ <entry>four</entry>
+ </row>
+ <row>
+ <entry colname="two">two</entry>
+ <entry>four</entry>
+ </row>
+ <row>
+ <entry colname="four">four</entry>
+ </row>
+ <row>
+ <entry colname="three">three</entry>
+ <entry>four</entry>
+ </row>
+ <row>
+ <entry colname="four">four</entry>
+ </row>
+ </tbody>
+</tgroup>
+</informaltable>
+
+<para>And here's some craziness to mix it all together:</para>
+<informaltable frame="none">
+<tgroup cols="5" rowsep="1" colsep="1">
+ <colspec colname="one"/>
+ <colspec colname="two"/>
+ <colspec colname="three"/>
+ <colspec colname="four"/>
+ <colspec colname="five"/>
+ <tbody>
+ <row>
+ <entry morerows="1">one</entry>
+ <entry>two</entry>
+ <entry>three</entry>
+ <entry morerows="3">four</entry>
+ <entry>five</entry>
+ </row>
+ <row>
+ <entry colname="three">three</entry>
+ <entry morerows="1">five</entry>
+ </row>
+ <row>
+ <entry>one</entry>
+ <entry namest="two" nameend="three">two-three</entry>
+ </row>
+ <row>
+ <entry>one</entry>
+ <entry namest="two" nameend="three" morerows="1">two-three</entry>
+ <entry>five</entry>
+ </row>
+ <row>
+ <entry>one</entry>
+ <entry>four</entry>
+ <entry>five</entry>
+ </row>
+ </tbody>
+</tgroup>
+</informaltable>
+
+</section> <!-- cals-tables-span -->
+
+<section id="cals-tables-sep">
+<title>Separators</title>
+
+<!-- FIXME: more -->
+<para>Here we just set <sgmltag>colsep</sgmltag> on some
+<sgmltag>entry</sgmltag> elements:</para>
+<informaltable frame="none">
+<tgroup cols="3">
+ <tbody>
+ <row>
+ <entry colsep="1">SEP</entry>
+ <entry>no</entry>
+ <entry>no</entry>
+ </row>
+ <row>
+ <entry>no</entry>
+ <entry colsep="1">SEP</entry>
+ <entry>no</entry>
+ </row>
+ </tbody>
+</tgroup>
+</informaltable>
+
+<para>Here we turn column separators on and off with
+<sgmltag>colspec</sgmltag> elements:</para>
+<informaltable frame="none">
+<tgroup cols="3" colsep="1">
+ <colspec colname="one" colsep="0"/>
+ <colspec colname="two" colsep="1"/>
+ <colspec colname="three" colsep="0"/>
+ <colspec/>
+ <tbody>
+ <row>
+ <entry>no</entry>
+ <entry colname="two">SEP</entry>
+ <entry>no</entry>
+ </row>
+ <row>
+ <entry namest="one" nameend="two">SEP</entry>
+ <entry>no</entry>
+ </row>
+ <row>
+ <entry namest="two" nameend="three">no</entry>
+ </row>
+ </tbody>
+</tgroup>
+</informaltable>
+
+</section> <!-- cals-tables-sep -->
+
+<section id="cals-tables-frames">
+<title>Frames</title>
+
+<para>This table has a top frame:</para>
+<informaltable frame="top">
+<tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>fe</entry>
+ <entry>fi</entry>
+ </row>
+ <row>
+ <entry>fo</entry>
+ <entry>fum</entry>
+ </row>
+ </tbody>
+</tgroup>
+</informaltable>
+
+<para>This table has a bottom frame:</para>
+<informaltable frame="bottom">
+<tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>fe</entry>
+ <entry>fi</entry>
+ </row>
+ <row>
+ <entry>fo</entry>
+ <entry>fum</entry>
+ </row>
+ </tbody>
+</tgroup>
+</informaltable>
+
+<para>This table has top and bottom frames:</para>
+<informaltable frame="topbot">
+<tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>fe</entry>
+ <entry>fi</entry>
+ </row>
+ <row>
+ <entry>fo</entry>
+ <entry>fum</entry>
+ </row>
+ </tbody>
+</tgroup>
+</informaltable>
+
+<para>This table has side frames:</para>
+<informaltable frame="sides">
+<tgroup cols="2">
<tbody>
<row>
<entry>fe</entry>
@@ -613,8 +864,59 @@ procedure
</row>
</tbody>
</tgroup>
+</informaltable>
+
+<para>This table has no frames:</para>
+<informaltable frame="none">
+<tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>fe</entry>
+ <entry>fi</entry>
+ </row>
+ <row>
+ <entry>fo</entry>
+ <entry>fum</entry>
+ </row>
+ </tbody>
+</tgroup>
+</informaltable>
+
+<para>We default to framing all sides when not specified:</para>
+<informaltable>
+<tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>fe</entry>
+ <entry>fi</entry>
+ </row>
+ <row>
+ <entry>fo</entry>
+ <entry>fum</entry>
+ </row>
+ </tbody>
+</tgroup>
+</informaltable>
+
+</section> <!-- cals-tables-frames -->
+
+<section id="cals-tables-misc">
+<title>Miscellaneous</title>
+
+<table pgwide="1">
+<title>Using <sgmltag>pgwide</sgmltag></title>
+<tgroup cols="3">
+ <tbody>
+ <row><entry>fe</entry><entry>fi</entry><entry>fo</entry></row>
+ <row><entry>fum</entry><entry>fe</entry><entry>fi</entry></row>
+ <row><entry>fo</entry><entry>fum</entry><entry>fe</entry></row>
+ <row><entry>fi</entry><entry>fo</entry><entry>fum</entry></row>
+ </tbody>
+</tgroup>
</table>
-</chapter> <!-- tables -->
+</section> <!-- cals-tables-misc -->
+
+</chapter> <!-- cals-tables -->
</book>