Ctl230 Structured Document Fundamentals
Resources Page (Autumn 2002)
Course Topics
1. LaTeX
Practical work 1.
- Start working step by step through this tutorial:
- Do all the examples in Chapters 1 and 2 of the tutorial,
using Emacs to edit your LaTeX files.
- There is no assignment this week :-) but there will be
a LaTeX assignment soon
so work on the tutorial carefully. Try to do Chapter 3
by next week.
2. More LaTeX
- Lecture notes:
LaTeX
for Linguists by Doug Arnold (University of Essex)
- Practical publication example:
Practical work 2.
- Login to the venus server (by
ssh venus)
to do the practical work.
On venus you can use LaTeX conveniently inside Emacs (by
ctrl-C ctrl-C), because Emacs includes
AUC TeX
.
- Continue working through the tutorial:
-
Assignment 1 (LaTeX).
3. HTML
Practical work 3.
-
Make a web page or small website in HTML for the LiTeR
Group which you visited last week (see Assignment 1).
-
(They talked about paying you lots of money, but next
morning they seemed not to remember very much about
that...)
-
The main page should have a title, a heading, a staff table,
some bullet points, and some links to other pages.
-
Don't use any web page composition tools - write the HTML
statements yourself using Emacs.
-
You can get help with HTML examples from
Sizzling
Jalfrezi.
-
Include some graphics (but not too much) - see examples from
Animated GIFs.
-
No assignment this week, but save your HTML files
to use as part of an assignment next week.
4. PDF and document format conversions.
Practical work 4.
-
LaTeX to HTML
-
Convert your LiTeR report (see Assignment 1)
from LaTeX to HTML using latex2html. View the result in a
web browser.
-
Try inserting several section and subsection headings into
your report, and check the format produced by latex2html.
- LaTeX to PDF
-
Convert your LiTeR report from LaTeX to PS using
dvips. View the PS using Ghostview.
-
Convert the PS version of the report to PDF using Ghostview.
Also convert it from PS to PDF using ps2pdf.
View the PDF using Acrobat Reader.
-
Convert your LiTeR report directly from LaTeX to PDF using
pdflatex. View the PDF using Acrobat Reader.
-
Assignment 2
(LaTeX and HTML Comparison).
Practical work 5.
-
Start reading the extract from
Learning XML
by Erik Ray (O'Reilly). Read at least the sections about
-
Using Emacs, create an XML file liter.xml with information about
the LiTeR Group (staff names, positions, ...).
-
No assignment this week, but save your XML file
to use as part of an assignment next week.
6. More XML. Parsing and Validation
Practical work 6.
-
Re-read the sections on
Validation Basics
and
Document Type
Definitions (DTDs).
-
Using Emacs, write a document type definition liter.dtd
for the LiTeR Group information.
-
Add a
<!DOCTYPE> line to your liter.xml
from last week, giving the DTD name "liter.dtd".
-
Edit both liter.dtd and liter.xml so they match each
other.
-
Run an XML parser to validate your liter.xml file.
-
On venus, you can run the Xerces XML parser by the command
xerces liter.xml
-
Assignment 3 (XML
Validation). Note: extra information added 31.10.02,
updated 06.11.02.
Mid-Semester Break
There will be no class on 31.10.02.
7. XSLT (XSL Transformation)
Practical work 7.
- Hello, World
- Download and look at
hello.xml,
hello.xsl and
empty.xsl.
-
Run the Xalan XSLT processor like this:
xalan -in hello.xml -xsl hello.xsl -out
hello.html
-
What if you use an empty stylesheet?
xalan -in hello.xml -xsl empty.xsl -out
empty.html
- CD Catalog
- Tee-se-itse:
Write your own stylesheets using Emacs in XSL mode.
Try the transformations using Xalan.
8. XSLT with XPath. Transforming XML to HTML.
Practical work 8.
9. XSL-FO (XSL Formatting Objects). Transforming XML to PDF.
Practical work 9.
-
Copy these shell scripts:
ctl230-xalan and
ctl230-fop
to your own directory.
-
Copy the examples
doc1.xml and
doc1-fo.xsl from
Introduction to XSL-FO to your directory.
-
Transform XML to FO with Xalan:
ctl230-xalan -in doc1.xml -xsl doc1-fo.xsl -out doc1.fo
and then transform FO to PDF with FOP:
ctl230-fop -fo doc1.fo -pdf doc1.pdf
-
View the PDF file using Acrobat Reader.
-
Transform XML directly to PDF with FOP:
ctl230-fop -xml doc1.xml -xsl doc1-fo.xsl -pdf doc1.pdf
-
Do the same with the second examples
doc2.xml and
doc2-fo.xsl,
and view the PDF.
-
Read
Transforming XML to PDF by Doug Tidwell.
(Note: this uses an older version of XSL-FO).
-
XML file: sonnet130.xml,
DTD: sonnet.dtd,
XSLT for FO: sonnet-fo.xsl
(updated by GW)
-
Transform the sonnet to FO:
ctl230-xalan -in sonnet130.xml -xsl sonnet-fo.xsl
-out sonnet130.fo
-
Transform the sonnet to PDF and view with Acrobat:
ctl230-fop -fo sonnet130.fo -pdf sonnet130.pdf
10. XML Applications. DocBook
Practical work 10.
-
Copy the Simplified DocBook DTD
sdocbook.dtd
to your directory and study it.
-
Copy the example article HelloWorldArticle.xml
to your directory and do these exercises:
-
Validate the article according to the DTD using Xerces:
ctl230-xerces -v HelloWorldArticle.xml
-
Create an environment variable "DB" giving the DocBook
stylesheets location:
export DB=~gwilcock/XML/DocBook/docbook-xsl-1.57.0
-
Transform the article from XML to HTML with Xalan,
view HTML in Mozilla:
ctl230-xalan -in HelloWorldArticle.xml
-xsl $DB/html/docbook.xsl -out HelloWorldArticle.html
-
Transform the article to FO with Xalan,
transform FO to PDF with FOP:
ctl230-xalan -in HelloWorldArticle.xml
-xsl $DB/fo/docbook.xsl -out HelloWorldArticle.fo
ctl230-fop -fo HelloWorldArticle.fo
-pdf HelloWorldArticle.pdf
-
Transform the article directly to PDF with FOP,
view PDF with Acrobat Reader:
ctl230-fop -xml HelloWorldArticle.fo
-xsl $DB/fo/docbook.xsl -pdf HelloWorldArticle.pdf
-
Assignment 5 (DocBook).
11. SVG (Scalable Vector Graphics). Transforming XML to SVG.
Practical work 11.
12. XML Servers, XML Browsers. Transforming XML to Speech.
Practical work 12.
Course assessment
-
There is no written final examination for this course.
-
To gain the course credits, you must complete the assignments
as follows
-
For 3 credits: all assignments (basic and advanced).
-
For 2 credits: assignments 1 and 2 and the basic
assignments.
-
For 1 credit only: assignments 1 and 2.
© Graham Wilcock 2002.