• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part II: XHTML Style and Structure > XSL—Style the XML Way

Chapter 12. XSL—Style the XML Way

In the last chapter, you learned about the separation of structure and presentation in XHTML 1.1 and saw one way to apply style information to XHTML 1.1 pages using Cascading Style Sheets.

Such complete separation of structure (content) from presentation in XHTML 1.1 implements one of the basic principles of the Extensible Markup Language (XML).

XHTML, whether version 1.0 or 1.1, complies with the syntax requirements of XML 1.0, for example the need to have an end tag for each start tag. But XHTML 1.0 only went part way to making HTML fully XML compliant. XHTML 1.0 included many presentation elements within it, thus mixing content and presentation. To move XHTML closer to full compliance with XML principles, those presentation-related elements had to go. XHTML 1.1 removes the presentation elements (tags) from XHTML, bringing XHTML more fully into line with the requirements and principles of XML 1.0.

Cascading Style Sheets can be used with XML or XHTML, but CSS has limitations when applied to documents where there is no presentation information at all—for example, with respect to reordering elements in the output document. In this chapter you will learn about another solution to the need to apply style to XML documents, Extensible Stylesheet Language Transformations (XSLT), when content and presentation are completely separated. Because XHTML 1.1 documents are XML documents, the principles you learn will apply fully to XHTML documents, from XHTML 1.1 onwards.

This chapter teaches you:

  • Extensible Stylesheet Language Transformations (XSLT)

  • XML Path Language (XPath)

  • Extensible Stylesheet Language Formatting Objects (XSL-FO)

  • How to create an XSLT style sheet


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint