ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William BC Crandall" <bc.crand...@earthlink.net>
Subject Re: Inserting a date stamp
Date Sat, 02 Aug 2003 00:33:28 GMT
David and Patrick,

Your suggestions let me get the timestamp I wanted. Thank you both very
much.

All the best,


William BC Crandall
bc.crandall@earthlink.net

>
> ----- Original Message ----- 
> From: Patrick Moylan
> To: bc.crandall@earthlink.net
> Sent: 01 August 2003 11:39 AM
> Subject: RE: Inserting a date stamp
>
>
> First I use a property for the timestamp value and format:
>
> <tstamp> <format property="buildtime" pattern="MM/dd/yyyy hh:mm:ss
> aa"/></tstamp>
>
> Then I do a token replace:
>
> <replace token="$buildtime" value="${buildtime}" file="myfile.xml"/>
>
> Inside of myfile.xml is the var:
>
> $buildtime
>
>
>

> ----- Original Message ----- 
> From: Sills, David
> To: 'William BC Crandall '
> Sent: 01 August 2003 8:29 AM
> Subject: RE: Inserting a date stamp
>
>
> Been a while, but as I recall, it would look like:
>
> In your XSL file (to be copied with filtering before use):
>
> <xsl:stylesheet version="1.0"
>                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>   <xsl:template name="footer">
>
>     <div class="boxFooter">
>       <p>
>         Last modified: @TODAY@
>       </p>
>     </div>
>
>   </xsl:template>
> </xsl:stylesheet>
>
> Then, in your build.xml file:
>
> <copy ... [name of xml file, destination, etc.]>
>   <filterset>
>     <filter token="TODAY" value="${TODAY}"/>
>   </filterset>
> </copy>
>
> and, of course, "<tstamp/>", probably within your "init" target, to set
the
> value of ${TODAY}.
>
> Hope this helps.
>
> David Sills
>


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


Mime
View raw message