XHTML Compliance
Monday, February 20, 2006 4:50:14 PM
|
Rate this Content
|
|
0 Votes
|
I've been working hard on getting mojoPortal to XHTML compliance and I'm happy to report that now almost every page is valid XHTML 1.0 Transitional according to the W3C Validator. Some pages would even validate as XHTML 1.1 but since the FCKeditor only supports 1.0 I decided to use the 1.0 doctype. In .NET 1.1 is was not possible or at least very difficult to get XHTML compliance because the server controls in 1.1 were not intended to emit XHTML but now 2.0 .NET makes it all possible. I had to fix one minor bug in the .NET wrapper for FCKeditor to get it to validate correctly.
One thing about ASP.NET is that the server controls are built to downgrade gracefully on legacy browsers so if it can't detect the browser it will not render as XHTML which made it not validate just by pointing the validator at my site. Then thanks to google I found Barry Dorran's blog post where he created a w3cvalidator browser definition file for 2.0 .NET. You just drop it in your App_Browsers folder and recompile, then you can point the w3c validator at your site and it will render as it would for a high level browser, or in other words XHTML.
Until I got the browser definition in place I had to view the page in a browser like Firefox and then right click to get the source, save to disk and upload it to the validator but now with the link it is easy to find the pages that still need some work.
So I thought it might be interesting to survey the sites of some competing ASP.NET portal and framework projects and here is what I found:
Community Server uses XHTML 1.0 Frameset for the DOCTYPE and the validator reports 76 errors
DotNetNuke uses HTML 4.0 Transitional for the DOCTYPE and the validator says 148 errors
Rainbow Portal uses HTML 4.0 for the DOCTYPE and the validator reports 84 errors
interestingly even the ASP.NET site doesn't validate, it uses XHTML 1.0 Strict for the DOCTYPE and the validator finds 168 errors
I used Firefox to get the page source in testing each of these.
To be fair I have to say that the current releases of mojoPortal probably don't fare well at the validator either but the next release of the 2.x branch will be compliant. This site and mojoportal.com are running on the latest mojo code from svn and they are both validating nicely on most pages and thats something even the big boys can't say right now
