ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyle Adams" <>
Subject Re: Creating EJB Deployment Descriptors
Date Wed, 08 Aug 2001 17:09:28 GMT 08/08/01 11:37AM:
> If you need more info, or are unfamiliar with XSLT, I'd be willing to
> post some resources that I've found helpful.

Well, it seems there is some interest in this.

DISCLAIMER: I'm pretty inexperienced with XSLT.  Until about a week
ago, I had no experience.  Then a project of mine evolved to the point
that XSLT was necessitated, so I've been on a crash course for about a
week.  These resources come from the perspective of a newbie, for fellow

I've been to,, (and probably a few
others) to read their respective intros to XSLT.

At - a column on XSLT



In general, I've found the articles to be the best as far 
as being understandable and being most applicable to Ant.  The stylesheets
I'm using now are based (very loosely) off of the ones presented in the articles.

I use Saxon as my XSLT parser, as it was recommended to me by other
XSLT gurus on this list. 

The Saxon User Manual has also been a nice "pocket reference" for XSLT. 

Specifically, I'm constantly referring to the pages on XSL elements and XPath. 

I've given remote links here, but the user manual is also included when you
download Saxon.

Lastly, be sure to check all the XSLT-related posts on this list by searching
the archives at:

A few final words: the articles gave me a good idea (at least, I
think it's good) on how utilize XSLT in my Ant files.  This, to me, has been
the toughest part about diving into XSLT - figuring out exactly what from my
Ant script should be in the XSL file, and what should be in the XML file.  Here's
what I've ended up with (presented in an abridged and snipped format):

<xsl:variable name="PROJECT_NAME" select="application/@name"/>

<xsl:template match="application">
  <project name="{$PROJECT_NAME}" default="all" basedir=".">
    <!-- load property files, specify the init target, all general "build" file things
here -->
    <xsl:apply-templates select="build"/>

<xsl:template name="compile" match="target[@name='compile']">
  <target name="compile" depends="init">
    <!-- do various compiling-type things here -->

<application name="foo">
  <build default="clean, compile">
    <target name="get"/>
    <target name="clean"/>
    <target name="refresh"/>
    <target name="compile"/>
    <target name="deploy"/>

Sorry for the long post, but this is one of the topics in the Ant community
that is least documented, and most in need of documentation.  Maybe I'll
have to sit down and write something out one of these day :-)  Eh, better
wait until I have some more experience...


View raw message