Home TOC |
![]() ![]() ![]() |
XML Stylesheet Language for Transformations
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.
Note: The examples in this chapter can be found indocs/tutorial/examples/jaxp/xslt/samples
.
In This Chapter
- Introducing XSLT and XPath
- Writing Out a DOM as an XML File
- Generating XML from an Arbitrary Data Structure
- Transforming XML Data with XSLT
- Concatenating XSLT Transformations with a Filter Chain
Home TOC |
![]() ![]() ![]() |