Subject: Re: breakup (was: Issues with literate programming DSSSL Script) From: Simon Pepping <spepping@xxxxxxxxxxxxxxxx> Date: Thu, 23 Dec 1999 10:57:41 +0100 |
On Tue, Dec 21, 1999 at 06:23:39PM -0600, Brandon Ibach wrote: > > (define breakup (lambda (#!optional (nl (children (current-node)))) > (let loop ((n nl) (s "") (r '())) > (if (node-list-empty? n) > (if (< 0 (string-length s)) (append r (list s)) r) > (let* ((cn (node-list-first n)) (c (node-property 'class-name cn))) > (loop (node-list-rest n) > (if (not (equal? 'data-char c)) "" > (string-append s (string (node-property 'char cn)))) > (if (equal? 'data-char c) r > (append r (if (< 0 (string-length s)) (list s) '()) > (list cn))))))))) This is a very useful procedure to break up mixed content nodes. Would it not be a good idea to make it part of the procedures library? > (element scrap > (let loop ((c (breakup)) (r (empty-sosofo))) > (if (null? c) r (loop (cdr c) (sosofo-append r > (if (node-list? (car c)) (process-node-list (car c)) > (make formatting-instruction data: (car c)))))))) My SGML backend does not pass on the data; the TeX backend does. > Hope this makes sense (and works). :) > > -Brandon :) Simon Pepping -- Simon Pepping email: spepping@xxxxxxxxxxxxxxxx DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Issues with literate programmin, Brandon Ibach | Thread | Re: breakup (was: Issues with liter, Brandon Ibach |
Re: Issues with literate programmin, Brandon Ibach | Date | OpenSP-1.4-pre2 released, Matthias Clasen |
Month |