STAXML
STAXML is a type system for the static verification of imperative script output to ensure it conforms to XML (or to particular XML applications).
The StaXML type systems allow program expressions to be statically typed with respect to their role in the structure of XML-based output languages. Unlike similar projects which support strong XML-typing of program output, StaXML does not impose a functional programming style upon the programmer; thus, it supports traditional web scripting idioms in which document content is progressivelt written to the output stream as a sequence of strings. By typing strings using the stacked type syntax and transforming the XML language's syntax into normalizations which can be applied to those stacks, we are able to capture several degrees of XML well-formedness in a compile-time type system; by further specializing these normalizations to particular XML schemata, we are also able to enforce correct element structure for particular applications of XML such as the XHTML language.
This project includes "StaXML for PHP", an implementation of the various StaXML type systems for the popular PHP4 scripting language. We have a working pre-compiler which supports application of several StaXML type systems to most of the core features of the PHP language, and is available for public use via a web gateway.
Implementations
Publications
[staxml:tr] Adam D. Bradley and Assaf J. Kfoury and Azer Bestavros, StaXML: Static Typing of XML Document Fragments for Imperative Web Scripting Languages, BU Computer Science Technical Report, BUCS-TR-2004-007, Boston, MA, 2004. [PDF] [PS]
[thesis] Adam D. Bradley, A Type-Disciplined Approach to Developing Resources and Applications for the World-Wide Web, Ph.D. Dissertation, Boston University, Boston, MA, 2004.

