ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angeshwar Deepak <angesh...@yahoo.com>
Subject RE: Problem-using foreach + tidy.jar
Date Wed, 28 Jul 2004 07:26:31 GMT
Hi,

Thanks a lot, now it works fine. 

Previously I had put the
<param name="tidy" value="path/to/tidy" />
before the foeach so everytime on echoing ${tidy}
I got the output as ${tidy} and not the intended
string.

Why was it so, is it something like a variable
which does not get recognised inside a loop? 

Anyway, thanks again.

bye,
with regards,
Deepak.


--- "Inger, Matthew" <Inger@Synygy.com> wrote:
> <foreach param="msg" target="run_tidy">
>   <path>       
>     <fileset
> dir="${build.test.report.html}/${component}">
>       <include name="**/*.html"/> 
>     </fileset>
>   </path>
>   <param name="tidy" value="path/to/tidy" />
> </foreach>
> 
> then use ${tidy} in your "run_tidy" target.
> 
> -----Original Message-----
> From: Angeshwar Deepak [mailto:angeshwar@yahoo.com]
> Sent: Tuesday, July 27, 2004 3:50 AM
> To: user@ant.apache.org
> Subject: Problem-using foreach + tidy.jar
> 
> 
> Hi,
> 
> I have used a foreach to iterate a directory to
> search
> for html files and tidy them.
> 
> The code is as follows
> 
> ......
> ......
> <foreach param="msg" target="run_tidy">
>         <path>       
>             <fileset
> dir="${build.test.report.html}/${component}">
>                 <include name="**/*.html"/> 
>             </fileset>
> 		</path>
> 		</foreach>
> </target>
> 
> <target name="run_tidy">    
>     <echo>
>     ********* ${msg}
>     </echo>
> 	<java classname="org.w3c.tidy.Tidy" fork="true" >
> 		<arg line="-config c:\tidy-config.txt -f errs.txt
> -asxhtml -numeric ${msg} " />
> 	</java>
> 
> </target>
> 
> It works perfectly fine.
> Except for the fact that I cant specify a relative
> path for the file tidy-config.txt. i.e. I dont want
> to
> specify the file as c:\tidy-config.txt. But insted
> as 
> ${tidy} or so.
> 
> I saw an example as follows in the ant webpage
> 
> <property name="browser"
> location="C:/Programme/Internet
> Explorer/iexplore.exe"/>
> <property name="file"
> location="ant/docs/manual/index.html"/>
> 
> <exec executable="${browser}" spawn="true">
>     <arg value="${file}"/>
> </exec>
> 
> But this does'nt work for my piece of code.
> Please suggest some solution to avoid writing the 
> absolute or real path for the file.
> 
> bye,
> with regards,
> Deepak.
> 
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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


Mime
View raw message