ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xml-dev
xml-dev
Re: [xml-dev] xmlns:xml = "???"
by Tim Bray other posts by this author
Jan 28 2002 8:54PM messages near this date
[xml-dev] xmlns:xml = "???" | RE: [xml-dev] converting XML Schema to DTD
At 08:35 PM 28/01/02 +0000, Michael Kay wrote:

> (1) Is it legal to specify
>   xmlns:xml="http://www.w3.org/XML/1998/namespace"?
> 
> (2) Is it legal to specify
>   xmlns:xml="anything else"?

Both of those are perfectly legal XML 1.0.  The namespaces
spec says nothing about these aside from the "by definition"
phrase that you quote.  The other question you don't ask is
whether it's legal to bind some other prefix to the 
http://www.w3.org/XML/1998/namespace namespace.

So this is a shortcoming in the rec.  I think we can all
agree though that doing any of these things would be really
bad practice. 

> Supplementary questions:
> 
> (3) Do xml:space and xml:lang have any defined meaning if
> xmlns:xml="anything else" is specified?

Probably they do, since XML 1.0 binds them to the prefix "xml:".
And probably if that namespace name were bound to some other
prefix, then "otherprefix:lang" wouldn't work.  But once again, 
this would be really really stupid, and if any software raised 
an error and threw it out on grounds of gross stupidity, I 
think that would be within the spirit of the spec.

> (4) Is it legal to specify
>   xmlns:xmlns="anything"?
> (and if not, where does it say so?)

Almost the same answer as for (1) and (2), but I could probably
make a stronger case that this is forbidden by the namespace
rec's assertion that this prefix "is not bound to any namespace
name".  -Tim


-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org> , an
initiative of OASIS <http://www.oasis-open.org> 

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl> 
Thread:
Michael Kay
Tim Bray

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved