Thanks a lot. I got it fixed.
My xml file was <pb></pb> when 'a' tag is absent
instead of <pb><e></e></pb>, so the message resides
between <xsl:otherwise> tag couldnt be displayed.
Thanks and have a good day
Dinh Tran
--- Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:
Can't see anything wrong with this code snippet,
perhaps the problem will be
revealed if you try to create a complete (but small)
stylesheet that
demonstrates the problem, and post the whole thing.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Tran Thanh Dinh [mailto:dinh107(_at_)yahoo(_dot_)com]
Sent: 15 July 2005 09:50
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] xsl:when, xsl:otherwise
question?
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
--~------------------------------------------------------------------
XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--