cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conal Tuohy" <>
Subject RE: XPathDirectoryGenerator
Date Thu, 29 May 2003 00:45:58 GMT
> Torsten Knodt wrote:
> > Hello,
> > I'm currently working on my patchset of the week ;). One 
> part is a modularized 
> > DirectoryGenerator. The only what is currently not included is the 
> > XPathDirectoryGenerator. As it can simply be simulated by 
> XInclude, why 
> > having the code doubled? Or have I understood something 
> wrong with this 
> > thing?

> From: Gianugo Rabellino []

> I don't see how you might simulate the behaviour with 
> Xinclude. The idea 
> of the XPathDirectoryGenerator is returning a list of all the XML 
> resources living in a given directory matching a given XPath 
> (mimicking 
> on a filesystem what an XPath query would do on a XML database). How 
> would you do that with Xinclude?

My understanding of XPathDirectoryGenerator is that it generates a directory listing containing
the xpath-matching fragments of each file.

It's true that you could use an ordinary DirectoryGenerator, transform the dir:file elements
to xi:include elements with @href="{@name}#xpointer(blah/blah)", then transform with xinclude
transformer. So this would effectively mimic XPathDirectoryGenerator. But I think a single
XPathDirectoryGenerator would be a lot simpler, and worth having.


View raw message