Hello, all.
Here is the situation:
- Orion 1.4.5
- SAXON 6.2.2
- Modified Jakarta XSL Taglib to use TRAX API provided by SAXON
If I use the following code to generate the output from the Taglib:
-----------------------------------
transformer.transform(
new StreamSource(data),
new StreamResult(pageContext.getOut())
);
-----------------------------------
The resultant generated text is padded with huge amounts of garbage
data... well huge in comparison I guess... the output is a simple 6
line HTML page... with about 2K of garbage mixed in.
If I instead use the following code... effectively telling the
transformer to transform into a StringWriter... and then post-process
spewing the StringWriter content to pageContext.getOut().. there is no
garbage data. Everything works fine.
-----------------------------------
java.io.StringWriter sw = new java.io.StringWriter();
transformer.transform(
new StreamSource(data),
new StreamResult(sw)
);
pageContext.getOut().println(sw.getBuffer().toString());
-----------------------------------
I've tried upgrading to SAXON 6.3, Orion 1.5.2 to no avail...
I am not sure if it is a bug in Orion's implementation of JspWriter,
or a bug in how SAXON is working with the StreamResult... or something
else..
Anyone else come across this?
Anyone else have any ideas?
Thanks.
Dylan Parker