[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: attribute test
I think there is some confusion here. not(/Root/foo/@att!='hi') will return true if the document has all the /Root/foo/@att have the value hi. So you should be getting results from all those documents that have all those @att attributes with values of hi. If you want to only process if there is at least one @att that doesn't have the value hi you should be able to do just /Root/foo/@att!='hi' (not() is negation. When working with node sets I believe it returns true if there is any node in the node set that satisifies the condition. I'd have to double check the standard for what happens with comparing two nodesets, but that's neither here nor there. I was kinda wondering how that solution was working but figured perhaps my brain was scrambled today as well ;). Jon Gorman ps See the first note in 3.4 of the XPATH 1.0 spec for a similar description of the not(foo != name) type test
|
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
|