Re: CheckHtmlEsis

On Wed, 22 Apr 1998, David Cary wrote:

> Here are a few things which I wish my validation tools would check:

Checking such things can be very important. But please do not call
general checking "validation", since the word "validation" has
fixed technical meaning for SGML based languages. The word "check"
is just fine for the broad everyday meaning.

> Once I forgot to put the terminating quote on a URI inside a <a></a>
> entity.

You mean an A element? (Most people will probably see what you mean,
but it would be better to avoid confusion by using correct terms.
An entity is, in SGML based languages, something quite different
from elements.

> Since ">" seems to be a valid character inside a string, ... my
> validation tools gave me error messages, but they were misleading. It took
> me a while to figure out the real problem.

Not surprising. You might have some fun in reading my "Why attribute
values should always be quoted in HTML, or the saga of the slashed
validators", http://www.hut.fi/u/jkorpela/qattr.html

> I wish my validators would warn me when "You forgot to put a 'alt'
> attribute inside this <img> tag". (same for the height and width
> attributes).

Well this is something a real validator can you for you. You just need
to specify a DTD which makes the attribute mandatory. The ALT attribute
is mandatory in IMG according to HTML 4.0 DTDs. (You could write a DTD
of your own which makes HEIGHT and WIDTH mandatory too. Or you could
use a checker. But I don't think it's a good idea to require such
attributes. They can in fact cause trouble on many graphic browsers
with images off.)

> Many people intend to make *every* graphic a link, so they would appreciate
> a program that listed which <img> tags were not wrapped in a <a></a> tag.

Again, if you like to do so, define a DTD which disallows IMG elements
outside A elements, or use a checker which has been programmed to check
for such things. Quite apart from this technical side, I'd say that the
very idea is crazy. Graphics should _not_ be links except in special
cases (e.g. thumbnails).

> I'm sure there are many other little things that a machine could easily
> check, but that current validators do not check.

Certainly. But most of the little (or not so little) things you have
in your mind are things that a validator is not allowed to report
as errors. A _checker_ (or linter or analyzer or whatever you like
to call it, as far as the name does not clash with a technical term
reserved for other user) can do anything people want it to do
as long as someone can do the programming - it could include spelling
checks (for data content), checking the facts presented, and the
beauty of the graphics. :-)

By the way, http://www.cast.org/bobby/ might be able to do many
things you are interested in. It seems to be overanxious to report
problems in some cases, though. And I suppose you should first validate
a document before asking Bobby to analyze it, since checkers usually
work best when the document has no reportable markup errors (in
the SGML sense, i.e. the document passes validation).

Yucca, http://www.hut.fi/u/jkorpela/

Received on Thursday, 23 April 1998 01:08:19 UTC