ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: <isset> oddity
Date Wed, 17 Jun 2009 15:50:26 GMT
On 2009-06-17, Rebhan, Gilbert <Gilbert.Rebhan@huk-coburg.de> wrote:

> It wasn't an issue with jdk, but the processNode Method in XmlProperty

> if (nodeText.trim().length() != 0 || emptyNode) {
>                 addProperty(prefix, nodeText, id);
>             }

> when trim removes all white spaces, so it works with

> if (nodeText.trim().length() >= 0 || emptyNode) {
>                 addProperty(prefix, nodeText, id);
>             }

> Works with ant 1.7.1, jdk 1.5.0_11 and jdk 1.6.0_07 on Windows 2000
> Have to recheck on my machine later ..

I guess this is for convenience so that

<foo></foo>

and

<foo/>

mean the same thing as

<foo>
</foo>

(it's not that likely that people actually want a value of newline).

Maybe we need some sort of flag?

Stefan

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


Mime
View raw message