cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: XInclude optimization
Date Mon, 23 Nov 2009 07:28:52 GMT
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/element2[@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


Mime
View raw message