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

Re: change stylesheet encoding

Subject: Re: change stylesheet encoding
From: Eliot Kimber <ekimber@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 May 2004 17:46:18 -0500
xml stylesheet encoding
Mike Ferrando wrote:

What is wierd, is that a friend of mine tried to change the encoding
in his editor of one of my stylesheets. But it would not let him. The
editor said that the stylesheet had characters in it that violated
the encoding choice. My question comes from his experience with my
stylesheet.

Many, if not most, non-Unicode encodings do not have a 100% coverage of the Unicode characters. This means that a Unicode document may contain characters that do not exist in some target non-Unicode encoding. That was probably the case here.


However, the numeric character references should not have caused this.

That is, at the level of the encoding of the *file* the numeric character references are interpreted as the characters "&", "#", "x", etc., not the (abstract) character they represent in XML land. These characters are all within the base ASCII range and therefore should be in every encoding you might want to use.

It is only in the XML parser that the reference is converted from the sequence of characters "&", "#', "x", etc. to a single *Unicode* character.

It's important to remember that, regardless of how the bytes of the XML file are written to disk (the character encoding of the file), once parsed, all XML documents are, by definition, sequences of Unicode characters. Thus, even if I defined "Eliot's personal encoding" and put all my XML files in it and hacked my favorite parser to understand it, once parsed, the XML data provided to other applications by the XML parser would be Unicode characters.

Cheers,

Eliot
--
W. Eliot Kimber
Professional Services
Innodata Isogen
9030 Research Blvd, #410
Austin, TX 78758
(512) 372-8122

eliot@xxxxxxxxxxxxxxxxxxx
www.innodata-isogen.com

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.