Subject: Re: [xsl] how check if the node exit and display content of it From: henry human <henry_human@xxxxxxxx> Date: Fri, 18 Mar 2005 23:04:36 +0100 (CET) |
thanks a lot for this good help, it works! with best greating henry --- JBryant@xxxxxxxxx wrote: > 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 > [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 > > ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] how check if the node exi, Aron Bock | Thread | [xsl] More-than-basic maths, andrew cooke |
RE: [xsl] Replacing strings in XSL, Aron Bock | Date | Re: [xsl] Replacing strings in XSL, preetig_2 |
Month |