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 | | Writer/Programmer |
|           Processing XML with Java (Addison-Wesley, 2002)          |
|                 |
|  |
|  Read Cafe au Lait for Java News:      |
|  Read Cafe con Leche for XML News:    |

Received on Tuesday, 7 January 2003 14:02:54 UTC