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.

Received on Thursday, 16 March 1995 14:13:34 UTC