xml:id attribute has been mentioned before on this weblog and as of today the specification is a W3C Candidate Recommendation. It is unfortunate that it is outside of the scope of the specification to define what should happen with multiple attributes of type
ID on the same element (invalid per XML 1.0, but it is well-formed), but I hope that problem will be solved eventually when everyone starts using
xml:id and drops other methods.
If it is not clear to you why
xml:id is useful, here is a short explanation. Currently you have to define by means of a DTD or Schema what attribute is of type
ID. Without such a Schema or DTD the processor does not know which attribute is an
ID and since there are a lot of documents where you simply do not want to have validation and all that it is very useful to have a common attribute that is defined to be of type
Anne van Kesteren’s is the first report to reach me that the W3C’s xml:id spec has just moved up the food chain to Candidate Recommendation. I’m usually one of the first people to whine about too many XML-related specs, but I think this is a good one, despite a few minor problems like an incompatibility with XML Canonicalization.