Re: [xsl] question about filling of nodeset

Subject: Re: [xsl] question about filling of nodeset
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 17 Mar 2005 15:37:43 GMT
  Now I have this code

  <xsl:variable name="AllKatern">
   <xsl:for-each select="/HowardsHome/Katern">
    <xsl:copy-of select="."/>
  <xsl:variable name="AllKaternNodes"

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


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:

Current Thread