W3C home > Mailing lists > Public > www-tag@w3.org > January 2003

Re: Options for dealing with IDs

From: Elliotte Rusty Harold <elharo@metalab.unc.edu>
Date: Tue, 7 Jan 2003 13:59:52 -0500
Message-Id: <p04330111ba40d2c6e920@[192.168.254.4]>
To: Chris Lilley <chris@w3.org>, www-tag@w3.org

At 7:27 PM +0100 1/7/03, Chris Lilley wrote:

>   3) Steal undeclared attributes of name id
>   In well formed content that does not have a DTD, or that has a
>   partial DTD used for decoration (declaring ID, declaring attribute
>   defaults, etc) if an attribute is called id and has not been
>   declared in the DTD, it is of type ID.

I'd like to suggest a slight variation of this, which goes along with 
something Tim Bray said in another message:

Steal undeclared attributes of name id (and ID). If an attribute is 
called id, whether or not it is declared in the DTD or schema, and 
whether or not it's type is DTD, it is treated as an ID for fragment 
identifiers. However, no change is made to the attribute's type. All 
parsers will continue to report the attribute's type as they 
currently do, whether that's CDATA, ID, 
my-namespace:social-security-number, etc.

This moves all the effort into the client application receiving data 
from the parser. It leaves XML 1.0 untouched.

Since XPointer is still open, that's easy to fix. DOM is the one that 
will have issues, but they aren't difficult.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|           Processing XML with Java (Addison-Wesley, 2002)          |
|              http://www.cafeconleche.org/books/xmljava             |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+
Received on Tuesday, 7 January 2003 14:02:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:47:15 GMT