Summary

Today you have looked at transforming XML documents into other data formats. The XSLT standard defines an XML stylesheet format that specifies how to transform an XML document into a new format. XSLT is commonly used to transform XML data into HTML for presentation by a Web browser.

An XSLT stylesheet defines a set of rules. Each rule

  • Is matched against elements in an XML source document

  • Defines transformations that are applied to the matched element to create the transformed data

  • Can be applied to a selected element or multiple elements including a complete tree hierarchy of elements

  • Uses the XPath notation to match XML elements (the same XPath notation is also used with XPointers in XML documents)

A new technology designed to address some of the performance problems of XSLT processors, such as Apache XALAN, is an XSLT compiler. An XSLT compiler has two components:

  • A compiler than generates a translet (a set of Java classes) from an XSLT stylesheet

  • A runtime processor that applies a translet to an XML document to perform the transformation

The XSL technology also identifies a portable device independent grammar (XSL-FO) for defining formatting requirements and the document data. XSL-FO is not being widely adopted by the industry at the present time.

You have now finished your excursion into XML. Tomorrow, you will return to Java programming and the J2EE platform to study Java and J2EE design patterns.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.138.178