XSL

Introduction

XSLT is an acronym for eXtensible Stylesheet Language Transformations and is a means of transforming an xml document into another xml document. It is useful to be able to convert one tree into another tree. Extensible stylesheet language transformations provide a facility for converting one xml document into another, by defining how a tree node in the from document is to be transformed into a node in the output document. The pages constituting this website were generated using xml and xslt transformations.

Contents

Source

XSL transformations are specified in plain text files. The website pages were all generated from xml documents. A xsl source file is created or amended using any text editor, such as NotePad. The source file name is saved in a file name with a .xsl extension.

UNIX

The UNIX command xsltproc transforms an xml file using an xslt stylesheet.

$ xsltproc transform.xsl TreeLeaves.xml

Windows

A small, free and easy to use xml transformations processor for Windows is the Instant SAXON processor. Download the file instant-saxon.zip (300 Kb) and unzip the file into the directory from which you intend to execute it. A simple MS-DOS batch file or program is created to run the transformations processor.

saxon.exe source.xml transform.xsl

Comments

Comments may be added to source code in order to improve the understanding of the code.