[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: xsl:when, xsl:otherwise question?

Subject: RE: xsl:when, xsl:otherwise question?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 15 Jul 2005 10:10:13 +0100
when xsl
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@xxxxxxxxx] 
> Sent: 15 July 2005 09:50
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  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 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.