Hi all,
I am trying (without much luck), to implement a simple 2-step
transformation. The first step to provide the XSLT transformation, the
second is to look for empty table cells (<td></td>) and insert a space in
them. Can any experienced Cocoon'ers explain how to do this?
Here's my sitemap setup:
<map:match pattern="*.dox">
<map:generate type="request" src="{1}" root-element="{1}"/>
<map:transform type="xslt" src="{1}.xsl" />
<map:transform type="xslt" src="tablefix.xsl" />
<map:serialize type="html" />
</map:match>
And here's the snippet I'm trying to use to do the table fix (which just
gives me a concatenated string of all element values):
<xsl:template match="td">
<td>
<xsl:choose>
<!-- If cell has child nodes or contains text then output them
-->
<xsl:when test="* or normalize-space()">
<xsl:apply-templates/>
</xsl:when>
<!-- Otherwise the cell is empty and we output a non-breaking
space -->
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
</td>
</xsl:template>
Thanks a bunch,
David Benoff
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]