OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xml-dev] Compatibility for XML attribute types with schemas

Most of the XML simple types in the W3C XML Schema Language -- e.g. 
NOTATION, NMTOKEN, iD, IDREF, etc. -- carry a compatibility rule; for 

For compatibility (see Terminology (1.4) 
<http://www.w3.org/TR/xmlschema-2/#terminology> ) *NMTOKEN* should be 
used only on attributes.

How important is this? Would it really be a compatibility problem to say 
that an element must have type NMTOKEN? or be an ID? How would this be 
incomaptible with standard XML? The resulting document would still be 
well-formed and perhaps DTD valid. Nothing in the schema would change 
this. Of course, these constraints could not be used on elements in a 
DTD. However, netiher could a constraint that an element be required to 
contain an integer, whihc is acceptable in schemas.

What's the reasoning  here? Why shouldn't we use NMTOKEN and the like 
for element types?

| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
|               Java I/O (O'Reilly & Associates, 1999)               |
|            http://www.ibiblio.org/javafaq/books/javaio/            |
|   http://www.amazon.com/exec/obidos/ISBN=1565924851/cafeaulaitA/   |
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      | 
|  Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/     |