Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 54883 invoked from network); 27 Nov 2003 12:34:28 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 27 Nov 2003 12:34:28 -0000 Received: (qmail 10029 invoked by uid 500); 27 Nov 2003 12:34:25 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 9895 invoked by uid 500); 27 Nov 2003 12:34:24 -0000 Mailing-List: contact dev-help@ant.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 dev@ant.apache.org Received: (qmail 9881 invoked from network); 27 Nov 2003 12:34:24 -0000 Received: from unknown (HELO corvil.com) (213.94.219.177) by daedalus.apache.org with SMTP; 27 Nov 2003 12:34:24 -0000 Received: from [172.18.1.173] (preilly.local.corvil.com [172.18.1.173]) by corvil.com (8.12.9/8.12.5) with ESMTP id hARCYMd8019147 for ; Thu, 27 Nov 2003 12:34:22 GMT (envelope-from peter.reilly@corvil.com) Subject: Re: XMLFragment From: Peter reilly To: Ant Developers List In-Reply-To: References: Content-Type: text/plain Message-Id: <1069936398.6860.68.camel@preilly.local.corvil.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Thu, 27 Nov 2003 12:33:18 +0000 Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Thu, 2003-11-27 at 12:15, Stefan Bodewig wrote: > Hi, > > I've just added a utility class to CVS HEAD that can be used to turn > nested content into a DOMFragment (not necessarily a tree). I.e., if > you use it as your nested element like > > public void addContext(XMLFragment f) > > you can get the DOMFragment corresponding to the structure nested into > from > > > with nested text > > > > via f.getFragment() Pretty cool. > > Dominique has posted similar code here and on the user list a couple > of times and Upayavira needed something like this for his cocoon Ant > task. I will need it for my and sandbox tasks. > > Some notes: > > * it doesn't deal very well with mixed content - but this is a general > problem of all Ant elements. This is something that we should look at in the 1.7 timeframe. > > * Namespace support is not complete. Peter, correct me if I'm wrong. > I can get the namespace URI and the local name, but I can't get > access to the prefix actually used on the elements when I use the > DynamicConfigurator interface. This is correct, the prefix is only known at parse time. I was thinking of retaining the prefix and storing it in the corresponding UnknownElement - but never got around to doing this. When this is done, we could provide a namespace-aware DynamicConfigurator interface. Peter > > Right now I don't parse the name at all, it may be better to extract > the namespace URI and the local name (currently commented out in the > committed code) instead. > > * I've put it into the util package. types would be an alternative. > > * Even though I'll have to copy it into my dotnet antlib sandbox if I > want to use it and Ant 1.6 together, I'd still prefer to keep it > outside of the 1.6 branch in order to not push too many things into > 1.6 anymore. > > Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org