If you've been following along, you already know how to parse XML documents using both SAX and the DOM with the Java-based Xerces XML parser. But why stop there? In this article, take your Java/XML skills to the next level by converting your XML into other formats with the very powerful Xalan XSLT engine
And that's about it from me. In this article, I attempted to demonstrate the basics of the Xalan XSLT processor, offering a broad overview of how it work by transforming XML documents into ASCII and HTML formats. I showed you how to write simple command-line Java applications to perform transformations, and then ported these examples over to the Web via JSP.
I've made a conscious attempt to stay away from the geekier aspects of the processor, hoping to keep things as simple as possible. If, however, those geekier aspects do interest you, consider visiting the following links
The goal here was to offer you a broad overview of how Xalan works, in order to give you some insight into the processor's capabilities and lay the groundwork for more advanced applications. Did I succeed? Write in and tell me.
Note: All examples in this article have been tested with JDK 1.3.0, Apache 1.3.11, mod_jk 1.1.0, Xalan 2.3 and Tomcat 3.3. Melonfire offers no support or warranties for the source code in this article. Examples are illustrative only, and are not meant for a production environment. YMMV!