OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is "xmlns:xml" legal or not?




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@reuters.com
========



-----------------------------------------------------------------
        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.