Re: caching imported stylesheet?
Brought to you by:
ovidiu
From: Ovidiu P. <ov...@xe...> - 2002-03-22 01:33:03
|
Hi Pepe, On Thu, 21 Mar 2002 11:55:55 -0800, "Pepe Kubon" <pe...@re...> wrote: > Hi: > > I have a following problem - I'm running a transformation in 2 modes, > each in a separate stylesheet. The 1st stylesheet imports the > 2nd. > > If I make changes in the 2nd stylesheet and run it independently, > the result reflects the changes. But if I run the 1st stylesheet > that imports the 2nd, those same changes don't seem to have any effect. > > Finally, if I kill Emacs and load the files again and then run the 1st > stylesheet, the changes are applied. > > I'm wondering if xslt-process is caching the imported stylesheet > for better performance and doesn't notice that the file was > changed. Can I force reloading if that's the case? Yes indeed, XSLT-process caches the stylesheet for performance reasons (running DocBook would be just a pain without this!). To get the correct behavior when imported stylesheets are being used, it would have to check for them. Unfortunately, the JAXP API doesn't have any provision for this, and doing it at the processor layer is very cumbersome and non-portable. I'll think of an Emacs-based solution, something that looks for imports in a stylesheet, and builds a dependency graph to be able to correctly detect a modified imported stylesheet. If you see a better solution please let me know. In the meantime, you don't have to kill Emacs, just kill the *xslt* buffer, or even better, touch the master stylesheet by saving it as well. Regards, -- Ovidiu Predescu <ov...@cu...> http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff) |