|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: question about filling of nodeset
Now I have this code
<xsl:variable name="AllKatern">
<xsl:for-each select="/HowardsHome/Katern">
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="AllKaternNodes"
select="msxml:node-set($AllKatern)"/>
that's quite an expensive operation as you have to copy everthing and
also requires the node-set extension
<xsl:variable name="AllKaternNodes" select="/HowardsHome/Katern"/>
Is a lot less to type and a _lot_ more efficient and just saves the node
set directly, which is almost certainly what you want here.
Here I have a copy of everything but now I want the <title> of each
Article with replaced quotes single double etc. That's not the problem,
but how can I write the result of this back to the nodeset?
You can never "write back" to anything in xslt, the transformation model
is always that you take a source tree and generate a new result tree.
So in your case you would apply som etemplates to $AllKaternNodes
and get a new tree, then do with it whatever you need to do
either letting it go to the main result tree, or saving it in a
variable.
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








