how to understand: void Element.normalizeNamespaces()

WARNING: Unsanitized content follows.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

as recommented by the current DOM Level 3 Core spec, I should 
take a look into its Appendix B, Namespace Algorithms, wich 
also describes the function void Element.normalizeNamespaces() 
in pseudo code.

Unfortunately the pseudo code is as pseudo as I wasn't able to 
understand it fully. Furthermore, does there exist _any_ 
implementation of that function so that I can look there to 
understand? I didn't find it yet in Xerces C and J nor in current 
Mozilla sources. libxml2 doesn't have it of course, too.

The only starting point I had, was one of them having the interface 
declared for void Document.normalizeDocument(). nothing more. I'd 
be happy if someone can point me to any project who implemented 
these namespace normalization.

Am I the only one, trying to implement DOM Level 3 modules? I 
implemented all algorithms as suggested by that namespace algorithms 
appendix, but not that Element.normalizeNamespaces() one :(

1.) "if (Element's prefix/namespace pair (or default NS if no 
    prefix) are within the scope of binding)"

"within scope of binding" is unclear.
does it mean both can be found using lookupNamespaceXXX?

In that case I'd code: 
if (lookupNamespacePrefix(prefix, false) && lookupNamespaceURI(namespaceURI))
right?

2.) "there's a conflicting local default namespace declaration"

What exactly is meant with conflicting? I have really no clue how to 
implement this :(

3.) "if one ore more prefix bindings are available"

A prefix binding is the corresponding namespaceURI, isn't it? so 
there should be used the first one found starting from current 
element up to the root. Am I wrong? Is that what is meant with 
"binding"?

Unfortunately namespace normalization seems not well documented 
in DOM Level3 Core, or should it be part of Load&Save, or XML 
(Namespaces?)?

It's now the third day I'm trying to fight against my misunderstandings 
caused by this pseudo code. Please help.

Best Regards,
Christian Parpart.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9oQIJPpa2GmDVhK0RAkiTAJ9UxGnK1c0HaVDqbIE3jrFHPOK7hACfUFDf
osf6aPYJf4pkgIOo989EGyU=
=lKLE
-----END PGP SIGNATURE-----

Received on Sunday, 6 October 2002 23:40:37 UTC