Subject: Re: passthrough and empty elements. From: Holger Klawitter <holger@xxxxxxxxxxxx> Date: Wed, 01 Dec 1999 15:08:14 +0100 |
> The pass-through construction makes an end tag to this element. Is > there any way to know from a node whether this is an empty tag or not? I solved this problem the following way: (define (is-in? elem lst) (if (null? lst) #f (if (equal? elem (car lst)) #t (is-in? elem (cdr lst)) ) ) ) (define (copy) (if (is-in? (gi (current-node)) *empty-elements*) (make empty-element attributes: (copy-attributes)) (make element attributes: (copy-attributes)) )) ; must be upper case! (define *empty-elements* '("BR")) AFAIK, there is no way to avoid hardcoding the empty elements. Hope this Helps, Holger Klawitter -- Holger Klawitter +49 (0)251 484 0637 holger@xxxxxxxxxxxx http://www.klawitter.de/ DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
passthrough and empty elements., Jon Haugsand | Thread | Re: passthrough and empty elements., Toby Speight |
RE: Rendering to PDF and PS, Gary Stainburn | Date | Re: passthrough and empty elements., Toby Speight |
Month |