ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
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.
http://marc.theaimsgroup.com/?l=ant-dev&m=97625192901988&w=2

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?

Conor


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message