Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - xsl output encoding type being ignored >Thread Next - Re: xsl output encoding type being ignored Re: xsl output encoding type being ignoredTo: 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 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
