XSLT TutorialLesson 65Free preview
XSLT Examples
This lesson is part of XML · All levels
Summary
The XSLT example page features some complete transformations, such as CD catalogs, flower galleries, and family trees. The patterns used are always the same: template match, then value-of, for-each, sort, if, or choose to format the results. These examples can be used as a framework for your own style sheet projects.
Key points
- A classic example: a CD catalog is converted into an HTML list containing titles, artists, and prices
- Flower galleries use <img> with the src attribute of XML data
- Family trees use template recursion for nesting structures
- General structure: one template match root then derivative template
- Always test the style sheet with a small XML file first.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.