Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 66010 invoked from network); 8 Nov 2002 12:32:36 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 8 Nov 2002 12:32:36 -0000 Received: (qmail 22901 invoked by uid 97); 8 Nov 2002 12:33:27 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 22881 invoked by uid 97); 8 Nov 2002 12:33:26 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 22840 invoked by uid 98); 8 Nov 2002 12:33:24 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) X-Authentication-Warning: bodewig.bost.de: bodewig set sender to bodewig@apache.org using -f To: ant-dev@jakarta.apache.org Subject: TaskContainer and nested data-types From: Stefan Bodewig Date: 08 Nov 2002 13:32:25 +0100 Message-ID: Lines: 54 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Military Intelligence) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, a technical question, for a change 8-) If you look into ProjectHelperImpl, you'll see public void startElement(String name, AttributeList attrs) throws SAXParseException { if (task instanceof TaskContainer) { // task can contain other tasks - no other nested elements possible new TaskHandler(helperImpl, this, (TaskContainer) task, wrapper, target).init(name, attrs); the intention seems to be that TaskContainers are not allowed to hold data-types. Now try this build file snippet it will work. The reason is that ProjectHelperImpl inserts a UnknownElement for and this one replaces itself with the data-type at runtime. If you now replace with a TaskContainer of your own, things start to get messy. will not work in CVS HEAD at all - because will become an UnknownElement itself and the handleChildren code in there doesn't allow any non-tasks to slip through. To make things worse, in 1.5.1 it will depend on where you place the for mycontainer. If you put it at the top-level in front of the target containing the snippet above, it will work. If you place the taskdef after the target (or inside a target), it will fail. Before I go and make things consistent, I thought I'd ask you what the correct behavior would be 8-) Is 1.5.1 wrong in that it should never allow the construct above to pass? If so, the sequential case must not pass either. Be aware that changing this may cause some build files to break. Should data-types be allowed inside TaskContainer? If so, UnknownElement needs to get fixed. Stefan -- To unsubscribe, e-mail: For additional commands, e-mail: