|
Subject: Re: Emulation of XSL's id() in DSSSL? From: Ralf Kempkens <kempkens@xxxxxxxxxxx> Date: Fri, 25 Feb 2000 19:18:01 +0100 |
Norman Walsh wrote:
>(let loop ((idstrlist (split (attribute-string "references")))
> (targets (empty-node-list)))
> (if (null? idstrlist)
> targets
> (loop (cdr idstrlist)
> (nodelist targets (element-with-id (car idstrlist))))))
Thank you, that helped a lot. Works perfectly.
My final version now looks like this:
;; usage for an XSL-like idref-set attribute 'refs'
;; (and a meaningful mode for the reference-list, e.g. bulleted list)
(with-mode result-reference
(process-node-list (ref-node-list (attribute-string "refs"))))
;; ref-node-list function from Norman Walsh
;; needs three functions from docbook's dblib.dsl
;;
(define (ref-node-list references)
(let loop ((idstrlist (split references))
(targets (empty-node-list)))
(if (null? idstrlist)
targets
(loop (cdr idstrlist)
(node-list targets (element-with-id (car idstrlist)))
))))
DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: Emulation of XSL's id() in DSSS, Norman Walsh | Thread | Re: Emulation of XSL's id() in DSSS, Toby Speight |
| RE: Counting Nodes, Peter Nilsson | Date | Re: Counting Nodes, Brandon Ibach |
| Month |