This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How generate encoding="ISO-8859-1" in the XML output?
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] How generate encoding="ISO-8859-1" in the XML output?
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Wed, 9 May 2001 18:16:48 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> Can any body tell me how cal generate <?xml version="1.0"
> encoding="ISO-8859-1"?> in the XML output
> because MSXML generates <?xml version="1.0"
> encoding="UTF-16"?> discard
> the sentence
> <xsl:output method="xml" indent="yes" encoding="ISO-8859-1" />?
The answer is to call MSXML in such a way that the output goes to a stream
and not to a DOM. If you send the transformation output to a DOM and then
use the DOM serializer, the xsl:output element has no effect.
>
> The only way I've found is
>
> <xsl:text disable-output-escaping='yes'><?xml
> version="1.0"
> encoding="ISO-8859-1"?></xsl:text>
>
That will put something that looks like an XML declaration into the output
stream, but do you really want the output just to say it's encoded in
ISO-8859-1, or do you want it actually to be encoded in ISO-8859-1?
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list