From: Lars J. <lar...@ma...> - 2003-05-23 22:56:41
|
Hello! I tried to find an answer for this in the email archive, but with no success. I want to do an XPATH query like collection("collectionname")//POO[Plan="2" and not(@id=//POOR[type="dec"]/Related)] in other words I want to find all POO where Plan equals "2" and that has no POOR pointing to it. The portion "not(@id=//POOR[type="dec"]/Related)" is supposed to return true if there is NO //POOR[type="dec"]/Related that equals @id, according to the XPATH specification at http://www.w3.org/TR/xpath I believe this is valid. The problem is that when I use eXist the same portion always returns true (or the portion inside the not()-function always returns false). Is this a bug? Any comments? Workarounds? I include a portion from the XPATH spec regarding this: If both objects to be compared are node-sets, then the comparison will be true if and only if there is a node in the first node-set and a node in the second node-set such that the result of performing the comparison on the string-values of the two nodes is true. If one object to be compared is a node-set and the other is a number, then the comparison will be true if and only if there is a node in the node-set such that the result of performing the comparison on the number to be compared and on the result of converting the string-value of that node to a number using the number function is true. If one object to be compared is a node-set and the other is a string, then the comparison will be true if and only if there is a node in the node-set such that the result of performing the comparison on the string-value of the node and the other string is true. If one object to be compared is a node-set and the other is a boolean, then the comparison will be true if and only if the result of performing the comparison on the boolean and on the result of converting the node-set to a boolean using the boolean function is true. Regards Lars Johanson |