Lists Home |
Date Index |
On Thu, Dec 20, 2001 at 01:17:07AM +0900, MURATA Makoto wrote:
> Since CR and LF are normalized to CRLF by the XML parser, how can you
> expect fidelity? Allowing C0 control functions to not provide any
> fidelity. It merely causes problems.
Many of the SOAP toolkits preserve fidelity by serializing CR as &#d;
and LF as LF. That way no normalization occurs and the data is kept
intact. A useful trick.
XML fidelity of CRLF sequences are only an issue because they are
stated to be an issue in the XML spec. That is, the XML spec says
CRLF translates to LF. Since XML does not talk about any other
translations, there are no other XML fidelity issues with
C0 or C1 control functions. The issue seems to be that XML documents
are used within *other* systems and protocols, and the other systems
and protocols might stuff things up (eg: C programs tend to use NUL
to indicate the end of a string, a printer might use CTRL-D's
between print jobs, an OS might use ^Z to indicate end of file etc).