<RefEntry id="node-list-X3Estring"> <!-- This file is generated automatically from the DSSSL source. --> <!-- Do not edit this file! --> <?html-filename node-2-string.html> <RefMeta> <RefEntryTitle>node-list->string</RefEntryTitle> <RefMiscInfo Role="file">dblib.dsl</RefMiscInfo> </RefMeta> <RefNameDiv> <RefName>node-list->string</RefName> <RefPurpose>Return a string representation of the node list</RefPurpose> </RefNameDiv> <RefSynopsisDiv><Title>Synopsis</Title> <Synopsis> (node-list->string nodelist) </Synopsis> </RefSynopsisDiv> <RefSect1><Title>Description</Title> <para> Builds a string representation of the node list and returns it. The representation is </para> <para> "gi(firstchildgi()secondchildgi(firstgrandchildgi())) secondgi()..." </para> <para> This is a debugging function, in case that wasn't obvious...</para> </RefSect1> <RefSect1><Title>Author</Title> <para> Norman Walsh, <ndw@nwalsh.com> </para> </RefSect1> <RefSect1><Title>Source Code</Title> <ProgramListing> (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))) ")") "")))))) </ProgramListing> </RefSect1> </RefEntry>