[XML-SIG] Namespace support for DOM
Paul
prescod@prescod.net
Wed, 30 Dec 1998 22:47:14 -0600 (CST)
On Mon, 28 Dec 1998, Andrew M. Kuchling wrote:
> Talking about this with Fred at lunch today, I realized that
> this is probably not sufficient, and that you really do need access to
> the dictionary. Consider an Element node with no namespace prefix;
> its namespace is therefore assumed to be the default one. Take that
> node out of the tree, and insert it somewhere else, where the default
> namespace is *different*. Assume that this behaviour isn't what you
> want; instead, you want to keep the element in the same namespace as
> it was originally in.
Since namespace defaulting is just a typing convenience, I would argue that
moving a node should never change its namespace.
> This may mean adding the right prefix for the namespace's URI,
> which means you need some way of getting at the prefixes and URIs
> availabe at the new location. (It could also be done by adding an
> xmlns="URI" attribute to the element, but that makes solving this
> problem too easy. :) More seriously, there might be applications where
> adding the NS prefix is the only way to go.)
I think that The namespace-aware node-moving-method should do the fixup
automatically.
Maybe my desire to have everything be automatic and semantically clean is
at odds with your desire to have this be a transparent extension to the
DOM that doesn't change the behaviorof any DOM-builtin method.
Paul Prescod