[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Re: $nodeset=true()
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|