XSLT Introduction-Intermediate

2 days

Course Overview

XSLT (Extensible Stylesheet Language Transforms) enables you to transform XML data from one document type into other XML document types, and even into other formats such as HTML, XHTML, WML, and XQL.
XSLT Introduction/Intermediate training course teaches attendees everything they need to begin using XSLT in their XML projects.
XSLT is a pseudo-programming language or scripting language used to output text which has been marked up as XML for display in a web browser or other device. It is the engine which brings the interoperability of XML to life in an online environment, and can either output XML statically or dynamically.

Prerequisites

Completion of XML Introduction/Intermediate training course or equivalent is required.

Course Outline

XSLT Basics

  • eXtensible Stylesheet Language
  • An XSLT Stylesheet
  • xsl:template
  • xsl:value-of
  • Whitespace and xsl:text
  • Output Types
  • Elements and Attributes
  • xsl:element
  • xsl:attribute
  • Attributes and Curly Brackets

XPath

  • XPath in XSLT
  • XPath Expression
  • XPath Terminology
  • Context Node
  • Current Node
  • Context Size
  • Proximity Position
  • Location Paths
  • Axis
  • Node Test
  • Predicate
  • Accessing Nodes
  • Abbreviated Syntax
  • XPath Functions
  • XPath Operators

Flow Control

  • Looping in XSLT
  • Sorting with XSLT
  • Looping and Sorting
  • Conditions with XSLT

XSLT Templates

  • xsl:apply-templates
  • xsl:call-template
  • Passing Parameters
  • Copying Nodes
  • xsl:copy
  • xsl:copy-of
  • Removing Content

Advanced Techniques

  • Working with Lists
  • Parsing Strings
  • Outputting Processing Instructions
  • Outputting CDATA Sections
  • Using JavaScript to Transform a Page

Multiple XML and XSLT Documents

  • Including XSLTs
  • Importing XSLTs
  • The document() Function

Tying It All Together

  • Workshop: Sharing data and transforming it
  • for the Web