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

Is "xmlns:xml" legal or not?

  • From: Tony.Coates@r...
  • To: xml-dev@l...
  • Date: Mon, 03 Sep 2001 14:19:26 +0100

xmlns xml

Recently, I've run into a compatibility problem with some XML tools over whether it is valid to have an "xmlns:xml" declaration in a document.  On close reading, the Namespaces spec says that namespace prefixes beginning with the (regular expression) pattern "[Xx][Mm][Ll]" are reserved, but it doesn't say that they are not allowed.  Nonetheless, this has led to two different interpretations by tool vendors:

1. Flag all namespace prefixes starting the "[Xx][Mm][Ll]" as an error;
2. Allow "xmlns:xml" to be declared, but only allow it to be associated with the namespace URI "http://www.w3.org/XML/1998/namespace" (and do who knows what else for any other prefix starting with "[Xx][Mm][Ll]".

I think we need to get a consensus on this one, and then (as necessary) push to have it added as an erratum to the Namespaces spec.  This is too big a crack to leave unfilled, because if one tool adds "xmlns:xml" to a document, and another flags it as an error, less erudite users are just going to think that XML and/or XML tools are unreliable, and I don't want to see that happening (life's too short, etc.).

As for my preference, having worked with tools that implement each interpretation, I think that allowing "xmlns:xml" to be defined (but only associated with a fixed [XML-version-dependent?] namespace URI) if actually easier for new users to understand than the alternative, that you may have to import the XML namespace to use "xml:lang", but you must not declare the prefix as you do for every other namespace.

You thoughts and comments (to this list) would be very welcome.

     Cheers,
          Tony.
========
Anthony B. Coates
(1) Content Distribution Architect - Project Gazelle
(2) Leader of XML Architecture & Design - Chief Technology Office
Reuters Plc, London.
Tony.Coates@r...
========



-----------------------------------------------------------------
        Visit our Internet site at http://www.reuters.com

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2013 All Rights Reserved.