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

Re: Formatting ASP.NET code

From: Tommi <tommiweb1@q1b.com>
Date: Wed, 14 Jul 2004 15:31:15 +0200
Message-ID: <40F535A3.5040307@q1b.com>
To: Cory Nelson <phrosty@gmail.com>
Cc: html-tidy@w3.org

I'm sort of trying to get around the limitations of ASP.NET 1.1 or to be 
more precise the limitations of VS.NET 2003 and it's insane HTML 
formatting features..

I've allready made a number of web applications that are XHTML compliant 
with asp.net, but the fact that it completely destroys your beautifull 
html formatting if you happen to wonder into the HTML design view, just 
kills me.

So, this is why I'm looking into using HTML Tidy to save the day :)

The --aspnet tag sounds like a good idea, but I still would prefer 
having a wildcard matching feature in the new-xxx-tag part: If it had 
wilcard matching, it could be used with other languages as well (eg. 
php*, something*, newlang* ..).

About the other problem I was having: I have a page with <asp:> tag 
inside the head and title part of the page:

<title><asp:literal ...

When I tidy this, it is moved into the body part and the head part is 
left with and empty <title></title>. Any idea why this happends?

As far as VS.NET 2005 goes (the Express edition you we're referring to): 
I've allready tried it out and it's wonderfull, but the reality is that 
it's still a beta product and you can't run any stuff you write with 
that live (it says so in the licence). So, until VS.NET 2005 comes out - 
all VS.NET users are stuck with the bug riddled 2003 version.

Cory Nelson wrote, On 14.07.2004 15:20:

> ASP.NET's controls are all written for HTML 4 so don't translate them
> into XHTML just yet, I'm pretty sure that'd come back to bite you in
> the ass.  ASP.NET 2.0 is written to use XHTML 1.1, you can get a free
> beta from the MSDN Express website.
> 
> The <asp:*> controls won't be recognised and afaik there currently
> isn't a way to get around that.  Reading wild cards would probably
> slow things down a lot, a better solution would be to:
> 
> make a --aspnet switch (or whatever) that makes it recognize all the
> asp:* tag names.  assuming the parser won't complain about the : in
> the tag, a patch for this could be easy...
> 
> read in the Register tags to see what user controls are allowed.  <%@
> Register TagPrefix="uc1" TagName="WebUserControl" %>, make it
> recognize <uc1:WebUserControl>.  This will be a bit more complex.
> 
> On Wed, 14 Jul 2004 14:50:46 +0200, Tommi <tommiweb1@q1b.com> wrote:
>> 
>> I'm trying to format ASP.NET source code files to be xhtml compliant and
>> the problem rises in how html-tidy wants to manage new-xxx-tags
>> (block-level, inline).
>> 
>> 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?
>> 
>> And then a feature suggestion: Wouldn't it be easier if new-xxx-tags
>> accepted wildcards?
>> asp:* would match all tags that start/close with asp:
>> This would be -really- helpfull for other script languages as well.
>> 
>> Cheers, T
>> 
>>
Received on Wednesday, 14 July 2004 09:31:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:54 UTC