Hosting web - 170 CHAPTER 6 INTRODUCTION TO XSLT Table

170 CHAPTER 6 INTRODUCTION TO XSLT Table 6-1. Support for XSLT in Recent Web Browsers Web Browser XSLT Processor and Support Internet Explorer (IE) 6 Microsoft XML Parser (MSXML) 3.0 (can be upgraded) supporting XSLT 1.0 Mozilla (Netscape 8 and Firefox 1.5) TransforMiiX supporting XSLT 1.0 Opera No support Let s work through a series of examples so you can see how to work with XSLT. You can download the resources referred to in this chapter from the Source Code area of the Apress web site (http://www.apress.com). These examples work with Internet Explorer (IE) 6, Netscape 8, and Firefox 1.5. They may also work in earlier browser versions. I ll work through the following examples: Creating headers and footers in an XHTML page Creating a table of contents in an XHTML page Presenting an XML document Including images in an XML document You ll see further examples in the next chapter. Let s start by looking at how XSLT can transform an existing XHTML document to add new information. Using XSLT to Create Headers and Footers Web sites commonly include repeating content such as navigation and copyright notices on all or most of the pages. Developers often use Server-Side Include (SSI) files or server-side code to generate the content. This example looks at an alternative approach and uses XSLT to add a header and footer to a simple XHTML page. Using client-side XSLT to generate content offers the following advantages: You can centralize the added content to one location with a single XSLT stylesheet, making the site much easier to update. Users need to download the XSLT code only once for the entire site, reducing page- loading time and offering bandwidth savings. All transformations can occur on the client, reducing the load on the server. This example uses the page planets.htm. If you open this file from your resources, you ll see that is contains the following code:
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Leave a Reply