Subject: Re: xsl:when, xsl:otherwise question?
From: Tran Thanh Dinh <dinh107@xxxxxxxxx>
Date: Fri, 15 Jul 2005 01:49:53 -0700 (PDT)
|
hi,
I am new in xsl, please help me to figure out why my
following code doesnt work:
here's the xml data:
<pb><e><a>hello</a></e></pb>
and it can be also <pb><e></e></pb>
so actually I want to separate 2 cases, one when tag a
doesnt exist and the other one is when it exists.
<xsl:choose>
<xsl:when test="a">
<tr><td>null</td></tr>
</xsl:when>
<xsl:otherwise>
<tr><td>not null</td></tr>
</xsl:otherwise>
</xsl:choose>
The result I got when tag 'a' exists is ok. I got
"null" displayed but when tag 'a' doesnt exist, i got
nothing display.
could you please let me know if the syntax i used is
correct and what i am supposed to do please.
thanks a lot
Dinh Tran
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
|