ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: <xmlproperty> intra-element attribute property resolution issue
Date Tue, 23 Jan 2007 10:41:12 GMT
Jacob Kjome wrote:
> I think Brian is correct.  XML attributes have no defined order other than the
> obvious alphabetical order, which might be an implementation detail.  Even so,
> I wonder if logic could be written to maximize resolution.  If a property is
> found to not be resolved, it could be deferred until other attributes are
> processed.  If after all attributes are processed, a property is still not
> resolved, then so be it.  But it would make sense to try.  If it were to pose a
> performance issue, it could be an option of XMLProperty defaulting to 'false'. 
> I'm not sure how complex the logic might be, but I would think it's doable.

Ahh, you've just entered the world of recursive and transitive reference 
resolution. I do know how hard it is, because it is something I've had 
to do it at work. You need to parse everything, then walk the tree for 
everything you need to resolve, As you walk it you push its path onto a 
stack so you catch loops. You also need to track the state of every node 
so you know whether its already been resolved or not, so yuo dont try 
re-expanding stuff that has already been done. And you need the unit 
tests to do it.

I am -1 to going there with XmlProperty.  It makes sense in a XSD-based 
language for describing the configuration of complex systems [1], but 
that is a specific language for a specific goal. And it took a long time 
to get right, believe me.

Remember: Ant is not a general purpose XML workflow language. It just 
has a little bit, to help with the builds. Why not XSL all the attrs 
into elements and get at them that way?


[1] :

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message