From: Tiffany <tif...@ya...> - 2006-03-01 22:53:09
|
Michael Beddow <mbexlist-2 <at> mbeddow.net> writes: > > Tiffany wrote: > > > I'm trying to execute a xpath that has more than one path for : > > > > //somePath and //anotherPath and //finalPath > > I really think you need to sort out some XPath basics, because this seems > not to be an eXist problem at all. > > I say "seems" because it isn't clear to me just what it is you are trying to > do. > > Do you mean something like "I am trying to write an XPath expression that > would return the intersection of the node sets returned by three distinct > XPaths"? If so, it's not clear what you would want "and" for in that case, > since no Boolean operation as such is going to give you an intersection, > which is not a Boolean value (although XPath and XQuery have rules for > casting sequences or sets to Boolean values in carefully defined > circumstances). And it's equally puzzling why you expect the union operator > | to do anything but give you the union of the sets you apply it to. That's > what it's for, and that's what it does, so of course it "returns all the > matching elements" if you use it to take the union of the sets produced by > three matching expressions. > > I don't think we can help you much unless you help yourself a bit more first > by clarifying what it is you hope to do. > > Michael Beddow > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > I have a bunch of xml documents. I'm getting xpath statements (which I have no control over their context, I don't even know for the most part what they will look like). I need to apply that filter (xpath, be it one or n) on the document and return only the documents that fulfill all the criteria (xpath) that has been passed to me. The general sample that I gave works fine in SQL Server 2005 (I don't get any errors and the result is as expected). I execute the same query in eXist and I get an error, granted that execution styles in both databases are different, but XPath is XPath. Now I did notice a work around in eXist using "|" in place of the "and" and it doesn't complain. Does eXist not implement the use of "and"? Thanks |