ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: Roles (was: antlib)
Date Thu, 08 May 2003 14:54:21 GMT
On Wednesday 07 May 2003 20:40, J.Pietschmann wrote:
> peter reilly wrote:
> >       -  namespaces of attributes is not handled yet - the
> >          code uses getQName() on the attributes and does
> >          not pass the URI of the attributes to the attribute list given
> >          to
>
> Most vocabularies don't use namespaces for attributes, the reason being
> that the semantics of attributes with the same name can be derived with
> the help of the elements where the attributes appear.
> An example:
>    <lang:translate src="en_US" dst="de"/>
> and
>    <task:translate src="foo.svg" dst="foo.jpg"/>
> The src attribute obviously serves a different purposes for the different
> elements, but it is assumed the element provides enough context to handle
> this.
> An exception are attributes where more than one attribute with the same
> local name can be expected to be attached to an element
> An example
>    <product electrical:class="high voltage" fireproof:class="flammable"
>      healthhazard:class="toxic"/>
> (or shorter: <product e:class="high voltage" f:class="flammable"
>     h:class="toxic"/> )
> The example may strike you as stupid, but this kind of vocabulary
> may really evolve from merging simpler stuff. I'd think Ant can avoid this,
> or at least try.

I realize this. My point is that the java code dealing with the attributes
should be correct.

>
> > 2) The usage of Project#createTask/DataType(name) will not work for
> >     tasks loaded as a result of XML namespaces, a
> > Project#createTask/DataType( uri, name) method will need to be added.
>
> Some projects migrated to namespaced XML by passing
>    ns-uri+"^"+name
> internally through the APIs.

This is one way to do it. However ComponentHelper will most likely need
need to have a map for each uri. - as multi build files are processed. (ant,
antcall, subant and import ....).

Peter


Mime
View raw message