Hands-on Web Publishing 2013



Do you have some Word, ODF, or XML documents, maybe with some images or videos, that you want to publish to the web or publish as an epub? This course will show you how to do precisely that - make a good-looking website or epub from your documents. This is a hands-on course that complements the Publishing With XML course.

We’ll use XSLT 2 to transform sample files into HTML5, style the pages to look good using some of the new features available in CSS, and (if time permits) add some simple interactivity using JavaScript. We’ll show you how to make your website respond well to different screen sizes and devices, and how to create a simple epub from the HTML and CSS. We'll use Ruby as a scripting language to pull all the pieces together. We will supply computers with the software installed, and you can take the code you develop home with you.

Prerequisites: You should know at least as much XSLT as is taught in the Hands-On Introduction to XML, but advanced XSLT knowledge is not necessary. You should also know as much CSS as is taught in the Hands-On Introduction. We do not expect you to know JavaScript or Ruby. Experience in Perl, Python, Ruby, or some other scripting language is an advantage, but not required. We'll teach you enough to get started.

This course is chaired by Lauren Wood and taught by Lauren Wood, Matt Patterson, Norm Walsh, and Peter Flynn.

Classes for 2013

The Hands-on Web Publishing course runs on and .

Using HTML and CSS for websites

Taught by Lauren Wood.

HTML has changed a lot in the last couple of years with the development of HTML5 - there are new HTML elements, new ways to define functionality, and compatibility with XML is no longer a necessary requirement. Many HTML frameworks and templates are readily available to get ideas from, or even use without changing. This class will cover some of the more important new elements and touch on other useful features. It will also cover the XML compatibility issue.

CSS3 is powerful. It has features to enable designs that look good on a desktop browser, your smartphone, or another mobile device. This class will cover some of the new features in CSS3, as well as some of the common design frameworks and the design principles used in creating sites that look good on multiple screen sizes.

Exercise: On paper, you'll mock up some of the basic features of a web site. You'll annotate this with HTML elements and preliminary ideas on design.

Converting XML to HTML

Taught by Norm Walsh.

There are certain things to watch for when converting XML to HTML. For standard schemas there are often existing transformation stylesheets that are far more than you need for your website or your ePub. This class will present guidelines for converting from a standard XML format to the HTML that you need.

Exercise: We will provide some XML sample files for you to convert to HTML using XSLT, and the basic stylesheet to get you started.

Word and other sources of XML — Maintaining a flow of information

Taught by Peter Flynn.

Word and OpenOffice files are often inputs to the publishing process, but by default they are intended to be read by humans, not programs. Both of them use XML to store the content and appearance, but to use the files in a production environment they need machine-readable metadata to identify the structure. This is usually in the form of named styles which provide both formatting and functional identity.

Wordprocessor file are largely ‘flat’, with no hierarchical structure and no containment. The first part of the class presents some guidelines to optimise the document styling and minimise editorial intervention. A worked example is combined with exercises to create a styled document ready for input.

The second part explains some of the techniques for transforming styled wordprocessor files with XSLT2 into a target XML format. Often this will be XHTML, but it could equally be DocBook, TEI, JATS, or another common vocabulary. This part shows how get the most out of the document content, and also covers the use of intermediate formats that can sometimes be useful to handle the lack of containment. The final exercise is to write the XSLT2 to transform the example document from the earlier exercise.

We provide some helper functions and model solutions. This class is based on XSLT2, and identifies features not available in XSLT1.

Creating ePubs

Taught by Lauren Wood.

The core (preferred) ePub syntax has a substantial overlap with XHTML. This class will touch on some of the major features. It will contain 'just enough' ePub information to allow you to create an ePub in the exercise. More in-depth information on ePub is in the 'Multiple Outputs from XML' class in the Publishing with XML course.

Automate, script, and unzip

Taught by Matt Patterson.

There are lots of steps involved with creating a website or ePub. Many of these can be automated using a scripting language. This class will show you how to use Ruby to automate those small tasks such as pulling the actual XML out of a Word XML file (which is really a zip file), copy the file to another directory, and run the XSLT transformation.

Putting it all together

Taught by Lauren Wood, Matt Patterson, Norm Walsh, and Peter Flynn.

This class will pull all the pieces together, using the HTML and CSS you designed to create a website (or ePub).