What Is XSLT (XSL Transformations)

This section describes XSLT (XSL Transformations), which is a language that allows you to write a stylesheet as an XML document to describe rules for transforming a source XML document into a new XML document or a regular text document.

What Is XSLT (XSL Transformations)? XSLT is a language that allows you to write a stylesheet as an XML document to describe rules for transforming a source XML document into a new XML document or a regular text document.

XSLT is mainly designed to be used with XSL to transform a source XML document into an XML document with formatting objects. However, XSLT is also widely used to transform XML documents by adding, removing or altering XML elements for other non-presentation purposes.

For example, below is an XSLT stylesheet that will transform an XML document with "student" elements nested inside a "class" element into a list of students in a regular text document:

<?xml version="1.1"?>
<xsl:stylesheet version="1.1"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:template match="class">
  Start of student list
  <xsl:apply-templates select="student"/>
  End of student list
 </xsl:template>
</xsl:stylesheet>

See "XML Tutorials - Herong's Tutorial Examples" book at https://www.herongyang.com/XML on how to write XSLT stylesheets and apply them to XML documents.

Table of Contents

 About This Book

Introduction of XSL-FO

 What Is XSL (eXtensible Stylesheet Language)

What Is XSLT (XSL Transformations)

 What Is XSL-FO (XSL - Formatting Objects)

 hello.fo - Sample XSL-FO document

 Apache™ FOP (Formatting Objects Processor)

 RenderX XEP as an XSL-FO Tool

 Introduction of Area Model

 XSL-FO Document Basics and Examples

 Page Layout Masters

 Block-Level Formatting Objects

 Inline-Level Formatting Objects

 Including Graphics in XSL-FO document

 Table of Rows and Columns

 List, Item, Label, and Body

 Floating Blocks - "float" and "footnote"

 Hyperlinks, Table of Contents and Indexes

 Headers and Footers using "static-content"

 Font Attributes and Font Families

 Apache FOP Font Configurations

 RenderX XEP Font Configurations

 Converting HTML to PDF

 References

 Full Version in PDF/ePUB