Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 83976 invoked from network); 9 Dec 2000 02:41:30 -0000 Received: from mail.alphalink.com.au (203.24.205.7) by locus.apache.org with SMTP; 9 Dec 2000 02:41:30 -0000 Received: from donalgar (d401-ps0-mel.alphalink.com.au [202.161.110.21]) by mail.alphalink.com.au (8.9.3/8.9.3) with SMTP id NAA11012; Sat, 9 Dec 2000 13:41:28 +1100 Message-Id: <3.0.6.32.20001209133824.007d1af0@latcs2.cs.latrobe.edu.au> X-Sender: pjdonald@latcs2.cs.latrobe.edu.au X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Sat, 09 Dec 2000 13:38:24 +1100 To: ant-dev@jakarta.apache.org From: Peter Donald Subject: RE: Content in tags Cc: "'ant-dev@jakarta.apache.org'" In-Reply-To: <635802DA64D4D31190D500508B9B04104E1007@dcsrv0> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N At 06:24 8/12/00 -0800, Jose Alberto Fernandez wrote: >> From: Peter Donald [mailto:donaldp@apache.org] >> >> >> At 09:34 8/12/00 +0100, Stefan Bodewig wrote: >> >>>My first thought was to enforce order here - force the user to >> >>>always add the child elements first for example - but I >> realize that >> >>>you cannot constrain the order for elements with mixed content. You >> >>>cannot do that in a DTD but we could make that a rule in >> Ant, though >> >>>I'm not sure the XML parser would expose this to Ant. >> >> >> >> You can force order by just throwing a SAXException in the handler >> >> thats not a problem but that approach feels very unnatural to me. >> > >> >Sure? AFAIK, it is not defined whether characters() will be invoked >> >once for all content or several times, that's why I'm not sure you'd >> >recognize whether content came before or after child elements. >> >> well its the way the parser I use behaves ;) Heres the >> documentation from >> SAX ContentHandler (SAX2) so I assume that in SAX2 at least >> it is true. >> Thou I would expect it to be or else you would have >> difficulty using it for >> HTML DOM implementations. >> >> *

The Parser will call this method to report each chunk of >> * character data. SAX parsers may return all contiguous >> character >> * data in a single chunk, or they may split it into several >> * chunks; however, all of the characters in any single event >> * must come from the same external entity so that the Locator >> * provides useful information.

> >Do we manage this correctly today? If the parser sends two consecutive >chunks because of buffering, how many call to addText() do we do? 1 or 2. >I think we do 2. So what happens if I write a very long