Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 3387 invoked from network); 23 Jan 2007 10:42:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Jan 2007 10:42:18 -0000 Received: (qmail 79971 invoked by uid 500); 23 Jan 2007 10:42:19 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 79892 invoked by uid 500); 23 Jan 2007 10:42:19 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 79629 invoked by uid 99); 23 Jan 2007 10:42:17 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jan 2007 02:42:17 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [192.6.10.2] (HELO colossus.hpl.hp.com) (192.6.10.2) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jan 2007 02:42:07 -0800 Received: from localhost (localhost.localdomain [127.0.0.1]) by colossus.hpl.hp.com (Postfix) with ESMTP id 3898D6BA24 for ; Tue, 23 Jan 2007 10:41:45 +0000 (GMT) X-Virus-Scanned: amavisd-new at hplb.hpl.hp.com Received: from colossus.hpl.hp.com ([127.0.0.1]) by localhost (colossus.hpl.hp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8YmtjkKBkerV for ; Tue, 23 Jan 2007 10:41:37 +0000 (GMT) Received: from ha-node-br2.hpl.hp.com (ha-node-br2.hpl.hp.com [16.25.144.57]) by colossus.hpl.hp.com (Postfix) with ESMTP id AA5126BA22 for ; Tue, 23 Jan 2007 10:41:36 +0000 (GMT) Received: from [16.25.171.182] (chamonix.hpl.hp.com [16.25.171.182]) by ha-node-br2.hpl.hp.com (8.13.4/8.13.4) with ESMTP id l0NAfNt8023253 for ; Tue, 23 Jan 2007 10:41:24 GMT Message-ID: <45B5E648.40407@apache.org> Date: Tue, 23 Jan 2007 10:41:12 +0000 From: Steve Loughran User-Agent: Thunderbird 1.5.0.9 (X11/20061206) MIME-Version: 1.0 To: Ant Users List Subject: Re: intra-element attribute property resolution issue References: <1168902419.45ac091403f69@my.visi.com> <45ACB628.8020204@apache.org> <1168990525.45ad613d9dd0b@my.visi.com> <45ADF7D4.8020601@apache.org> <1169048903.45ae4547c98bf@my.visi.com> <7.0.1.0.0.20070117235524.050f00d8@visi.com> <45AF65B6.4070204@apache.org> <7.0.1.0.0.20070118214102.050f01a0@visi.com> <45B4A1CD.6010407@apache.org> <45B4A596.7060307@oopsconsultancy.com> <1169507557.45b544e55488e@my.visi.com> In-Reply-To: <1169507557.45b544e55488e@my.visi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HPL-MailScanner-Information: Please contact the ISP for more information X-HPL-MailScanner: Found to be clean X-HPL-MailScanner-From: stevel@apache.org X-Virus-Checked: Checked by ClamAV on apache.org Jacob Kjome wrote: > I think Brian is correct. XML attributes have no defined order other than the > obvious alphabetical order, which might be an implementation detail. Even so, > I wonder if logic could be written to maximize resolution. If a property is > found to not be resolved, it could be deferred until other attributes are > processed. If after all attributes are processed, a property is still not > resolved, then so be it. But it would make sense to try. If it were to pose a > performance issue, it could be an option of XMLProperty defaulting to 'false'. > I'm not sure how complex the logic might be, but I would think it's doable. > Ahh, you've just entered the world of recursive and transitive reference resolution. I do know how hard it is, because it is something I've had to do it at work. You need to parse everything, then walk the tree for everything you need to resolve, As you walk it you push its path onto a stack so you catch loops. You also need to track the state of every node so you know whether its already been resolved or not, so yuo dont try re-expanding stuff that has already been done. And you need the unit tests to do it. I am -1 to going there with XmlProperty. It makes sense in a XSD-based language for describing the configuration of complex systems [1], but that is a specific language for a specific goal. And it took a long time to get right, believe me. Remember: Ant is not a general purpose XML workflow language. It just has a little bit, to help with the builds. Why not XSL all the attrs into elements and get at them that way? -steve [1] : http://www.gridforum.org/Public_Comment_Docs/Documents/Mar-2006/draft-ggf-cddlm-xml-cdl2-002.pdf --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org