I don't think is a bug, but it's decidedly odd behavior, in my opinion, at least based on a lot of obvious uses for the method. I'm sure it's not a bug in fact, because the code is directly from the DOM3 spec, which says to implement lookupNamespaceURI such that no namespace declaration has to be present in the DOM in order for the function to return a result for a given prefix. Namely if some element at or above the node is assigned a prefix and a namespace, it will match it and return that namespace.
So I have a non-wellformed document, but the lookup function is telling me that the prefix is "bound" to that namespace. This seems off to me. Example: DOMElement e: <ns:foo> where the NamespaceURI is http://foo.com e->lookupNamespaceURI("ns") returns "http://foo.com" I would have intuitively expected the element to have to look like: <ns:foo xmlns:ns="http://foo.com"> So, what am I missing? What good is the method if by XML processing rules the prefix isn't actually going to be valid when I serialize the document? -- Scott --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
