Sylvain Wallez wrote:
I don't know if this should be an independent component, or one that extends the SourceResolver.Ah ok, by independent component I meant a component that extends
perhaps the SourceResolver component from Avalon, but can still be
looked up using a component manager. So that it is available in
every component. This is in contrast to extending the Cocoon environment.SourceResolver interface that is only available in
sitemap components.
Ah ok, I understand. Since Excalibur's SourceResolver than can be looked up everywhere, I think we should strongly discourage the use of Cocoon's legacy environment.SourceResolver, and consequently avoid enhancing it.
Having a new CocoonResolver extending Excalibur's SourceResolver seems good to me.
But should this extended resolver be looked up with SourceResolver.ROLE, or with a new CocoonResolver.ROLE ?
<random-thought>
This makes me think of a feature that would be good to have : component aliasing.
Components that are not XML-related or that have no dependency on Cocoon will lookup SourceResolver.ROLE, while Cocoon components that want to use XML features will lookup CocoonResolver.ROLE.
Now, we will provide a single implementation for CocoonResolver and hence (because of inheritance) SourceResolver. If two different roles are used for the lookup, this normally means two different instances (provided ths implementation iis ThreadSafe)
Now what if we were able to specify in cocoon.xconf that SourceResolver.ROLE is just an alias for CocoonResolver.ROLE ? We would have a single instance for two different roles.
The same could be used e.g. for InputOutputModules : we could have a single e.g. SessionAttributeIOModule implementing both InputModule and OutputModule, and have the 'session-attr' input-module configuration be an alias for the 'session-attr' output-module.
</random-thought>
Sylvain (now awaken, stimulated by these wild thoughts ;-)
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }