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(_at_)yahoo(_dot_)de>
03/17/2005 04:52 PM
Please respond to
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
cc
Subject
[xsl] 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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--