Re: how is this Strict valid?

Le 22 déc. 2006 à 22:48, Jasper Magick a écrit :
> According to this:
> http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.w3.org%2F
>
> w3.org validates Strict.  But, in the source code I found this:
> <h2 class="newsHeading"><a name="news" id="news" shape="rect">News</ 
> a></h2>

This is valid by spec definition.

<!ELEMENT a %a.content;>
<!ATTLIST a
   %attrs;
   %focus;
   charset     %Charset;      #IMPLIED
   type        %ContentType;  #IMPLIED
   name        NMTOKEN        #IMPLIED
   href        %URI;          #IMPLIED
   hreflang    %LanguageCode; #IMPLIED
   rel         %LinkTypes;    #IMPLIED
   rev         %LinkTypes;    #IMPLIED
   shape       %Shape;        "rect"
   coords      %Coords;       #IMPLIED
   >


> I thought NAME was replaced by ID in Strict doctypes, making NAME  
> no longer valid?

shape="rect" is an attribute which is in the dtd by default.


> Also couldn't you have archived the same effect with less code if  
> you did this:
> <h2 class="newsHeading" id="news">News</h2>

Yes that would be lighter. It sounds like the home page has been  
regenerated with an XSLT parser. which is usually agnostic about  
shape="rect".

-- 
Karl Dubost - http://www.w3.org/People/karl/
W3C Conformance Manager, QA Activity Lead
   QA Weblog - http://www.w3.org/QA/
      *** Be Strict To Be Cool ***

Received on Tuesday, 26 December 2006 00:50:08 UTC