--- Begin Message ---
The Redirect extension does not handle output to an externally stream but it would be easy work to extend the redirect class and override the open/write/close
methods. The only problem you may have is passing in the Stream object
as I don't think the Attribute Value Table can handle objects, only Strings.


What you would need to do is look for another attribute on your open method, call it "parameter". If you find that attribute then use its value as the name of a parameters defined in the Stylesheet. The value of this parameter will be your Stream object that will be used for the write/close methods.

All the pieces you need are there, you just need to rearrange them a bit.

John G


shadab wrote:

A related question.instead of redirect writing to a file,could the output be
redirected to a stream as the regular output is?

as in

javax.xml.transform.Transformer.transform(src, res)

here result(res) being the stream and can be redirected to a file if needed.


----- Original Message ----- From: "Marco" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 19, 2004 11:41 AM
Subject: Xalan redirect




When I use redirect:write Xalan creates a new file with the same
xsl:output setting.

In my case, I would like to omit the xml declaration in the newly
created file, and mantain it in the main output file.

Is it possible? Are there any options?

Thanks in advance,
Marco



--- End Message ---


Reply via email to