Re: Re[2]: <FIG> implies <P>?

Ka-Ping Yee (kryee@novice.uwaterloo.ca)
Wed, 2 Aug 1995 00:23:46 -0400

In message [1], Daniel W. Connolly writes:

>We considered the possibility of expressing the above situation as:
>
> <p>The bond angle between the two oxygen-hydrogen
> bonds in water is slightly larger than that
> between two carbon-hydrogen bonds in methane
> (see <a href="fig1">figure 1</a>)<spot id=fig1anchor>. This
> is due to the two extra pairs of free electrons around the
> oxygen atom, which take up more space than the bound
> pairs.</p>
>
> <fig src="molecules.jpg" id="fig1" align="right" at="fig1anchor">
> figure 1 shows models of CO2 and H2O molecules
> </fig>
>
> This way, the content models aren't changed: <FIG> is still a
> peer of <P>. But the <spot> element allows the author to suggest
> where the figure should be anchored in the paragraph.

Just a question: would an ID="fig1anchor" attribute to the anchor also
work here (not to preclude <SPOT>, but as another way of doing this)?
Assuming this will be treated the same as any other hypertext reference,
an ID attribute to any tag should work.

On Fri, 14 Jul 1995, in message [2], Rodney Barnett wrote:
>
> Why restrict this discussion to figures if <FIG> and <P> are peers?
> Couldn't the mechanism above be generalized a little to allow textual
> sidebars or embedded lists? In other words, isn't this discussion really
> about taking two separate elements and expressing a containment
> relationship between them?

I'd definitely agree that more generalized thinking is called for.
(Though i wouldn't necessarily call this a containment relationship, but
a rendering suggestion to convey relation between figures and text.)

The simplest way this could be achieved -- without further extending the
DTD at all! -- would be to use the mechanism Dan Connolly described above
with a <FIG> element whose SRC was another HTML document. That document
could contain the inset text or embedded list, and would be rendered in
the space where an image might usually be rendered next to the main text.

For the sake of efficiency and convenience, it might be prudent to add
the condition that, when SRC is not specified, it is the *content* of
the <FIG> block which is to be rendered (again only extending the
interpretation of a document, but not the DTD itself). This is easy,
because we have already settled that <FIG> is a block-structuring peer
to <P> and thus guarantees we have an excerptable piece of HTML within.
Thus an embedded list could be achieved with

... I have to remember to buy <a href="#shoplist">some
groceries</a><spot id="shoplist-anchor"> before i go home today.

<fig id="shoplist" align="right" at="shoplist-anchor">
<ul>
<li>onions
<li>tomatoes
<li>apples
</ul>
</fig>

Assuming that browsers understand named references to ID values, i
believe there aren't any compatibility problems at all with this method.
Browsers which don't understand <FIG> at all would still render the
HTML; those which don't know what to do without a SRC might still
hyperlink the anchor to the list; and those which don't feel like
rendering the HTML as an embedded figure could render it where it
is, put it in a pop-up window, let the user activate the hyperlink, etc.

Opinions?

(In a previous message at [3], i explored some ideas about general
media inclusion in HTML. While the ideas above could be carried
further, they remain consistent with the thoughts i had in that messsage.
But -- since we've already got HTML within the <FIG> element, we can
at least make the easy step now!)

[1] http://gummo.stanford.edu/html/hypermail/www-html-1995q3/0212.html
[2] http://gummo.stanford.edu/html/hypermail/www-html-1995q3/0216.html
[3] http://www.acl.lanl.gov/HTML_WG/html-wg-95q2.messages/1230.html

Ping (Ka-Ping Yee): 2B Computer Engineering, University of Waterloo, Canada
kryee@csclub.uwaterloo.ca | 62A Churchill St, Waterloo, N2L 2X2, 519 886-3947
CWSF 89, 90, 92; LIYSF 90, 91; Shad Valley 92; DOE 93; IMO 91, 93; ACMICPC 94
: Amano Ai : Hayakawa Moemi : Hiyama Hikaru : Tendou Akane : Ayukawa Madoka :
WWW maintainer for the Canadian Space Agency - <http://www.dsm.sp-agency.ca/>