Text only | Skip links
Skip links||IT Services, University of Oxford

1. First steps

For this purpose, use the finished Punch document for July 1st 1914, in the directory Punch/147/1914_July_1 on your network drive. Load it into oXygen and check that it is well-formed.

Transformations are run in oXygen by pressing the icon like this: . The first time you do this, you should be offered a choice of built-in options:
From these, choose ‘TEI P5 HTML’ and click on Transform now.

The transformation is run, and the default web browser is fired up with the resulting web page.

Check that this looks like a plausible rendition, and that links work etc.

2. Working with XPath

You can explore the Punch file (or other XML file of your choice!) by typing XPath expressions into the box at the top left:
If you use XPath 2.0 (the default), you can put in expressions such as //figure without a namespace prefix. If you use XPath 1.0, you have to first set up the namespace by pressing the small icon to the right of the XPath box:

and linking the prefix tei with the namespace http://www.tei-c.org/ns/1.0. It is probably easier for this exercise to stay with XPath 2.0 and use unprefixed element names.

Type //figure into the box, and select one of the results listed in the window at the bottom. You should see something like this:

Try to locate:
  • All the head elements inside figure elements
  • All the name elements which do not have a rend attribute.
  • The foreign words (marked as <foreign>)
  • The sections (<div>) which more than 5 paragraphs
  • Paragraphs which contain the word ‘Dogs’

3. Trying the PDF rendering

  • Load the file stalky.xml from your network drive into oXygen, and choose the TEI P5 to PDF transform scenario (press the ‘Configure Transfomation Scenario’ icon, ). If all goes well, your browser wil load a PDF rendering in due course.
  • Now set the parameter Institution to ‘Oxford Summer School’ and rerun the transformation. See the difference?
  • More dramatically, change columnCount to have the value 2, and see what happens then.
  • Set parIndent to ‘0em’ and parSkip to ‘2pt’
  • Finally, change pageWidth to ‘1755mm’, change columnCount back to 1, run the transform, and check that the page width is lessened.

4. Going further with parameters of the HTML

Try some of these changes to the HTML rendering of Punch, by setting parameters, and check the results:
  • Set autoToc to ‘false’
  • Set numberHeadings to false
  • Set pageLayout to ‘CSS’
  • Set numberParagraphs to ‘true’

5. Feeling strong?

Download the TEI OpenOffice filters by following links from http://tei.sf.net (or go direct to http://sourceforge.net/project/showfiles.php?group_id=106328&package_id=197808&release_id=587974). That will be a .jar file for TEI P5. Do not open that, but save it on disk. Start OpenOffice, make a new text document, then go to Tools/XML Filter Settings and choose Open Package. Point it at the .jar file you downloaded, close that dialogue, go back to the text document and try ‘Save As … TEI P5’.

Sebastian Rahtz. Date: 2008-07-07
Copyright University of Oxford