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

RE: how check if the node exit and display content of

Subject: RE: how check if the node exit and display content of it
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Fri, 18 Mar 2005 02:56:50 +0000
xsl check for node
Henry, if all you want to do is test for any children, just look along the child:: axis, like so:

   <xsl:template match="Group">
       <xsl:choose>
       <xsl:when test="child::*">
           has children
       </xsl:when>
       <xsl:otherwise>
           no children
       </xsl:otherwise>
       </xsl:choose>
   </xsl:template>

Regards,

--A


From: henry human <henry_human@xxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: how check if the node exit and display content of it Date: Thu, 17 Mar 2005 23:52:09 +0100 (CET)



i create xml files . the node "Group" could has child: <Group> <undergroups> <Duration>1:9</Duration> <description>Waiting for data</description> </undergroups> </Group> or could be without child: <Group> </Group> How could i check in my xsl file if this node has some child (f.example <Duration> or <description>) after that i will to display the Result(f.example Waiting for data) in browser i tied it with xsl:if test and xsl:variable but could'nt use it correctly!

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement


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.