Subject: Re: [xsl] HTML tag inside <xsl:when></xsl:when> tag From: Matts Isuls <matts.isuls@xxxxxxxxxxx> Date: Thu, 21 Feb 2002 09:31:25 +0200 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] HTML tag inside <xsl:when, Jarno . Elovirta | Thread | [xsl] xlink implementation, Slava Sedov |
[xsl] Global variable in included s, Andrey Astakhov | Date | Re: [xsl] A general question (Mozil, Joerg Heinicke |
Month |