Re: [xsl] Passing document fragments as nodsets

Subject: Re: [xsl] Passing document fragments as nodsets
From: "Simon Kelly" <kelly@xxxxxxxxxx>
Date: Mon, 7 Jul 2003 12:29:59 +0200
Ah, got what you mean.  I'm changing them all and re testing now. Heres
hoping it'll work ;-)

Cheers

Simon



----- Original Message -----
From: "David Carlisle" <davidc@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, July 07, 2003 12:21 PM
Subject: Re: [xsl] Passing document fragments as nodsets


>
>   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
>
>


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


Current Thread