Forum Moderators: open

Message Too Old, No Replies

XHTML 1.1: What's wrong with <map>/usemap

Validator doesn't accept #mapname

         

waldemar

9:33 am on May 15, 2003 (gmt 0)

10+ Year Member



<img src="xxxxxxx" usemap="#mapname" />
<map id="mapname">....

is not accepted by the validator because of the #. I didn't find any alternative for this so far...

tedster

10:05 pm on May 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



waldemar, sorry your question has been hanging for two days. I did a bit of research and I can't find any more information. In fact, I found several XHTML 1.1 tutorials recommending exactly that format for the usemap attribute, but I get the same validator message you do:

character "#" is not allowed in the value of attribute "USEMAP"

Have you discovered anything more?

tedster

10:47 pm on May 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A bit more reading at the W3C uncovers some information. With XHTML 1.1, the value that the usemap attribute takes was redefined. It used to be a URI, but now it is an IDREF.

The leading hash mark was used when the map was defined elsewhere in the same document with a NAME attribute. But now in XHTML 1.1, the map is defined with an ID attribute and the leading hash is not allowed.

We're not the only ones who are stumbling on this. The issues seem to revolve around whether image maps should be allowed to be defined externally to the document.

W3C list correspondence [lists.w3.org]

waldemar

8:26 pm on Jun 2, 2003 (gmt 0)

10+ Year Member



Sorry, was offline the last two weeks.

Yep, I read also read about the switch from URI to IDREF, and no, unfortunately I did not find any workaround for it yet. Maybe we have to wait for another browser generation :-)