I had a similar problem, where the backend delivered model data in an XML
format.  We initially used XML/XSL, but we later went with JSPs.  What I did
to handle the XML data was write some taglibs that accessed XML data via
XPath.  I also wrote a taglib that will perform an XSL transformation and
include the resulting output to a JSP, which was used for handling the more
complexed XML structures.  I don't have any source code (as I'm not working
at that company any more), but I believe JavaWorld had an article that
talked about something similar.

Calvin

----- Original Message -----
From: "Greg Reddin" <[EMAIL PROTECTED]>
Cc: <recipient list not shown:>
Sent: Wednesday, July 11, 2001 10:16 AM
Subject: RE: XML/XSL/Struts Architecture


> Using XSL, you can recreate the majority of what the taglibs do.  However,
that
> begs the question of why you would use XSL in the first place.  I've
worked on a
> Struts-based XSL project for about 6 months now, and we've had to recreate
so
> much of the Struts functionality in our architecture that we find
ourselves
> always asking why we're doing this.  Our data comes from the backend in
XML, so
> it seemed logical to leave it in XML and use the parsers to access it.
But the
> parsers (Xalan/Xerces) turn out to be a lot of overhead and got in our way
quite
> a bit.  I'd like to go back and convert it to JSP.
>
> -----Original Message-----
> From: [EMAIL PROTECTED] at INTERNET
> Sent: Wed 7/11/2001 3:41 AM
> To: Reddin, Greg; [EMAIL PROTECTED] at INTERNET
> Cc:
> Subject: RE: XML/XSL/Struts Architecture
>
>
>
> Hi Mahesh,
> We have started using Struts for an application that uses XSP/XML/XSL
(using
> Cocoon).  Instead of specifying a  JSP page in the struts configuration
file
> we specify a XSP page.  This server page is responsible for getting XML
data
> from some data object set up in the action classes (we are using
attributes
> in the session object for now).  We also have extended ActionMapping to
> allow us to specify the XSL stylesheet in the struts configuration file.
> You are right about the use of tag libraries - that is one aspect of
struts
> that you potentially lose out on using the above approach.
> Regards,
> John
>
>
> > -----Original Message-----
> > From:     Mahesh Bhagia [SMTP:[EMAIL PROTECTED]]
> > Sent:     10 July 2001 17:24
> > To:     Apache Struts (E-mail)
> > Subject:     XML/XSL/Struts Architecture
> >
> > Hi,
> >
> > In our application, we are using XML/XSL to generate JSP and plan to use
> > Struts for submitting data from HTML forms. Has anyone used / know
> > if this architecture works. my thinking is ( correct me if wrong ) , we
> > will not be able to use tag libraries coz of XML/XSL combination for
> > generating pages. unique thing about this application is structure of
> > HTML is different for each client.
> >
> > Thanks
> > Mahesh
> >
> >

Reply via email to