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

Re: Why Hex character like Hex04 are not suppoted by X

Subject: Re: Why Hex character like Hex04 are not suppoted by XML/XSL
From: Mike Brown <mike@xxxxxxxx>
Date: Fri, 15 Mar 2002 20:36:56 -0700 (MST)
which hex character are you
Avula, Raj wrote:
> I will have to encode all the rawdata string and decode
> it back after parsing which is a performace hit. Does any body know why xml
> does not support these hexa-decimal characters.

So that you will not make the mistake of thinking that XML is to be used for
blindly encapsulating an arbitrary sequence of bytes.

You must clearly distinguish between the notion of a character (abstract) and
the encoded representation of that character. Then you will see that the XML
spec's restrictions on characters are not at all unreasonable.

XML documents are a sequence of Unicode characters -- these characters are
abstract objects, each with a unique number, that may be encoded as bits &
bytes for storage/transmission in a *multitude* of ways.

If you think of your binary data as a blob of non-characters, it should be
evident that in order to construct an XML document, you must be working
entirely with characters, independent of their encoding. So your binary data
should be converted to characters perhaps with a Base64 scheme. Once you have
your document as a Unicode string, you can then encode/serialize the document
in a UTF-8 or iso-8859-1 or ASCII or whatever form you desire, as long as
the encoding supports the characters in your document or any unsupported 
characters are properly escaped.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  personal: http://hyperreal.org/~mike/

 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.