DSSSL Library Reference: Part of the Modular DocBook Stylesheet distribution
Prev |  | Next

# ancestor-member

## Name

ancestor-member -- Returns the first ancestor in a list of GIs

## Synopsis

    (ancestor-member nd gilist)

## Description

Returns the first ancestor of `nd` whose GI is a member of `gilist`.

## Author

Norman Walsh, <ndw@nwalsh.com>

## Source Code

    (define (ancestor-member nd gilist)
      ;; Returns the first ancestor in a list of GIs
      (if (node-list-empty? nd)
          (empty-node-list)
          (if (member (gi nd) gilist)
    	  nd
    	  (ancestor-member (parent nd) gilist))))

Prev | Home | Next
string-replace-list | Up | has-ancestor-member?