Re: empty-element?

Subject: Re: empty-element?
From: Daniel Speck <dspeck@xxxxxxxxxxxx>
Date: Fri, 10 Oct 1997 10:31:54 -0400
Jacco van Ossenbruggen wrote:
> How can I find out whether an element has a declared content
> of empty? I need this information in an SGML to SGML transformation using
> jade -t sgml to choose between the "element" or "empty-element" flow object.
> Jacco

There is a property named "must-omit-end-tag?" on nodes of class ELEMENT
can be used to see if the end-tag must be omitted (either because the
element has a content model of EMPTY or because it has a CONREF
attribute value specified):

(define (output-element #!optional (node (current-node)))
  (if (node-property "must-omit-end-tag?" node)
      (make empty-element
        attributes: (copy-attributes))
      (make element
        attributes: (copy-attributes))))


Daniel Speck                              e-mail: dspeck@xxxxxxxxxxxx
Research Engineer                          voice:     +1 301.548.7818
Thomson Technology Services Group            fax:     +1 301.527.4094
1375 Piccard Drive, Rockville, MD 20850      WWW:

 DSSSList info and archive:

Current Thread