Cover page images (keys)

Publishing in Style with XML

Liam Quin, <liam@w3.org>

Publishing in Style with XML

Publishing in Style with XML

Context:

XSL-FO is not dead…

But not many people want to work on it today. …

CSS for print is not total crap …

We’re making CSS better …

Here are some notes on whether & how to move.

Open Web Platform

Open Web Platform and Publishing

Open Web Platform and Publishing

Grandma’s CSS

Not Aunt Tillie’s CSS Either

OWP and Gaps

OWP and Gaps

Until now

W3C and Publishing

W3C and Publishing

XSL-FO Workflow

XSL-FO Workflow

A “traditional” way from XML to print:

[XML via XSLT to XSL-FO and thence via an FO renderer to Beautiful PDF]

XML CSS Workflow

We want to format XML with CSS:

[trying to format XML with CSS]

CSS Workflow Redux (1)

CSS is really meant for styling HTML …

[trying to format XML with CSS]

CSS Workflow Redux (2)

CSS is really meant for styling HTML …

[trying to format XHTML into books with CSS]

XHTML CSS Workflow Considered Sad

Practical XHTML CSS Workflow

Transform to XHTML and then apply CSS:

[format XML to XHTML with XSLT and thence with CSS to PDF]

Some XSL-FO and HTML/CSS differences

Page Masters and Mistresses

[XSL-FO simple page master]  [CSS page box with margin boxes and content area]

Formatting Books

Some Formatting Example Aspects

Defining the page

@page {
  size: A4;
  /* or,
   * width: 21cm;
   * height: 29.7cm;
   */
}
@page:left {
  @top-left {
    content: "Page " counter(page);
  }
}
@page:right {
  @top-right {
    content: "Page " counter(page);
  }
}

Static Page Content

The Table of Contents

ToC Markup and Style

div.contents ul li a:after {
  content: " " leader(dotted) " " target-counter(attr(href, url), page);
}
<div class="contents">
  <h1>Table of Contents</h1>
  <ul><li><a href="#preface">Preface</a></li>
      <li><a href="#c1">Chapter One</a></li>
  </ul></div>
Table of Contents

Preface . . . . . . . . . . . 7
Chapter One  . . . . . . . . 11

Selectors

Baseline positions

Indexes

OpenType Support

OpenType Support

So is it a good idea?

Publishing, W3C and the Open Web Platform

Publishing, W3C and the Open Web Platform

Ever Vigilant

Ever Vigilant

Questions, Discussion, Comments

Questions, Discussion, Comments

Photo Credits

All images are from fromoldbooks.org (an image site maintained by the author of this presentation) or by Liam Quin, except the viewport illustration from XSL-FO and the Open Web Platform logo from openwebplatform.org.