On Monday, March 10, 2003, at 11:32 AM, Kohsuke Kawaguchi wrote:
>>> - Suppose the original output was
>>>
>>> <ns1:root ns1:att="foo" xmlns:ns1="uri1"> bar </ns1:root>
>>>
>>> Mapping uri1 to "" will change it to
>>>
>>> <root att="foo" xmlns="uri1"> bar </root>
>>>
>>> But this is wrong.
>>
>> I don't see what is wrong with that one.
>
> Well, that's why our default XML output is not so nice :-)
> we felt that marshalling things correctly is more important than
> marshalling things beautifully.
>
>
I believe this is semantically wrong because by default, attributes
that are not prefixed and are not namespace declaration attributes
themselves are in the null namespace (note: note default but the *null*
namespace). So in the 2nd example, the attribute 'att' lives in the
null namespace world while in the first example, it lives in the
namespace 'uri1'.
Han Ming