Steps

Steps are some kind of interstations which process the XML documents within a XProc flow. In combination with the respective ports, a pipeline is generated through them.

XProc steps

Figure: XProc steps

Each step has an input and an output from which an output document can be provided for the next step. There are three types of steps in XProc (Atomic Steps, Compound Steps and Multi-Container Steps).

The XProc specification describes a whole series of steps with different functions. Some of them are required (“Built-In“, “Standard Step“) and have to be able to be processed by the appropriate implementations (e.g. Calabash, Calumet). Others are optional which means the processors do not necessarily have to use them (currently, Calabash and Calumet support all steps defined by the W3C).

In addition you can create separate steps. There are two possibilities. Either they are put together from the existing XProc steps. A separate pipeline which appears as step in another pipeline. Or the separate step is developed in a high-level language, preferably in Java, because that code has to be embedded in one of the established processors (at present, all of them are written in Java). However, all self-developed steps have to get their own namespace because they are not part of the official XProc namespace.

In the following pages the individual (W3C) step variants will be introduced in both theory and practice. All examples, unless otherwise noted, refer to the following XML document “FilmCollection.xml“.

<?xml version="1.0" encoding="UTF-8"?>
<FilmCollection>
  <Film>
    <Title>Star Wars: Episode IV - A New Hope</Title>
    <Year>1978</Year>
    <Genre>SciFi</Genre>
    <Director>George Lucas</Director>
    <Producer>George Lucas</Producer>
    <Cast>
      <LeadingActor>Mark Hamill</LeadingActor>
      <LeadingActor>Harrison Ford</LeadingActor>
    </Cast>
    <Duration>121 min</Duration>
    <Author>George Lucas</Author>
  </Film>
  <Film>
    <Title>Eraserhead</Title>
    <Year>1976</Year>
    <Genre>Horror</Genre>
    <Director>David Lynch</Director>
    <Producer>David Lynch</Producer>
    <Cast>
      <LeadingActor>Jack Nance</LeadingActor>
      <LeadingActor>Allen Joseph</LeadingActor>
    </Cast>
    <Duration>89 min</Duration>
    <Author>David Lynch</Author>
  </Film>
  <Film>
    <Title>Unforgiven</Title>
    <Year>1992</Year>
    <Genre>Western</Genre>
    <Director>Clint Eastwood</Director>
    <Producer>Clint Eastwood</Producer>
    <Cast>
      <LeadingActor>Clint Eastwood</LeadingActor>
      <LeadingActor>Gene Hackman</LeadingActor>
    </Cast>
    <Duration>131 min</Duration>
    <Author>David Webb Peoples</Author>
  </Film>
</FilmCollection>