[plt-scheme] Announce: WebIt! - An XML Collection (version 0.4)

From: Benderjg2 at aol.com (Benderjg2 at aol.com)
Date: Wed Jul 24 12:34:45 EDT 2002

The WebIt! collection supports the creation and processing of XML, HTML, and 
CSS using Scheme. The core of WebIt! is RS-XML, an abstract datatype for XML.
The WebIt! collection can be downloaded from 
  http://celtic.benderweb.net/webit/.

New in version 0.4 is a substantially expanded XML transformation system,
which allows one to write "macros" for transforming XML documents. One can
write traditional macros, micros, or Expansion Passing Style macros. (Normal
macros and micros are in fact implemented in terms of EPS macros.) Micros
and EPS macros give the programmer more control over the expansion/
transformation process.

Pattern matching of XML, similar to that of syntax-rules/syntax-case is now 
supplied as well. One can write a macro such as the following, to transform 
an XML element "book" (which in turn contains poem XML elements):
 (xml-macro book
   (xml-rules
      ; the input pattern
     ((_ title: bt
         (poem title: t poet: a tag: m
               (stanza (line l1) (line l) ...) ...) ...)
      ; the output template
      (xml-template
         (h4:html
          (h4:head (h4:title bt))
          (h4:body
            (h4:h1 bt)
            (h4:p) "Table of Contents:"
            (h4:ul (h4:li (h4:a h4:href: (string-append "#" m) t)) ...)
            (h4:div (h4:p) (h4:a h4:name: m) (h4:strong t) (h4:br) (h4:em a)
                    (list (h4:p) l1 (list (h4:br) l) ...) ...) ...))))))))

The documentation for the "XML macro" system is available online, without 
downloading the full webit collection: http://celtic.benderweb.net/excess/.

Other features of WebIt! include:
- an implementation of the XML Infoset, including support of namespaces, 
    which represents XML as structures rather than sexprs.
- libraries of element and attribute constructor functions (and predicates) 
    for HTML, XML Schema, and Scalable Vector Graphics (SVG)
- a library for a bibtex-like XML language ("Sbib")
- additional libraries can be produced by 'compiling' an XML Schema for the 
    new XML language(s)
- an embedding of Cascading Stylesheets (CSS)
- an implementation of the SXPath library, parameterized for RS-XML

WebIt! requires PLT Scheme v200.

Jim Bender




Posted on the users mailing list.