ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyle Adams" <kad...@gfs.com>
Subject Re: Creating EJB Deployment Descriptors
Date Wed, 08 Aug 2001 17:09:28 GMT
kadams@gfs.com 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
newbies.

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

At xml.com:
http://www.xml.com/pub/a/2000/08/holman/index.html 
http://www.xml.com/pub/q/transformingxml - a column on XSLT

At webmonkey.com:
http://hotwired.lycos.com/webmonkey/98/43/index2a.html?tw=authoring 

At builder.com:
http://builder.cnet.com/webbuilding/pages/Programming/XMLToday/ss03.html?tag=st.bl.7267.dir1.XMLToday_03
http://builder.cnet.com/webbuilding/pages/Programming/XMLToday/?tag=st.bl.7267.pro_hXMLToday


In general, I've found the builder.com 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
builder.com articles.

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

http://saxon.sourceforge.net/ 

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

http://saxon.sourceforge.net/saxon6.4.2/index.html 

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

http://saxon.sourceforge.net/saxon6.4.2/xsl-elements.html
http://saxon.sourceforge.net/saxon6.4.2/expressions.html 

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:

http://marc.theaimsgroup.com/?l=ant-user&r=1&w=2

A few final words: the builder.com 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):

BUILD.XSL
==========
<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"/>
  </project>
</xsl:template>

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

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

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...

Kyle


Mime
View raw message