Subject: RE: (dsssl) loop problem From: "Maltby, David G" <david.g.maltby@xxxxxxxx> Date: Tue, 04 Sep 2001 13:17:59 -0400 |
You don't need the (make sequence ... ) since your not making a sequence of sosofos. That is, (define (f_make-entities) (let loop( (nl (select-elements (descendants (current-node)) "MYELEMENT")) (str "")) (if (node-list-empty? nl) str (loop (node-list-rest nl) (string-append str "information from this nodelist element"))))) should return a string. HTH, David > -----Original Message----- > From: Lutz Pliske [mailto:pliske@xxxxxxxx] > Sent: Tuesday, September 04, 2001 12:03 PM > To: dssslist@xxxxxxxxxxxxxxxxxxxxxx > Subject: (dsssl) loop problem > > > Hi there, it´s probably easy but I don´t get the problem: > > I want this function to return a string that was built while looping > thrue the nodelist and picking an informatin from every member of this > nodelist. I start with a "" and then add all the following > strings with > a string-append. When the looping is finished the function > will return a > string with all the values. Well - not like this: > > (define (f_make-entities) > (let loop((nl (select-elements (descendants (current-node)) > "MYELEMENT"))(str "")) > (if (node-list-empty? nl) > str > (make sequence > (loop (node-list-rest nl) (string-append str "information > from this nodelist element")) > ) > ) > ) > ) > > I am getting "this context requires a text-sosofo". So I tried a > (literal "information from this nodelist element"). That didn´t help. > > Please help .... > > Greetings Lutz > > > DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: (dsssl) loop problem, Paul Tyson | Thread | (dsssl) Unicode input transforms in, Lutz Pliske |
(dsssl) loop problem, Lutz Pliske | Date | Re: (dsssl) loop problem, Paul Tyson |
Month |