This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re:programlisting extra line
- From: Dennis Grace <dgrace at us dot ibm dot com>
- To: docbook-apps at lists dot oasis-open dot org, vnhu38f93 at subdimension dot com
- Date: Mon, 11 Nov 2002 09:53:30 -0600
- Subject: Re:DOCBOOK-APPS: programlisting extra line
ion asked:
>>>>>
Does anyone have a suitable solution to the "extra line" problem
illustrated by the XHTML code below:
<html>
<head><title>test</title></head>
<body>
<table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre
class="programlisting">blah blah blah</pre></td></tr></table>
</body>
</html>
I encapsulate programlistings and screen sections in tables so
that they are shaded, but, I get the extra line that is produced
by the code above. Any ideas on how to remove it?
<<<<<
I think I might. I don't get the extra line, and I use the following
customization (derived from Dan York's examples) in lieu of the
shade.verbatim param:
<xsl:template match="programlisting|screen|synopsis">
<xsl:param name="suppress-numbers" select="'0'"/>
<xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
<xsl:variable name="id"><xsl:call-template
name="object.id"/></xsl:variable>
<xsl:if test="@id">
<a href="{$id}"/>
</xsl:if>
<xsl:choose>
<xsl:when test="$suppress-numbers = '0'
and @linenumbering = 'numbered'
and $use.extensions != '0'
and $linenumbering.extension != '0'">
<xsl:variable name="rtf">
<xsl:apply-templates/>
</xsl:variable>
<table border="0" bgcolor="#E0E0E0" width="90%">
<tr><td>
<pre class="{name(.)}">
<xsl:call-template name="number.rtf.lines">
<xsl:with-param name="rtf" select="$rtf"/>
</xsl:call-template>
</pre>
</td></tr></table>
</xsl:when>
<xsl:otherwise>
<table border="0" bgcolor="#E0E0E0" width="90%">
<tr><td>
<pre class="{name(.)}">
<xsl:apply-templates/>
</pre>
</td></tr></table>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Dennis Grace
Information Developer
IBM Linux Technology Center
(512) 838-3937 T/L 678-3937 cell: (512)-296-7830
dgrace@us.ibm.com
There are only 10 kinds of people in the world: those who understand binary
and those who don't.