W3C home > Mailing lists > Public > public-xml-id@w3.org > April 2005

Character references pointing to carriage returns and linefeeds

From: Elliotte Rusty Harold <elharo@metalab.unc.edu>
Date: Sat, 02 Apr 2005 12:27:10 -0500
Message-ID: <424ED5EE.5030100@metalab.unc.edu>
To: public-xml-id@w3.org

Here's an ugly case:


<root xml:id='&#x0D;  p2  '/>

My understanding is that the ID attribute reported here should be 
"\n\u0020p2" (in Java parlance).

However appendix E2 of the xml:id spec says:

Parsers are required to normalize all attribute values. Normalization 
expands character references, expands entity references, and cleans up 
line end characters. Attributes of type ID are subject to additional 
normalization rules: removing leading and trailing whitespace and 
replacing sequences of spaces with a single space.

I think "removing leading and trailing whitespace" should really be 
"removing leading and trailing space characters" because in this example 
  the linefeed would not be removed by a validating parser.

-- 
Elliotte Rusty Harold  elharo@metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
Received on Saturday, 2 April 2005 17:27:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:53:49 UTC