XML Query Algebra (November 1999 version)

Philip Wadler


This version of the algebra has been superseded by the July 2000 version.

Also see XML: Some hyperlinks minus the hype.


A Data Model and Algebra for XML Query

Mary Fernandez, Jerome Simeon, Dan Suciu, Philip Wadler. Draft manuscript, November 1999.

This note presents a possible data model and algebra for an XML query language.

Available in: pdf, ps, html.

The data model and algebra have been implemented in the functional programming language Haskell. We use a variant of Haskell that supports regular expression comprehensions. Mark Jones of OGI has been kind enough to prepare a version of his Hugs interpreter that supports the variant. You can download Hugs from the usual location, listed below. Then either download the hugs.exe file for Windows and use this to replace the hugs.exe file in the standard download, or make the following change in the Hugs source and recompile.

To compile the Hugs variant. Edit prelude.h and change the line that says:

   #define MONAD_COMPS   0
to:
   #define MONAD_COMPS   1
To confirm: just a one character change, 0 to 1. It's on about line 126.

Download data model and algebra in Haskell: Query.hs.

Download Hugs source and executables: Hugs.

Download Hugs variant for Windows: hugs.exe.


Philip Wadler,