cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject RE: Collecting Source dependencies (was Re: [RT]: Calculating the cache key)
Date Wed, 22 May 2002 09:03:29 GMT

Sylvain Wallez wrote:
> Geoff Howard wrote:
> >I just read a post on the users list from someone wishing that file
> >generator's cache validity could check dependencies of xml/xslt
> files which
> >use the document() function.  This is obviously unfeasible in the current
> >structure, but may be workable if the file generator could store
> >dependencies in the scenario I proposed with dependencies:
> >
> >
> Some thoughts I had about this dependency problem...
> Cocoon has the important feature that all access to files or URLs goes
> through the central SourceResolver. What we need is the ability to put
> the SourceResolver in "dependency collecting" mode. In this mode, every
> source resolved within the current thread is added to a list of
> dependencies by the resolver.
> This applies well to loading of XSL stylesheets when to keep track of
> xsl:imports : before loading a stylesheet, the TraxTransformer sets the
> resolver in collecting mode, loads the stylesheet and then asks the
> resolver for the list of Sources (or a composite SourceValidity ?) that
> have been used.
> Collecting dependencies during stylesheet execution can be more tricky,
> as we need to collect only the sources used by a particular component
> and not those used by other components triggered by the pipelined SAX
> events.
> Thoughts (especially Carsten "master of sources") ?
Hehe, "master of sources" sounds good!

Ok, as far as stylesheet execution is concerned I think the collecting
mode is not required as all URI are resolved by the stylesheet resolver
which is the xslt processor itself. So for each stylesheet the resolve()
method of the processor is invoked. It is then possible to collect
the information there.

What you get is a collection of Source and SourceValidity objects.

When the same document is requested the next time, the difficult part
starts. How is it possible to validate if everything is still valid?


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

View raw message