[whatwg] <map id="">

Michael A. Puls II shadow2531 at gmail.com
Wed Aug 8 11:21:00 PDT 2007

On 8/8/07, Ian Hickson <ian at hixie.ch> wrote:
> On Sat, 6 Jan 2007, Shadow2531 wrote:
> >
> > In Opera, regardless of mime type, Opera can match usemap="#test" to
> > <map id="test">, <map name="test"> or <map name="test" id="test">.
> > Whether Opera uses the map element with the name or the map element with
> > the id depends on which one comes first in the document.
> >
> > IE does the same.
> >
> > For FF Minefield, it strictly only matches an id in
> > application/xhtml+xml and strictly only matches a name attribute in
> > text/html.
> >
> > Allowing *both* id and name to match (in text/html at least ) per IE's
> > rules would be great for compatibility.
> >
> > As for application/xhtml+xml and the name attribute, I don't have much
> > of an opinion.
> >
> > Having to use name in text/html and id in application/xhtml+xml or both
> > if you're serving the page as text/html to some and
> > application/xhtml+xml to others means an extra tweak that could be
> > solved by allowing id to match in text/html.
> >
> > Just being able to use id regardless of the mime type would be the way
> > to go and name can be left for just for text/html for compatibility if
> > we don't want to allow it for application/xhtml+xml too like Opera does.
> Right now the spec requires that you use id="", but both name="" and
> id="" work, and they are case-insensitive. So we have back-compat (except
> in esoteric cases where pages expect it _not_ to match something, or where
> there are duplicates). Is that ok?
> The case-insensitiveness on ID could be a problem. Should that change?

Just wan to be sure:

Even though id is required, name is allowed on <map>. Correct? (It
currently needs to be for Safari and Firefox in text/html or image
maps won't work (even on trunk versions)

As for case:

match for id or name is case-insensitive regardless of mime type.

[Firefox and Safari]
match for id is case-sensitive
match for name is case-insensitive

match for name or id is case-insenstive.

So, it seems it might have to be case-sensitive for xhtml5 (since
other things are case-sensitive in xml)  and case-insensitive for
html5. (Unless there's no need to be case-sensitive for XHTML5. If so,
then Opera's way would be cool.)


More information about the whatwg mailing list