Subject: RE: [xsl] More addition questions: Using node-set()|
From: "Deborah Pickett" <debbiep-list-xsl@xxxxxxxxxx>
Date: Fri, 12 Oct 2007 12:48:00 +1000 (EST)
On Fri, October 12, 2007 01:20, Scott Trenda wrote: > I guess the common part of what I'm trying to ask is, once you have a > RTF captured in a variable, does node-set() return a newly-constructed > node-set, or a reference to the node-set corresponding to that variable? The Mozilla guys might be right. It depends heavily on how they have implemented result tree fragments. XSLT 1.0 has some pretty heavy limitations on what you can use a RTF for. About the only things that you can do with a RTF is to stringify it, or to use it inside another RTF. In practice, it means that implementations need not even keep RTFs as full trees, and can start serializing the RTF as soon as its contents are known. This is what I did with my toy XSLT 1.0 implementation last year. I'm curious to know if this opportunity for early optimization was a deliberate decision of the XSLT 1.0 architects, to "bribe" implementations with an easy way out and so multiply the XSLT meme in the wild. If this is what the Mozilla implementation is doing, then there is no tree for node-set() to act on. It'd need to change the way it keeps RTFs, in effect stopping it from being a black box. That might require quite a lot of re-engineering.