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

Re: Sibling axis and as="element()"

Subject: Re: Sibling axis and as="element()"
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 31 Jul 2006 16:46:41 +0100
Re:  Sibling axis and as="element()"
>  how do you go about making it explicit 
if you want it really explict you could use

<xsl:variable as="document-node()">
  <xsl:document>
    ... stuff


but note that the main (perhaps) difference between 

<xsl:variable name="x">
  <xsl:sequence select="foo"/>
</xsl:sequence>

and

<xsl:variable name="x" as="element()*">
  <xsl:sequence select="foo"/>
</xsl:sequence>

isn't so much the implict document node as the implict copying. in the
second case $x references foo nodes in their original trees, whereas in
the first case, the nodes are _copied_ into the temporary tree so it's
the same as if you had used copy-of rather than sequence, so you get new
nodes with new identities, and unless MK is kindly optimising stuff
away, new memory usage.

david

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.