|
I have an webapplication that uses xsl transformations heavily, therefore i use xsltc to improve speed, My xsl files refer to a couple of other xsl and xml files, like this: <xsl:variable name="structure" select="document('../../structure.xml')"/> <xsl:include href=""/> <xsl:include href=""/> What i want: If i change any of the xml/xsl documents then the Translet should be recompiled. (I dont know if this is neccesary for the $structure variable) What i have now: private void setupTransformerFactory(TransformerFactory factory) { if(this.useXslCompiler) { factory.setAttribute("translet-name", "Xcm"); factory.setAttribute("destination-directory", filterConfig.getServletContext().getRealPath("/WEB-INF/classes/") ); factory.setAttribute("package-name", "translets"); factory.setAttribute("generate-translet", Boolean.TRUE); factory.setAttribute("auto-translet", Boolean.TRUE); } } The auto-translet param is set to true, so it should recompile if the main xsl file is edited (am i right?). But it does not work, the Translet is not recompiled! How can this be? On the xalan site i read: -- auto-translet: Specifies that time-stamp of translet file, if any, should be compared with that of stylesheet to decide whether to recompile the stylesheet -- But this does not work.. How can i get what i want ( recompilation if any of the xsl files change)? Some system info: Webapps runs on Tomcat 5.5.9 JVM 1.5.0_03 Xalan-j: 2.7.0 |
Enforcing XLTC to recompile a Translet
Postmaster Wolterink Webdesign Sat, 08 Oct 2005 05:50:39 -0700
