Re: Hyperlinks in OBJECT inclusions

On Thu, 20 Aug 1998, Braden N. McDaniel wrote:

> Consider the following:
[ an HTML document which does OBJECT inclusion of another
  HTML document, with the following error: ]

> 	<OBJECT DATA="inclusion.html" TYPE="text.html" WIDTH="320"

It should be "text/html", not "text.html". Interestingly,
(my copy of) IE 4.0 seems to treat the situation so that the
object cannot be included, i.e. displays the content of the
OBJECT element instead. Whether this is correct behavior or not
depends on the interpretation of the nature of the TYPE attribute,
which has been discussed at length.
 
> When I click on the link in the inclusion, what does the new resource
> replace? The entire host document (and inclusion), or just the inclusion?

A good question. Do I guess right when I assume you have noticed
what IE 4.0 does (namely the former), and you are wondering whether
such behavior is correct? More exactly, we can ask whether it is
a) _the_ correct behavior, b) _a_ correct behavior (among different
possibilities allowed by the spec), or c) incorrect behavior.

Let us first formulate a question at the presentation-independent level:
Assume document A contains an OBJECT element which refers, via the DATA
attribute, to an HTML document B, which contains a link (say, via A HREF)
to a document C. Is that link from A to C or from B to C?

Obviously, from B to C. It's difficult to find any reason to think
otherwise, especially with regard to the following:
"An embedded document is entirely independent of the document in which it
is embedded. For instance, relative URIs within the embedded document
resolve according to the base URI of the embedded document, not that of
the main document. An embedded document is only rendered within another
document (e.g., in a subwindow); it remains otherwise independent." 
( http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.5 ) 

But one may still ask whether it is an acceptable _implementation of 
links_ that when a link in an embedded document is followed, the
target document replaces the entire current content (the embedding
document).

The specifications mandate no particular implementation of links.
For instance, when a normal link is followed on a graphic browser,
the target document might be presented in the same window, in 
another existing window on the screen, in a new window, or in another
screen. 

Thus, my answer is that IE 4.0 behavior is b) _a_ correct behavior,
as far as the specifications are considered. And similarly, my answer to
the general question you asked is that both behaviors are within the
(vague) semantics defined in the specifications.

Which one is _better_, pragmatically? Hard to say. The dimensions
of the display area for the embedded document, whether set by the
WIDTH and HEIGHT attributes, or by a style sheet, or selected
by the browser, might be suitable for the embedded document but
unsuitable for a document it links to. Thus, although my first
intuitive reaction was to say it's more natural to display it in
that area (replacing just the embedded document), I'm not sure of it.
I wouldn't even say that the specification should be amended to
make a _recommendation_ or even a description of "typical implementation".
_If_ some recommendation were given, it could say that a browser
should, if possible, let the user follow links in such cases in
different ways, at least in the ways presented in the question
and so that the document is opened in a new window (if possible).

Yucca

Received on Thursday, 20 August 1998 03:22:08 UTC