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

Re: checking if child exists

Subject: Re: checking if child exists
From: "JB Blond" <pblond@xxxxxxxxxxxxxxxx>
Date: Sat, 24 Jun 2000 19:16:57 +0200
xsl child exists
Why not try something like that :
<xsl:if test="boolean(item)">
<!-- use your node -->
</xsl:if>
or :
<xsl:choose>
<xsl:when test="boolean(item)">
<!-- use your node -->
</xsl:when>
<xsl:otherwise>
<!-- something else -->
</xsl:otherwise>
</xsl:choose>

Hope this helps...
JB
----- Original Message -----
From: ".::romina::." <romina@xxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Saturday, June 24, 2000 3:27 PM
Subject: checking if child exists


> Hello...
> I wanted to know if there's a way with xslt (i'm sure there is) to check
if
> a child of a node exists. For eg.
>
> <somethingbig>
> <law>
> <parag n="1">yadda yadda yadda</parag>
> <parag n="2"><item nb="1">blah</item> <item nb="2">blaah</item></parag>
> <parag n="3">something else</parag>
> </law>
> </somethingbig>
>
> I need to check if there's the child node <item> and if it exists to show
> the value of it and if it doesnt exist... well to go on checking for
nodes.
>
> Thanks in advance
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.