Re: [xml-dev] My report on experiments with unused namespaces

From
Andrew Welch <>
To
Amelia A Lewis <>
Date
2010-09-22T09:29:56Z
ID
<AANLkTinfXe2DhE9prNvZ=>
Thread
Re: [xml-dev] My report on experiments with unused namespaces
> I can't imagine anyone actually doing this, can you?  A parse/write
> sequence could result in:
>
> <orderInfo xmlns:ns0="sampleOrder" xmlns:ns1="3" xmlns:ns2="1234" />
>
> or even:
>
> <ns0:orderInfo xmlns:ns0="" xmlns="3" xmlns:ns1="1234"
> xmlns:ns2="sampleOrder" />
>
> which are all informationally equivalent, per Namespaces in XML
> (because the prefix doesn't matter, in theory).

As far as I know, that's not allowed... you can't have:

xmlns:ns0=""

...if you use a prefix, the namespace can't be empty.  I'm guessing
it's to avoid a conflict with the default namespace, but it the past
I've needed to "unset" a prefix and ran into this problem.


-- 
Andrew Welch
http://andrewjwelch.com

-- 
Andrew Welch
http://andrewjwelch.com