cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianugo Rabellino <>
Subject Re: About (XPath)TraversableGenerator
Date Thu, 02 Oct 2003 15:02:15 GMT
Unico Hommes wrote:
> Gianugo Rabellino wrote:
>>>The limitation is that generate() throws a 
>>SourceNotFoundException if the input Source is not a 
>>collection. I'd like to use this generator also to view some 
>>meta information on <collection:resource>s without having to 
>>generate all of the contents of its parent and then 
>>harvesting only those things I need. (the davmap sample would 
>>also benefit from this feature as it could reduce the number 
>>of traverse2propfind transformation sheets from two to only one).
>>Agreed. That behaviour came straight from the DirectoryGenerator, I 
>>think there is no particular need to keep it. I don't know, 
>>though, if 
>>some users are already depending on the "directories only" contract.
> OTOH, the TraversableGenerator is still a in the scratchpad area. If we want to ever
change this we should do it now. If someone protests we could make the behavior configurable.

Yes, but the idea was to deprecate DirectoryGenerator in favor of this 
implementation. Anyway, I guess that we can just go ahead.

>>>The bug is that the input sources are not tested for their 
>>existence wich means that it is perfectly legal to specify a 
>>non-existing source as the input source.
>>I don't see the point here. Care to delve a bit more?
> If you do:
> <map:generate src="myresource" />
> but myresource does not exist, it will not be an error but xml will be generated just
the same.

Oh! That's definitely a bug, you're most welcome to patch it. :-)

>>That might be just OK, as long as all others behaviour remain... 
>>sometimes mime-types mapping is not applicable.
> OK, I could make it a conjunction: xml resources are those that either have a mime mapping
according to the Context object or that match the pattern that is passed in as a sitemap parameter.
Or I could make it an exclusive disjunction: only look at the Context object if sitemap parameter
is not 
> specified.
> Wich one do you think is preferable?

I like the first one best.

Thanks in advance for the patch! :-)


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

View raw message