cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject Re: [C2]: The EntityResolver and the URLFactory
Date Fri, 18 May 2001 09:44:05 GMT
On Fri, 18 May 2001, Carsten Ziegeler wrote:

> 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
> - 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 from me. i look forward to this - but just to be clear, i don't think
we have to wait for this before going beta.

- donald

To unsubscribe, e-mail:
For additional commands, email:

View raw message