- From: Jukka K. Korpela <jkorpela@cs.tut.fi>
- Date: Tue, 29 Jan 2002 00:51:17 +0200
- To: www-html-editor@w3.org
[posted to comp.infosystems.www.authoring.html and mailed to www-html-editor@w3.org] In message news:a33jn8$12s$1@mordred.cc.jyu.fi Ville Seppänen <rissepp@itu.st.jyu.fi> wrote: > The problem is that a document which contains a client-side imagemap > does not validate as XHTML 1.1. I have used <img usemap="#mymap" ... > /> and later <map id="mymap">. > > While validating it as XHTML 1.1 an error is > > Error: character "#" is not allowed in the value of attribute > "usemap" > > However, the same document validates as XHTML 1.0 Transitional and > Strict. Any ideas what is wrong? I havent found any hints that would > suggest this is changed in 1.1 and usemap's correct value still seems > to be idref (URI). This is confusing, and what might be done to reduce the confusion is a correction to the XHTML 1.1 specification, which is why I'm sending a copy of this to maintainer of that document. In XML (as well as in SGML), when an attribute is declared to take IDREF value, the value must be an identifier as such, without any # prefix, and an identifier that is defined elsewhere in the document in an ID attribute. More formally: "Validity constraint: IDREF Values of type IDREF must match the Name production, and values of type IDREFS must match Names; each Name must match the value of an ID attribute on some element in the XML document; i.e. IDREF values must match the value of some ID attribute." http://www.w3.org/TR/2000/REC-xml-20001006#idref In XHTML 1.0, the usemap attribute in <img> is declared as %URI whereas in XHTML 1.1 it is declared as IDREF. The same applies to some other attributes as well, like usemap in <img>. I haven't studied the differences systematically, but surely there are changes that should be listed at http://www.w3.org/TR/xhtml11/changes.html#a_changes It is not sufficient to mention that "On the a and map elements, the name attribute has been removed in favor of the id attribute". Related actual changes elsewhere should be explicitly mentioned too. A clarifying reference could be made to <http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/ abstract_modules.html#s_imapmodule> This is a real change that makes some valid XHTML 1.0 documents invalid under XHTML 1.1. In the other direction, things are different, since usemap="foo" is valid in XHTML 1.0 but lacks useful meaning, since the semantics is as defined in HTML 4.01: "usemap = uri [CT] This attribute associates an image map with an element. The image map is defined by a MAP element. The value of usemap must match the value of the name attribute of the associated MAP element." <http://www.w3.org/TR/1999/REC-html401-19991224/struct/objects.html# adef-usemap> The semantic change should be noted too. XHTML specifications generally make normative references to HTML specifications as regards to semantics, and here the reference needs to be modified suitably. -- Yucca, http://www.cs.tut.fi/~jkorpela/ Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
Received on Monday, 28 January 2002 17:51:19 UTC