Print version


1. Introduction
2. Framework
3. Root element
4. Templates
5. Selecting text
6. Iteration
7. Setting conditions
8. Sorting
9. Navigation
10. Multiple templates.
11. Apply-templates and value-of


Exercise 1
Exercise 2
Exercise 3
Exercise 4
Exercise 5
Exercise 6


A. Using XSLT in Oxygen
B. Transforming a TEI document

1. introduction

XML is a standard which, amongst other things, can be used to record the structure of a text. Encoding a text in XML can be highly useful for a number of reasons. One of the most important advantages is that it enables computers to search the text for its contents beyond free text searches. XML tags are added primarily to enable machines to process the text more intelligently. For human beings, such explicit encoding is normally not needed. Human readers prefer to read texts with a standard lay-out, such as HTML documents in a web browser. If a text is laid out using traditional typographical means, human readers can usually access the contents of the text without any conscious efforts. Whereas XML elements and attributes can capture many semantic and logical aspects of a text, they may appear distracting to human beings who simply want to read a text. For this reason, XML files normally need to be transformed to something else to render them more readable or more usable for human readers. To do this, we can make use of the eXtensible Stylesheet Language for Transformations (XSLT). Like XML, XSLT was developed by the World Wide Web Consortium (W3C). This tutorial contains step-by-step instructions on how to write an XSLT stylesheet.


  • A basic knowledge of XML and HTML is assumed.
  • This website makes use of Macromedia Flash.The most recent version of the Flash player can be downloaded from the Macromedia website.


[ up  | next ]