[Home] [By Thread] [By Date] [Recent Entries]
On your XML (corrected for markup), the following XSL shoukld illustrate the
idea:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" /> <xsl:template match="node( ) | @*">
<xsl:copy>
<xsl:apply-templates select="@* | node( )"/>
</xsl:copy>
</xsl:template> <xsl:template match="td[count(text()) = 0]">
<td>
<xsl:text>__NOTHING__</xsl:text>
<xsl:apply-templates/>
</td>
</xsl:template></xsl:stylesheet> It uses an identity transform to copy everything verbatim, except for empty <td> elements, which are filled-in with default text. You should be able to use some variation of this for what you ultimately need. Of course, we were lucky here in that we could specifically match empty td elements. Things would not have been quite so easy otherwise. For example, XSL doesn't have a provision for invoking a template on a non-match--there was a thread about just that about 2 months ago. Regards, --A From: knocte <knocte@xxxxxxxxx> _________________________________________________________________ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/
|

Cart



