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(_at_)sdp(_dot_)com(_dot_)ar]
Sent: 07 November 2002 16:16
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] 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