Introduction to XSLT

As a tool for humanities computing

What is where

ALLC/ACH 2002, Tübingen

21-22 July 2002

C. M. Sperberg-McQueen

Wendell Piez



This document describes what files and resources are located in which subdirectories of the workshop disk (and of the Web site where these files are also made available).

/workshop: Main workshop directory

This directory includes everything used for the workshop: exercises, sample documents used in exercises, sample style sheets, copies of the slides, DTDs, and software.

/workshop/data: Documents and sample data

(This should be duplicated in ./work, so that you can fall back on originals if you need to.)
Short samples:
  • rossetti.xml: “Remember” by Christina Rossetti (1849), encoded in TEI Lite by C. M. Sperberg-McQueen.
  • greeked.xml: a dummy TEI Lite document with some text traditionally used for Greeking
  • greekdiv.xml: like greeked.xml but with div elements
  • sinclair.xml: John Sinclair, sample text from Corpus Concordance Collocation. Oxford: Oxford University Press, 1991, p. 139. The source of the sample is not identified; presumed to be composed by Sinclair for the purpose.
  • shelley.xml: Oscar Wilde, “The grave of Shelley”
Some longer texts:
  • dorian.xml: Oscar Wilde, The Picture of Dorian Gray (1890), encoded in TEI by the CELT project.
  • earnest.xml: Oscar Wilde, The Importance of Being Earnest: A trivial comedy for serious people (1895), encoded in TEI by the CELT project
  • frnknstn.xml: Mary Shelley, Frankenstein: or, the modern Prometheus (1831).
  • lying.xml: Oscar Wilde, The decay of lying (1891), encoded in TEI by the CELT project
  • peergynt.xml: Henrik Ibsen, Peer Gynt (1875), tr. by William and Charles Archer, encoded in TEI Lite.
  • prince.xml: Oscar Wilde, The Happy Prince (1891), encoded in TEI by the CELT project.
  • salome.xml: Oscar Wilde, Salome: a tragedy in one act (1893), encoded in TEI by the CELT project.
  • savile.xml: Oscar Wilde, Lord Arthur Savile's Crime: a study in duty (1891), encoded in TEI by the CELT project.
A set of XML data files with census information for the Gorbals district of Glasgow, used with the kind assistance of Donald Spaeth:
  • gorbals51.xml: a list, by individual, of everyone in the sample from the 1851 census, showing what household they were part of, their forenames and surname, their relation to the head of the household, the household size, their family size, their marital status and sex, their occupation and its classification in a standard set of occupational codes and social status codes, their town and county of birth, and miscellaneous remarks.
  • gorbals81.xml: a corresponding sample from the 1881 census

/workshop/xslt-exx: XSLT samples and examples

Stylesheets discussed in the slides, and sample solutions to many of the exercises, are here.

/workshop/slides: Slides

Slides used in the presentations are here.
  1. Sunday a.m.: introductions (HTML)
  2. Sunday a.m.: basics (simple transformations, if, choose, selection by attribute values) (HTML)
  3. Sunday p.m.: modes (e.g. tables of contents) (HTML)
  4. Sunday p.m.: XPath (HTML)
  5. Monday a.m.: functions, numbering (HTML)
  6. Monday a.m.: near-identity transformations (HTML)
  7. Monday p.m.: named templates, recursion (HTML)
  8. Monday p.m.: sorting and grouping (HTML)

/workshop/dtd: Document type definitions, etc.

Document type definitions used in the exercises and examples are here.
  • CATALOG: SGML Open catalog file
  • teixlite.dtd: XML version of TEI Lite
  • xmllite.dtd: XML version of TEI Lite
  • xslt10.dtd: XSLT DTD
  • html40.dtd: HTML 4.0 DTD
  • html32.dtd: HTML 3.2 DTD
  • xhtml....dtd: XHTML 1.0 DTD
  • isolat1.pen: XML version of ISO Latin 1 entity set
  • isolat2.pen: XML version of ISO Latin 2 entity set
  • isopub.pen: XML version of ISO Publishing entity set
  • isonumb.pen: XML version of ISO Numeric and Special Graphic entity set