Fundamentals of XSLT and XPath
(3-day hands-on introduction to XSLT/XPath)
XSLT is a declarative language for transforming XML. XPath is its companion specification for identifying parts of XML documents. XSLT and XPath are widely used to convert XML data into other data formats, including display formats such as HTML; XML according to arbitrary schemas and DTDs; and text-based formats such as database load files. This class covers the principles and practice of XSLT and XPath, focusing on the XPath 1.0 data model (which represents an XML document as a tree of elements, attributes and text nodes) and the XSLT processing model (which provides for a built-in recursive traversal of the tree to address and transform its contents). Students learn to navigate the tree using XPath, with attention to its non-XSLT applications including standalone XPath, Schematron, and XQuery; to create and prioritize templates in XSLT, using patterns, expressions, and XSLT instructions to match templates, select nodes and generate output; and to analyze incoming data structures and design and implement mappings from input to output formats.
Understanding the XSLT processing model is fundamental to XSLT 1.0 and XSLT 2.0, which makes this class an ideal place to start for people who will be using XSLT/XPath 2.0 as well as those who will work in the XSLT/XPath 1.0 environment.
Upon completion of the course, participants will be able to:
- Design and run XSLT transformations to convert XML data into other formats, including HTML, any form of XML, and other text-based formats.
- Interpret XML markup as a logical tree, recognize and understand the standard terminology describing the tree structure, and apply absolute and relative path expressions to address data in a document.
- Understand how XSLT templates work and the role and usefulness of the built-in templates.
- Create and manage modular XSLT stylesheets.
- Understand the architecture of XSLT transformations, including processing XSLT in batch mode, on web servers and in client applications such as web browsers.
- Understand the role and capabilities of XSLT within the XML family of standards, including XML, (X)HTML, CSS, XSL-FO, schemas, transformation and query technologies.
This hands-on class can be taught on PC or Macintosh.
Prerequisites: This course is appropriate for anyone with an XML background who will be writing or maintaining transformations in XSLT 1.0 or XSLT 2.0, or who needs to understand their capabilities and strengths in order to assess their strategic role and communicate effectively with others. Students who have had some exposure to XSLT are also welcome to take this course, either as a refresher or in order to develop a better understanding of core concepts. Prior expertise in programming is helpful but not required.
Related Classes: Participants may also be interested in the Advanced Document Processing with XSLT 2.0 course.