Re: CAPTION in FIG element

Terry Allen (
Thu, 16 Mar 1995 12:38:19 PST

Chris wrote:
This gives an error:

<FIG src="c-chart.gif">
<caption align=bottom>Figure 1: An example natal chart.</caption>
Removing the line break between the close of FIG and the start of CAPTION
meant the file was declared valid.

<FIG src="c-chart.gif"><caption align=bottom>Figure (etc)

The error messages were less than helpful in spotting this. Is there anything
that can be done to stop this, or does SGML's handling of whitespace leave
something to be desired?

I'm using Draft: Mon 13-Mar-95 09:51:25, modified with that fix to
line 552. In the content model

<!ELEMENT FIG - - (OVERLAY*, CAPTION?, %body.content;, CREDIT?) -(FIG|IMG)>

the subelements could be OR'd, or some subset of %body.content; that
doesn't use free text could be substituted. (This is in non-Recommended
mode, BTW; the problem goes away in Recommended mode because %text;
is not part of %body.content; in Recommended mode.) Or the bug could
be left as is, to trip up those who don't use Recommended mode, as
we recommend.


Terry Allen  (   O'Reilly & Associates, Inc.
Editor, Digital Media Group    101 Morris St.
			       Sebastopol, Calif., 95472
occasional column at:

A Davenport Group sponsor. For information on the Davenport Group see or