Stefan Bodewig wrote:
On Tue, 20 Dec 2005, <[EMAIL PROTECTED]> wrote:


better deal with elements that don't have a namespace URI


This is for the case where the task tells DOMElementWriter to qualify
elements with namespaces but passes in a DOM tree with elements that
don't have a namespace URI associated with them.

Is


+    private static String getNamespaceURI(Node n) {
+        String uri = n.getNamespaceURI();
+        if (uri == null) {
+            // FIXME: Is "No Namespace is Empty Namespace" really OK?
+            uri = "";
+        }
+        return uri;
    }



oh, do not ask me. I never understand DOM and its namespace stuff. I know that if you parse something without an ns, you cannot do Element.getLocalName(), you need to do something else like Element.getName(). Xom is more consistent, "" means local namespace. For dom it may be 'null' instead.

Think we will need some tests here to work out wtf is going on.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to