Thanks David for your answer. I will nevertheless close the thread on the Dev's list if you don't mind.
Setting the XSLTResultTarget.setEncoding(xmlencoding) solved my problem! Now, as I am using the xalan-c 1.9 version, the ommit-xml-declaration in the stylesheet has no effect whenever "xmlencoding" is set to something different than UTF-8. As a result, I get multiple <?xml.. Entries in my output file. I can see that this has been fixed in the 1.10 version (XALANC-557), but just by curiosity...is there any workoround for this in 1.9? Thanks in advance -----Original Message----- From: David Bertoni [mailto:[EMAIL PROTECTED] Sent: mercredi, 12. novembre 2008 18:21 To: xalan-dev@xml.apache.org Subject: Re: [Encoding] Xalan-c API alternative to <xsl:output encoding= "xxx"> Diaz Manuel wrote: > Hi all, > > I was wondering if there's an alternative way to set the XSL processor > output encoding(e.g. through a c++ API call), other than setting the > <xsl:output encoding= ...> to the desired value. The reason why I am > asking this is because I would like this encoding setting to be > dynamic, and, to my understanding, this is not possible using the xsl stlysheet. > > Thanks in advance. Hi Manuel, Please ask this sort of question on the user list, rather than the developer list. The class XalanTransformer has a member function setOutputEncoding() to set the output encoding on the transformation. This will override any value in the encoding element, if it happens to be present. If you aren't using the XalanTransformer class, then the class XSLTResultTarget also has a member function setOutputEncoding(). Finally, the command line "Xalan" utility has a "-e" option to specify the encoding of the result. Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]