Chapter 13. XSL Transformations

In this chapter, I'm going to start working with Extensible Stylesheet Language, (XSL). XSL has two parts , a transformation language and a formatting language.

The transformation language lets you transform the structure of documents into different forms (such as PDF, WML, HTML, or another schema type), while the formatting language actually formats and styles documents in various ways. These two parts of XSL can function quite independently, and you can think of XSL as two languages, not one. In practice, you often transform a document before formatting it because the transformation process lets you add the tags that the formatting process requires. In fact, this is one of the main reasons the World Wide Web Consortium (W3C) supports XSLTit's the first stage in the formatting process, as we'll see in the next chapter.

This chapter is about the transformation language, and the next is about the formatting language. The XSL transformation language is often called XSLT, and it has been a W3C recommendation since November 16, 1999. You can find the W3C recommendation for XSLT (the current version is XSLT 1.0) at www.w3.org/TR/xslt.

XSLT 2.0 Working Draft

XSLT 2.0 is in the works, but it's only a working draft with frequent changes at this point. You can see the current version of the XSLT 2.0 Working Draft at www.w3.org/TR/xslt20/. There is some support for XSLT 2.0 in the Saxon XSLT processor, which you can download for free from http://saxon. sourceforge .net/. (There also was an XSLT version 1.1, but it never got past the working draft stage.)

I'll start this chapter with an example to show how XSLT works.



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net