Subject: Re: [xsl] Removing dead targets from Ant build files From: "J.Pietschmann" <j3322ptm@xxxxxxxx> Date: Wed, 02 Jan 2008 22:14:42 +0100 |
<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,' 
',''),','), 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.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Removing dead targets fro, Heath, Graham | Thread | [xsl] Help with moving nodes from o, David Larsson |
RE: [xsl] Apache FOP Processor Erro, Angela Williams | Date | Re: [xsl] Replacing values in xml f, Mukul Gandhi |
Month |