File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes JSP for transforming XML using XSL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JSP for transforming XML using XSL" Watch "JSP for transforming XML using XSL" New topic

JSP for transforming XML using XSL

Thomas Greene
Ranch Hand

Joined: Aug 09, 2004
Posts: 127
I am using XSL to transform XML to HTML.

TO specify the name of the XSL, I write the following code in my XML

Now suppose I want to apply a different XSL to the same XML, I have to make changes to this XML file.

Is there a way that I use a JSP page and in that page I load the XML and the coresponding XSL file and the output is displayed in the JSP page?

Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

You can do the transformation on the server instead. (Your setup asks the browser to do the transformation.) Here's an article on how to use the JSTL XML tags to do that:
I agree. Here's the link:
subject: JSP for transforming XML using XSL
jQuery in Action, 3rd edition