pascalin / pycoon

Automatically exported from code.google.com/p/pycoon
GNU General Public License v2.0
0 stars 0 forks source link

XSLT transformer compiles stylesheet at server startup #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The XSLT transformer compiles the given stylesheet upon instantiation. 
This means that, after the server has started, the stylesheet associated 
with the transformer can not be changed. Two problems arise from this:

1) It is necessary to re-start the server if the stylesheet is altered;
2) You can't specify a variable file name for the stylesheet, e.g. 
<transform type="xslt" src="xslt/{$1}.xsl" />

The simple solution would be to make the XSLT transformer component store 
the value of its "src" attribute upon instantiation, and then determine 
and compile the actual stylesheet file every time its called.

However, it may be more beneficial to integrate a solution to this 
problem into a more generalisation caching mechanism. Work has begun on a 
caching method (see http://pycoon.googlecode.com/svn/trunk/resources.py) 
but it is far from finished.

Original issue reported on code.google.com by pyc...@gmail.com on 31 Aug 2006 at 12:19

GoogleCodeExporter commented 9 years ago
I've changed this so that, upon initialisation, the xslt_transformer component 
stores the path to the stylesheet and then, upon execution, compiles and 
executes 
the stylesheet.

(Work on a caching mechanism will have to wait!)

Original comment by pyc...@gmail.com on 13 Sep 2006 at 9:54