ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <j_a_fernan...@yahoo.com>
Subject Re: antlib descriptor
Date Tue, 19 Feb 2002 11:33:19 GMT
 --- Peter Donald <peter@apache.org> wrote: > On Tue,
19 Feb 2002 18:03, Jose Alberto Fernandez
> wrote:
> > Anything that we may declare is a type (well
> except for the thing
> > that actually defines new types). I did not think
> was worth segregating
> > this one from the others.
> 
> I suspect he wants to support the notion of roles
> (ie categories of types 
> that implement an interface) in the same descriptor.

I already support the notion of roles without need for
segregating things around. If you want to look it that
way, the only predefined "role" is 'role' itself.

The implementation is not treating it this way at the
moment, but in principle a role is just a predefined
type in the system as anything else.

Hummm, maybe I should just do that and make the whole
code even more general. No stinking string constants.
:-)

Let me just sumarize what my DTD currently is for
<antlib> and then how it could be reduced for this
firts integration:

<!DOCUMENT antlib>
<!ELEMENT antlib ( role | [typename] )* >

<!ELEMENT role EMPTY>
<!ATTLIST role name #CDATA #REQUIRED
               class #CDATA #REQUIRED
               adapter #CDATA #IMPLIED
>

<!ELEMENT [typename] EMPTY>
<!ATTLIST [typename] name #CDATA #REQUIRED
                     class #CDATA #REQUIRED
>

Here "[typename]" correspond to the name of a role
previously made available in the system. At this point
I am programatically predefining two typenames:
"task" and "datatype". I do not have any attachment to
these names so I have no issue on changing them.

The DTD I think we should stride for would be limited
as follows:

<!DOCUMENT antlib>
<!ELEMENT antlib ( task | datatype )* >
<!ATTLIST antlib version #CDATA #REQUIRED >

<!ELEMENT task EMPTY>
<!ATTLIST task name #CDATA #REQUIRED
               class #CDATA #REQUIRED
>

<!ELEMENT datatype EMPTY>
<!ATTLIST datatype name #CDATA #REQUIRED
                   class #CDATA #REQUIRED
>

Again no attachment to names although I prefer "class"
to "classname" as I prefer shorter names.


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
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