<!doctype style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">

(element recursive
	 ; you may replace process-recursive2 by process-recursive
	 ; process-recursive is easier as process-recursive2 but does not change anything on the node-list
	 (process-recursive2 (children (current-node)))) ; calls recursive-function

; processes the node-list ndl without change
(define (process-recursive ndl)
	(if (node-list-empty? ndl)
		(empty-sosofo)								    ; End of recursion
		(sosofo-append
			(process-node-list (node-list-first ndl))
			(process-recursive (node-list-rest ndl)))))	; Recursive call

; adds !!! to every node with Gi "A"
(define (process-recursive2 ndl)
	(if (node-list-empty? ndl)
		(empty-sosofo)
		(sosofo-append
			(if (string=? (gi (node-list-first ndl)) "A")
				(literal (string-append "!!!" (data (node-list-first ndl))))
				(literal (data (node-list-first ndl))))
			(process-recursive2 (node-list-rest ndl)))))



