You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Scot P. Floess" <fl...@mindspring.com> on 2006/06/08 19:29:37 UTC

macrodef and uri

I am trying to find some examples using a uri on macrodef...

My assumption was, if I used a uri, I could use that to prefix using the 
macrodef itself...

For instance:

<macrodef name = "foo" uri = "bar">
...
</macrodef>

...

<bar:foo/>

But that does not seem to work (as in I get an error)...

I found a link regarding this as being a bug but couldn't find any 
additional information.

I am guessing that (hopefully), I am using the uri attribute 
incorrectly.  Again, I did some searching but did not find any real 
examples regarding macrodef.

Any and all help is -greatly- appreciated!

Scot

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim


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


Re: macrodef and uri

Posted by "Scot P. Floess" <fl...@mindspring.com>.
Peter:

Thanks for the reply...

I had found the answer shortly after I posted...For some reason it never 
"clicked" about adding the namespace at the <project> level...I sorta 
felt silly once I realized that ;)

Regardless, I appreciate you responding...thanks again :)

Scot

Peter Reilly wrote:
> In particular a uri is not a namespace prefix. One needs
> to map a prefix to a uri using the xmlns attribute.
>
> <project name="test" xmlns:me="x.y.z">
>   <macrodef name="sample" uri="x.y.z">
>       <sequential>
>          <echo>Hello world</echo>
>       </sequential>
>   </macrodef>
>
>   <me:sample/>
> </project>
>
> Peter
>
> On 6/8/06, Scot P. Floess <fl...@mindspring.com> wrote:
>>
>> OK, someone feel free to kick me and call me a newbie!
>>
>> I found my problem... I didn't define the namespace in the <project>
>>
>> Regardless...disregard!
>>
>> Scot P. Floess wrote:
>> > I am trying to find some examples using a uri on macrodef...
>> >
>> > My assumption was, if I used a uri, I could use that to prefix using
>> > the macrodef itself...
>> >
>> > For instance:
>> >
>> > <macrodef name = "foo" uri = "bar">
>> > ...
>> > </macrodef>
>> >
>> > ...
>> >
>> > <bar:foo/>
>> >
>> > But that does not seem to work (as in I get an error)...
>> >
>> > I found a link regarding this as being a bug but couldn't find any
>> > additional information.
>> >
>> > I am guessing that (hopefully), I am using the uri attribute
>> > incorrectly.  Again, I did some searching but did not find any real
>> > examples regarding macrodef.
>> >
>> > Any and all help is -greatly- appreciated!
>> >
>> > Scot
>> >
>>
>> -- 
>> Scot P. Floess
>> 27 Lake Royale
>> Louisburg, NC  27549
>>
>> 252-478-8087 (Home)
>> 919-754-4592 (Work)
>>
>> Chief Architect JPlate  http://sourceforge.net/projects/jplate
>> Chief Architect JavaPIM http://sourceforge.net/projects/javapim
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim


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


Re: macrodef and uri

Posted by Peter Reilly <pe...@gmail.com>.
In particular a uri is not a namespace prefix. One needs
to map a prefix to a uri using the xmlns attribute.

<project name="test" xmlns:me="x.y.z">
   <macrodef name="sample" uri="x.y.z">
       <sequential>
          <echo>Hello world</echo>
       </sequential>
   </macrodef>

   <me:sample/>
</project>

Peter

On 6/8/06, Scot P. Floess <fl...@mindspring.com> wrote:
>
> OK, someone feel free to kick me and call me a newbie!
>
> I found my problem... I didn't define the namespace in the <project>
>
> Regardless...disregard!
>
> Scot P. Floess wrote:
> > I am trying to find some examples using a uri on macrodef...
> >
> > My assumption was, if I used a uri, I could use that to prefix using
> > the macrodef itself...
> >
> > For instance:
> >
> > <macrodef name = "foo" uri = "bar">
> > ...
> > </macrodef>
> >
> > ...
> >
> > <bar:foo/>
> >
> > But that does not seem to work (as in I get an error)...
> >
> > I found a link regarding this as being a bug but couldn't find any
> > additional information.
> >
> > I am guessing that (hopefully), I am using the uri attribute
> > incorrectly.  Again, I did some searching but did not find any real
> > examples regarding macrodef.
> >
> > Any and all help is -greatly- appreciated!
> >
> > Scot
> >
>
> --
> Scot P. Floess
> 27 Lake Royale
> Louisburg, NC  27549
>
> 252-478-8087 (Home)
> 919-754-4592 (Work)
>
> Chief Architect JPlate  http://sourceforge.net/projects/jplate
> Chief Architect JavaPIM http://sourceforge.net/projects/javapim
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: macrodef and uri

Posted by "Scot P. Floess" <fl...@mindspring.com>.
OK, someone feel free to kick me and call me a newbie!

I found my problem... I didn't define the namespace in the <project>

Regardless...disregard!

Scot P. Floess wrote:
> I am trying to find some examples using a uri on macrodef...
>
> My assumption was, if I used a uri, I could use that to prefix using 
> the macrodef itself...
>
> For instance:
>
> <macrodef name = "foo" uri = "bar">
> ...
> </macrodef>
>
> ...
>
> <bar:foo/>
>
> But that does not seem to work (as in I get an error)...
>
> I found a link regarding this as being a bug but couldn't find any 
> additional information.
>
> I am guessing that (hopefully), I am using the uri attribute 
> incorrectly.  Again, I did some searching but did not find any real 
> examples regarding macrodef.
>
> Any and all help is -greatly- appreciated!
>
> Scot
>

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim


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