Skip navigation.

Overview of Codezone.comAll recent postsPage Events Raised Twice

That Pesky Document Schema Picker: Part II

Back in May we had a heated discussion over the document type picker in Visual Studio 2005 (beta 2 at that time). I cranked out a copy of the now released VS2005 and noticed that the picker did not change one bit. To my disappointment the changes I expected didn’t happen.

Document type picker in Visual Studio 2005

You will notice several standard Doctypes are missing from the list (if you are new to Doctypes, see my article What’s In Your DOCTYPE?). For example, when you start a new web project, you get XHTML 1.0 Transitional by default. If you select HTML 4.01 from the list, what are you validation the page against? XHML 1.0 Transitional, as defined on the page; HTML 4.01 Strict or HTML 4.01 Transitional?

The way it is set up right now, you validate against the schema selected from the picker, not the one defined on your page. Does anybody else think this is really confusing?

Next, HTML 4.01: is it Strict or Transitional? Where’s XHTML 1.0 Strict? Please, don’t tell me it’s the same as XHTML 1.1 (which is always strict, if you will). And who in hell still needs IE 3, NN 3 and NN 4? I’d wager 0.1% of people may need it, but why bake it in for the 99.9% of other developers? What a mess… :(

For the curious kind, all these schemas are located in Program Files\Microsoft Visual Studio 8\Common 7\Packages\Schemas\html. I’ve poked around a couple of them and realized that adding the missing ones would be very time consuming.

If this were a small insignificant issue, I wouldn’t even spend time typing this. But deciding which document type definition to go with and declaring the right DOCTYPE is the first step to not only staring a new web page, but a new web project. Whether you work in Quirks or Standards mode is important. This choice even affects how you manipulate DOM.

Traditionally, ASP.NET developers have known little about web standards, and have always had a lame and incorrect DOCTYPE in the template to confuse them: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">. The document schema picker creates even more confusion.

I met some folks from the ASP.NET team at the MVP summit, and I know they understand the importance of promoting web standards, but I just don’t get it why they are to stubborn on some important issues. I’m afraid this discussion is to be continued.

Comments

Comment permalink 1 Martin |
Why didn't you enter this issue on the product feedback website http://lab.msdn.microsoft.com/productfeedback/ _before_ the release?
Comment permalink 2 Milan Negovan |
Martin, I did: FDBK25806 and FDBK25803.
Comment permalink 3 Daniel Steigerwald |
Hi Milan, Since I use the new VS2005, one of first things what I did was disabling doctype validation. Its always select my For that reason I switch off this crappy validataing and use again this great FF extension http://users.skynet.be/mgueury/mozilla/
Comment permalink 4 Mike Gale |
Like you I'm surprised by the response to your two feedbacks.

If XHTML 1.0 Strict is almost like XHTML 1.1 then it's easier to add the extra one!

What's the use of validating against a standard DTD for a whole solution when the browser will look at the DOCTYPE when deciding what to do? Sometimes a site has different DTD's on different pages so the development tools must be flexible and smart enough to match.

It's a pity that you found this hard to modify. Without easy change we end up in the mess we've had with browser ID / DOCTYPE ID that's plagued us for so long time. This can only be a "negative sales point" for Microsoft. (It will also continue to encourage partial illiteracy among developers!)

(The responses I saw to your feedback look like throw-aways from somebody too busy to look at it and with no time to do something.)

I'll have to stick with my own tools to check ASPX pages and where necessary continue to throw away the easily produced, but flawed markup. A disappointment, I was hoping for better.
Comment permalink 5 Dave |
I agree that 1.0 Strict should be there, even when you change the dropdown to HTML 4.01 for instance, when you create a new page, it shows XHTML 1.0 as the doctype?

You'll probably find you will have to turn this feature off anyway as it makes the IDE very slow.
Comment permalink 6 Johan |
Microsoft has catching up to do, not only on understanding doctypes vs each other, but also doctypes in general. It's stuff like this that makes me hesitate about using an IDE instead of plain old notepad. That is, not the picker by itself, but the fact *no* IDE developers have any clue how to follow standards. It's also the reason I don't use the ASP.NET built in controls. Just look at that code output made by asp:Calendar.... Not only does it violate the XHTML Strict DTD, it's also butt-ugly. >.>

Emails and Notifications

Would you like to be notified when somebody responds to this post?  Would you like to have these comments emailed to you?

TrackBacks

1 456 Berea Street  |   
No XHTML 1.0 Strict in ASP.NET 2.0

Microsoft still has some catching up to do when it comes to understanding Strict DOCTYPEs and XHTML 1.0 vs. 1.1.

Sorry, TrackBacks are not allowed.

Submit your comment

Please enter only text since all HTML tags except hyperlinks will be stripped. Hyperlinks will become live links. Any comments with flaming or offensive language will be deleted. Be courteous to other posters. Thank you.

Your name (required):
Your email (optional):
Your site's URL (optional):
Enter this number
Type in the number above:
Comment (required):