This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: outputting spaces in html table cells
- To: "'ladioss at hotmail dot com'" <ladioss at hotmail dot com>
- Subject: RE: outputting spaces in html table cells
- From: "Sellmer-Brüls, Barbara" <B dot Sellmer-Bruels at klopotek dot de>
- Date: Mon, 28 Aug 2000 11:09:48 +0200
- Cc: "'XSL-List at mulberrytech dot com'" <XSL-List at mulberrytech dot com>
- Reply-To: xsl-list at mulberrytech dot com
Hi,
I solved it with the following toplevel XSL elements:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html"/>
<xsl:preserve-space elements="*"/>
The preseve-space statement seems to be the essential part. Netscape still
does not print the background colour properly, but at least it stopps
shifting the next column. This solution works with Saxon.
Regards,
Barbara
---
Barbara Sellmer-Bruels
Klopotek & Partner GmbH - Berlin
E-Commerce
======================================================================
ladioss@hotmail.com wrote:
Hi,
<xsl:for-each select="listing/item">
<xsl:sort select="title"/>
<tr>
<td class="listing"> <xsl:value-of select="blah" /> </td>
<td class="listing"> <xsl:value-of select="blah2" /> </td>
<td class="listing"> <xsl:value-of select="blah3" /> </td>
</tr>
</xsl:for-each>
There is some code before this that generates a table. This is all fine and
dandy except
that if the value of "blah" is blank, and I was outputing this to html, then
netscape would
not handle blank <td/> fields in an elegant manner because it would shift
the next column
over one to replace the blank column. Normally, I would insert an ' '
between each <td>
tag so that netscape would render a space and not ignore the cell, but as
you know, '&' is
reserved in xml.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list