[Bug 3808] Constr-namespace-13.xml seems to missing namespace undeclaration

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3808





------- Comment #5 from mike@saxonica.com  2007-01-11 23:59 -------
>why is Constr-namespace-13 different from Constr-namespace-22, whose result contains <child xmlns=""/> ?

Because undeclaring of the default namespace is possible in XML 1.0, and
therefore happens whether or not you enable undeclare-prefixes in the
serializer. We've made the assumption that undeclaring of non-default prefixes
is something that should only happen if you really need it, it shouldn't happen
by accident because for most people it's just unnecessary clutter.

(Apart from the history, there's also a semantic difference between xmlns=""
and xmlns:p="". Writing xmlns="" doesn't just undeclare the binding of prefix
"" to some namespace, it also establishes a new binding of prefix "" to the
non-namespace. So it has a positive effect, not just a negative effect. By
contrast, the only real effect of writing xmlns:p="" is to make any reference
to p an error.)

Received on Thursday, 11 January 2007 23:59:49 UTC