[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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
xml id 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 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.