Attribute-Value Normalisation

James Tauber jtauber at
Wed Mar 31 19:45:41 BST 1999

> <MYDOC file="c:\temp\hello.txt"/>
> Will this attribute be normalised if it contains any whitespace?

If it is declared CDATA, the only whitespace normalization is that
carriage-returns, line-feeds and tabs are normalized to spaces (with a CR+LF
being normalized to only a single space)

Only if it were *not* CDATA would multiple spaces be normalized to one.

> Essentially my question is, if I have a valid filename (on Windows or Mac)
> I use as an attribute value in XML can I be sure the parser will pass this
> unchanged?

As long as the filename didn't contain a < or & that you include literally.

James Tauber / jtauber at /
Associate Researcher, Electronic Commerce Network
Curtin University of Technology, Perth, Western Australia

Full-day XML Tutorial @ WWW8 :

Maintainer of :, and

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as: and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list