cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianugo Rabellino <>
Subject Re: DirectoryGenerator source-oriented refactoring
Date Thu, 10 Jul 2003 10:19:26 GMT
Sylvain Wallez wrote:

>> I just added to scratchpad a refactored implementation of 
>> DirectoryGenerator (TraversableGenerator) that doesn't work with just 
>> files but with any TraversableSource. Together with it, a refactoring 
>> was done on XPathDirectory, which is now XPathTraversable, so that 
>> even XPath queries can be done on any TraversableSource (while we were 
>> at it, we added namespace support, missing on the previous 
>> implementation). 
> Damn, competing implementations : I've had this same thing on my HD for 
> several weeks now as part of the new version of the CVSSource. Shame on 
> me, I should have committed this for a long time. "release early, 
> release often".

Oh well... silly me for not asking. :-)

> My version is cacheable, but doesn't support XPath. I'll look at yours 
> to see how to merge them.

Ours is cacheable too, actually it was very little more than 
s/File/Source on the cacheable DirectoryGenerator, so a more clever 
implementation would be most welcome. :-) Also, the XPath stuff is on an 
different class (XPathTraversableGenerator), which extends 
TraversableGenerator, so some care should be taken in merging the two.

>> Also, since we're not talking about directory and files anymore, I 
>> used the more generic terms of collection and resource, changing the 
>> namespace too to "". I don't 
>> remember if a vote was required for new namespace additions, but I'd 
>> like to hear at least your opinion on that. :-) 
> I think we should keep the current namespace, which describes a 
> hierarchy, and is not really tied to the fact that is a real filesystem 
> or something else. But we should keep the current DirectoryGenerator 
> (eventually deprecated) since users may have extended it (we did it for 
> an application to add extra attributes and filtering rules).

Makes sense.


Gianugo Rabellino
Pro-netics s.r.l. -
Orixo, the XML business alliance -
     (Now blogging at:

View raw message