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

Re: question about filling of nodeset

Subject: Re: question about filling of nodeset
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 17 Mar 2005 15:37:43 GMT
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
________________________________________________________________________

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.