[jdom-interest] Help XSLT/Piped Streams?
Scott_Boag at lotus.com
Mon Nov 27 06:38:30 PST 2000
Yusuf, Nick, many apologies for the long delay in following up on this. I
hope no offense is taken.
Yusuf, from your example, it looks like the issue is with something with
piped input streams.
Nick Vincent wrote:
> but when I attempt to pipe the input
> the XSLT parser
> hangs, as if it is still waiting for input from the input stream.
Yes, that's what it looks like to me also. From Yusuf's example, if I add
a close() to the output pipe, it seems to work. I think Xerces (or
whatever parser you are using) is reading from the input stream, and it
hangs waiting for the output stream.
PipedInputStream pi = new PipedInputStream();
PipedOutputStream po = new PipedOutputStream();
//transformer.transform(new InputSource("foo.xml"), new Result(new
transformer.transform(new StreamSource(pi), new StreamResult(new
System.err.println("Done with Transform");
(Using the current TrAX APIs). If I don't do the close(), and just do the
flush instead, it just hangs inside the transform, which I think replicates
your problem. So, I don't think this has anything to do with Xalan, it has
to do with piping streams and possibly differing behavior with various
versions of the JDK in regards to PipedInputStream.
BTW, you might be better off using the JDOM DOM adapter instead of piping
Goolamabbas To: Scott_Boag at lotus.com
<yusufg at outbl cc:
aze.com> Subject: Re: [jdom-interest] Help XSLT/Piped Streams?
Scott, Did you get any info from my test case. Do you need me to provide
you with more info etc
> I hate to ask, but is it possible you could send me a complete test,
> including jdom jars, etc? I'm on a very short time schedule this week,
> would like to get to the bottom of this.
> Goolamabbas To: Scott_Boag at lotus.com
> <yusufg at outbl cc:
> aze.com> Subject: Re: [jdom-interest]
Help XSLT/Piped Streams?
> 01:27 AM
> > Which version of Xalan are you using?
> Scott, I am seeing the same thing with Xalan-2 D01
> > -scott
yusufg at outblaze.com
More information about the jdom-interest