DSSSL Library Reference: Part of the Modular DocBook Stylesheet distribution
Prev |  | Next

# node-list->string

## Name

node-list->string -- Return a string representation of the node list

## Synopsis

    (node-list->string nodelist)

## Description

Builds a string representation of the node list and returns it. The representation is

"gi(firstchildgi()secondchildgi(firstgrandchildgi())) secondgi()..."

This is a debugging function, in case that wasn't obvious...

## Author

Norman Walsh, <ndw@nwalsh.com>

## Source Code

    (define (node-list->string nodelist)
      ;; Return a string representation of the node list
      (let loop ((nl nodelist) (res ""))
        (if (node-list-empty? nl)
    	res
    	(loop (node-list-rest nl)
    	      (string-append res
    			     (if (gi (node-list-first nl))
    				 (string-append
    				  (gi (node-list-first nl))
    				  "("
    				  (node-list->string
    				   (children (node-list-first nl)))
    				  ")")
    				 ""))))))

Prev | Home | Next
normalize | Up | include-file