ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angeshwar Deepak <angesh...@yahoo.com>
Subject Problem-using foreach + tidy.jar
Date Tue, 27 Jul 2004 07:49:33 GMT
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


Mime
View raw message