mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Fondermann <bf_...@brainlounge.de>
Subject [Vysper] XML Namespaces [WAS: Re: Moving new nbxml in trunk]
Date Sun, 09 May 2010 18:23:49 GMT
Niklas Gustavsson wrote:
> On Wed, May 5, 2010 at 7:55 PM, Bernd Fondermann
> <bernd.fondermann@googlemail.com> wrote:
>> The group chat problem is between Psi and Psi. But I didn't test that
>> today, but will tomorrow.
> Great, let me know the results (or how to reproduce it).
>> And I don't think those xmlns="" should be there. Isn't this kind of
>> overwriting the default namespace, when you really want the default
>> namespace from the outer element to propagate?
> Right, it sets the default namespace to be the empty namespace. This
> is normally due to us not setting the correct namespace when creating
> elements. See rev 941337 for an example of fixing this problem.

But this is quite awkward, isn't it?
I don't want to re-set the namespace on all inner elements. This will
lead to errors (copy/paste, missing) and is much more work than neccessary.

What I wanted to achieve with the initial implementation, is that
namespaces get propagated automatically within the scope. That's also my
notion of how XML default namespaces are scoped and what the patch is

I see now why you don't consider the patch to be a fix, at least in
cases of nsAttr.getValue eq "".
For nsAttr.getValue == null I'm definitively pro not rendering xmlns="".

So my resultion would be:
+ propagating default namespaces to inner elements is implicit. (means:
possible reverting revision 941337, which is an strange revision number
anyway ;-)
+ setting the default namespace to "" means overriding the outer scope's
default ns. this must be done explicitely.
+ empty default namespaces get rendered as xmlns="".



View raw message