Gianugo Rabellino 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".

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

Would you guys think that this implementation might supersede the current DirectoryGenerator stuff, maybe by providing a migration path? If so, I'd gladly produce some docs, confs and samples once it's proven stable.

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 "http://apache.org/cocoon/collection/1.0";. 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).

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com




Reply via email to