Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: xsl output encoding type being ignored [Thread Next] Re: xsl output encoding type being ignoredTo: NULL Date: 10/9/2007 7:36:00 AM On Oct 4, 8:39 pm, "Neil Smith [MVP Digital Media]" <n...@nospam.com> wrote: > On Thu, 04 Oct 2007 15:40:40 -0000, robsto...@gmail.com 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 : eghttp://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-2007http://mvp.support.microsoft.com/mvpfaqs Neil That method sounds promising but I'm having a bit of difficulty implementing (I'm a bit new to this XSL stuff). Where do I put the XSL processing instruction? In the XML file? Thanks Rob | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
