Chapter 1. Transforming Documents with XSLT
Extensible Stylesheet Language Transformations, or XSLT, is a straightforward language that allows you to transform existing XML documents into new XML, Hypertext Markup Language (HTML), Extensible Hypertext Markup Language (XHTML), or plain text documents. XML Path Language, or XPath, is a companion technology to XSLT that helps identify and find nodes in XML documents—elements, attributes, and other structures.
Here are a few ways you can put XSLT to work:
Transforming an XML document into an HTML or XHTML document for display in a web browser
Converting from one markup vocabulary to another, such as from Docbook (http://www.docbook.org) to XHTML
Extracting plain text out of an XML document for use in a non-XML application or environment
Building a new German language document by pulling and repurposing all the German text from a multilingual XML document
This is barely a start. There are many other ways that you can use XSLT, and you’ll get acquainted with a number of them in the chapters that follow.
This book assumes that you don’t know much about XSLT, but that you are ready to put it to work. Through a series of numerous hands-on examples, Learning XSLT guides you through many features of XSLT 1.0 and XPath 1.0, while at the same time introducing you to XSLT 2.0 and XPath 2.0.
If you don’t know much about XML yet, it shouldn’t be a problem because I’ll also cover many of the basics of XML in this book. Technical terms are usually defined ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access