A communiqué from Oleg Kiselyov reports on the availability of an XML parser construction kit and corresponding revised SXML specification. The 'Functional XML Parsing Framework' is a package of low-to-high level lexing and parsing procedures that can be combined to yield a SAX, DOM, validating parsers, or a parser intended for a particular document type. The procedures in the package can be used separately to tokenize or parse various pieces of XML documents. The package supports XML namespaces, character, internal, and external parsed entities, xml:space, attribute value normalization, processing instructions and CDATA sections. It is intended to be a framework, a set of 'Lego blocks' you can use to build a parser that follows DOM, SAX, or another discipline, and performs validation to any degree. As an example of such parser construction, the package includes a semi-validating SXML parser. It converts XML to SXML, an instance of XML Infoset as S-expressions, an abstract syntax tree of an XML document. SXML can be queried (in a XPath style), transformed, and evaluated. The framework parses XML in a pure functional style, as folding over a text XML document considered a spread-out tree. The input port is treated as a linear, read-once parameter. The framework's code does not use assignments at all."
From the web site description: "The package is tested on Gambit-C 3.0, SCM 5d2; see below for ports to many other platforms. The current version is 4.6, Mar 30, 2001. SSAX.scm [.scm, 107K] is the well-commented source code of the package. The code comes with an extensive set of self-tests, which verify not only the correct behavior but the detection of constraint violations as well."
- Functional XML Parsing Framework
- Definition of SXML: an instance of XML Infoset as S-expressions, an Abstract Syntax Tree of an XML document.
- XML and Scheme
- XML Information Set
- "XML and Scheme." A presentation at a Workshop on Scheme and Functional Programming 2000, Montréal, 17 September 2000.
- Contact: Oleg Kiselyov