Ken wrote:
When the types are not the same, the processor reduces one or both of
the sides to a common type. The empty sequence is boolean false, and
the empty string is boolean false, so when both are converted to
boolean, they are the same.
Not quite. In XSLT 2.0, '=' compares all pairs of values across the two
sequences. If there are no pairs, the result is always false. If there
are pairs, untypedAtomic values are converted to the other type, and
numeric promotion takes place, but you certainly won't see both sides
converted to booleans.
In XSLT 1.0, when you compare a node-set to a boolean, an empty node-set
compares equal to true, and a non-empty node-set equal to false. This
behaviour is carried forward to XSLT 2.0 when running in 1.0
compatibility mode.
Michael Kay
Saxonica
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--