cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steffen Stundzig <stef...@smb-tec.com>
Subject Re: [C1] and xalan2
Date Mon, 22 Jan 2001 08:18:05 GMT
Hi Ovidiu,

/**
 * @author: Ovidiu Predescu <ovidiu@cup.hp.com> 
 * @date: Fri, 19 Jan 2001 11:55:49 -0800
 */
> Hi Steffen,
> 
> On Fri, 19 Jan 2001 10:25:10 +0100, Steffen Stundzig <steffen@smb-tec.com> 
> wrote:
> 
> > the attachment contains the TRaXTransformer and some patches needed to
> > replace xalan1 with xalan2 in the current cocoon_1.8.1-cvs. 
> > The transform process is now 2-3 times faster as with the old 
> > XalanTransformer and xalan1.
> > 
> > A very good side effect of the compiled stylesheets are the
> > detection of errors in the XSL stylesheets. So now we have a chance to
> > get some metrics from it and we could optimize the stylesheets.
> 
> This looks very good, thanks a lot for the good work!
> 
> I have a comment though. In TRaXTransformer.java the getTransformer() method
> caches the XSLT sheet and never checks to see whether it has been updated
since
> the last use. You should have a check of the timestamp of the file, or even
> better, since the XSLT file can be a remote resource, use the Java URL's
> methods to check for modifications.

you are right. I've noticed that in my last tests. Now the caching of
the templates in getTransformer() isn't based on the URL but on the 
stylesheet Document. So if a new Document is created, a new transformer
were built. The check on modifications of the stylesheet is done inside
the XSLTProcessor, so there is no need to do this also in the 
TRaXTransformer. But now I must also store the URL and the appropriate
Document, 
to check, if a compiled stylesheet for this stylesheet document already exists
and if its modified. Then I must replace the compiled stylesheet for the older
version.

I'm working on integrating Saxon with C1. With the TRaXTransformer this is
very easy, because I remove xalan2.jar and put the saxon.jar in my classpath. 
Thats it. :-)
But there are some errors in the cocoon XSPProcessor-taglibs. 
Currently I'm checking response.xml. Saxon seems to be anymore fussy then 
xalan2 on compiling the XSL stuff.



Regards
	Steffen...

-- 
______________________________________________________________________
Steffen Stundzig                            mailto:steffen@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com




Mime
View raw message