Closed Bug 227441 Opened 21 years ago Closed 21 years ago

XHTML Strict/1.1 and image with usemap doesn't work

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: johannes, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

642 bytes, application/xhtml+xml
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 I've got the following valid XHTML 1.1 document from my current project: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <title>Title</title> </head> <body id="top"> <div id="functionaldiv"> <img src="_img/functional_navigation.gif" width="174" height="21" usemap="functionalmap" alt="" /> <map id="functionalmap"> <area shape="rect" coords="6,0,35,21" href="#1" alt="" /> <area shape="rect" coords="35,0,60,21" href="#2" alt="" /> </map> </div> </body> </html> The problem is that Mozilla doesn't use the given map for the image. It only works when I add a name attribute to the map: <map id="functionalmap" name="functionalmap"> Which is invalid XTHML of course. This should be fixed so that you can use both image maps and valid XHTML. Reproducible: Always Steps to Reproduce:
Attached file reporter's code
testcase
Your code works for me, 20031202 PC/WinXP. I'll bet a dollar you are serving your page as text/html and not application/xhtml+xml as is required for XHTML 1.1. Your code will not work as text/html. (View Page Info and check the Type field to see what your page is served as.)
Keywords: testcase
True. Actually I am opening the document from my file system (It will be an offline-project distributed on CD-ROM). From a server with application/xhtml+xml it works. I guess I should use another doctype then...
The MIME type of the document on the file system is determined by the MIME mapping of the host operating system, at least on Windows. So, if you save it as a .xhtml file, it should be recognised as application/xhtml+xml, while if you rename it to .html, it'll appear as text/html. Closing this as WORKSFORME based on comments, though please open another issue if there's something else that's not working correctly.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
v
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: