There are several things that would be nice to have as filters:

        <replaceregexp>
        <style>
        <anakia>

The point being that maybe we can figure out some sort of adaptor
that would allows (a slightly modified version of these tasks) to be
used as filters. The current arquitecture of filters needing to be a
subclass of FilterReader(?) makes this a little complicated that is why
I am thinking on an Adaptor.

So maybe we can have something like this:

        Task may implement an interface called Transformer (or something)
        with methods to chain the input and output.

        The filter chain adaptor element allows tasks to be specified inside
        use the <sequential> pattern. It requires all its tasks to implement 
Transformer.
        it will then chain all of them.

Presto, we can use many of our already existing tasks as Filters.

I live the details for the general discussion ;-)

Jose Alberto

> -----Original Message-----
> From: Magesh Umasankar [mailto:[EMAIL PROTECTED]
> Sent: 16 January 2003 20:26
> To: Ant Developers List
> Subject: Re: FilterChain is there a regexp?
> 
> 
> Not that anybody is unaware, but...
> 
> A lot of Ant targets are constructed to transform 
> data from one form to another, and tend to use 
> temporary files as the medium, which is not so 
> attractive.
> 
> To highlight this point, the example below is 
> creating curtag.txt and rewriting its contents
> and later deleting it when, ideally, all this
> can be performed in memory (as stream transforms),
> without messy intermediate files.
> 
> Seems like we have a nice use case for writing
> a filterreader that works somewhat like <replaceregexp>
> 
> Cheers,
> Magesh
> 
> ****************************************************
> *  Doctor: A person who kills your ills by pills,  *
> *  and then kills you with his bills.              *
> ****************************************************
> ----- Original Message ----- 
> From: "Stefan Bodewig" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, January 10, 2003 6:42 AM
> Subject: Re: FilterChain is there a regexp?
> 
> 
> > On Fri, 10 Jan 2003, Jose Alberto Fernandez
> > <[EMAIL PROTECTED]> wrote:
> > 
> > > I am not sure I understood, do <linecontainsregexp> and
> > > <replaceregexp> already exists or are those just the names you are
> > > proposing for them?
> > 
> > They exist (<replaceregexp> is a(n optional) task, not a filter,
> > though) in 1.5.
> > 
> >    <copy file="${basedir}/CVS/Tag" tofile="curtag.txt"/>
> >    <replaceregexp file="curtag.txt" match=".\(.*\)" replace="\1"/>
> >    <loadfile property="curbranch" srcFile="curtag.txt">
> >        <filterchain>
> >            <striplinebreaks/>
> >        </filterchain>
> >    </loadfile>
> >    <delete file="curtag.txt"/>
> > 
> > is a way without sed, that is as silly as your original 8-)
> > 
> > Stefan
> > 
> > --
> > To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> > 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to