This tutorial will guide you through setting up Tomcat and Cocoon to serve XML pages, then you will create a DTD, XML file and three XSL stylesheets so that you can view your data in your desktop browser, a cell phone browser and a pdf file.
As problems go, It grows every time you turn around. Just how are you going to deal with all of these new devices? Suddenly everything is internet ready and your site has to accommodate them all. Figuring out how to deal with Netscape and IE were nothing compared to what is coming up. People will soon be viewing your site with a text browser that only show 6 lines at a time. Forget graphics. Your site has to be reduced to the basics. Html is not good for these new browsers so you have to learn a new markup language. When web services and SOAP become mainstream you may not be presenting your data in a browser at all. The worst part is that you have to write all of these So, how do you support all of these new devices, manage to keep your data consistent and actually keep your sanity?
One of your largest problems is html. Html is is presentation oriented. When you write html the focus is on how the page will look. The actual data in the page is secondary to the layout. There are now many tools to help make web pages look nice but they do not help make sense of the data contained in the pages.
XML, in contrast, is data oriented. When you create an XML document you focus on what the data is without concern for layout or presentation. Once you have the data and its structure down, you then write stylesheets and focus on how the data will be presented. The great thing about this approach is that you can present the same data in different ways. XML can greatly reduce the amount of work you need to do ensure that your data stays consistent no matter what media your users are using. This may not be particularly useful for your home page but it can do amazing things to help manage volumes of company data, documentation, contacts, schedules or orders.
This tutorial will guide you through setting up Tomcat and Cocoon to serve XML pages, then you will create a DTD, XML file and three XSL stylesheets so that you can view your data in your desktop browser, a cell phone browser and a pdf file. Before getting started you should be warned that writing pages in XML requires more time up front than HTML. By the end of the tutorial you will see the value in taking the extra time.
At the end of this tutorial you will have: 1. Installed and configured Tomcat to serve up xml documents 2. Installed Cocoon to process xml documents and format it according to your xsl documents. 3. Created a dtd to define the structure of you xml document. 4. Created an xml document containing an address book entry. 5. Created three xsl files to format the xml document in HTML,WML and pdf formats