W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2006

[Bug 3446] [XQueryX] constructing attribute values with whitespace characters

From: <bugzilla@wiggum.w3.org>
Date: Sat, 29 Jul 2006 08:45:01 +0000
To: public-qt-comments@w3.org
Message-Id: <E1G6kRR-0007Ka-1p@wiggum.w3.org>


------- Comment #5 from mike@saxonica.com  2006-07-29 08:45 -------
The two elements in 

<x><elem attr="a&#x09;b"></elem><y/><elem attr="a    b"></elem></x>

should not produce the same result. XQuery clause 1 says:

"Each consecutive sequence of literal characters in the attribute content is
treated as a string containing those characters. Attribute value normalization
is then applied to normalize whitespace and expand character references and
predefined entity references. An XQuery processor that supports XML 1.0 uses
the rules for attribute value normalization in Section 3.3.3 of [XML 1.0]; "

and the relevant rule in XML 1.0 is 

* For a character reference, append the referenced character to the normalized

* For a white space character (#x20, #xD, #xA, #x9), append a space character
(#x20) to the normalized value.

Thus a character reference #x9 should result in a tab character, whereas a tab
character should result in a single space (#x20) character.
Received on Saturday, 29 July 2006 08:45:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:13 UTC