« HTTP-Tunnel - Access the Content You Need | Main | Fun With Regular Expressions »
January 07, 2005
Using Javascript and XSLT with ANT
Apache ANT has become the standard Java-based build and deployment tool. Many things can be done using ANT's core and optional tasks, such as chmod, copy, jar, and FTP. However, this article on sitepen.com does a good job of explaining how to use external scripting such as Javascript and XSLT along with ANT.
Here is an example of how to use Javascript with ANT:
<project name="helloWorld" default="main" basedir=".">
<target name="setup">
<script language="javascript"> <![CDATA[
echo = helloWorld.createTask("echo");
main.addTask(echo);
echo.setMessage("Hello World!");
]]> </script>
</target>
<target name="main" depends="setup"/>
</project>
Make sure to read the article and download the correct JAR files.
Here is an example of how to make an XSL Transformation request with a parameter:
<style in="src/webProject.xml" out="temp/index.html" extension="html" style="webSite.xsl" processor="trax"> <param name="pageId" expression="com.sitepen.pages.home"/> </style>
If you are tasked with creating ANT scripts, you should take a look at this article.
Posted by Chuck at January 7, 2005 09:54 AM
Trackback Pings
TrackBack URL for this entry:
http://www.chuckcaplan.com/blog/mt-tb.cgi/12