Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 7743 invoked from network); 21 Dec 2005 10:45:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Dec 2005 10:45:09 -0000 Received: (qmail 71765 invoked by uid 500); 21 Dec 2005 10:45:08 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 71722 invoked by uid 500); 21 Dec 2005 10:45:07 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 71711 invoked by uid 99); 21 Dec 2005 10:45:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2005 02:45:07 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [192.6.10.60] (HELO tobor.hpl.hp.com) (192.6.10.60) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2005 02:45:06 -0800 Received: from localhost (localhost [127.0.0.1]) by tobor.hpl.hp.com (Postfix) with ESMTP id C565337134 for ; Wed, 21 Dec 2005 10:44:25 +0000 (GMT) Received: from tobor.hpl.hp.com ([127.0.0.1]) by localhost (tobor.hpl.hp.com [127.0.0.1]) (amavisd-new, port 20024) with LMTP id 05023-04-3 for ; Wed, 21 Dec 2005 10:44:24 +0000 (GMT) Received: from kropotkin.hpl.hp.com (kropotkin.hpl.hp.com [15.144.59.2]) by tobor.hpl.hp.com (Postfix) with ESMTP id F37033712B for ; Wed, 21 Dec 2005 10:44:21 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by kropotkin.hpl.hp.com (Postfix) with ESMTP id EAC8E514A for ; Wed, 21 Dec 2005 10:44:20 +0000 (GMT) Received: from kropotkin.hpl.hp.com ([127.0.0.1]) by localhost (kropotki [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 27851-05-35 for ; Wed, 21 Dec 2005 10:44:17 +0000 (GMT) Received: from timmay.hpl.hp.com (timmay-hb.hpl.hp.com [15.144.59.39]) by kropotkin.hpl.hp.com (Postfix) with ESMTP id 33E62E2D for ; Wed, 21 Dec 2005 10:44:17 +0000 (GMT) Received: from [16.27.195.5] ([16.27.195.5]) by timmay.hpl.hp.com (8.13.2/8.13.2) with ESMTP id jBLAhwRw022160 for ; Wed, 21 Dec 2005 10:43:58 GMT Message-ID: <43A93214.6020302@apache.org> Date: Wed, 21 Dec 2005 10:44:36 +0000 From: Steve Loughran User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Developers List Subject: Re: svn commit: r357908 - /ant/core/trunk/src/main/org/apache/tools/ant/util/DOMElementWriter.java References: <20051220045018.85325.qmail@minotaur.apache.org> <877j9zhwg9.fsf@www.samaflost.de> In-Reply-To: <877j9zhwg9.fsf@www.samaflost.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HPLB-IMAP-MailScanner-Information: Please contact the Helpdesk for more information X-HPLB-IMAP-MailScanner: Found to be clean X-HPLB-IMAP-MailScanner-SpamCheck: not spam, SpamAssassin (score=0, required 5) X-Virus-Scanned: amavisd-new at kropotkin.hpl.hp.com X-Virus-Scanned: amavisd-new at hplb.hpl.hp.com X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Stefan Bodewig wrote: > On Tue, 20 Dec 2005, 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: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org