Subject: Re: [xsl] test for blank From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Wed, 20 Nov 2002 22:16:25 +0100 |
<xsl:choose> <xsl:when test="string(@value)"> the value of @value is: <xsl:value-of select="@value"/> </xsl:when> <xsl:when test="not(@value)"> <!-- no @value found --> </xsl:when> <xsl:when test="not(string(@value))"> There is nothing to see </xsl:when> </xsl:choose>
I'm trying to test for a value of nothing for with XSL. I understand there are no 'else' statements available in xsl so I'm trying to get this to work. I thought using the not function would work but so far the only output I'm getting is from the 1st nested if statement
Here are my if statements:
<xsl:if test="@value"> <xsl:if test="@value[contains(., '')]"> There is nothing to see </xsl:if> <xsl:if test="@value[not(contains(., ''))]"> <xsl:value-of select="."/> </xsl:if> </xsl:if>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] test for blank, SAL ROSALES Jr. | Thread | Re: [xsl] test for blank, David Carlisle |
[xsl] test for blank, SAL ROSALES Jr. | Date | RE: [xsl] test for blank, Martinez, Brian |
Month |