|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: HTML tag inside <xsl:when></xsl:when> tag
I'm quite new att this and did not get that:
"What you have to keep in mind is that you are writing well-formed xml, even
if you will produce html at the end. When you put a start tag within
another element, in this case xsl:when, the close tag for that element has
to be nested properly within that element as well."
And i did not explain my problem properly, but here is the solution that
produces what i expected. Put together for your posts:
<td>
<xsl:attribute name="align">
<xsl:choose>
<xsl:when test="ss:Data/@ss:Type = 'Number'">right</xsl:when>
<xsl:otherwise>left</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="ss:Data"/>
</td>
Before i had it in my mind before that this (see below) was OK (wellformed
and all that). Still learning every day.
<xsl:choose>
<xsl:when test="ss:Data/@ss:Type = 'Number'">
<td align="right">
</xsl:when>
<xsl:otherwise>
<td align="left">
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="ss:Data"/>
</td>
thanks all
Matts Isuls
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








