- From: Daniel W. Connolly <connolly@beach.w3.org>
- Date: Sun, 18 Feb 1996 23:30:16 -0500
- To: Abigail <abigail@tungsten.gn.iaf.nl>
- Cc: www-html@w3.org
In message <199602122315.AAA16878@tungsten.gn.iaf.nl>, Abigail writes: >You, Jonsm@aol.com wrote: >++ >++ I would suggest these categories: >++ >++ 1) Errors - pages containing severe errors like overlapping tags, >++ quote/comment problems. Any page that can't be parsed by a SGML system gets >++ this rating. This doesn't mean all of the tags/attributes will be understoo >d, >++ it just means that the page is not lexically correct. > >That's quite hard to do. While ><img src = foo.gif alt = "bla bla>Text <img src = foo.gif"> or ><!-- -- -- Comment comment -- --> Text text <!-- -- Foo --> >are most likely "errors", they _are_ correct SGML. But it's easy to issue warnings in these cases. For example, in the implementaiton accompanying "A Lexical Analyzer for HTML and Basic SGML," at: http://www.w3.org/pub/WWW/MarkUp/SGML/#sgml-lex I implemented a warning for missing quotes: excerpt from http://www.w3.org/pub/WWW/MarkUp/SGML/sgml-lex/sgml.l $Id: sgml.l,v 1.9 1996/02/07 15:32:28 connolly Exp $ /* <a href = ^http://foo/> -- unquoted literal HACK */ <ATTRVAL>[^ "\t\n>]+{ws} { ERROR(SGML_ERROR, "attribute value needs quotes", yytext, yyleng); ADD(SGML_LITERAL, yytext, yyleng); BEGIN(ATTR); } It would be simple enough to add warnings for the case of > within attribute value literals and comment declarations with multiple comments (e.g. <!-- xxx -- -- yyy -->) Dan
Received on Sunday, 18 February 1996 23:30:29 UTC