Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: xsl:if test fails when source xml element on 2 lines xsl:if test fails when source xml element on 2 linesTo: NULL Date: 5/1/2007 9:58:00 AM I have the following xml...
<person>
<name>Kevin</name>
<email>
</email>
</person>
I have the followng xsl...
<xsl:choose>
<xsl:when test="person/email != ''>
<xsl:text>Email Not Empty</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Email Is Empty</xsl:text>
</xsl:otherwise>
</xsl:choose>
The first test is attempting to determine if the element is not
"empty", but with the example xml, it is evaluating to true because
the test is seeing the newline created from the Email element being on
two lines. I would like to evaulate a node like Email so that even if
it is on two lines, there is still "no email address" in the element.
I do not have control over the source file, so I need to come up with
a test to correctly evaluate this.
I appreciate any help you can provide!
Kevin
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
