| The Modular DocBook Stylesheets | ||
|---|---|---|
| Prev | DSSSL Library | Next |
(absolute-child-number snl)
Returns the child number, regardless of gi, of snl within its parent.
Isn't there a better way to get this?
The node (singleton node list) whose child number is desired.
Norman Walsh, <norm@berkshire.net>
(define (absolute-child-number snl)
;; Returns the absolute child number of the specified node
(let loop ((nl (children (parent snl))) (count 1))
(if (node-list-empty? nl)
#f
(if (node-list=? (node-list-first nl) snl)
count
(loop (node-list-rest nl) (+ count 1))))))| Prev | Home | Next |
| %library-version% | Up | ancestor-member |
Copyright © 1997, 1998 Norman Walsh