xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Removing dead targets from Ant build files


Subject: Re: [xsl] Removing dead targets from Ant build files
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Wed, 02 Jan 2008 22:14:42 +0100

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
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor