Hi All, I am woking on Struts with xml and xslt on WebSphere Studio Application developer edition v 5.1. I would like to know as where we have to place our xml and xsl file and our result beans and how to map both xml and xsl.
A couple of questions: 1) What XML file? Are you talking about just some custom XML file you need to transform with XSLT? If so, Struts doesn't have anything to say about where you place your files. 2) What is a "result bean" and how is it related to the XML and XSL files? 3) What do you mean by "mapping both XML and XSL"?
Result bean nothing but a model through which we are going to create XML document, on whcih we apply XSLT to get html, xml, cvs output.
and one more article on struts and xml is http://www.sys-con.com/xml/articleprint.cfm?id=612. if you please see this there he gave the implementation with example with some code snippets. and hes says that "The names of the XML document and XSL stylesheet are contained within an externalized property resource bundle (named ApplicationResources.properties)". To render some output for view we need to apply xslt on xml, so my question is where we need to specify the mapping between the xml and xsl. I think there should be some file which tells about for a particular xml this is the xsl.
-Thank you Vishnu
Joined: Jan 23, 2002
The article seems to imply hardcoding properties like "page.frontpage.xsl=transformation.xsl" into ApplicationResources.properties. Having a dedicated configuration file for the transformations is certainly an option, recommended even.