Subject: Re: Problems with attributes. From: Brandon Ibach <bibach@xxxxxxxxxxxxxx> Date: Thu, 21 Oct 1999 10:47:46 -0500 |
Quoting Reyes <reyes.garcia@xxxxxxxxxx>: > At 15:53 20.10.99 -0500, you wrote: > Hi! > > I have understood the problem with the list. Before to recieve this message > I have used (append list-att (list (attribute-string att (node-list-first > nl)))) and this works good [ like (cons ...) I think ]. > Yes, the (append) expression above would do the trick as well. The only difference would be that the (append) would add new elements on to the end, instead of the beginning, of the list. For purposes of use with (member), however, this doesn't matter. > I have thougth in this problem, I have try to solve using > (node-list-contains? ...) : > > (define (node-list-contains? nl snl) > (node-list-reduce nl (lambda (result i) > (or result (node-list=? snl i))) #f)) > > but gave me an error in (node-list-reduce ...) [ didn't understand ]. > Actually, this looks fine. What error did you get? > Then I have used (node-list=? ...). The final procedure is the next: > > [...] > (if (node-list=? (node-list-first result) > (ancestor tag n)) > [...] > > This works good and "my head is on my shoulders", thank goodness!! :-) > This looks good, but it won't eliminate all duplicates, as it only compares the node-to-be-added to the first node in the result list. If you can figure out what's wrong with your node-list-contains?, that would be superior. On that note, Jade 1.3 implements *all* of the node-list operations natively. > Thanks for all and "see you later", > My pleasure... good luck! -Brandon :) DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Problems with attributes., Reyes | Thread | Re: Problems with attributes., Reyes |
Re: Hopefully simple -- include a q, Adam Di Carlo | Date | Re: Hopefully simple -- include a q, Matthias Clasen |
Month |