Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Checking if node has data

From: Mukul Gandhi <mukul_gandhi@--------->
To:
Date: 8/3/2004 9:20:00 AM
Hi David,
  You are right in your reasoning. But the original
question asked was "if a node say <fruits></fruits> in
the XML file has data in it or not". By having data, I
assumed "string value".. 

Regards,
Mukul

--- David Carlisle <davidc@xxxxxxxxx> wrote:

> 
> 
>      <xsl:if test="mygarden/fruits = ''">
>     <!-- evaluates to true if node fruits does not
> contain data -->
> 
> Not really, it evaluates to true if its string value
> is empty
> so it would be true for
> <mygarden><fruits><apples/></fruits><mygarden>
> 
> 
> To test if the element is non empty use
> 
>      <xsl:if test="mygarden/fruits/node()">
> 
> 
> David
> 
>
________________________________________________________________________
> This e-mail has been scanned for all viruses by Star
> Internet. The
> service is powered by MessageLabs. For more
> information on a proactive
> anti-virus service working around the clock, around
> the globe, visit:
> http://www.star.net.uk
> 


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent