-
question for paps
Ok, but I don't know how to create a variable that contains a list of nodes (node-set) through a for-each.
<xsl:variable name"test">
<xsl:for-each select"initial_list">
<xsl:value-of select="current()"/>
</xsl:for-each>
</xsl:variable>
I want that variable 'test' to contain a list of nodes.
Is it possible to do something like this? (to change the value of a variable during a for-each cycle?)
-
Yes it is possible to change a value of variable within a for-each loop...instead of writing this...
<xsl:variable name"test">
<xsl:for-each select"initial_list">
<xsl:value-of select="current()"/>
</xsl:for-each>
</xsl:variable>
y dont u try....
<xsl:for-each select"initial_list">
<xsl:variable name"test" select="."/>
</xsl:for-each>
"current()" and "." should mean the same, current() becomes different only when used in the context of [] brackets
This should keep updating the "test" variable with new value, each time it loops through....
Hope this helps...
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks