cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Knodt <>
Subject Re: [proposal] some changes to SourceResolver.resolve(baseURI, location, params)
Date Tue, 27 May 2003 10:57:19 GMT
Hash: SHA1

> Therefore, I propose to move the absolutizing code out of
> SourceResolverImpl.resolveURI(location, baseURI, params) and into a new
> method SourceFactory.resolveURI(location, baseURI, params), to be
> implemented by each source factory. The method
> SourceResolver.resolveURI(...) will continue to exist, but will now have
> more of a dispatch function (see below).
Would be good to get this. For those who argue, it's only cocoon: and 
context:, see it like this. It's a question, where something belongs. It can 
be done, like it is, in the SourceResolver, but it belongs there, where all 
the knowledge for the scheme is, in the Source.

> I have already the utility code ready to do correct absolutizing both
> for "normal" URLs and for the cocoon and context cases, so it is mainly
> a matter of integrating it into the current sourceresolver.
I've also done this. I've made some corrections in NetUtils and made 
SourceResolver use this. I think it was Vadim ho suggested this. If the 
others don't agree with the above paragraph, I suggest to do this here, as a 
temporary solution.

> 1. determine scheme:
>      - if the scheme of the location is not empty, use that
>      - otherwise use the scheme of the baseURI (it is an error
>        for baseURI not to have a scheme)
Not very nice, but I don't have a clean solution, for doing it better.

> 2. use the scheme to lookup the SourceFactory
> 3. do SourceFactory.createSource(location, baseURI, params)
We should also provide a way to have baseURI already as a source. Then 
XMLBaseSupport and perhaps others can use Source instead of more 

- -- 
Domain in provider transition, hope for smoothness. Planed date is 1.7.2003.
pub 1024D/4CD29A2C 2001-01-12 Torsten Knodt <>
 Schl.-Fingerabdruck = A2B1 C626 F819 7C58 B2F9 4F4C BF16 64B6 4CD2 9A2C
Version: GnuPG v1.2.2 (GNU/Linux)


View raw message