ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: replacement of properties in addText(String)
Date Sat, 25 Oct 2003 00:28:52 GMT
> Also, can someone explain me why Ant merges all the text segments
> of a node,
> when this node contains child elements? SAX doesn't, so why does Ant merge
> them? You thus loose the relative ordering between the child elements and
> the text notes... I'm sure someone will argue against mixed content, but
> adding String to a StringBuffer upon each call to addText(String)
> is no big
> deal at all IMHO, and the current behavior prevents useful uses
> of the lost
> ordering. Thanks, --DD

It has never really been a goal of Ant to support mixed content. In general,
elements should either support nested content or nested elements. There was
even an explicit discussion about this at one time in the dim, distant past.

The merging of text is primarily to handle the 8k buffering in the SAX
parser, IIRC.

This issue could be revisited but would need to be changed in a backward
compatible way. i.e. the Task would need to indicate that it wants to
receive mixed content. Is the usecase strong?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message