W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2006

[whatwg] id and xml:id

From: fantasai <fantasai.lists@inkedblade.net>
Date: Sun, 02 Apr 2006 11:56:53 -0400
Message-ID: <442FF445.1090300@inkedblade.net>
Henri Sivonen wrote:
> Since UAs handle whitespace in the id attribute inconsistently (see  
> below), old specs imply or require whitespace trimming and ids with  
> whitespace are unreferencable from whitespace-separated lists of ids,  I 
> suggest adding the following language concerning document conformance:
> 
> The value of the id attribute must be a string that consists of one  or 
> more characters matching the following production: [#x21-#xD7FF]| 
> [#xE000-#xFFFD]|[#x10000-#x10FFFF] (any XML 1.0 character excluding  
> whitespace).

I'd rather see the id attribute restricted to an NCName token insofar
as possible. We can make an exception for Hixie's repetition templates,
but otherwise I think it should be compatible with the XML ID syntax.

So

   xsd:id {
     pattern: "\S*";
   }

The concept of "idness" is a useful one for many tools, and even if
browsers don't care what characters there are, other tools do. We can't
express IDness in a schema if we insist on ignoring its syntactic
restrictions.

~fantasai
Received on Sunday, 2 April 2006 08:56:53 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:46 UTC