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?
-steve
[1] :
http://www.gridforum.org/Public_Comment_Docs/Documents/Mar-2006/draft-ggf-cddlm-xml-cdl2-002.pdf
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]