Re: (dsssl) RE: (dsssl) siblings

Subject: Re: (dsssl) RE: (dsssl) siblings
From: Dave Pawson <DaveP@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Feb 2002 17:27:14 +0000
At 10:49 28/02/2002 -0600, Brandon Ibach wrote:

   A quick solution for getting just the elements would be to wrap the
(siblings) call with something like:

(select-by-class (siblings) 'element)

   I don't recall what the support for (select-by-class) is in various
versions of Jade/OpenJade, so here's an off-the-top-of-my-head,
completely-untested implementation:

        (define (select-by-class nl sym)
          (node-list-filter (lambda (snl) (member sym
                                (list (node-property 'classnm snl)
                                  (node-property 'classnm snl rcs?: #t))))
                            nl))

   If you're missing node-list-filter, there's an implementation in
the standard (or the procedure library, I'm sure).

Got that one (node-list-filter).


Thanks Brandon.

Regards DaveP


DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist


Current Thread