[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: JBryant@xxxxxxxxx
Date: Thu, 17 Mar 2005 17:13:40 -0600
xsl if test and
If you need to something only when the Duration element is present:

<xsl:template match=" Group">
  <xsl:if test="Duration">
    <!-- Do something -->
  </xsl:if>
</xsl:template>

If you need to do something when the Duration element is present and 
something else when it is not:

<xsl:template match=" Group">
  <xsl:choose>
    <xsl:when test="Duration">
      <!-- Do something -->
    </xsl:when>
    <xsl:otherwise>
      <!-- Do something else -->
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

If that doesn't work, post small (but complete enough to show the problem) 
XML and XSL files, so we can see more detail. Remember to paste the XML 
and XSL into the body of your message, since the list (thankfully) doesn't 
take attachments.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)





henry human <henry_human@xxxxxxxx> 
03/17/2005 04:52 PM
Please respond to
xsl-list@xxxxxxxxxxxxxxxxxxxxxx


To
xsl-list@xxxxxxxxxxxxxxxxxxxxxx
cc

Subject
 how check if the node exit and display content of it







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!


thanks
henry






 

 
 
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier 
anmelden: http://mail.yahoo.de

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.