I’m not sure if this is a problem or not, but it caused me a few headaches. I hold my stylesheets in a sub directory of the web applications’ root e.g. /xsl and create a StreamSource using

 

new StreamSource(ServletContext.getResource(“/xsl/myxsl.xsl”).toExternalForm())

 

this gives “file:C:\…….\MyWebApp\xsl\myxsl.xsl”.  

 

If the xsl happed to contain an xsl:include statement, e.g. <xsl:include href=”myinclude.xsl”> then I get a javax.xml.transform.TransformerConfigurationException exception thrown.

 

"javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: File "file:///c:/<appservers java home>/c:/...../MyWebApp/xsl/myinclude.xsl" not found.".

 

It doesn’t appear to recognise the URL correctly. If I modify the URL so it reads “file:///C:/……./MyWebApp/xsl/myxsl.xsl” then everything works fine.

 

My question is? Is xalan behaving as it should and have I done something wrong, or is there a bug in xalan.

 

Regards

Anthony Dodd

Synergy Financial Systems Limited

Synergy House, Highfields Science Park

Nottingham NG7 2RF

United Kingdom

 

t: +44 (0)115 9677990

f: +44 (0)115 9677933 

e: [EMAIL PROTECTED]

w: www.synergy-fs.com

 

 

Reply via email to