|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: differences between x != 0 and not(x = 0)
At 2005-06-08 10:03 -0400, Jaime Stuardo wrote:
If I want to test that all nodes has value different from 0, I have to use x!=0 or not(x=0) ? Use not(x=0) to return true if all of the values are not equal to 0. The processor will walk through each node in set "x" and continue checking as long as the answer is false. "x=0" is false if x is non-zero, so it keeps checking the nodes in x. As soon as any is true, the comparison stops and true is returned, and the not() changes the true to false. If all of the tests are false, then false is returned and not() changes the false to true, implying that all of the nodes are not equal to zero because none of the nodes are equal to zero. But be aware of what you want for the empty set "x", though. Do you want true or false? The comparison is initialized to false so if there are no nodes in "x" the comparison returns false and the not() returns true and you will get "all nodes different from 0" when you have no nodes ... you may not want that. I hope this helps. . . . . . . Ken
|
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
|

Cart








