Callimachus 0.18 introduced an XProc implementation. XProc is an XML pipeline language and can be used to script the transformation of content such as SPARQL query results or XML data gathered from the Web. XProc is a W3C Recommendation.This page provides examples of XProc pipelines to perform common tasks.

The XProc Web site provides links to other materials, including a tutorial and examples. The XProc specification provides the complete details of the XProc syntax and should be consulted before using XProc for complex tasks. The purpose of this page is to ease your transition into XProc usage by providing a short tutorial.

Callimachus uses XProc as an extension mechanism. As of Callimachus 0.18, one can create PURLs that resolve to XProc pipelines. XProc replaces the Action with no side effects pattern that used an executable Turtle file to orchestrate the transformation of SPARQL query results to other formats via XSLT.

An XProc pipeline works similarly to other pipeline implementations: A series of "steps" are defined and the order of processing is step-by-step. Consider a Unix pipeline as an analogy:

$ cat README.txt | grep Callimachus > callimachus-refs.txt

That Unix pipeline consists of two steps (the 'cat' command and the 'grep' command. The first step echoes the contents of the file README.txt, which is passed to the 'grep' command. The 'grep' command outputs only those lines containing the word 'Callimachus'. Finally, the results are put onto the process' STDOUT and thus to a file. An XProc pipeline works in a similar manner. A number of steps are defined, the output of each becomes the input to the next. The equivalent of STDIN in XProc is called source and has zero or more XML documents. The equivalent of STDOUT in XProc is called result and has zero or more XML documents.