Lists Home |
Date Index |
> 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