Re: Problems with attributes.

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
  • Re: Problems with attributes., (continued)
    • Brandon Ibach - Tue, 19 Oct 1999 16:38:10 -0400 (EDT)
      • Reyes - Wed, 20 Oct 1999 05:18:10 -0400 (EDT)
        • Brandon Ibach - Wed, 20 Oct 1999 16:48:24 -0400 (EDT)
        • Reyes - Thu, 21 Oct 1999 08:34:57 -0400 (EDT)
        • Brandon Ibach - Thu, 21 Oct 1999 11:46:16 -0400 (EDT) <=
        • Reyes - Fri, 22 Oct 1999 02:25:47 -0400 (EDT)
        • Brandon Ibach - Fri, 22 Oct 1999 04:08:57 -0400 (EDT)
        • Reyes - Fri, 22 Oct 1999 05:22:23 -0400 (EDT)
        • Reyes - Fri, 22 Oct 1999 05:23:03 -0400 (EDT)