In article <c82liu$rqk$>,
Victor <engmark-> wrote:
>While debugging my stylesheet using XMLSpy, I got a really weird result:
><xsl:if test="$match = true()"> matches even if $match is an empty node
>fragment. How can this be?
What do you mean by "empty node fragment"? Do you mean "empty node set",
"empty result tree fragment", or what?
If the value of $match is a node set, then "$match = true()" is true
if and only if the node set is non-empty.
If the value of $match is a result tree fragment, then it is
"equivalent to a node-set containing just a single root node" (section
11.2) so it is never empty and "$match = true()" is always true.
I suspect this is different in XSLT version 2, which might explain why
different versions of Saxon and Xalan give me different results when I
test it.
-- Richard
|