This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Re: $nodeset=true()
- From: "Evan Lenz" <elenz at xyzfind dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 2 Jan 2002 10:42:40 -0800
- Subject: RE: [xsl] Re: $nodeset=true()
- Reply-to: xsl-list at lists dot mulberrytech dot com
Mike Kay wrote:
> As with $node-set='somestring" or $node-set=42 in XPath 1.0,
> $node-set=true() will return true if there is at least one node $N in
> $node-set such that $N=true().
>
> In other words, the XPath 1.0 "existential" meaning of "=" (A=B is true if
> some a in A is equal to some b in B) now covers all cases, removing this
> awkward exception of comparison to a boolean. This change was necessary
> because a singleton boolean is equivalent in the XPath 2.0 data model to a
> sequence of length 1 whose only item is a boolean.
It's probably also worth noting that the behavior of other "boolean
contexts" is unaffected by this change. For example, person[@married] still
selects all person elements that have a married attribute, regardless of
that attribute's typed value. If you only want married people, you would
write person[@married=true()] which is an example of the aforementioned
departure from XPath 1.0.
Evan
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list