[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Re: $nodeset=true()

Subject: RE: Re: $nodeset=true()
From: "Evan Lenz" <elenz@xxxxxxxxxxx>
Date: Wed, 2 Jan 2002 10:42:40 -0800
xsl boolean nodeset
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.