cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: [C2]: The EntityResolver and the URLFactory
Date Fri, 18 May 2001 10:02:33 GMT


On Fri, 18 May 2001, Carsten Ziegeler wrote:

> Dear Developers,
>
> in the last weeks we often questioned the EntityResolver and the URLFactory.
> I think before going beta we should take some time and think about this
> concept.
>
> The EntityResolver object which is passed for example to the generator
> and the transformer can not resolve all urls. Even worse for caching
> is that it that the EntityResolver returns an InputSource object which
> is not able to tell the last modification date.
> So the current approach in most components for resolving the src information
> (the file for the file generator or the stylesheet for the trax transformer
> etc.)
> is the following:
>
> 1. Getting the InputSource from the EntityResolver
> 2. Getting the System ID from the InputSource
> 3. Testing if it is a file
> 4. if it is a file
> 4a.  Creating a file object and getting the last modification date
> 5. if it is not a file
> 5a.  Create an URLConnection object and getting the last modification date
> 6. If the component is not cached us either the InputSource or a
>    newly created URLConnection for processing
>
> I think this approach is very confusing and has some more problems:
> - The EntityResolver must be used for making subsitemaps work

Obviously, yes.

> - The URLFactory is the only one which can handle "resource://" URLs
> - The URLFactory does not handle local files correctly
>
> So my suggestion looks like this:
> - Using a slightly modified interface for the EntityResolver which does not
>   return an InputSource but either an URL or a combination of an InputSource
>   and a last modification date.
>   This would allow all components to only use the EntityResolver.
> - The new EntityResolver uses internally the URLFactory.
>
> This would - I think - also solve the problem we have currently with the
> internal content aggregation. The X/CInclude Transformer could simply use
> the new EntityResolver.
>
> This is a rough explanaition of the concept - I haven't solved any details,
> but it should work.
>
> Your votes and comments are welcome!

+1 I've never liked the EntityResolver since sub sitemaps are realized
but never took the time to think of a better aproach.

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message