cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: Fantastic!!!! My first Generator that connects to an EJB.
Date Mon, 27 Jan 2003 15:26:15 GMT
On Mon, 2003-01-27 at 13:58, Robert Simmons wrote:
> This sucker connects to an EJB which runs the given JDO query and
> returns the set of found objects from the database. Best of all it
> works!!!! See the two attached files. Next thing you know I will be
> writing something useful. O_O
>  

Just some small hints...

* I see you do the following in your code:

this.contentHandler.processingInstruction("xml",                                         
     "version=\"1.0\" encoding=\"UTF-8\"");

You shouldn't create the XML declaration this way, since an XML
declaration is not a processing instruction. The SAX API explicitely
forbids this.

* For logging, instead of using log4j, you can use Avalon's logger.
Since the class extends from AbstractGenerator, it is already available:
simply call getLogger().error("...")

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message