This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Tables and XSL stylesheets


I thought I'd learn how to do tables in DocBook XML, and that I'd 
start by running the example in the O'Reilly book through the XSL 
stylesheets.  First, I added a couple of slashes to convert the empty 
tags from SGML to XML, and then I  wrapped it inside of a <book> 
element and a <chapter> subelement, just to make sure it would behave 
okay.  The result was surprising: the stylesheets complained that "No 
template matches entry" and _some_ of the tags were printed verbatim 
in red.  But some of the entries worked.  It seems like a stylesheet 
problem, or did I screw up the XML?

See attachments for more info...
<?xml version ="1.0"?>
<!DOCTYPE book SYSTEM "../Development/docbook/dtd/docbookx.dtd"> 
<!-- -*- docbook -*- -->
<book>
   <bookinfo>
     <title>
       Table example
     </title>
   </bookinfo>

<chapter>
<title>Table Example</title>
<table frame="all"><title>Sample Table</title>
<tgroup cols="5" align="left" colsep="1" rowsep="1">
<colspec colname="c1"/>
<colspec colname="c2"/>
<colspec colname="c3"/>
<colspec colnum="5" colname="c5"/>
<spanspec spanname="hspan" namest="c1" nameend="c2" align="center"/>
<spanspec spanname="bspan" namest="c2" nameend="c3" align="center"/>
<thead>
<row>
   <entry spanname="hspan">Horizontal Span</entry>
   <entry>a3</entry>
   <entry>a4</entry>
   <entry>a5</entry>
</row>
</thead>
<tfoot>
<row>
   <entry>f1</entry>
   <entry>f2</entry>
   <entry>f3</entry>
   <entry>f4</entry>
   <entry>f5</entry>
</row>
</tfoot>
<tbody>
<row>
   <entry>b1</entry>
   <entry>b2</entry>
   <entry>b3</entry>
   <entry>b4</entry>
   <entry morerows="1" valign="middle"><para>  <!-- Pernicous Mixed Content -->
   Vertical Span</para></entry>
</row>
<row>
   <entry>c1</entry>
   <entry spanname="bspan" morerows="1" valign="bottom">Span Both</entry>
   <entry>c4</entry>
</row>
<row>
   <entry>d1</entry>
   <entry>d4</entry>
   <entry>d5</entry>
</row>
</tbody>
</tgroup>
</table>
</chapter>
</book>
Title: Table example

Table example


Table of Contents

1. Table Example

1. Table Example

Table 1.1. Sample Table

<entry>f1</entry><entry>f2</entry><entry>f3</entry><entry>f4</entry><entry>f5</entry>
Horizontal Spana3a4a5
b1b2b3b4

Vertical Span

c1Span Bothc4
d1d4d5
file:/Mingus/tmp/table.xml:30: No template matches entry.
file:/Mingus/tmp/table.xml:31: No template matches entry.
file:/Mingus/tmp/table.xml:32: No template matches entry.
file:/Mingus/tmp/table.xml:33: No template matches entry.
file:/Mingus/tmp/table.xml:34: No template matches entry.
-- 
+-------------------------------------------------------------------+
| Dave Makower                                 <davemak@iclick.com> |
| Director of Portal Architecture & Development                     |
+--------------------------------+----------------------------------+
|   iClick, Inc.                 |   (914) 872-8030                 |
|   120 Bloomingdale Road        |   (914) 872-8100   fax           |
|   3rd Floor                    |   (914) 872-8000   main          |
|   White Plains, NY  10605      |   http://www.iclick.com/         |
+--------------------------------+----------------------------------+

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]