This Scheme library provides syntactic forms for pattern matching of SXML, in a "by example" style reminiscent of the pattern matching of the syntax-rules and syntax-case macro systems. Three macros are provided: sxml-match, sxml-match-let, and sxml-match-let*.
Compared to a standard s-expression pattern matcher, sxml-match provides the following benefits:
The present library is a descendant of WebIt!, and was inspired by an s-expression pattern matcher developed by Erik Hilsdale, Dan Friedman, and Kent Dybvig at Indiana University.
Three versions of the implementation are provided below, supporting a range of Scheme implementations.
Download:
Via PLaneT (for v299.x-3xx):
Compatible with (Petite) Chez Scheme, SISC, and Chicken. This version requires a recent version of the Kent Dybvig's portable syntax-case, supporting modules.
Download:
This version is compatible with older versions of portable syntax-case. This version is known to work under Gambit, Guile, and SCM.
Download: