Re: [xsl] ClassCastException

Subject: Re: [xsl] ClassCastException
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 12 Dec 2003 23:32:05 GMT
> Is there somewhere I can find an example of the difference between a node
> set and a result tree fragment?

archives of this list, xslt spec.

> Is a node set just a "path",
No a path is an expression (think x + 3 in C or fortran etc)
a node set is a value (think 5 in c or fortran)
in common with most other languages variables in xslt can only hold
values not expressions.

A result tree fragment could have been the same as a node set (and is in
xslt2 drafts) but in xslt 1 there is a restriction that stops you
making queries, further transforms on the result of a transformation.
If you use a variable binding element (xsl:variable xsl:param or
xsl:with-param with content rather than a select expression
teh result of executing the content is stored in the variable as a
result tree fragment, the only thing you can do with that is copy it to
the final result using xsl:copy-of or convert it to a string (just about
any other operation on it) in partiular you can not use an Xpath / step
to go $x/a/b/c to extract the element nodes out of the variable.

> Is a node set just a "path", or set of nodes with only one
"destination"
a node set is a set of nodes, I'm not sure what you mean by destination.

David

-- 
http://www.dcarlisle.demon.co.uk/matthew

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


Current Thread