cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Unico Hommes" <Un...@hippo.nl>
Subject RE: [RT] Rethinking the SourceResolver concept
Date Mon, 20 Oct 2003 13:21:03 GMT


Carsten Ziegeler wrote:
> 
> Now, I think we can make it simpler :)
> a) A sitemap component gets a Cocoon source resolver anyway.
>   We can provide in the setup() method a wrapper for
>   the Avalon SourceResolver that knows it's sitemap. This
>   is simply and doesn't need thread locals etc. anymore.
> b) The only problem lies in all this nice little thread
>   safe components that resolve URIs relative to the
>   current sitemap. 
> One solution for b) is to say, relative paths are always
> resolved to the context directory of cocoon than we can
> remove a lot of the hacky things. But I fear this might
> break some things.

I fear this as well but think it will make the contract much clearer too, so I would be in
favor of changing the behavior in this way.

The way I understand it is that cocoon has a hierarchical containment model. The root container
manages components declared in cocoon.xconf and the child containers each manage the components
of the sitemap they represent. A SourceResolver is contextualized against the current sitemap
(= container context managing the sitemap components). Therefore it means that each container
in the hierarchy should provide its own SourceResolver contextualized relative to its own
context instead of following the traditional ECM paradigm of inheriting all components it
does not specifically declare itself from the parent container.

Hmm. But shouldn't *any* contextualizable component that lives in a hierarchical containment
model *always* be contextualized against the container it was looked up on? Shouldn't that
actually be part of the Contextualizable contract? I would say that goes without saying (no
pun intended :-). What about components that have a dependency on components that are contextualizable?
ad infinitum?


> 
> So, what do you think?
> 
> Carsten 
> 
> 
> 

Mime
View raw message