Transforming XML using XSLT
eXtensible Stylesheet Language for Transformations is a core XML technology for both presentation and middleware layers of enterprise applications. This training course teaches students to write their own XSLT files to transform XML into HTML, XHTML, or some other form of XML.
Objectives
- Understand the XSLT mechanism
- Write XSLT Templates
- Understand the role of the pre-defined templates
- Write XPath expressions for use in XSLT
- Use XPath functions
- Define parameterised stylesheets
- Use variables in XSLT
- Use the XSLT flow control elements
- Create XML output from XSLT
- Use regular expressions from XSLT
- Work with XSLT groups
- Understand and work with sequences
- Working with XML Schema
- Working with multiple result documents
- Defining custom XSLT functions
Prerequisites
- Delegates must be familiar with XML. XML experience can come from the ‘XML Overview’ training course. It is also helpful if delegates have programming experience in some programming or scripting language.
Contents
Introduction to XSLT
- Uses of XSLT
- XSLT transformation mechanism
- XSLT Templates
XPath
- Accessing elements
- Accessing attributes
- XPath axes
- XPath predicates
XPath Functions
- Number functions
- Formatting functions
- Text functions
- Working with Regular Expressions
More on Templates
- Named templates
- Priority values
- Passing parameters
- Default templates
- Defining custom XSLT functions
XSLT Flow Control
- The for-each construct
- Using groups and for-each-group
- The if construct
- The choose, when, otherwise construct
Creating XML Output
- The element tag
- The attribute tag
- The copy tag
- The copy-of tag
- Multiple output documents
- Controlling the output
Combining Stylesheets
- Importing stylesheets
- Including stylesheets
- Using apply-imports
Advanced XSLT Features
- Using keys
- Adding functions
- Passing variables from processors
- The fallback element


