You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Hartmut Bernecker <h....@dhw.de> on 2001/05/14 17:20:33 UTC
XML Data out of a property into an XSL Transformation by JSP-Tag
Has anyone integrated struts with XML/XSL by populating a property with
XML-data and processing this data with XSLT and by using a custom
JSP-Tag.
With other words: Is there a good way to include an XSLT-Output into a
JSP page?
Have you a sample code?
TIA
Hartmut Bernecker
Re: XML Data out of a property into an XSL Transformation by JSP-Tag
Posted by Thibaut Bodart <th...@tiscalinet.be>.
I'm personnaly using Cocoon the generate HTML output from XML documents.
The custom tag will simply get the parameters, put them in the request
and dispatch the request to the cocoon servlet.
This cocoon servlet will invoke a specific Cocoon Producer that will
generate XML that will be afterwards transformed into HTML using a XSLT
stylesheet.
I works fine with me !!
Regards,
Thibaut
Sean Pau wrote:
> me too looking for something similar. Looking for Struts to generate XML and
> passthrough XSLT to transform to HTML, WAP, PDF etc. Is Cocoon a solution?
> Is there something lighter, simpler but with the Cocoon caching mechanism?
> Or is servlet filter a solution? Thanks
>
> -----Original Message-----
> From: Hartmut Bernecker [mailto:h.bernecker@dhw.de]
> Sent: Monday, 14 May, 2001 11:21 PM
> To: struts-user@jakarta.apache.org
> Subject: XML Data out of a property into an XSL Transformation by
> JSP-Tag
>
>
> Has anyone integrated struts with XML/XSL by populating a property with
> XML-data and processing this data with XSLT and by using a custom
> JSP-Tag.
>
> With other words: Is there a good way to include an XSLT-Output into a
> JSP page?
> Have you a sample code?
>
> TIA
> Hartmut Bernecker
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>
>
>
Re: XML Data out of a property into an XSL Transformation by JSP-Tag
Posted by Jonathan <ja...@i-2000.com>.
My suggestion would be that your action should forward you to a jsp page
that has a custom tag in it. That tag could do 1 of 2 things:
1) search for a bean in the request which has the pre generated html result
from a stylesheet transformation
2) get, process and display the transformed data using an Action class
The xsl transformation can happen before returning from the action, or
during the perform() method of the action. We are doing something similar
here. We took the road of letting the framework generate a result which
ends up a a long html string which gets slapped into the area the tag was
sitting in. Now that I have gone through this, I would not use stylesheets
for display. I would rather recommend the developer to get an object filled
with hashtable like results, and iterate through the results. I would do
this with a custom tag.
----- Original Message -----
From: "Sean Pau" <se...@yahoo.com>
To: <st...@jakarta.apache.org>
Sent: Monday, May 14, 2001 12:53 PM
Subject: RE: XML Data out of a property into an XSL Transformation by
JSP-Tag
> me too looking for something similar. Looking for Struts to generate XML
and
> passthrough XSLT to transform to HTML, WAP, PDF etc. Is Cocoon a solution?
> Is there something lighter, simpler but with the Cocoon caching mechanism?
> Or is servlet filter a solution? Thanks
>
> -----Original Message-----
> From: Hartmut Bernecker [mailto:h.bernecker@dhw.de]
> Sent: Monday, 14 May, 2001 11:21 PM
> To: struts-user@jakarta.apache.org
> Subject: XML Data out of a property into an XSL Transformation by
> JSP-Tag
>
>
> Has anyone integrated struts with XML/XSL by populating a property with
> XML-data and processing this data with XSLT and by using a custom
> JSP-Tag.
>
> With other words: Is there a good way to include an XSLT-Output into a
> JSP page?
> Have you a sample code?
>
> TIA
> Hartmut Bernecker
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
Web design forum / listserv
Posted by Roy Truelove <ro...@pulver.com>.
Hey guys,
I'd like to know if anyone knows of a listserv / forum / newsgroup that
deals solely with web application design philosophies, and not necessarily
with their implementations. I read several lists (this one, Turbine, JSP,
barracuda,) and most of the traffic is geared toward problems *using* the
framework. A place where people could go and discuss things like MVCm2,
push/pull etc. I believe would be very beneficial. If someone knows of a
forum like this, please let me know.
Thanks!
-Roy
Re: XML Data out of a property into an XSL Transformation by JSP-Tag
Posted by Jonathan Asbell <ja...@i-2000.com>.
You can use the ActionForward to send you to a jsp page which contains a tag
(or tags) which do any one of the following:
1) A Tag/Action calls business objects which in turn get xml, transform the
xml using a stylesheet, and slaps the resulting html in the space where the
tag sits on the jsp page
2) A Tag/Action calls business objects which in turn get xml, transform the
xml using a stylesheet, puts the result in a bean which is retrieved by the
Tag/Action
3) A Tag/Action calls business objects which in turn get xml, puts the xml
result in a bean which is retrieved and iterated over by the Tag/Action
4) Tag/Action calls business objects which return return xml, which is
transformed on the Tag/Action level using a stylesheet
The point is:
You can start with xml and stay with xml up to the web layer and do
transforms there
You can start with xml, transform in the lower layer, and send html up to
the web layer
You can start with regular string data, make a dom, and send it around (I
dont recommend this)
etc. etc. etc.
>From experience, I recommend that if you are actually going to need to work
with xml, DONT USE STYLESHEETS, but rather make "model" objects from the xml
which you can iterate over.
----- Original Message -----
From: "Sean Pau" <se...@yahoo.com>
To: <st...@jakarta.apache.org>
Sent: Monday, May 14, 2001 12:53 PM
Subject: RE: XML Data out of a property into an XSL Transformation by
JSP-Tag
> me too looking for something similar. Looking for Struts to generate XML
and
> passthrough XSLT to transform to HTML, WAP, PDF etc. Is Cocoon a solution?
> Is there something lighter, simpler but with the Cocoon caching mechanism?
> Or is servlet filter a solution? Thanks
>
> -----Original Message-----
> From: Hartmut Bernecker [mailto:h.bernecker@dhw.de]
> Sent: Monday, 14 May, 2001 11:21 PM
> To: struts-user@jakarta.apache.org
> Subject: XML Data out of a property into an XSL Transformation by
> JSP-Tag
>
>
> Has anyone integrated struts with XML/XSL by populating a property with
> XML-data and processing this data with XSLT and by using a custom
> JSP-Tag.
>
> With other words: Is there a good way to include an XSLT-Output into a
> JSP page?
> Have you a sample code?
>
> TIA
> Hartmut Bernecker
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
RE: XML Data out of a property into an XSL Transformation by JSP-Tag
Posted by Sean Pau <se...@yahoo.com>.
me too looking for something similar. Looking for Struts to generate XML and
passthrough XSLT to transform to HTML, WAP, PDF etc. Is Cocoon a solution?
Is there something lighter, simpler but with the Cocoon caching mechanism?
Or is servlet filter a solution? Thanks
-----Original Message-----
From: Hartmut Bernecker [mailto:h.bernecker@dhw.de]
Sent: Monday, 14 May, 2001 11:21 PM
To: struts-user@jakarta.apache.org
Subject: XML Data out of a property into an XSL Transformation by
JSP-Tag
Has anyone integrated struts with XML/XSL by populating a property with
XML-data and processing this data with XSLT and by using a custom
JSP-Tag.
With other words: Is there a good way to include an XSLT-Output into a
JSP page?
Have you a sample code?
TIA
Hartmut Bernecker
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com