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

RE: iterating through nodes

Subject: RE: iterating through nodes
From: "Ben Robb" <Ben@xxxxxxxxxx>
Date: Thu, 7 Nov 2002 16:48:26 -0000
msxml loop through nodes
You need to look at what you are doing here:

//w:string means "Get me all of the nodes called "string" (in the namespace "w") which are *anywhere* in the document"

That means that you are doing a for-each loop through the document, but then in your value-of call, you are getting the first w:string element in your document.

<xsl:value-of select="//w:string"/> is equivilent to <xsl:value-of select="//w:string[position() = 1]"/>

Hope this helps,

Ben

-----Original Message-----
From: Margarita Manterola [mailto:margaritam@xxxxxxxxxx] 
Sent: 07 November 2002 16:16
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  iterating through nodes


El jue, 07-11-2002 a las 12:53, NIENKE, Bill P. - ACCOR-NA escribió:

> When I use <xsl:for-each> I get the first <string> node over and over.
> 
> <xsl:for-each select="//w:string">
> <xsl:value-of select="//w:string"/><br></br>
> </xsl:for-each>
> 		
> How do you force a move to the next node?

Usually, it just moves.  Try using 
	
	<xsl:value-of select="."/>

This would show the value of each node as the for-each iterates.

Love,
Margarita Manterola


 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.