I have a similar need. I need to filter out NAnt output after the build
is complete. I would like to specify a regular expression and remove any
xml nodes in the Nant output whose content matches the regular
expression.

In particular I'd like to ignore warnings that references Microsoft
Visual C++ codes in standard include files. I get hundreds of these and
they clutter NAnt's output making it difficult to find warnings and
errors generated by our code.

I'm using the <exec> task to execute devenv.com to compile our code
since our solutions don't build well with the <solution> task. I could
potentially have the <exec> task send the output to a file but I would
need to concatenate a number of these output files since our build
requires calling devenv.com about 8 times.

Currently I wrote a custom task for CCNet to filter NAnt xml output. It
would be nice to have a NAnt target execute my build and then use the
<style> task to remove the offending nodes (if this is possible, I don't
know xslt very well).

Any ideas on how I might go about this better? My current solution works
but it does require an extra solution of code to be compiled and
deployed to the CCNet server. Using the <style> task would only require
that the xslt is correct!

Thanks!

--
Edwin

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian MacLean
Sent: Wednesday, September 15, 2004 8:00 AM
To: Merrill Cornish
Cc: Felice Vittoria; [EMAIL PROTECTED]
Subject: Re: [Nant-users] NAnt Writing NAnt--How?

Merrill Cornish wrote:

>Felice,
>
>I'll have to admit that I've never understood what a filterchain is or
what it is used for.
>
>  
>
a filter chain is basically for replacing specified tokens in a file.

I'm not sure exactly what needs to be in the script you are generating 
but I would consider xslt as one possible option. You can call it using 
the <style> task and pass a bunch of paramaters thru.
Then of course you could use the <script> task or a custom task - then 
you get the use of all of System.Xml for writing the target file.


Ian

>Merrill
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
>Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
>Camcorder. More prizes in the weekly Lunch Hour Challenge.
>Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
>_______________________________________________
>Nant-users mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/nant-users
>  
>


-- 
Ian MacLean, Developer, 
ActiveState, a division of Sophos
http://www.ActiveState.com



-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users


-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to