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

RE: XPath: all elements with only non-parent children

Subject: RE: XPath: all elements with only non-parent children with identical style attr
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Thu, 13 Dec 2001 22:04:37 -0000
michael kay xpath
> >     not(*/@style != */@style)]
>
> Hi Tobias, Jeni:
>
> maybe a dumb question but why all the "not"s (and writhing
> and fainting in
> coils?)
> wouldn't
 ... (*/@style = */@style)]
> work the same way?

Not the same thing at all!

A != A, where A is a node-set, is true if there is some node in A that is
unequal to another node in A. So "not(A != A)" is true if all the nodes in A
have the same string value (brilliant, Jeni!). While "A = A", of course, is
true if any node in A has the same value as some node in A - which will
always be true, so long as A is not empty, because every node is equal to
itself.

(This is actually the first time I have ever seen A != B, where the operands
are both multi-node node-sets, used for a serious purpose; perhaps I will
have to reconsider my previous assumption that it wasn't worth optimising!).

Mike Kay


 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.