S Woodside wrote:
On Saturday, January 18, 2003, at 02:38 AM, Roger Glover wrote:
Now we get to the really hairy part. You see, in XSLT 1.0, a "result
tree fragment" is a bit like a "node set", but not exactly. Result
tree fragments are conceptually tied to output, while node sets are
conceptually tied to input. Practically, this means that a "result
tree fragment" cannot be used in many contexts where a "node set" is
expected. Hence it is much more than likely that in the context
where you are using "$StartNode" (2), the "result tree fragment" it
contains evaluates as an empty "node set".
Roger wasn't entirely accurate with that last sentence. A result tree fragment
has a root node. Therefore, it is not equivalent to an empty node-set. The
root node's string-value might be an empty string (thus accounting for the
illusion that the RTF is empty), but the RTF itself will never test as boolean
false, and count() on the RTF will always be 1.
Well, actually I was thinking about inserting an attribute into the
output without it being attached to any element. that's illegal isn't
it?
As I mentioned before, the spec says that it is an error, but one that
a processor can ignore (by ignoring the offending xsl:attribute instruction
altogether)
Mike
--
Mike J. Brown | http://skew.org/~mike/resume/
Denver, CO, USA | http://skew.org/xml/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list