> The problem with using JSP for generating XML is that the JSP wants to
> assume that it is sitting at the  top level of your application, i.e. it
> wants to send the response back to the client.
> >From what I understand, your current architecture looks like this
>
> [db] <-----> [pl/sql] ---XML---> [XSL engine] --HTML via HTTP---> [client]
>
> If we try to introduce JSP into this scenario we get
>
> [db] <-----> [pl/sql] ---data---> [JSP] ---XML via HTTP--> [client]
>
> There is no room after the JSP layer to perform the XSL transformation
> JSP does not allow for post processing of it's output in order to perform
> the rendering. I believe this is because JSP is meant to be used in as
> presentation generation language, not as a data mapping language. Sure,
you
> could chain this to another servlet which contained your rendering code,
but
> it is much cleaner to just have something like
>
> [db] <-----> [pl/sql] ---data---> [XML data mapping code] ---XML--> [XSL
> engine] --XML/PDF/etc. via HTTP--> [client]


A lot depends on whether you really "need" XSLT or not.  JSP is in many ways
an XSLT transform, creating output from the data in beans.  XSLT transforms
XML-formated data.  JSP transforms bean data.  Using both seems like
overkill.  JSP has the advantage in that it can merge lots of different
beans together, whereas XSLT works on only a single XML doc.  Of course, if
your data comes out natively in XML format, then XSLT is a nice way to go.

Realize that a lot of complex transforms via XSLT will likely be harder to
get right than with JSPs.  For simple mapping, XSLT seems very powerful, but
it can be a complex beast when doing more complex things.

David

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to