Generic validation of structural content with parametric modules

author: Tyng-Ruey Chuang
publication date: September 2001
cite this with: Tyng-Ruey Chuang. Generic validation of structural content with parametric modules. In 2001 International Conference on Functional Programming (ICFP), pages 98-101. Florence, Italy. September 2001.
link this with: http://tsm.iis.sinica.edu.tw/papers/icfp01/
copyright: all rights reserved
category: Functional Programming
tag:
full paper: postscript

Abstract

We demonstrate a natural mapping from XML element types to ML module expressions. The mapping is inductive and definitions of common XML operations can be derived as the module expressions are composed. We show how to derive, in a generic way, the validation function, which checks an XML document for conformance to its DTD (Document Type Definition). One can view validation as assigning ML types to XML elements and the validation procedure a pre-requisite for typeful XML programming in ML. Our mapping uses the parametric module facility of ML in some contrived way. For example, in validating WML (WAP Markup Language) documents, we need to use 36ary type constructors, as well as higher-order modules that take in as many as 17 modules as input. That one can systematically model XML DTDs at the module level suggests ML-like languages are suitable for type-safe prototyping of DTD-aware XML applications.

 
papers:icfp01:home Last modified: 2007/10/26 15:16