ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Atherton <br...@callenish.com>
Subject Re: Selectors (was cullers)
Date Fri, 01 Mar 2002 18:37:37 GMT
At 05:31 PM 3/1/2002 +0100, you wrote:
>On Thu, 28 Feb 2002, Bruce Atherton <bruce@callenish.com> wrote:
>
> > This raises an interesting question, though. Should Selector
> > containers accept <patternset>s as elements and internally convert
> > the <include>s and <exclude>s into equivalent selectors?
>
>What about <patternset> is a selector container?

Well, of course it is, but I was using "selector container" to refer to 
<and>, <or>, and <not>. Sorry for being unclear. So you might have:

<patternset id="readonly">
     <permissionselect type="r"/>
</patternset>

<patternset id="javaclasses">
     <filenameselect name="**/*.java"/>
</patternset>

<patternset id="readonly-or-javaclasses">
     <or>
         <patternset refid="readonly"/>
         <patternset refid="javaclasses"/>
     </or>
</patternset>

Doing things this way, I'm not sure whether references make sense on the 
individual <and>, <or>, and <not> tags, but it requires that those three

accept patternsets as children. It also means that the <or> has to 
interpret the <include>s and <exclude>s of the patternset, since the 
patternset has no built in methods to validate a file itself (not sure why 
not).

Or are you suggesting '<patternset 
type="and"|"or"|"not"><selector/></patternset>', with "and" being the 
default? Probably not, since it loses the clarity of Rob's proposal.

> > Another question is whether I should still include the "inverted"
> > attribute, given the existence of <not>?
>
>Answer this on a case by case basis.  In general I'd say no, but some
>selectors may become frequently used in both their normal and the
>inverted form.

That seems sensible. Thanks.



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message