James Cook <[EMAIL PROTECTED]> wrote: > ----- Original Message ----- > From: "Stefan Bodewig" <[EMAIL PROTECTED]> >> Representing a Task as a DOM Node - i.e. using DOM as the object >> model of Ant has been ruled out for various reasons. The DOM API >> forces you to implement a big interface we don't need IMHO. > > I don't think I agree here. I am unaware of any "big interface" the > the DOM API forces you to implement.
Hmm, a Task would become a Node, right? org.w3c.dom.Node has eighteen methods and almost all of them are completely useless for a Task, even if you want to build a project hierarchy out of it - or maybe I simply don't understand what you want to use DOM for. There are better methods in tasks that control the addition of child elements and setting of attributes - and they make sure you are adding the right types as they are more specific than Node or String. I feel supporting the more general methods in Node would be dangerous. Navigation to siblings, parents or the Document don't look useful to me either. What remains are getter methods for attributes and child elements - here I think tasks should be extended to provide them, but again I don't think getAttributes() or getChildNodes() would be the way to go. Something more task specific seems more appropriate. Stefan
