Re: Element.create(): a proposal for more convenient element creation

On Sat, Aug 6, 2011 at 9:05 AM, Dominic Cooney <dominicc@google.com> wrote:
> Third, is the order of attributes significant for XML namespace
> declarations? eg does this:
> <x xmlns:foo="…" foo:bar="…" />
> mean the same thing as
> <x foo:bar="…" xmlns:foo="…" />
> ? If not, including namespaces in the attribute dictionary is fraught,
> because the iteration order of properties is undefined.

The order is unimportant when setting them via markup, but important
when setting them via successive setAttribute calls.  I'd prefer that
the attribute bag be handled like markup attributes, where xmlns
attributes are handled "early" so that later attributes fall into the
correct namespace.

~TJ

Received on Monday, 8 August 2011 07:53:19 UTC