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

Re: Passing document fragments as nodsets

Subject: Re: Passing document fragments as nodsets
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 7 Jul 2003 11:21:36 +0100
david elswhere
  You said this in your reply

  "A quick scan through your stylesheet shows that you're using the
  content of the variable-binding elements quite a lot when you should
  be using the select attribute instead."

  I didn't quite understand what you ment by this. Do you mean in the template
  declaration or elswhere?

Jeni's message hasn't reached here yet, but she meant the same as I
meant when I wrote


  As is said most days on this list, if you use with-param or variable
  with a select expression rather than with content, it will be bound to
  a node set not a result tree fragment.


If you mean to go

<xsl:variable name="x" select="y"/>

don't go


<xsl:variable name="x">
 <xsl:copy-of select select="y"/>
</xsl:variable>


(and similarly xsl:param or xsl:with-param)

as it is a lot more to type, a lot more work for the XSLT stystem
(having to create a new tree with new nodes) and is a lot less useful as
it poduces a result tree fragment which without an extension function
can't be queried into with Xpath, only copied to the result, or used as
a string.

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.