xml:id spec and XML Schema?

In attempting to integrate the xml:id spec with existing schemas, I have run into some details that differ from the specification as written, which raises a larger question.

The specification ( http://www.w3.org/TR/xml-id/#with-schema-validation ) features a sample declaration of xml:id

| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|            targetNamespace="http://www.w3.org/1998/XML/Namespace">
| 
|     <xs:attribute name="xml:id" type="xs:ID"/>
| 
| </xs:schema>

Which has a couple of problems.  To pass validation, mine ended up looking like:

| <xs:schema 
|     targetNamespace="http://www.w3.org/XML/1998/namespace"
|     xmlns:xs="http://www.w3.org/2001/XMLSchema">
|   <xs:attribute name="id" type="xs:ID"/>
| </xs:schema>

Note the different namespace, and the different declaration of xs:attribute (attribute name must be a NCName).  

This raises the question: is there a normative schema for the xml namespace?  

It seems that having individual implementors create (and therefore debug) their own versions of the xml namespace is not the Right Answer.  I don't want to know what happens when my unauthorized version of the xml namespace collides with someone else's copy.  The document at the namespace URL describes two attributes of the xml namespace (version 1.0), but does not include the xml:id attribute.  It does not include a schema for the namespace.

Thanks,
Webb Roberts

Received on Monday, 11 October 2004 20:40:03 UTC