- From: lilley <lilley@afs.mcc.ac.uk>
- Date: Thu, 16 Mar 1995 16:20:33 +0000 (GMT)
- To: dsr@hplb.hpl.hp.com
- Cc: www-html@www10.w3.org, html-wg@oclc.org
Is it just me being dumb, or what? I understood that the FIG element could contain overlays, a caption, some body text, and(recently added) a credit. Like this: <FIG SRC="url"><CAPTION>Figure 1: something</CAPTION> <P>Hello, you can't see my pretty picture</P> </FIG> Looking at the DTD (Draft: Mon 13-Mar-95 09:51:25) I see: <!ELEMENT FIG - - (OVERLAY*, CAPTION?, %body.content;, CREDIT?) -(FIG|IMG)> which (and I could well be wrong) I take to mean FIG is a container and can contain (0 or more) OVERLAY, (an optional) CAPTION, a required body.content (ie marked up text, roughly?) and (an optional) CREDIT. Is that right? Looking at <http://www.hpl.hp.co.uk/people/dsr/html/figures.html> this is also the impression I get. However, attempting to check some HTML 3 gives a different story: sgmls: SGML error at figures.html3, line 10 at ">": FIG end-tag implied by CAPTION start-tag; not minimizable sgmls: SGML error at figures.html3, line 10 at ">": Out-of-context CAPTION start-tag ended HTML document element (and parse) Huh? I don't understand this and I don't understand how SGMLS gets this from the DTD. If some kind soul could explain it to me, I would be grateful. Looking for an example to copy, I took the one on Dave's page cited above 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) cguhpc [87]: Right, Dave's example had HREF not SRC, ok slip of the keyboard I expect. But again it appears to be saying that you can't have a CAPTION inside a FIG. Why? Ah yes, the Draft: Mon 13-Mar-95 09:51:25 DTD gives some extra errors. Clues, people? cguhpc [87]: html-check dsr-fig-example.html3 dsr-fig-example.html3 ... sgmls: SGML error at /afs/mcc.ac.gb/users/cgu/cgu_sources/Dir9/html-check/lib/h tml-3.dtd, line 561 in declaration parameter 4: "TEXT" keyword invalid; declaration terminated sgmls: SGML error at /afs/mcc.ac.gb/users/cgu/cgu_sources/Dir9/html-check/lib/h tml-3.dtd, line 561 at "%": Invalid character(s) ignored; attempting to resume DOCTYPE subset sgmls: SGML error at /afs/mcc.ac.gb/users/cgu/cgu_sources/Dir9/html-check/lib/h tml-3.dtd, line 563 at "<": Invalid character(s) ignored; attempting to resume DOCTYPE subset plus the errors given above For those not familiar with html-check, it is a Mark Gaither/Dan Connolly production which goes: cguhpc [88]: more `which html-check` #!/bin/sh H=/afs/mcc.ac.gb/users/cgu/cgu_sources/Dir9/html-check/lib for i in $*; do echo $i ... 1>&2 # show file name on STDERR sgmls -s -m $H/catalog $H/html.decl $i && echo '... valid' 1>&2 done -- Chris Lilley +-------------------------------------------------------------------------+ | Technical Author, Manchester and North HPC Training & Education Centre | +-------------------------------------------------------------------------+ | Computer Graphics Unit, | Email: Chris.Lilley@mcc.ac.uk | | Manchester Computing Centre, | Voice: +44 61 275 6045 | | Oxford Road, | Fax: +44 61 275 6040 | | Manchester, UK. M13 9PL | X400: /I=c /S=lilley | | /O=manchester-computing-centre /PRMD=UK.AC /ADMD= /C=GB/| |<A HREF="http://info.mcc.ac.uk/CGU/staff/lilley/lilley.html">my page</A> | +-------------------------------------------------------------------------+ |This is supposed to be data transfer, not artificial intelligence. M VanH| +-------------------------------------------------------------------------+
Received on Thursday, 16 March 1995 13:18:19 UTC