[jdom-interest] Help XSLT/Piped Streams?
Scott Boag/CAM/Lotus
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();
// pi.connect(po);
po.connect(pi);
xmlout.output(doc,po);
// po.flush();
po.close();
//transformer.transform(new InputSource("foo.xml"), new Result(new
FileOutputStream("foo.out")));
System.err.println("Calling Transform");
transformer.transform(new StreamSource(pi), new StreamResult(new
FileOutputStream("foo.out")));
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
streams?
-scott
Yusuf
Goolamabbas To: Scott_Boag at lotus.com
<yusufg at outbl cc:
aze.com> Subject: Re: [jdom-interest] Help XSLT/Piped Streams?
11/21/2000
09:36 AM
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,
but
> would like to get to the bottom of this.
>
> -scott
>
>
>
>
>
> Yusuf
> Goolamabbas To: Scott_Boag at lotus.com
> <yusufg at outbl cc:
> aze.com> Subject: Re: [jdom-interest]
Help XSLT/Piped Streams?
>
> 11/14/00
> 01:27 AM
>
>
>
>
>
>
> >
> > Which version of Xalan are you using?
>
> Scott, I am seeing the same thing with Xalan-2 D01
>
> >
> > -scott
> >
>
>
>
>
--
Yusuf Goolamabbas
yusufg at outblaze.com
More information about the jdom-interest
mailing list