On 2010-06-28, Stefan Bodewig wrote: > [just echoing what Antoine and Dominque already said, Ant doesn't even > know you used an entity reference to specify the newline.]
Just read <http://www.w3.org/TR/2008/REC-xml-20081126/#AVNormalize> and realized that what I said above isn't true. If Ant sees a \n, \r or \t inside an attribute's value, then it must have been an entity reference in the original input - otherwise normalization would have replaced it with a space. This also means >> <foo attr="beforenewline afternewline"> and >> <foo attr="beforenewline >> afternewline" /> result in different attribute values being passed to the application (one containing the newline and one containing a space instead). By now I tend to agree with Jon that DOMElementWriter should encode \n, \r and \t when writing attribute values (and only when writing attribute values). Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org