O'Reilly logo

Sams Teach Yourself J2EE™ in 21 Days by Peter Roxburgh, Andy Longshaw, Debbie Law, Dan Haywood, Martin Bond

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

XSLT Stylesheets

In Listing 17.2, you saw a simple stylesheet that used default transformation rules to remove everything except for the text from an XML document. You will now look at how to define your own rules for transforming an XML document.

Rules are based on matching elements in the XML document and transforming the elements into a new document. Text and information from the original XML document can be included or omitted. Components from the XML document are matched using the XPath notation defined by the W3C. You will learn more about XPath in the “Using XPath with XSLT” section later in today's lesson, after you have looked at some simple XSLT templates.

Template Rules

The most common XSLT template rules are those for matching and ...

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