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

RE: How to preserve numerical representation of chars

Subject: RE: How to preserve numerical representation of chars when parsing?
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Fri, 6 Sep 2002 10:40:26 +0100
numerical representation
> > > Is there any possibility to let the numerical references pass
> > transparently?
> ...
> I suggest to consider a setting/property for XML Parsers that 
> allows to not 
> expand numerical refs. Would this make any sense or is this 
> feature too exotic to consider?
> 
XML tries - not always successfully - to separate the logical
information content from the physical encoding of the file. Certain
features of XML are considered to carry information that applications
can legitimately use (for example, the names and values of elements and
attributes, the order of elements), and other features are considered to
be accidents of the encoding (for example, the order of attributes, the
whitespace within a start tag, the choice of single or double quotes).

There are some boundary cases such as CDATA sections, comments, and
namespace prefixes, where different specs have interpreted the
constructs differently in this respect. But the distinction between
representing a character literally and representing it by a decimal or
hexadecimal character reference is definitely in the "accident of
encoding" category, and no application should rely on it being
represented one way or the other. Indeed, XML parsers should not even
tell the application which way it was encoded.

XSLT works strictly at the level of the logical information content: it
is not concerned with retaining the original encoding, though it does
allow you some limited control over the output encoding if you use the
XSLT serializer.

You haven't really explained why your target application (the one that
is the recipient of the output from the transformation) cares which XML
representation of the characters in the document is chosen. As David
explained, if it does care, then it is not an XML application as defined
by the XML specification.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


 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.