I was about to aks if you set the systemId of the Source, but usign a
URL for the constructor should do that for you.
The odd thing is, the URL that your ServletContext gives you (if I'm
reading this correctly) starts "file:C:\...\MyWebApp...", and I don't
remember if that's really a legal absolute URL or not.
So on one hand we can have a discussion of what legal URL's are; on the
other hand we can look into how Xalan scans URL's to see if they're
relative or absolute. One likely problem in Xalan code (which may or
may not be a bug depending if that URL really is legal) may be in how
we scan the starts of URL's for file:// characters to see if it's
relative or absolute.
You should probably enter a Bugzilla bug for this so we can track it
better than just discussing it on the mailing list.
- Shane
---- you "Anthony Dodd" <[EMAIL PROTECTED]> wrote ----
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
=====
<eof aka="mailto:[EMAIL PROTECTED]"
BartSays="Nobody reads these anymore."/>
__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1