ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: <comment> task
Date Thu, 08 Jan 2004 15:32:19 GMT
On Thu, 08 Jan 2004, Steve Loughran <steve_l@iseran.com> wrote:
> Stefan Bodewig wrote:
>> On Thu, 08 Jan 2004, Steve Loughran <steve_l@iseran.com> wrote:
>>
>>>I propose that utils.XmlFragment is moved to typedefs and made to
>>>extend Datatype;
>> Why do you want it to extend DataType at all?
> 
> hey this is cool, now that I am almost in europe, stefan can comment
> on my ideas before waste time implementing them.

;-)

> I want to do referencing so that you could go
> 
> <xmlfragment refid="payload" xmlns:f="something">
>   <f:foo>some XML here</f:foo/>
> </xmlfragment>

[bodewig@bodewig tmp]$ cat > foo.xml
<project>
  <typedef name="foo" classname="java.lang.Object"/>
  <foo id="my-foo"/>
  <property name="my-foo.toString()" refid="my-foo"/>
  <echo>${my-foo.toString()}</echo>
</project>
[bodewig@bodewig tmp]$ ant -f foo.xml 
Buildfile: foo.xml
     [echo] java.lang.Object@4aeb52

BUILD SUCCESSFUL
Total time: 2 seconds

You don't need a DataType to use ids.

> And then later use it
> 
> <SoapPost>
>   <body refid="payload"/>
> </SoapPost>

OK, so you need refid support, I see.

Stefan

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


Mime
View raw message