O'Reilly logo

Inside XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using XSLT Style Sheets in XML Documents

You use XSLT to manipulate documents, changing and working with their markup as you want. One of the most common transformations is from XML documents to HTML documents, and that's the kind of transformation we'll see in the examples in this chapter.

To create an XSLT transformation, you need two documents—the document to transform, and the style sheet that specifies the transformation. Both documents are well-formed XML documents.

Here's an example; this document, planets.xml, is a well-formed XML document that holds data about three planets—Mercury, Venus, and Earth. Throughout this chapter, I'll transform this document to HTML in various ways. For programs that can understand it, you can use the

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required