Fwd: W3C validator and ASP.NET __VIEWSTATE

Hi David,

I have forwarded your mail to the validator mailing-list. There should 
be some people more familiar with the html validator  than I am to help 
you. All I can say is that your page should not validate and you should 
see messages like: value of attribute "ID" invalid: "_" cannot start a 
name. I am pretty sure there are no exceptions made for .Net websites.


-------- Message original --------
Sujet: 	W3C validator and ASP.NET __VIEWSTATE
Date : 	Fri, 14 May 2010 11:37:31 +0100
De : 	MILLIER, David <David.Millier@nao.gsi.gov.uk>
Pour : 	tgambet@w3.org <tgambet@w3.org>

Hi Thomas

I have no idea whether you are the correct person to contact so forgive 
me if I have this completely wrong!

I'm a web developer at the UK's National Audit Office and a few years 
ago my organisation published some reports about the provision of 
government services via the web that was quite influential in informing 
government policy on UK public sector websites. One of the 
recommendations that is now mandatory for all UK public sector sites is 
that have to be WCAG 1.0 AA compliant by this year. Obviously for 
reputational reasons this rule particularly applies to our own website 
here at the National Audit Office.

Imagine then, my horror this week when I discovered that every one of 
our pages fails to meet AA standards because they do not validate 
successfully to xhtml 1.0 strict as they are supposed to. We had, until 
this week complacently believed that they did because they pass the W3C 
validation check successfully.  However, they shouldn't.  Our website 
uses a content management system called Immediacy (recently renamed 
Alterian) which sits on a Microsoft .Net platform.  .Net outputs special 
tags for state management (eg VIEWSTATE) that use ID attribute values 
that start with a double underscore (eg id="__VIEWSTATE"). According to 
the W3C standard section C, id attributes are SGML tokens not CDATE data 
types and can only start with alphabetical characters, not underscores. 
Therefore, our pages should fail validation using the W3C validator. But 
they don't. However they are failing other validator programs such as 
the Sitemorse checker that we subscribe to to give us monthly 
assessments of our code quality.

My question is: have I misunderstood something in the standards that 
means the W3C validator makes the correct interpretation or is the 
situation as I think it is in that the validator is wrong. If it is 
wrong, is this simply a bug or is there something else going on (eg an 
official exception being made for .Net sites).  My dilemma at the moment 
is that based on the information I currently have, it appears that is is 
impossible for any .Net site to correctly validate.

I look forward to any advice you have or if you are the wrong person, I 
be grateful for suggestions as to whom I could consult.

Many thanks

Dave Millier

Web developer

National Audit Office


Received on Friday, 14 May 2010 13:22:04 UTC