Re: Conflicting validation results

On Thu, 23 Feb 2006, David Gatwood wrote:

> One of the files is generating validation errors in the w3c validator but not 
> in xmllint's validator
> (xmllint --html --valid index.html).  Both tools are supposedly validating 
> against the same version of the HTML DTD.

Supposedly? A real markup validator uses the document type definition 
specified in the document, without supposing anything.

The word "lint" generally refers to an informal and often unsystematic 
checker, so I would not suppose anything called "xmllint" to perform
(markup) _validation_. Besides, the name suggests XML, and you are (quite 
adequately) not using XML but a (nominally) SGML-based version of HTML.

Thus, read the validator messages. The first message, for example, is 
quite understandable: "document type does not allow element 'BODY' here", 
because you have declared a Frameset DTD, where a HEAD element must not be 
followed by a BODY element but by a FRAMESET element.

In practice, it is best to consult first a suitable tutorial, reference, 
or specification on HTML in order to write a syntactically correct 
Frameset document, if that's what you want. Validators are best used to 
track down unintentional small syntax errors, rather than working with 
documents where the overall structure is syntactically wrong.

> I have attached the (relatively short) file below.

It would have been better to include just a URL.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Friday, 24 February 2006 05:59:59 UTC