Hi Ofer,

You may try to specify output properties for javax.xml.transform.Transformer
using setOutputProperties method.
JavaDoc for this method says:

     * Set the output properties for the transformation.  These
     * properties will override properties set in the Templates
     * with xsl:output.

Then you can obtain stylesheet output properties from
javax.xml.transform.Templates using getOutputProperties method, that will
return all default values. You can override any of them and pass them to
Transformer.
For instance:

String enc = ...;
Templates templates = ...;
Transformer transformer = templates.newTransformer ();
// change encoding
Properties oformat = templates.getOutputProperties ();
oformat.setProperty (OutputKeys.ENCODING, enc);
transformer.setOutputProperties (oformat);

Thanks,
Dmitry

-----Original Message-----
From: Ofer Kalisky [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 03:44
To: [EMAIL PROTECTED]
Subject: Dynamic i18n


Hi. I'd like to change the encoding of the output dynamically. I understand
that in XSL it is impossible, because xsl:output's encoding must be a string
and not an expression. Is there a possibility to do so in Xalan? I
understand it is possible in Saxon...

Reply via email to