cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Defining Source Interfaces
Date Wed, 08 Jan 2003 14:31:27 GMT
Nicola Ken Barozzi wrote:

> Carsten Ziegeler wrote:
>> Sylvain Wallez wrote:
> [...]
>>> You're totally on track. If you need this action right now, I would 
>>> suggest to mimic what's in the DirectoryGenerator, that makes the 
>>> assumption that the Source is a file. You can then use all the 
>>> facilities given by File.
>> And we only argue, if this support should belong to the Source interface
>> or too an optional extension interface where I always have to do an 
>> instanceof to see if the source has childs or not.
>> :)
> It's nice when discussions are about where to put something new, it's 
> always goodness :-)

Welcome to the party, Nicola Ken !

> MHO: It all depends on what a Source is.
> 1 - If a source is a plug to a URI-based source handler, it should 
> have children. 

?? Have you seen children access methods on ??

> 2  - If it's a plug to a resource, it should not.

What is a "resource" ?

> Usually a source is (2), but since we bind the Source to a URI, (1) 
> makes more sense. BTW, if (2) is true, specific Sources should 
> probably not be the place anyway where to traverse a URI space, or 
> else we are in case (1).

You lost me ;-)

> Also, a source should IMNSHO do stream2xml conversion. It should pipe 
> directly XML *only* if the source is itself already in xml form, like 
> for example a precompiled SAX stream or a direct plugged in SAX stream 
> (for example in the future bean env).
> This makes the whole system more flexible, because we can easily 
> change Generators to make the stream2xml conversion phase pluggale. If 
> we make sources do all the conversion, we are back to Generators, and 
> I don't see the real benfit other than syntatic sugar...

Even Carsten "source-master" got lost here ;-)))


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

To unsubscribe, e-mail:
For additional commands, email:

View raw message