This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: How generate encoding="ISO-8859-1" in the XML output?


> 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'>&lt;?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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]