Re: Emulation of XSL's id() in DSSSL?

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)
	(loop (cdr idstrlist)
	      (node-list targets (element-with-id (car idstrlist)))

 DSSSList info and archive:

Current Thread