ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Martin <>
Subject Re: [Xalan2J] Using new Xalan2-TRaX interfaces for
Date Wed, 03 Jan 2001 12:03:15 GMT
Sam Ruby wrote:

> Jeff Martin wrote:
>> Whilst your in there you don't fancy trying to
>> add a new bit of functionality. I'd quite like
>> to use xpath to set ant property values from XML
>> documents. I've been think of doing it for a
>> while but never quite got into it.
> Doesn't sound like a <style> task to me, but rather a different beast.  Can
> you give me a use case for this function?
> - Sam Ruby
Good point, I sometimes forget people can't read my mind. Your right 
it's not a job for the style task but I think it would need an addition 
to the XSLTLiason.

What I want to achieve is to have a task like this:

<xproperty expression="/cvs/repository/module@name" property=""/>

which sets the property ${} to be the value in this XML file 
i.e. monkey
               <module name="monkey"/>

as far as multiple nodes being returned I suppose we could either throw 
a BuildException or concatanate them together some how, but that's 
probably a can of worms.

I'm quite happy to do the coding myself but it'll be a while as I don't 
know anything about using xpath in xalan ;0)

View raw message