ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Proposal: XML output from ant tasks
Date Sat, 26 Feb 2000 13:17:47 GMT
James Duncan Davidson wrote:
> 
> > First, everything that is sent to the console should also go into to the
> > log.  (The converse is definately not true).
> 
> Yes, the converse is not true, but I don't think it's a requirement that
> everything on the console should go into the log. I think it's also
> perfectly reasonable to approach this from the standpoint that there are 2
> distinct methods that send information to the user, one instantaniously, one
> delayed. If the task wants to put the same information in both, it can call
> both methods.
> 
> I'm not one way or the other, but I don't see a hard dependancy unless it's
> agreed to do so.
> 
> > Second, I'd like to request that logXml be able to provide some support
> for
> > nested content
> 
> This gets into a higher level issue. Does logXML take a String which happens
> to be an XML fragment, or something else. Unfortunatly, there's no really
> generic tree object like thing that can swap out to XML easily at this point
> unless you depend on a very specific parser implementation.

DOM is portable .... but I agree, writing logs in DOM is NASTY!!! to say
the least

> > Finally, I would like to be able to log to the Xml file without require
> the
> > developer to code a lot of \" and <> characters.
> 
> Seems reasonable. This may require the definition of some helper classes...
> 
>     MessageFragment.addNode(String name, String value) ???

Hmmmm, what about a simple micro-DOM?

Element element = new Element(name, value);
element.setAttribue(attname, attvalue);
element.addElement(new Element(name2, value2));
project.log(element);
project.log(value);

project.log(Element element) is the XML logging method (to file?)
project.log(String value) is the current logging method (to console?)

the behavior of the two methods can be decided with command line
arguments.

What do you think?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message