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

Re: Formatting ASP.NET code

From: Lee Passey <lee@novomail.net>
Date: Thu, 15 Jul 2004 12:14:49 -0600
Message-ID: <40F6C999.2010908@novomail.net>
To: html-tidy@w3.org

Bjoern Hoehrmann wrote:

> * Tommi wrote:
>>It want's me to specify each ASP.NET control type as it's own tag:
>>asp:literal asp:placeholder and so on. Now for some weird reason all of 
>>the asp tags I have inside the documents <head></head> portion get moved 
>>inside the <body></body> tag after tidying. Am I missing something?
> The problem here is that HTML 4.01 is defined so that any element that
> is not defined to be allowed inside <head> causes the <head> element to
> be closed, the body element be opened and then processed, i.e.

It seems to me that the real problem is that Tommi is trying to use the wrong 
tool for the task. The goal of Tidy is to take "broken" HTML and make it valid 
HTML (or XHTML). Files containing <asp:*> tags are _not_ valid HTML, just as 
files output from M$word which contain <o:*> tags or <v:*> tags are not HTML. 
They may be useful, and they may be valid markup in some scheme that has 
extended HTML, but they are not valid HTML.

A better solution here may be to find a DTD which accounts for .ASP markup, 
and use a generic XML validator. Continuing to extend Tidy to tolerate 
non-HTML markup, no matter how common, does not seem to me to be the best 
Received on Thursday, 15 July 2004 14:15:44 UTC

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