Altova Mailing List Archives
>xml-dev Archive Home
>Recent entries
>Thread Prev - Re: [xml-dev] Some questions about xml:id
[Thread Next]
Re: [xml-dev] Some questions about xml:id
To: Richard Tobin <richard@---.--.--.-->
Date: 11/10/2004 5:47:00 PM
> This is already true for DTD-declared IDs: they have type ID even if > they are not valid. Okay, this makes sense... > Also, in plain XML, for a given element name, all attributes with the same > name have the same type. Some APIs don't have a way to return different > types for a given attribute depending on its value. I am not sure I understand the implication? > I expect they will continue to do what they do now with invalid > DTD-declared IDs. Right, sounds good. >> <?xml version="1.0"?> >> <!DOCTYPE root [ >> <!ELEMENT root EMPTY> >> <!ATTLIST root >> id ID #IMPLIED> >> ]> >> <root id="ID1" xml:id="ID2"/> > > Not an xml:id error. It will of course give you a validity error if > you validate it. Just so I am clear, the validity error that should be raised is undeclared attribute right? Or should you get two validity errors-- undeclared attribute and One Id per Element Type? I think the former (only undeclared attribute) is correct and not the latter-- as the xml:id isn't declared and that is where the VC is applied. This brings up one additional question which I didn't think of before, though I am pretty sure I know the answer: Does VC: ID Attribute default have any relevance here? I think not-- again xml:id has no relevance unless the xml:id is declared in the DTD-- in which case a document where an xml:id was declared with a default value would produce a validity error, nothing more. Right? > You're right. My guess is that the only reason it's not mentioned is > that the editor was only thinking about conformance to the basic > infoset when he wrote section 7. I will send this as a comment to the public comments list so that the WG can address it (either as you have, or by adding the additional infoset item). Thanks, Jeff Rafter
Disclaimer
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

