XSLT for compound documents tutorial
Jump to navigation
Jump to search
Introduction
- Learning goals
- Learn how to create XSLT that can handle XML documents that combine several vocabulariescombined XHTML/SVG/MathML/etc documents
- Prerequisites
- Level and target population
- Intermediate XML/XSLT users
- Remarks
- This tutorial provides a short overview about XSLT dealing with several XML namespaces. It includes minimal knowledge needed for an XML class. Most parts also can be used in introductory web technologies class.
Introduction
XSLT can handle XML documents that include more than one namespace.
Principles:
- Declare the same namespaces on top of the XSLT stylesheet
- Declare even the default namespace (e.g. XHTML)
- Each XPath expression must use a prefix !
- Strip the output from prefixes if you produce XHTML
An example
(soon)
Links
- Handling namespaces (Jenny Tennison, btw. a good resource for all XSLT problems).
- Avoid common XSLT mistakes by Jirka Kosek, Dec 2008 (retrieved 4/2013)