This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi All Is there any way by which i can convert my XML file into an HTML file using XSLT. As of now i am doing by using <?xml-stylesheet type="text/xsl" href="cdshow1.xsl"?> if i do this way i am restricting my xml to one particular view provided by the specified XSL file. i just want to know is there any way we can use one XML file and different XSL file to generate different views.
Ramesh, Sure you can. Do do this however, you will need some programming on the server side. For instance from a Javaservlet, depending on the client browser (user-agent), you may use one of many stylesheets to transform your XML into HTML. Apache Cocoon is a framework that provides this feature (among other features). Cheers
Ramesh R G V S
Joined: Apr 20, 2002
Thanx and regards Ramesh R G V S
Joined: Nov 22, 2008
Ramesh, there is not other reasonable way than to have the HTML produced on the server side. XSLT transformations on the client side can only be done in Internet Explorer. Maybe some other new web browsers will understand it but it wont work for all of your visitors. You may also use java applets, but it will only run on webbrowsers that support java applets. And we all know that Windows XP does not ship with a Java Virtual Machine, i.e. all Windows XP visitors won't have a chance to see your pages. Don't you have access to any programming languages on your web host? Most ISP today allow CGI Scripts (using Perl) at least. You should hence be able to do the XSLT transform using one of the many XSLT modules available. Good luck