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: Ant 1.6 and namespace
Date Mon, 17 Nov 2003 17:13:26 GMT
On Monday 17 November 2003 17:01, Dominique Devienne wrote:
> > From: peter reilly [mailto:peter.reilly@corvil.com]
> >
> > Yes, this is std xml (not visible from ant processing code):
> >
> > <project xmlns:antcontrib="antlib:net.sf.antcontrib"
> >          xmlns:ant="antlib:org.apache.tools.ant"
> >          xmlns:acme="antlib:org.acme.anttasks">
> >    <target name="show">
> >      <if xmlns="antlib:net.sf.antcontrib">
> >          <or>
> >  	    <equals arg1="yes" arg2="${prop}"/>
> >             <acme:fileready file="${file}"/>
> >          </or>
> >          <then>
> >             <ant:echo>The arguments are equal</ant:echo>
> >          </then>
> >      </if>
> >    </target>
> > </project>
>
> So the NS for <project> and <target> does not matter?
> Conceptually they are part of the Ant XML dialect to me,
> so seeing them in no namespace at all seems weird??? --DD

If no namespace uri is picked for the empty prefix, it is up
to the processor to pick one, in ant's case this is
antlib:org.apache.tools.ant.
The above can also be written:

<ant:project xmlns:antcontrib="antlib:net.sf.antcontrib"
         xmlns:ant="antlib:org.apache.tools.ant"
         xmlns:acme="antlib:org.acme.anttasks">
   <ant:target name="show">
     <if xmlns="antlib:net.sf.antcontrib">
         <or>
 	    <equals arg1="yes" arg2="${prop}"/>
            <acme:fileready file="${file}"/>
         </or>
         <then>
             <ant:echo>The arguments are equal</ant:echo>
         </then>
      </if>
    </ant:target>
</ant:project>

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


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


Mime
View raw message