An XSLT consists of a stylesheet declaration and a set of templates.
Do not forget: template elements must not be nested!
Some more text.
The first chapter explains basic structures.