I'm trying to write a control that puts the result of an xslt transform into the response stream. Since the xsltransform.transform method can take a stream object for the result, it's pretty simple and efficient to just pass it Response.OutputStream. By itself it works fine but if I do a response.write before it, the chars in the response stream up until the write to outputstream are encapsulated with what looks like 3 extended ascii chars; an i with two dots over it, a double greater-than, and an upside-down question mark (I can get the actuall hex or octal values if anyone thinks it will help).
So when I do something like this...
Code:
xslt.Transform(xPathDoc, null, Response.OutputStream);
...I get an output like this
Code:
resultsOfXSLTransform
when i do this...
Code:
Response.Write("Hello");
xslt.Transform(xPathDoc, null, Response.OutputStream);
...I get an output like this
Code:
<EASCIIchars here>Hello<EASCIIchars here>resultOfXSLTransform
I realize that we could mix text and binary output in old asp and that I could write the results of the transform to a temp stream and convert that to text, but this way seems more efficient (and more interesting to solve ;).
B