cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: multiple xpaths
Date Mon, 03 Oct 2005 22:04:12 GMT
David wrote:

> I am writing a cocoon transformer and need to know when any of 
> multiple xpaths match. I'm sure there must be a be a more efficient 
> way then converting it to a DOM document and then running each xpath 
> to get the nodelist of each.
>
> What is the best way to do this?


The problem with XPath is that it's intrinsically tied to the DOM 
hierarchical model. So you need to have a DOM ready to query the 
document with XPath.

You may want to have a look at STX [1], which uses a subset of XPath 
that is suited to streamed processing.

Sylvain

[1] http://stx.sourceforge.net/

-- 
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Mime
View raw message