RE: [xsl] difference between Result Tree Fragment (RTF) and a nodeset

Subject: RE: [xsl] difference between Result Tree Fragment (RTF) and a nodeset
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 25 Apr 2003 15:43:24 -0400
William (Bill?),

As I just posted, the space makes no difference as to whether a variable refers to a node set or to an RTF. It's all in how the variable is declared.

<xsl:variable name="node-set" select="/node/set"/>

<xsl:variable name="RTF">
  <xsl:copy-of select="/node/set"/>
</xsl:variable>

$RTF holds a result tree fragment. Note that the instruction xsl:copy-of creates a *copy* of the node set. In XSLT 1.0, all such copies are RTFs. But in general, any variable you bind by inserting element content into the variable element creates an RTF.

$node-set holds a node set. That is because this is the type of data object returned by the XPath expression in the select attribute. Had it said select="false()", the variable would refer to a Boolean value, and so forth.

For more on your particular problem, you've seen that earlier post by now, probably.

Cheers,
Wendell

At 02:42 PM 4/25/2003, you wrote:
I don't mean to muddy the waters of Leena Kulkarni's query,
but if anyone would like to also consider my ~similar (sort of)
query of the previous couple of days, I'd appreciate it... :>)


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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



Current Thread