Transforming an XML file with XSLT

(TEI) XML is a metadata format that captures the structure of a document. In itself, XML is not an attractive presentation format, but XML files can be transformed into other types of files, that serve presentation purposes, such as HTML, PDF, or ePub. You can also transform an XML document into a structurally different XML. For the transformation, you need a source-XML file, a stylesheet (XSLT), and an application that can process the transformation. Two stylesheets which can transform TEI files can be found in this zipped folder. These stylesheets are called tei-html.xsl and tei-pdf.xsl; the former transforms TEI into HTML, and the latter transforms TEI to PDF.

Transformations in Oxygen

To transform an XML file in the Oxygen application, you need to create a 'transformation scenario'. If a scenario is available and if it has been configured correctly, you can execture the transformation by clicking on the Apply Transformation-button which is marked by a red arrow (see illustration). If the transformation is successful, a new HTML-file will have been created in the directory that you had specified. If the transformation is not successful, Oxygen will show with a red notification and an error report in the bottom of your window.  

Transforming XML in your browser

An XSLT-transformation can also be performed by a browser that supports XSL. This is the case for, for example, Firefox, and for Internet Explorer version 5 and higher. The Microsoft XSLT implementation is called MSXSL. To transform the file, add a link in the XML file to the XSLT-file, immediately after the XML-declaration :
If you open the xml-file in a browser that supports XSL, you will see not the full XML file, but a representation of this file based on the specifications in the stylesheet transformation.xsl.