Transforming XML using XSLT Style Sheets — A 3 day course
XML has rapidly become a de-facto standard for exchanging data between applications and organisations. The growth of XML has led to the emergence of XPath and XSLT as standard ways of accessing and transforming content in an XML document.
XPath and XSLT are a natural combination. XPath is a declarative language that allows content to be located in an XML document. XSLT style sheets define template rules, using XPath expressions to locate XML content, and then transform the selected data into another form.
This course explores the XPath language in detail, showing how to locate XML content by value, position, and type. It then shows how to use XSLT to transform XML documents into a different dialect of XML, HTML, or a text format such as EDI files. The course also shows how to filter unwanted data, and how to generate new XML content from scratch.
The course is based on the latest World Wide Web Consortium standards for XPath and XSLT version 1.0 and 2.0.
This course is a mixture of instructor-led tuition with separate practical sessions for each chapter designed to help reinforce the techniques covered in the lecture material. It has a high practical content. Delegates will write and apply many different style sheets during the practical sessions, to explore the full range of capabilities available in XPath and XSLT.
This course is aimed at Designers, architects, and developers who need to manipulate and transform XML documents using XPath and XSLT.
Delegates will learn how to:
- Locate content in an XML document using XPath
- Write XSLT style sheets to transform XML documents
- Apply XSLT style sheets statically or dynamically to XML documents
- Generate new XML content using XSLT
- Perform repetition and conditional logic in an XSLT style sheet
- Sort documents, and control textual and numeric output
- Define and use named templates
- Parameterise template rules and style sheets
- Coordinate multiple XML documents using style sheets
- Reuse, customise, and extend XSLT style sheets
- Understand what's new in XPath 2.0 and XSLT 2.0
- Query using XPath 2.0
- Write XSLT 2.0 syntax stylesheets
Delegates must have a foundational knowledge of XML or HTML Mark-up hierarchies, which can be obtained by working on at least one XML/HTML project or by attending the Understanding XML course.
Publicly scheduled dates, locations, and prices
A schedule of dates for this subject is not currently available. Please call 0333 210 0140 or use our contact form to enquire about places and availability.
- A recap of XML syntax, structure and formatting to produce well formed documents
- What are namespaces?
- How are XML grammars defined and formerly specified
- An introduction to XML Schemas
XSLT and XPath Introduction
- What is XPath?
- What is XSLT?
- Why are XSLT and XPath useful?
- Transforming XML documents using XPath and XSLT
- Generating XML and/or HTML output
- Industry support for XPath and XSLT
Selecting XML Nodes using XPath
- XPath nodes and properties
- Axes, node tests, and predicates
- Location paths and location steps
- Accessing elements and attributes
- Accessing other node types
- Filtering nodes using predicates
- Using XPath operators and functions
Writing and Applying XSLT Style Sheets
- XSLT style sheet structure
- Defining template rules
- Obtaining node values
- Invoking template rules
- Literal result elements
- Applying a style sheet to an XML document
- Applying a style sheet dynamically using DOM
The XSLT Programming Language
- Performing iteration
- Making decisions
- Creating named templates
- Calling named templates
- Defining and using variables
- Defining and using parameters
Fine-Tuning XSLT Output
- Formatting numbers
- Sorting the result tree
- Controlling whitespace
- Character encodings
- Specifying XML, HTML, and plain text output methods
Mapping XML dialects with XSLT
- Creating new XML content with XSLT
- Creating elements
- Creating attributes
- Namespace issues
- Generating and formatting text content
- Creating numeric output
- Creating other XML content
Producing Scalable Solutions with XSLT
- Including style sheets
- Importing style sheets
- Overriding imported template rules
- Invoking overridden template rules
- Specifying template priorities
Managing multiple XML documents and Grouping
- Accessing multiple XML documents
- Accessing XML data with keys
- Generating cross references in XML documents
- Implementing standard techniques to achieve group by functionality
- What's new in XPath 2.0?
- How has the query language of XML been enhance?
- Introducing data types and sequences
- Querying with 2.0
- Using for, some and every keywords
- How to use if statements
- Set operations
- Functions and Type casting
- What's new in XSLT 2.0; Data types and strong typing
- How to use Grouping
- User defined Functions
- Creating multiple output documents
- Generating sequences
- Processing data with regular expressions
- Controlling template processing