[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Removing dead targets from Ant build files

Subject: Re: Removing dead targets from Ant build files
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Wed, 02 Jan 2008 22:14:42 +0100
Re:  Removing dead targets from Ant build files
Heath, Graham wrote:
<xsl:if test="//target[contains(@depends,$name)]

Note that this will also find a target named "compile" in a dependency list containing "compile-stuff". IIRC ant target dependency lists contain comma separated, optionally whitespace surrounded values. Therefore a more exact approach is to kill whitespace in the dependency list and surround everything by guarding commas, somewhat like: test="//target[contains( concat(',',translate(@depends,' &#xA',''),','), concat(',',$name,',')]

You may run into performance problems for large
ant files, but reformulating this search using keys
should solve these.

It is quite possible that ant target names are also
whitespace trimmed by ant, which would mean you have
to do the same in the XSLT also. Please refer to the
ant docs for further details.

J.Pietschmann

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.