Re: passthrough and empty elements.

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)
    (if (equal? elem (car lst))
      (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

 DSSSList info and archive:

Current Thread