[prev in list] [next in list] [prev in thread] [next in thread]
List: xalan-j-users
Subject: RE: URIResolver object not called when Input file is in JarFile
From: "Michael Kelly Ml (BH/LMI)" <michael.ml.kelly () ericsson ! com>
Date: 2005-11-02 15:16:41
Message-ID: 9B90FC9233F6E94493FF4FD8E0BA247D036E7773 () eiedbnt502
[Download RAW message or body]
hi Henry
I have found a solution thanks to Stanimir Stamenkov
Source stream= new StreamSource(this.getClass().getClassLoader().getResourceAsStream(fileName));
URL sourceURL = this.getClass().getClassLoader().getResource(fileName);
stream.setSystemId(sourceURL.toExternalForm());
using this code to set the stream for the input file my URIResolver object is called
and I can find the file on the local file system.
thanks
michael
-----Original Message-----
From: Henry Zongaro [mailto:zongaro@ca.ibm.com]
Sent: 02 November 2005 14:30
To: Michael Kelly Ml (BH/LMI)
Cc: 'xalan-j-users@xml.apache.org'
Subject: Re: URIResolver object not called when Input file is in JarFile
Hi, Michael
"Michael Kelly Ml (BH/LMI)" <michael.ml.kelly@ericsson.com> wrote on
2005-11-01 08:14:33 AM:
> here is the code I use to reslove the XML input file in the jar file:
>
> StreamSource stream= new StreamSource(this.getClass().
> getClassLoader().getResourceAsStream(fileName));
>
>
> Can anyone let me know why my URIResolver is not been called in
thissituation.
>
> Please note
>
> It is called and works if I put the Input file on the local file and
> use the following code to reslove it:
>
> StreamSource stream = new StreamSource(fileName);
I tried reproducing the problem you've described, but was unable to -
my URIResolver was called in both situations.
Could I ask you to open a bug report for this problem so that we can
investigate it further? Please supply a complete stylesheet, input
documents and Java source that are needed to reproduce the problem. Also,
please describe exactly how the jar file should be set up - or actually
attaching a jar would be nice too.
Thanks,
Henry
------------------------------------------------------------------
Henry Zongaro Xalan development
IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044
mailto:zongaro@ca.ibm.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic