Re: Options for dealing with IDs

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 UTC