Datypic Logo

XSLT 2.0: The complete course

Abstract

Detailed technical coverage of XSLT 2.0, including XPath 2.0, looping and flow control, templates, copying and creating nodes, modularizing and overriding templates, sorting and grouping. All new features in XSLT 2.0 are covered, including user defined functions, multiple inputs and outputs, regular expressions, grouping. In addition, guidelines and caveats for upgrading stylesheets from 1.0 to 2.0 are provided.

Duration

2-3 days

Schedule

To schedule a class, please contact us at pwalmsley@datypic.com.

Topics covered

  1. XSLT: The basics
    • Purpose and capabilities of XSLT
    • Overview of stylesheet parts and basic constructs
    • Output methods
  2. XPath 2.0
    • The data model
    • Basics: paths and steps, axes, predicates
    • Language constructs: overview of the XPath operators
    • New in 2.0: conditional (if-then-else) and "for" expressions
  3. Flow control in XSLT
    • Looping using xsl:for-each
    • Sorting using xsl:sort
    • Conditions using xsl:if
    • Conditions using xsl:choose
  4. Templates, parameters and variables
    • Template basics
    • Calling templates using xsl:apply-templates
    • Calling templates using xsl:call-templates
    • Understanding template priority
    • Using modes
  5. Copying and creating nodes
    • Copying nodes using xsl:copy and xsl:copy-of
    • Creating nodes dynamically using xsl:element and xsl:attribute
    • Other kinds of nodes
  6. Functions
    • Built-in XPath 2.0 functions: an overview
    • User-defined functions
  7. Inputs and outputs
    • Opening documents: the document, doc and collection functions
    • Combining stylesheets using xsl:include and xsl:import
    • Creating multiple result documents
  8. String manipulation
    • Regular expressions in XSLT 2.0
    • The string-related functions in XPath 2.0
    • Parsing strings with xsl:analyze-string
    • Parsing non-XML input documents
  9. Grouping
    • XSLT 1.0 grouping issues
    • Grouping by value in XSLT 2.0
    • Grouping by position in XSLT 2.0
  10. Namespaces, types and schemas
    • Using namespaces in XSLT 2.0
    • The XSLT 2.0 type system in more detail
    • Declaring types for variables and parameters
    • Using schemas with XSLT 2.0