Re: Problem with validator and client side Image Map

Jukka K. Korpela wrote: 

You're using XHTML 1.1, which is incompatible with XHTML 1.0 and HTML 4

and, more seriously, with browsers.

  

Not correct.

Mozilla supports XHTML 1.1 ( http://www.mozilla.org/newlayout/xml/
<http://www.mozilla.org/newlayout/xml/>  )
So does Opera ( http://www.mozilla.org/newlayout/xml/
<http://www.mozilla.org/newlayout/xml/>  )

There may be others too.  IE6 doesn't specifically support XHTML 1.1
(along with a bunch of other things it doesn't support) but it seems to
cope satisfactorily with it all the same.  [ IE5 is essentially
obsolete, as are its forerunners and others such as Netscape 4.  But
they still have a go anyway. ]



The error message objects to

usemap="#fpmap0"

saying that '#' is not permitted  



Because in XHTML 1.1 that attribute's value must be an identifier.



  

but if I take the # out it validates - but doesn't work    



Quite right. (You currenly have a name="..." attribute in <map>, too.

It does not validate under XHTML 1.1, which requires you to use
id="...".

I haven't checked whether browsers would support id="...".)

This has hit on perhaps the main backward compatibility issue with XHTML
w.r.t HTML: the replacement of the 'name' attribute with 'id'.

I came across this issue on two of my pages.  As a workaround, the <map>
element needs both 'id' and 'name' attributes to work in a wide range of
browsers.  XHTML 1.1 does not allow 'name'.  So I chose to use XHTML 1.0
Transitional (which still allows 'name') for those pages. 

[ If you want to see one of them, open
http://www.whr.co.uk/maps/index.html
<http://www.whr.co.uk/maps/index.html>  and click on the interactive
aerial photo.  (Sorry about the broken icon - I've only just noticed it.
Fixed in the next upload.) ]



You started using XHTML 1.1, which is a specification written as an

exercise in futility. Upgrade to XHTML 1.0 or, better still, to

HTML 4.01.

  

This is in jest, right?  :-)

The older tag-soup SGML flavours of HTML are bettered by XML, IMHO (and
in my experience).  Having said that, Jukka is well respected for his
breadth and depth of knowledge on SGML and his website makes good
reading for detail markup issues.

The W3C position on XHTML is here:
http://www.w3.org/MarkUp/#recommendations
<http://www.w3.org/MarkUp/#recommendations> 
and here: http://www.w3.org/TR/xhtml11/introduction.html#s_intro
<http://www.w3.org/TR/xhtml11/introduction.html#s_intro> 

Sorry this has got off topic (validation & the W3C validator).
Rick :-)




-- 
Registered Office: Roke Manor Research Ltd, Siemens House, Oldbury, Bracknell,
Berkshire. RG12 8FZ

The information contained in this e-mail and any attachments is confidential to
Roke Manor Research Ltd and must not be passed to any third party without
permission. This communication is for information only and shall not create or
change any contractual relationship.

Received on Monday, 16 February 2004 13:25:34 UTC