Subject: Re: [xsl] attribute test From: Jon Gorman <jonathan.gorman@xxxxxxxxx> Date: Thu, 15 Sep 2005 15:27:37 -0500 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] attribute test, Joris Gillis | Thread | Re: [xsl] attribute test, Jon Gorman |
Re: [xsl] attribute test, Joris Gillis | Date | Re: [xsl] attribute test, Jon Gorman |
Month |