June 4, 2011, 7:55 a.m.
posted by reo
XML Stylesheet Language for Transformations
In This Chapter
The XML Stylesheet Language for Transformations (XSLT) defines mechanisms for addressing XML data (XPath) and for specifying transformations on the data, in order to convert it into other forms. In this chapter, you'll learn how to use XSLT to write out a DOM as an XML file. You'll also see how to generate a DOM from an arbitrary data file in order to convert it to XML. Finally, you'll use XSLT to convert XML data into a different form, unlocking the mysteries of the XPath addressing mechanism along the way.
In this chapter, you'll parse an existing XML file to construct a DOM, display and inspect the DOM hierarchy, convert the DOM into a user-friendly JTree, and explore the syntax of namespaces. You'll also create a DOM from scratch, and see how to use some of the implementation-specific features in Sun's JAXP reference implementation to convert an existing data set to XML.
The examples in this chapter can be found in docs/tutorial/examples/jaxp/xslt/samples.