W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2007

Re: DocType Setting Effect

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 30 Aug 2007 03:00:11 +0200
To: "Jim Wiggs" <jim.wiggs@gmail.com>
Cc: html-tidy@w3.org
Message-ID: <pd5cd392nlb98o43s9o10gon878hnqqjlh@hive.bjoern.hoehrmann.de>

* Jim Wiggs wrote:
>   When you set the doctype value to strict, does this have any effect
>beyond controlling what DOCTYPE declaration tidy puts in its output?

Generally speaking it does not.

>Setting the doctype to strict does not seem to cause tidy to throw any
>errors when encountering invalid XHTML as opposed to warnings.  I'm
>not sure if it just doesn't do this, or if I'm just doing the wrong thing.

No, if you, for example, declare Strict in the document, and it actually
uses Transitional features, you would get a message that there is a mis-
match between the declared document type and the document's content. You
should not get diagnostics beyond that.

Also note that while Tidy can find many errors, it will silently ignore
many, for example, if you forget to close certain elements, or forget to
quote an attribute value, or, in some cases, if you use text content
where it is not allowed. If you are looking for a tool that discovers
all errors in a document, Tidy is not the right tool.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 30 August 2007 01:00:20 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:56 UTC