cocoon-dev mailing list archives

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

Sylvain Wallez wrote:
> 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 ??

Good point. Actually, it sorta closes the discussion for me :-)

>> 2  - If it's a plug to a resource, it should not.
> What is a "resource" ?

stuff, bytes, bits, whatever ;-)

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

Yeah :-)

Let me try to explain it, it could be fun trying to understand how my 
fried brain comes up with these sentences:

Usually a source is [intended as something that gives me a resource, 
that is a data entity], but since we bind the Source to a URI, [that is 
we get Sources from URIs], [making it hierarchically navigable as a URI 
space] makes more sense. BTW, if [being simply a handle to a resource] 
is true, specific [implelentations of] Sources should probably not be 
the place anyway where to traverse a URI space, or else we are in [the] 
case [where those Sources are resolvable with URIs, so they should have 
those methods].

If you still don't get it (yes, you should laugh at the complexity of 
the above) don't worry, *I'm* the mad one ;-)

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

hope my reply helps...

Nicola Ken Barozzi         
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)

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

View raw message