dion 02/01/20 19:32:35
Modified: latka/xsl/site docbook2document.xsl
Log:
Added informaltable, sgmltag support.
Fixed bug in table header handling
Revision Changes Path
1.3 +20 -6 jakarta-commons/latka/xsl/site/docbook2document.xsl
Index: docbook2document.xsl
===================================================================
RCS file: /home/cvs/jakarta-commons/latka/xsl/site/docbook2document.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- docbook2document.xsl 21 Jan 2002 00:17:45 -0000 1.2
+++ docbook2document.xsl 21 Jan 2002 03:32:35 -0000 1.3
@@ -2,8 +2,8 @@
<!--
Author: (insert avalon author here)
Author: dIon Gillard
- Version: $Id: docbook2document.xsl,v 1.2 2002/01/21 00:17:45 dion Exp $
- FIXME: Doesn't handle informaltable, sgmltag etc...
+ Version: $Id: docbook2document.xsl,v 1.3 2002/01/21 03:32:35 dion Exp $
+ FIXME: Doesn't handle attributes of informaltable
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
@@ -186,8 +186,7 @@
</subsection>
</xsl:when>
<xsl:otherwise>
- <p><em><xsl:value-of select="title"/></em>
- <br />
+ <p><b><xsl:value-of select="title"/></b><br />
<xsl:apply-templates>
<xsl:with-param name="level" select="number($level)+1"/>
</xsl:apply-templates>
@@ -278,6 +277,13 @@
</table>
</xsl:template>
+ <!-- FIXME: support attributes of informal table here -->
+ <xsl:template match="informaltable">
+ <table border="1">
+ <xsl:apply-templates/>
+ </table>
+ </xsl:template>
+
<xsl:template match="tgroup">
<xsl:apply-templates select="thead|tbody|tfoot"/>
</xsl:template>
@@ -287,7 +293,7 @@
</xsl:template>
<xsl:template match="row" mode="head">
- <th><xsl:apply-templates/></th>
+ <tr><xsl:apply-templates select="entry" mode="head"/></tr>
</xsl:template>
<xsl:template match="row">
@@ -298,8 +304,12 @@
<xsl:apply-templates/>
</xsl:template>
+ <xsl:template match="entry" mode="head">
+ <th><xsl:apply-templates/></th>
+ </xsl:template>
+
<xsl:template match="entry">
- <p><xsl:apply-templates/></p>
+ <td><xsl:apply-templates/></td>
</xsl:template>
<xsl:template match="firstterm">
@@ -308,6 +318,10 @@
<xsl:template match="remark">
<p><b>Note:</b> <xsl:apply-templates/></p>
+ </xsl:template>
+
+ <xsl:template match="sgmltag">
+ <code><xsl:apply-templates/></code>
</xsl:template>
<xsl:template match="trademark"><xsl:apply-templates/><sup>TM</sup></xsl:template>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>