ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject RE: Content in tags
Date Sat, 09 Dec 2000 02:38:24 GMT
At 06:24  8/12/00 -0800, Jose  Alberto Fernandez wrote:
>> From: Peter Donald []
>> 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.
>>      * <p>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.</p>
>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 <script> or <echo>
>who is in charge of putting all the chunks together?

each individual task is responsible for managing it so without an auidt of
all tasks it would be difficult to tell ;) Thats one of the reasons in
myrimidon I moved the responsobility to the ConfigurationBuilder (because
thats where it should belong IMHO).



| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message