Re: CAPTION in FIG element

James Clark (jjc@jclark.com)
Thu, 16 Mar 1995 19:12:05 +0000


Date: Thu, 16 Mar 1995 19:12:05 +0000
From: jjc@jclark.com (James Clark)
Message-Id: <9503161912.AA27648@jclark.com>
To: lilley@afs.mcc.ac.uk
Cc: www-html@www10.w3.org
In-Reply-To: <8158.9503161620@afs.mcc.ac.uk> (message from lilley on Thu, 16 Mar 1995 13:24:19 +0500)
Subject: Re: CAPTION in FIG element


> Date: Thu, 16 Mar 1995 13:24:19 +0500
> From: lilley <lilley@afs.mcc.ac.uk>
> 
> Looking at the DTD (Draft: Mon 13-Mar-95 09:51:25) I see:
> 
> <!ELEMENT FIG - - (OVERLAY*, CAPTION?, %body.content;, CREDIT?) -(FIG|IMG)>

...

> and wrapped it up with suitable doctype and so on, like this:
> 
>  <!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 3.0//EN//">
>  <html><head><title>Tester</title></head>
>  <body><h1>Tester</h1>
> 
>  <FIG HREF="nicodamus.jpeg"> 
>   <CAPTION>Ground dweller: <I>Nicodamus bicolor</I>
>   builds silk snares</CAPTION>
>   <P>A small hairy spider light fleshy red in color with a brown abdomen.
>   <CREDIT>J. A. L. Cooke/OSF</CREDIT>
>  </FIG>
> 
>  </body></html>
>  
> This gives the following errors when checked against the 
> (Draft: Wed 01-Mar-95 09:08:15) version of the DTD (old, I know. I shall 
> come back to that)
> 
>  cguhpc [86]: html-check dsr-fig-example.html3
>  dsr-fig-example.html3 ...
>  sgmls: SGML error at dsr-fig-example.html3, line 5 at """:
>         HREF = "nicodamus.jpeg" attribute ignored: not defined for this element
>  sgmls: SGML error at dsr-fig-example.html3, line 5 at """:
>         Required SRC attribute was not specified; may affect processing
>  sgmls: SGML error at dsr-fig-example.html3, line 6 at ">":
>         FIG end-tag implied by CAPTION start-tag; not minimizable
>  sgmls: SGML error at dsr-fig-example.html3, line 6 at ">":
>         Out-of-context CAPTION start-tag ended HTML document element (and parse)

Unless you use HTML.Recommended, %body.content includes #pcdata, so
FIG will have mixed content, so the white space before CAPTION will be
treated as #pcdata, but the content model doesn't allow a CAPTION
after #pcdata.