ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: wrapping long string literals
Date Thu, 23 May 2002 22:56:24 GMT
I would have done it as below if I really really really didn't want to write
long lines in build.xml ;-)

  <longproperty name="javadoc.header">
    <value>&amp;copy;</value>
    <value>Copyright SMSI, 2000, 2002&lt;br&gt;</value>
    <value>All Rights Reserved</value>
  </longproperty>

Ant abuses XML attributes IMHO. --DD

-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com] 
Sent: Thursday, May 23, 2002 5:53 PM
To: Ant Users List
Subject: RE: wrapping long string literals

--- Mike Cepek <mcepek@smsi.com> wrote:
> Here's another example:
> 
>    <javadoc doctitle="SMSI Java API Reference"
>         header="&amp;copy; Copyright SMSI, 2000, 2001, 2002&lt;br>All
> Rights Reserved"
> 
> Having to write:
> 
>    <property name="header1" value="&amp;copy; Copyright SMSI, 2000, "/>
>    <property name="header2" value="2001, 2002&lt;br>All Rights
> Reserved"/>
>    <property name="javadoc_header" value="${header1}${header2}"/>
> 
> is amazingly unsatisfying.
> 
> Other thoughts?

The only other I had was to modify the Property task to allow a nested
<append> element -- so that's what I did :)  Since my Java is still less
than it should be, I wasn't sure how to do anything fancy (like maybe
extend Property?), so I just copied Property.java to LongProperty.java and
diddled that:

So you could do your example like this:
  <longproperty name="javadoc.header" value="&amp;copy;">
    <append value="Copyright SMSI, 2000, 2002&lt;br&gt;"/>
    <append value="All Rights Reserved"/>
  </longproperty>

Would that do?

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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

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


Mime
View raw message