Re: [xml-dev] What to escape when serializing XML

From
Bjoern Hoehrmann <>
To
Paul Spencer <>
Date
2007-01-03T12:08:41Z
ID
<>
Thread
Re: [xml-dev] What to escape when serializing XML
* Paul Spencer wrote:
>Don't forget that multiple sequential whitespace characters in attribute
>values will be normalised. This affects your third bullet. From the REC
>section 3.3.3:
>
>If the attribute type is not CDATA, then the XML processor MUST further
>process the normalized attribute value by discarding any leading and
>trailing space (#x20) characters, and by replacing sequences of space (#x20)
>characters by a single space (#x20) character.

There is no way to prevent this from happening; this is an operation on
the normalized value, which has all its character references expanded.
Also note that this applies only to non-CDATA attributes, whatever that
may be.
-- 
Björn Höhrmann · mailto: · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/