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

Re: Formatting ASP.NET code

From: Tommi <tommiweb1@q1b.com>
Date: Thu, 15 Jul 2004 08:09:21 +0200
Message-ID: <40F61F91.1070704@q1b.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: html-tidy@w3.org

If checking for the closing </head> tag is cumbersome, how about making 
a new switch called "new-script-tag"?

We could give this tag the ability to recognise the wildcard tags as 
discussed and still keep the old new-blocklevel-tag and others operating 
as is.

Would it be possible to define a new group of tags like this that would 
not be moved from the head segment?

In the example case I have the <asp: tags in the head segment for a 
reason: the page is dynamic and those segments get filled out with data 
from the server side when the page is processed. Would Tidy behave the 
same if the tag was an ASP script tag <% ... %> ?

I think if we can add a feature like this to Tidy it would really bring 
a whole new area of uses for it, especially inregards to integrating it 
with various web development IDE's etc.

Bjoern Hoehrmann wrote, On 15.07.2004 00:24:
> * 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.
>   <head><title>...</title><unknown>...
> would be processed as if it were
>   <head><title>...</title></head>
>   <body><unknown>...
> Tidy does not know that your custom elements are allowed inside <head>
> so it assumes they are not. So Tidy behaves as designed. We could make
> a new configuration option to state which elements are allowed inside
> <head> to solve this. We could also make it so that Tidy looks whether
> there is a following </head> and assume that </head> is not misplaced,
> but that would require major changes to the code. Do you have anything
> else in mind to solve this problem?
Received on Thursday, 15 July 2004 02:09:25 UTC

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