Is there any processer/parser to generate .xsl/.xslt files by accepting .xml files as input. If it is there , It is easier to generate .html files using XT processer. Becoz i am sick of writing .xsl .xslt and .html files from .xml files. Raya, it�s not clear what level of control you have on your XML and HTML files. Do you have predefined HTML file for each XML, so you have to convert to this particular HTML? If not, and if all you need is somehow show your XML, you can write one generic XSLT which will, for example, translate any element into <p>element content</p> or something like this.
If you do have predefined HTML, then I am not sure you can 100% automatize this task. There always will be need to tell an automat which XML tags corresponds to which piece of HTML. Perhaps there are tools which allow you to do it in run time via GUI or some kind of script, check this:
http://www.xmlsoftware.com/convert/ Another possibility: if you have a control on how your XML files are generated, you can modify this process by including presentation information in XML document itself. This is described in XML Journal, vol. 2, issue 3, p.32
something like:
and then have one generic XSLT which will produce HTML output (or another XSLT, or even
Java program; the article I mentioned describes Java program generation from XSLT
)
How should i write a servlet/jsp file by using (.xml and .xsl/.xslt) files to generage .html content as output and input to browser. Usually you simply call your XSLT processor and tell it your input XML and XSL files. For example with Xalan and Jakarta taglib you would write:
in this case resulting HTML will be inserted after <body> tag.
For more information you can read:
Using XML and JSP together By Alex Chaffee
http://www.javaworld.com/jw-03-2000/jw-0331-ssj-jspxml.html Serving XML with JavaServer Pages by Duan Yunjian and Willie Wheeler
http://www.devx.com/upload/free/features/javapro/2000/08aug00/ww0008/ww0008.asp