"Fickes, Vic" wrote:
> Hi,
>
> Being new to the world of web applications and Struts, I'm still trying to
> decide on an architecture to use for our application.
> One of the things I had been hoping to do was to make use of some legacy
> code that publishes XML from our database and then translates it to HTML
> using XSL. However, it seems you can't use XSL to translate to Struts html
> tags (or any JSP custom tags). So before I completely drop the idea of
> using XML and XSL, does anybody know of any approach that would allow me to
> use XML in the context of the Struts framework?
>
> I thought of using Digester, but since this is all new to me, my first
> impression was that the implementation would get to be too complicated to
> make it worthwhile. I also ran into the Cocoon project in my wanderings,
> which seems like a great solution if all you're going to do is builds
> displays, but I've got to do some heavy duty editing and validating of input
> data and I don't see how Coccon supports that. If anybody could provide
> some suggestions on using these or any other approachs, I'd appreciate it.
>
One integration opportunity is the <xsl:apply/> custom tag, which is available
in the Jakarta Taglibs project <http://jakarta.apache.org/taglibs>. This tag
lets you dynamically request XSLT transformations over XML data gathered from
any of a variety of places, and then render the transformed information
(presumably HTML in this case) to the resulting page.
In a similar vein, Struts itself uses offline XSLT transformations to create the
documentation pages you see in the Struts Documentation application. The Ant
build tool <http://jakarta.apache.org/ant> has a <style> task that can apply
XSLT transformations in build scenarios.
>
> Thanks,
> Vic
Craig