Hi Sylvain, indeed, that's yet another exception I didn't think, thanks for your clarification!!! Bonne journée, a bientot ;) Simo
On Mon, Nov 23, 2009 at 8:28 AM, Sylvain Wallez <sylv...@apache.org> wrote: > Jos Snellings wrote: >> >> Hmmm, I guess the XPath expression is known before the parsing begins? >> I remember I have done a similar thing, where a chunk had to be isolated >> from a document that came by via a SAX stream, but here the xpath >> expression was something like: "/element1/elemen...@id=somenumber]". >> >> Theorem: any XPath expression can be evaluated with a SAX filter. >> Proof? >> Do you know some exceptions? >> > > What about this one : //foo[bar[position() = 3]//baz], find all elements > "foo" whose 3rd "bar" child has a "baz" descendent element. > > This requires to buffer the contents of every "foo" element to inspect their > chidren sub-tree. > > Sylvain > > -- > Sylvain Wallez - http://bluxte.net > > -- http://www.google.com/profiles/simone.tripodi