I am using IBM XML parser ....The input is XMl and the output is an HTML report .Can somebody tell me which all IBM java objects can create a dynamic HTMl .....The concept is simlar like how a Servlet builds an HTML...The PAI being used is DOM....Uptil now i have been able to create only XML output from XMl input..need to know how to create HTML output?? Please help
Create a XSL stylesheet that captures all of your presentation requirements and have a (hardcoded) static link in the XML file. Advantages - no additional coding. Disadvantages - hard to change, will not work for XML files generated outside your organizational boundaries unless you "attach" the stylesheet reference to the document. Also this approach introduces some level of browser dependency since you are serving the XML directly to the client browser.
Create XSL stylesheets but write programs to do the XSL Transformations on the server using XSLT APIs. Checkout Xalan from Apache. Advantages - Opens up options for more dynamic output generation. The XSLT API allows you to add your own "hooks" to control and affect the transformation process. Disadvantages - Some server-side coding required, which means changes to the output format will result in changes to the code, recompiling, migration yada yada yada. All the bad things of configuration management
The Publisher pattern - if your XML files are hardly dynamic, you can run a batch process that builds the HTML files( using static/dynamic transformatios ) and keeps them ready on the server. When a client request comes in, you serve the ready made HTML. This approach is the least complicated of all the three and greatly enhances the response time. Advantages - Faster response, very little coding required( most of the XSLT engines supports command-line invocations ), easy maintenance. Disadvantages - Not flexible at all. Might require additional coding if you decide to automate the HTML generation process.
Match your requirements to these strategies and choose the best fitting approach. Don't think of these approaches as mutually exclusive, if need be get creative and derive a hybrid solution Cheers! ------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).