473,796 Members | 2,573 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

encoding="utf-8" ?

When I transform a dataset to a xml file by applying a
xslt file, why by default, a "encoding=" utf-8" ?" is
added to the output file?How to get rid of it?
Thanks
Nov 12 '05 #1
4 2414
peter wrote:
When I transform a dataset to a xml file by applying a
xslt file, why by default, a "encoding=" utf-8" ?" is
added to the output file?How to get rid of it?


Because UTF-8 is default output encoding. Try
omit-xml-declaration="ye s" attribute on xsl:stylesheet element to get
rid of xml declaration.
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog

Nov 12 '05 #2
I have tried.But it also got rid of of <?xml
version="1.0" ?>
-----Original Message-----
peter wrote:
When I transform a dataset to a xml file by applying a
xslt file, why by default, a "encoding=" utf-8" ?" is
added to the output file?How to get rid of it?
Because UTF-8 is default output encoding. Try
omit-xml-declaration="ye s" attribute on xsl:stylesheet

element to getrid of xml declaration.
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog

.

Nov 12 '05 #3
Peter wrote:
I have tried.But it also got rid of of <?xml
version="1.0" ?>

And don't want to? You cannot get rid of just encoding declaration. Why
do you care? UTF-8 is default anyway.
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog

Nov 12 '05 #4


peter wrote:
When I transform a dataset to a xml file by applying a
xslt file, why by default, a "encoding=" utf-8" ?" is
added to the output file?How to get rid of it?


Why do you want to get rid of that? The XML declaration with the
encoding specified is part of the XML syntax so any XML parser should be
able to process your XML file without problems.
If you want a different encoding use
<xsl:output encoding="iso-8859-1" />
for instance.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.