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

Re: <xsl:for-each> help

Subject: Re: <xsl:for-each> help
From: "Zoe Peng" <zoe@xxxxxxxxxxxx>
Date: Wed, 1 May 2002 18:49:39 -0400
xsl for each explained
c..
thanks.
--Zoe

> [Zoe Peng]
> 
> > many thanks.
> > I won't be able to use <xsl:if test...> cuz the xml document is
> > generate on the fly and the key is coming from parameter. But, I got
> > what I need. It outputs "My News".
> >
> > This is what I want:
> > <xsl:for-each select='dynamictree/category[@id="1"]'>
> > <xsl:for-each select='service[@id="01"]'>
> >   servicename: <xsl:value-of select="@name" />
> > </xsl:for-each>
> > </xsl:for-each>
> 
> Glad I could help.  I don't think you need the double for-each, 
though,
> depending on what else you do in them that you haven't explained.  
Just by
> what you have shown, a single for-each would do what you need. You 
could use
> 
>     <xsl:for-each
>         select='dynamictree/category[@id="1"]/service[@id="01"]'>
> 
> Depending on whether there would be more than one of them, you might 
not
> even need to use any for-each at all, just the value-of.
> 
> Cheers,
> 
> Tom P
> 
> 
>  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.