xalan-dev@xml.apache.org
[Top] [All Lists]

RE: xsl:include issue?

Subject: RE: xsl:include issue?
From: "Rick Bullotta"
Date: Fri, 22 Jul 2005 07:55:01 -0500
Strangely enough, it works fine when no proxy host is defined, but fails
when a proxy host is defined...odd!

Also, we do call setSystemID, with the same URL that was used to load
the DOMSource.

- Rick

-----Original Message-----
From: Henry Zongaro [mailto:zongaro@xxxxxxxxxx] 
Sent: Thursday, July 21, 2005 10:36 AM
To: xalan-dev@xxxxxxxxxxxxxx
Subject: Re: xsl:include issue?

Hi, Rick.

"Rick Bullotta" <Rick.Bullotta@xxxxxxxxxxxxxxx> wrote on 2005-07-21 
03:54:17 AM:
> We're having a very strange issue with Xalan when a proxy server is
> assigned (using the system property http.proxyHost).
> 
> Any stylesheets that have an xsl:include with a relative path, such as
> ../MyFolder/MyStylesheet.xsl, fail loading with the following error:
> 
> javax.xml.transform.TransformerException: Had IO Exception ...
> 
> Is this a bug?  Any workarounds?

     I believe that if no system ID is provided for a stylesheet, and a 
relative URI has to be resolved, Xalan-J will fall back to using the
value 
of the user.dir system property as a base URI.  Attempting to get the 
value of the user.dir property may throw a SecurityException.  It's 
possible that that's what is happening in your scenario.

     If that's the case, the solution is to ensure the system ID of the 
Source object for the stylesheet is set properly - for instance, by
using 
the Source.getSystemId(String).  The system ID can be inferred in some 
situations - for instance, if you create the Source object using the 
StreamSource(String) or the StreamSource(File) constructor - but not in 
all cases.

     I hope that helps.

Thanks,

Henry
------------------------------------------------------------------
Henry Zongaro      Xalan development
IBM SWS Toronto Lab   T/L 969-6044;  Phone +1 905 413-6044
mailto:zongaro@xxxxxxxxxx




---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xxxxxxxxxxxxxx
For additional commands, e-mail: xalan-dev-help@xxxxxxxxxxxxxx


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xxxxxxxxxxxxxx
For additional commands, e-mail: xalan-dev-help@xxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>