[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How to read the encoding of an XML document

Subject: Re: How to read the encoding of an XML document
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 25 Oct 2001 20:30:46 +0100
xmldocument utf16
> Ok, I think you two are saying the same thing.
we're twins don't you know:-)

> If I no longer know what my original XML document was encoded as, how do I 
> know the appropriate encoding set to specify for the output?

every xml application is mandated to support at least the utf8 and utf16
encodings, so either of those is always appropriate  (or at least
acceptable) whatever the original encoding of the file.

>   In XML I was going to do xsl:output encoding="whatever the input xml was"

>   In HTML I was going to do META content="text/xml; charset=whatever the 
> input XML was"

in both the xml and html output forms from XSLT these will be added
automatically to match the encoding that's used on output. The system
will choose something or you can give it a hint which encoding you'd
prefer and use <xsl:output encoding="...."/> (although the system is
allowed to ignore that and in some contexts msxml does ignore it and
give you a utf16 based output)

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.