cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: Bug? Foreign SourceResolver in Generator.configure()
Date Wed, 16 Jun 2004 14:14:07 GMT
Carsten Ziegeler wrote:

>Vadim Gritsenko wrote:
>  
>
>>Usually you declare component once, and re-use in several 
>>sitemaps. In this case, relative URLs in configuration are 
>>not possible, only context:// URLs. So, I'd say, nobody 
>>should expect such behavior, at least, it is not intuitive.
>>
>>Now question, suppose that this component looks up some other 
>>component
>>-- this second component, which sitemap will be current for it?
>>
>>    
>>
>Yepp, I was wondering about this as well :)
>
>And if we consider this a bug, and we would change it, the generator
>would behave different in these two cases:
>
>a)
>configure() {
>   URI = configuration.getURI();
>   source = resolver.resolve(URI); <-- resolved relative to sitemap the
>                                       component is declared in.
>}
>
>b)
>configure() {
>   URI = configuration.getURI();
>}
>
>generate() {
>   source =resolver.resolve(URI); <-- resolved relative to sitemap the
>                                      component is used in.
>}
>
>Hmm...
>  
>

All sitemap components have two sitemaps - one where component is 
defined, and another where it is used. Reminds me of the general problem 
we have with all other components as well. All components have 
(logically) at least two managers, one is "own" manager, where component 
was defined / created; and another is current manager of the current 
request. But physically, component has ability to recieve only one 
manager through compose() method (or service() method - for those 
following all renamings). For a moment, we are "abusing" Recomposable to 
pass second manager (and overwriting the first one).

Now, if we somehow able to distinguish between those two - it can help 
fix the problem of two sitemaps, right?

Vadim


Mime
View raw message