- From: John Cowan <cowan@ccil.org>
- Date: Mon, 9 Apr 2007 17:50:55 -0400
- To: "Booth, David (HP Software - Boston)" <dbooth@hp.com>
- Cc: John Cowan <cowan@ccil.org>, Misha Wolf <Misha.Wolf@reuters.com>, Richard Cyganiak <richard@cyganiak.de>, www-tag@w3.org, semantic-web@w3.org, public-xg-mmsem@w3.org, newsml-g2@yahoogroups.com
Booth, David (HP Software - Boston) scripsit: > I'm confused by your point #3 below, as it seems to be implying that a > document without a DTD could legitimately have an attribute of type ID > with value "123456", and after looking at the specs I don't see how it > can. Did I miss something? Detailed analysis below. An xml:id processor will report a constraint violation when it sees "xml:id='123456'" in an element, but it will perform ID type assignment anyway, as noted in Section 4 of the xml:id Recommendation. In addition, a conformant XML processor must report an attribute declared to be of type ID as having that type, no matter what the value may be. For example, the document: <!DOCTYPE items [ <!ATTLIST item id ID #IMPLIED> ]> <items> <item id="123456">...</item> ... </items> is not valid, but the id attribute of the item element is of type ID. So you can use either xml:id or a (possibly partial) DTD to force an attribute to be of type ID, and ignore any xml:id or validation errors. Neither of these devices is available in valid XHTML documents, of course. -- You are a child of the universe no less John Cowan than the trees and all other acyclic http://www.ccil.org/~cowan graphs; you have a right to be here. cowan@ccil.org --DeXiderata by Sean McGrath
Received on Monday, 9 April 2007 21:51:19 UTC