cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steffen Stundzig <stef...@smb-tec.com>
Subject Re: [C1][Patch] Saxon and Cocoon1.8.1 [Was:Re: PERFORMANCE PROBLEM!]
Date Fri, 26 Jan 2001 17:14:17 GMT
Hi Martin,

/**
 * @author: "Martin Sevigny" <sevigny@ajlsm.com> 
 * @date: Fri, 26 Jan 2001 17:53:58 +0100
 */
> Steffen,
> 
> > > Error on xsl:import on line ...
> > >  d:\currentdir\d:\path_to_xsl\file_to_import.xsl (file not found)
> > 
> > do you wrote down the absolut filename with the complete path in your
> > <xsl:import> element?
> > 
> > If so, insert a "file:/" before the path and test it?
> 
> The calling stylesheet is in d:\path_to_xsl\, and the called stylesheet too.
> 
> In Xalan:
> 
> <xsl:import href="file_to_import.xsl"/> works
> 
> In Saxon:
> 
> <xsl:import href="file_to_import.xsl"/> does'nt work
> <xsl:import href="d:\path_to_xsl\file_to_import.xsl"/> does'nt work
> <xsl:import href="file:/d:\path_to_xsl\file_to_import.xsl"/> works
> 
> I've checked the sheetBase parameter passed to SaxonTransformer.getTransformer, and it
is correctly set to the calling stylesheet, in the form "d:\path_to_xsl\...".
> 
> It can compile logicsheets neither, but this time the sheetBase property is set to something
beginning with "file:/d:/...".
> 
> Any other idea? Trace doesn't help, my stylesheet is never compiled.

Do you receive an error from Saxon such as 
   javax.xml.transform.TransformerConfigurationException: 
             Failed to compile stylesheet. 1 error detected.

or occurs this error before Saxon is invoked? 
It looks like an Windows specific error on method getResource() in the 
org.apache.cocoon.processor.xslt.XSLTProcessor class, because there was  
created an URL based on the method Utils.getRootPath(). I class Utils I found the
following comment:

 // FIXME (SM): I have _no_absolute_idea_ how much this is portable. The whole
 // architecture should be based on URL rather than Files to allow the 
 // use of Servlet 2.2 getResource() to void calling such nasty methods
 // but for now, well, it's the best I can do :(
 return request.getRealPath("/");

Any ideas to fix it?

Regards
	Steffen...

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




Mime
View raw message