You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave Makower <da...@mac.com> on 2001/12/12 23:04:09 UTC

Mixing Struts with XSLT

We are currently using XML with XSLT in JSPs, in the following manner, and
we'd like to integrate this approach with Struts:

We use a custom tag (similar to the <x:transform> tag slated for inclusion
in the standard JSP taglibs) that applies a stylesheet to XML included in
the body of the tag.  This way, we can use Java and JSP inside the
<transform> tag to generate XML, and have our HTML developers create XSLT
stylesheets that create the appropriate look for the data represented by the
XML.  A further advantage of this approach is that we can start by including
static XML in the JSP as a stand-in for the dynamic data, so that the HTML
developers can create their stylesheets in parallel with the Java developers
doing the work to generate the XML dynamically.

Now that we're considering moving to Struts, we'd like to be able to let our
HTML developers use the Struts html taglib within their stylesheets to
generate HTML form elements.  But that would require that after the
<transform> tag is interpreted, the results are passed again through the JSP
interpreter in order to replace the Struts tags with the appropriate HTML
form elements.

Is this making sense?  Does anyone have a suggestion as to the best way to
accomplish this?

-- 
+-------------------------------------------------------------------+
| Dave Makower                        <da...@mac.com>             |
| http://www.davemak.com/                                           |
+-------------------------------------------------------------------+



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Mixing Struts with XSLT

Posted by Sandeep Takhar <sa...@yahoo.com>.
It makes sense to me and would like to know if there
is an answer as well.

This tackles one problem.

What about the return?  You have to generate XML again
and than send it through the loop.

Sandeep
--- Dave Makower <da...@mac.com> wrote:
> We are currently using XML with XSLT in JSPs, in the
> following manner, and
> we'd like to integrate this approach with Struts:
> 
> We use a custom tag (similar to the <x:transform>
> tag slated for inclusion
> in the standard JSP taglibs) that applies a
> stylesheet to XML included in
> the body of the tag.  This way, we can use Java and
> JSP inside the
> <transform> tag to generate XML, and have our HTML
> developers create XSLT
> stylesheets that create the appropriate look for the
> data represented by the
> XML.  A further advantage of this approach is that
> we can start by including
> static XML in the JSP as a stand-in for the dynamic
> data, so that the HTML
> developers can create their stylesheets in parallel
> with the Java developers
> doing the work to generate the XML dynamically.
> 
> Now that we're considering moving to Struts, we'd
> like to be able to let our
> HTML developers use the Struts html taglib within
> their stylesheets to
> generate HTML form elements.  But that would require
> that after the
> <transform> tag is interpreted, the results are
> passed again through the JSP
> interpreter in order to replace the Struts tags with
> the appropriate HTML
> form elements.
> 
> Is this making sense?  Does anyone have a suggestion
> as to the best way to
> accomplish this?
> 
> -- 
>
+-------------------------------------------------------------------+
> | Dave Makower                       
> <da...@mac.com>             |
> | http://www.davemak.com/                           
>                |
>
+-------------------------------------------------------------------+
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>