Subject: Re: [xsl] if statement From: Martin Klaffenboeck <martin.klaffenboeck@xxxxxx> Date: Wed, 2 Jul 2003 19:09:08 +0200 |
> How can I test if my current node has a attribute named 'wrap' and if > it has the value 'yes' I would have to add some things with <xml:text> > if 'wrap' does not exist or it is 'no', I don't want to add this things.
Hi,
Use choose / when:
<xsl:choose> <xsl:when test="@wrap='yes'"> <wrap> <xsl:apply-templates/> </wrap> </xsl:when> <xsl:otherwise> <xsl:apply-templates/> </xsl:otherwise> </xsl:choose>
<xsl:when test="@wrap='yes'"> </tr><tr> </xsl:when>
Thanks, Martin
-- If you've got an idea and need help, or just need general encouragement, write me a message. ;-)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] if statement, Andrew Welch | Thread | RE: [xsl] if statement, David Neary |
[xsl] as efficient as possible..., Corey Wilson | Date | Re: [xsl] how to test for the eleme, Wendell Piez |
Month |