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

Re: performace considerations for XSL while coding

Subject: Re: performace considerations for XSL while coding
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 7 Apr 2003 10:18:34 +0100
xsl while

  I am using -
  <xsl:variable name="..." >
  <xsl:copy-of select="...." />
  </xsl:variable>

  in my code. Do you think this hampers performance?


Yes.

It is much better to go <xsl:variable name="..."  select="..."/> if that
is what you mean, that essentially just makes a variable that references
into the input node set, whereas xsl:copy has to make new nodes with
new identities.

similarly
<xsl:variable name="x" select="2"/>
makes $x the number 2 but
<xsl:variable name="x">2</xsl:variable>
makes $x a result tree fragment corresponding to a node set consisting
of a root node containing a child text node with value the string "2".
This is harder to build and harder for the system to coerce back to
being the number 2 when you use it.

David



________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. 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
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.