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

RE: xsl:for-each?

Subject: RE: xsl:for-each?
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Sun, 21 Jan 2001 23:24:09 -0000
mike kay xsl for each
> In the template I have:
>
>   <xsl:template match="markets">
>     <select name="Markets" size="1">
>       <xsl:for-each select="markets">
>         <option value="@id"/><xsl:value-of select="@name"/>
>       </xsl:for-each>
>     </select>
>   </xsl:template>
>

This template rule is called to process one particular <markets> element.
You xsl:for-each is then asking to process the <markets> elements that are
children of this <markets>, and there aren't any.

> Now, I know this isn't correct. I am confused as to why it
> doesn't work though.

No, your analysis seems to be quite correct...
> is it because the xsl node is
> already selected to "markets" that it is looking inside the
> first market node it comes across and isn't finding anything called
markets?

Yes (in effect - though your terminology is non-standard)

Mike Kay


 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.