Re: relation of ISMAP to URL

Roy T. Fielding (fielding@avron.ICS.UCI.EDU)
Fri, 14 Apr 95 02:31:29 EDT

> I don't think the HTML 2.0 (or 3.0?) specification states how a
> browser should modify the anchor URL surrounding an ISMAP image when it
> sends the augmented URL to a server. That behavior seems to fall into
> a gray area between HTML and HTTP.

Not really -- it is an HTML user agent issue as to how to construct the
ISMAP URL such that it remains a valid URI. My Relative URL draft
won't help here either, since none of these are relative (and ISMAP does
not apply to the document's base URL).

I agree that this needs to be specified in the HTML 2.0 draft. I recommend
changing the ISMAP description of Section 7.3 (Image) as follows:

=======================================================================
ISMAP
The ISMAP (is map) attribute identifies an image as an image
map. Image maps are graphics in which certain regions are mapped
to URLs. By selecting different regions, different resources
can be accessed from the same graphic. Example of use:

<A HREF="http://machine/htbin/imagemap/sample">
<IMG SRC="sample.xbm" ALT="[menu]" ISMAP>
</A>

Graphical HTML user agents should implement an ISMAP image as
a "clickable map", where the x and y coordinates of the user's
pointing device at the time of a selection event are used to
modify the anchor's referenced URL, such that the coordinates are
appended as query information to the URL (after a question mark
"?" and separated by a comma ",") for the hypertext action. The
image coordinate origin (0,0) is in the upper-left corner, with
the x coordinate increasing from left to right and the y
coordinate increasing from top to bottom. Both dimensions are
expressed in units of pixels. For example, a selection event on
the sample image map above which occurs at 42 pixels right of
the image's leftmost column of pixels (x=42) and 123 pixels below
the image's topmost row of pixels (y=123), would result in a
hypertext reference of
"http://machine/htbin/imagemap/sample?42,123".

NOTE: The anchor href attribute value of the anchor enclosing
an image map must be a valid URL, must not already contain any
query information (as would be indicated by the presence of a
"?" character in the URL path), and must not contain any
fragment identifier (as would be indicated by the presence of
any "#" character). An anchor href which does not obey these
constraints may not be interpreted consistently by HTML user
agents.

Non-graphical user agents should render the text in the ALT
attribute (if available; "[ISMAP]" or "[IMAGE]" recommended
as a default) as normal hypertext, with the anchor href as the
hypertext link destination.

NOTE: In theory, a hypertext request to an image map URL not
containing any query information (i.e., a request without the
appended "?x,y" coordinate value), should result in an HTML
document which includes the image's possible destination URLs
as a simple menu for non-graphical HTML user agents. However,
many server implementations of image maps do not support this.

The ISMAP attribute is only effective when the IMG element is
enclosed within an Anchor element which specifies an HREF
attribute. ISMAP should be ignored if this is not the case.

=======================================================================

....Roy T. Fielding Department of ICS, University of California, Irvine USA
<fielding@ics.uci.edu>
<URL:http://www.ics.uci.edu/dir/grad/Software/fielding>