W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2004

xml:id spec and XML Schema?

From: Webb Roberts <webb.roberts@gtri.gatech.edu>
Date: Mon, 11 Oct 2004 16:30:30 -0400
Message-ID: <416AED66.5020508@gtri.gatech.edu>
To: xmlschema-dev@w3.org
Cc: jmarsh@microsoft.com

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.

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:06 UTC