Upayavira wrote:
Gianugo,


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).


I'm impressed. Well worth doing. I would certainly think that replacing the DirectoryGenerator and XPathDirectory generator makes sense. The only issue being one of how to maintain compatability.

1. The easy and unclean way: keep the old namespace and the directory/file metaphore (and maybe the class name too), just change the implementation to use TraversableSources instead than File;


2. The clean way: provide a clear documentation on what's changed and (maybe) add a stylesheet converting the "new" output to the "old" one.

What's best is hard to tell. :-) Moreover, I'm definitely not sure that this should go into the next release, even if I consider it a major leap forward for collection browsing.

Ciao,

--
Gianugo Rabellino
Pro-netics s.r.l. -  http://www.pro-netics.com
Orixo, the XML business alliance - http://www.orixo.com
    (Now blogging at: http://blogs.cocoondev.org/gianugo/)



Reply via email to