On Wednesday 14 November 2001 03:47 am, you wrote:
> > For data from other sources, I've been moving towards making java objects
> > that are XMLizable, and having a generator that just calls .toSAX on
> > them. -pete
>
> Maybe a stupid question... but: why? Do you really gain in performance, or
> in architecture design? (I mean comparing this to <util:include-file> from
> XSP or Xinclude)

More from the design standpoint. We're working on creating a web-based 
application here, and we have a single XML document that describes menus and 
different lists of data the user can display (defining columns, sorts, etc). 

At server startup this file is parsed and two types of objects are created 
from it, menu objects and list objects. To spit out a piece of the menu, I 
have a generator that looks up the appropriate menu node, and then calls 
toSAX on it, generating the event stream. 

While I could use XSP for this, the overhead of recompiling the XSP isn't 
worth it. My generator class is very simple.

I guess "other sources" needs to be qualified a bit. If you are loading XML 
that can be represented via a URI, then the methods that you mention work 
fine. But if you want to generate XML from sources that cannot be represented 
as an URI, a generator is the way to go, imho.
-pete

-- 
peter royal -> [EMAIL PROTECTED]

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

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to