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

Subject: Re: [xsl] difference between Result Tree Fragment (RTF) and a nodeset
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 25 Apr 2003 12:54:53 -0400
At 2003-04-25 14:21 +0100, Leena Kulkarni wrote:
What is the difference between Result Tree Fragment
(RTF) and a nodeset?

A result tree fragment can only be added to the result and its contents cannot be addressed using XPath without using an extension to XSLT 1.0.


A node set can only be obtained from a source tree (which through the document function can include a source tree version of the stylesheet file) and cannot be obtained from a result tree fragment or the result tree.

My perception is RTF is a set of nodes in user defined
tags like -

<mytag>
<value/>
<value/>
</mytag>

and nodeset is the set of nodes got from the input doc
itself.

Is this correct?

Sure, though not complete ... perhaps better said "a result tree fragment is a set of nodes defined in the stylesheet and destined for the result tree" though that doesn't capture the issue that the definition of the result tree fragment can include source tree nodes.


The distinction is what you can *do* with either a result tree fragment or a node set. One can address a node set using XPath, but one cannot address the contents of a result tree fragment using XPath.

I hope this helps!

........................ Ken


-- Upcoming hands-on courses: Europe (XSLT/XPath): May 5, 2003 - Europe (XSL-FO): May 16, 2003 - (XSLT/XPath and/or XSL-FO) North America: June 16-20, 2003

G. Ken Holman                mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                      Definitive XSLT and XPath
ISBN 0-13-140374-5                              Definitive XSL-FO
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-10-1              Practical Formatting Using XSL-FO
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc


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



Current Thread