8.3 (sxml fold)

8.3.1 Overview

(sxml fold) defines a number of variants of the fold
algorithm for use in transforming SXML trees. Additionally it defines
the layout operator, fold-layout, which might be described as a
context-passing variant of SSAX's pre-post-order.

8.3.2 Usage

— Function: foldt fup fhere tree

The standard multithreaded tree fold.

fup is of type [a] -> a. fhere is of type object -> a.

— Function: foldts fdown fup fhere seed tree

The single-threaded tree fold originally defined in SSAX. See (sxml ssax), for more information.

— Function: foldts* fdown fup fhere seed tree

A variant of foldts that allows pre-order tree
rewrites. Originally defined in Andy Wingo's 2007 paper,
Applications of fold to XML transformation.

— Function: fold-values proc list . seeds

A variant of fold that allows multi-valued
seeds. Note that the order of the arguments differs from that of
fold.

— Function: foldts*-values fdown fup fhere tree . seeds

A variant of foldts* that allows multi-valued
seeds. Originally defined in Andy Wingo's 2007 paper, Applications
of fold to XML transformation.