XSL processor - stylesheet caching?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

XSL processor - stylesheet caching?

Stephen Bayliss

I understand that OPS caches stylesheets for performance.

 

We have a situation where the <config> input of an oxf:xslt processor is generated dynamically – based on an input parameter, a config file is read, and the name of the xsl file is taken from that.  This is then retrieved using the URL generator, and fed into the oxf:xslt processor.

 

So my question is, would the stylesheets (ie the ones defined in the config file) be cached in this case?

 

And if not, does anyone have any suggestions for how this could be achieved, maybe by reading the stylesheet in a different way?

 

Steve



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: XSL processor - stylesheet caching?

Erik Bruchez
Administrator
Stephen Bayliss wrote:

> I understand that OPS caches stylesheets for performance.
>
> We have a situation where the <config> input of an oxf:xslt processor is
> generated dynamically ? based on an input parameter, a config file is
> read, and the name of the xsl file is taken from that.  This is then
> retrieved using the URL generator, and fed into the oxf:xslt processor.
>
> So my question is, would the stylesheets (ie the ones defined in the
> config file) be cached in this case?

Whether a stylesheet can be cached depends on the whole tree of
dependencies of that stylesheet. You should be able to determine this by
putting a "debug" attribute on the output of your Request generator, if
that is what you are using: the attribute will make sure that no caching
appears. If you notice a significant different in performance, it means
that the stylesheet was cached.

I think it should be cached, because the dependency tree involves the
Request generator, URL generator, etc., which all support caching.

> And if not, does anyone have any suggestions for how this could be
> achieved, maybe by reading the stylesheet in a different way?

-Erik



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: XSL processor - stylesheet caching?

Stephen Bayliss
In reply to this post by Stephen Bayliss
Thanks Erik, I'll run some tests and see what happens.  It may well be
that there are already debug attributes on there, come to think of it,
which could be preventing caching.

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: 09 November 2005 20:54
To: [hidden email]
Subject: Re: [ops-users] XSL processor - stylesheet caching?

Stephen Bayliss wrote:

> I understand that OPS caches stylesheets for performance.
>
> We have a situation where the <config> input of an oxf:xslt processor
is
> generated dynamically - based on an input parameter, a config file is
> read, and the name of the xsl file is taken from that.  This is then
> retrieved using the URL generator, and fed into the oxf:xslt
processor.
>
> So my question is, would the stylesheets (ie the ones defined in the
> config file) be cached in this case?

Whether a stylesheet can be cached depends on the whole tree of
dependencies of that stylesheet. You should be able to determine this by

putting a "debug" attribute on the output of your Request generator, if
that is what you are using: the attribute will make sure that no caching

appears. If you notice a significant different in performance, it means
that the stylesheet was cached.

I think it should be cached, because the dependency tree involves the
Request generator, URL generator, etc., which all support caching.

> And if not, does anyone have any suggestions for how this could be
> achieved, maybe by reading the stylesheet in a different way?

-Erik





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws