That Pesky Document Schema Picker: Part II

Posted on November 24, 2005  |  

Posted in Design

7 comments

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.

7 comments

Martin
on November 25, 2005

Why didn't you enter this issue on the product feedback website http://lab.msdn.microsoft.com/productfeedback/ _before_ the release?


Milan Negovan
on November 25, 2005

Martin, I did: FDBK25806 and FDBK25803.


Daniel Steigerwald
on November 25, 2005

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/


Mike Gale
on November 26, 2005

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.


Dave
on November 30, 2005

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.


Johan
on March 29, 2007

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. >.>


Tim
on February 11, 2009

Here it is 2009, using VS 2008 and the DOCTYPE in the page is still ignored.

Just pitiful...