|
Subject: Re: (dsssl) RE: (dsssl) siblings From: Brandon Ibach <bibach@xxxxxxxxxxxxxx> Date: Thu, 28 Feb 2002 10:49:54 -0600 |
Quoting DPawson@xxxxxxxxxxx <DPawson@xxxxxxxxxxx>:
> My confusion was primarily because I expected an element count,
> I'd forgotten that chars were also included in the node count.
> Hence my confusion, made worse by the fact that having (or not having)
> a DTD in use makes a difference to the result.
>
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).
-Brandon :)
DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: (dsssl) RE: (dsssl) siblings, DPawson | Thread | Re: (dsssl) RE: (dsssl) siblings, Dave Pawson |
| (dsssl) Fw: [OpenJade-devel] Develo, Paul Tyson | Date | Re: (dsssl) siblings, Paul Tyson |
| Month |