This page provides of a couple examples of simple XSLT stylesheets. Both templates are designed to tranform the student_directory.xml file. The XML file represent a student directory from a fictional college. The first stylesheet converts the file into text, the second converts the file into an HTML page.
student_directory.xml
Download source for: student_directory.xml
XSLT Text Stylesheet

This stylesheet converts the XML file into a text file. The default output method of XSLT is XML. Therefore, the xsl:output tag is used to tell the processor to output to text.
student_text.xsl
Download source for: student_text.xsl
Here is the output from the transformation.
student.txt
Download source for: student.txt
XSLT HTML Stylesheet

This stylesheet converts the XML file into an HTML file. Note that any HTML must be well formed to be stored in the an XSLT stylesheet. Most transformation engines will automatically remove trailing slashes to make the HTML work better with the browser.
student_html.xsl
Download source for: student_html.xsl
Here is the HTML file produced from the transformation.
student.html
Download source for: student.html