Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xsl output encoding type being ignored

From: "Neil Smith [MVP Digital Media]" <neil@------.--->
To: NULL
Date: 10/4/2007 7:39:00 PM

On Thu, 04 Oct 2007 15:40:40 -0000, robstoves@g... wrote:

>In an xslt file I am specifying the encoding type of the resulting xml
>file:
><xsl:output method="xml" version="1.0" encoding="iso-8859-1"
>indent="yes"/>
>
>But, when the xml is produced the code is indented but the encoding
>attribute is missing:
><?xml version="1.0"?>
>
>This causes the xml file to be ignored by the javaScript xsl processor
>I am using as it contains characters seemingly not supported by utf-8.


Sounds odd

I can't imagine that happening unless you're not passing the correct
MIME encoding type to the javascript (you didn't say how this "file"
is loaded by javascript, it sounds like it's coming off a web server)

The encoding value above should be used by the XSL processor to make
sure that the character code points in its output conform to
ISO-8859-1 characterset.


If you must include that processing instruction I guess you can write
out a processing instruction out in the XSL processor : eg
http://www.w3schools.com/xsl/el_processing-instruction.asp

<xsl:processing-instruction name="xml ">version="1.0"
encoding="iso-8859-1"</xsl: processing-instruction>

HTH
Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent