Subject: [xsl] Re: encoding <-> omit-xml-declaration From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Sun, 18 Jan 2004 18:29:24 +0100 |
"Maia Zaharieva" <m.zaharieva@xxxxxxx> wrote in message news:008701c3dde2$f09db2c0$bf01a8c0@xxxxxxxxxxxxx > i have just noticed, that if i have > <xsl:output method="xml" omit-xml-declaration="yes"/> > i get the output file with no xml declaration (as it should be). > > but if i set the encoding attribute on anything different than UTF-8 the > omit-xml-declaration get ignored and i always get the xml declaration at the > beginning of the output file. > > could anyone explain me this correlation? The default value of the encoding pseudo-attribute of the xml declaration is "UTF-8". In case there is no xml declaration a parser will assume that the encoding of the document is UTF-8. Therefore, for any encoding different from UTF-8 the xml declaration must be specified (otherwise the parser will not be correctly informed about the real encoding of the document). Cheers, Dimitre Novatchev. FXSL developer, http://fxsl.sourceforge.net/ -- the home of FXSL Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] encoding <-> omit-xml-dec, G. Ken Holman | Thread | Re: [xsl] Re: encoding <-> omit-xml, Maia Zaharieva |
Re: [xsl] encoding <-> omit-xml-dec, G. Ken Holman | Date | Re: [xsl] Re: encoding <-> omit-xml, Maia Zaharieva |
Month |