Hands On XSLT
Hands-On XSLT
Please turn off all
What Is XSL?
Versions
Part I: Basic XSLT
The Process of an XSL Transformation
XSLT Software
Two Example XML Documents
An XSLT Style Sheet
Exercise 1: Running the XSLT Processor
Template Rules
Exercise 2: Template Rules
Answer 2:
Literal text
Exercise 3: Literal Character Data and Markup
Answer 4: Literal Character Data and Markup
Adding the root
Applying Templates
The select attribute
Exercise 4: Applying Templates
Answer 4: Applying Templates
Attributes
Exercise 5: Attributes
Answer 5: Attributes
Attribute Value Templates
Iteration with xsl:for-each
Exercise 6: Iteration
Answer 6: Iteration
Matching Elements in Namespaces
Exercise 7: Matching Elements in Namespaces
Answer 7: Matching Elements in Namespaces
Part II: XPath
XPath Explorer
Expressions to Try Out
XPath Data Model
Node Properties
Location steps
Axes
Node Tests
Exercise 8: Axes and Node Tests
Answer 8: Axes and Node Tests
Predicates
Exercise 9: Predicates
Answer 9: Predicates
Multistep Location Paths
Absolute location paths
Abbreviated location paths
Combining location paths with |
General Expressions
Data Types
Literals
Number Operators
Exercise 10: Arithmetic
Answer 10: Arithmetic
Boolean Operators
Exercise 11: Boolean Operators
Answer 11: Boolean Operators
Functions
Node-set Functions
Exercise 12: Node-set Functions
Answer 12: Node-set Functions
Number Functions
Exercise 13: Number Formatting
Answer 13: Number Formatting
String functions
Exercise 14: String Manipulation
Answer 14: String Manipulation
Boolean Functions
Match patterns vs. XSLT Expressions
Part III: More XSLT
The Default Template Rules
Testing conditions with xsl:if
Exercise 15: Conditional Output
Answer 15: Conditional Output
xsl:choose
Exercise 16: Selection
Answer 16: Selection
Sorting with xsl:sort
Multiple Key Sorts
Sort Options
Exercise 17: Sorting
Answer 17:
Numbering Output
Number Options
Part IV: XSLT in Practice
Where Does the Transformation Happen?
Client Side Processing
Exercise 18: Client Side Transformation
What else does XSLT have?
What does XSLT not have?
Summary
To Learn More
Questions? Comments?
Entire Presentation as Single File
Start
|
Cafe con Leche
Copyright 2002 Elliotte Rusty Harold
Last Modified November 20, 2002