Chapter 2. Product Pages: Transforming XML in the Browser Using XSL

In this chapter

  • The Two Faces of XSL

  • Trees: The Basic Structure of XML

  • Well-Formedness

  • Building the Style Sheet

  • Getting Specific—Using XPath

  • Looping and Sorting

  • Adding Elements and Attributes

  • Conditionals

  • Next Steps

Chapter 1 talked about markup languages in general and HTML and XML in particular. Specifically, we discussed the separation of content and presentation.

One of the ways we did that was to take our HTML content, which was rich in presentation but didn't give us a lot of information about the content, and change it to XML, which told us everything we needed to know about the content but nothing about the presentation. We then used Cascading Style Sheets (CSSs) to control the ...

Get XML and Java™ from scratch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.