node-list-filter-elements

Name

node-list-filter-elements -- Returns the elements in 'nodelist'

Synopsis

(node-list-filter-elements nodelist)

Description

Returns the elements in nodelist

Author

Norman Walsh, <ndw@nwalsh.com>

Source Code

(define (node-list-filter-elements nodelist)
  ;; Returns the elements in 'nodelist'
  (let loop ((result (empty-node-list)) (nl nodelist))
    (if (node-list-empty? nl)
	result
	(if (equal? (node-property 'class-name (node-list-first nl)) 'element)
	    (loop (node-list result (node-list-first nl))
		  (node-list-rest nl))
	    (loop result (node-list-rest nl))))))