Validations Show different Results when done through Javascript and when done by Direct Input on W3C website

Hi,

Requirement:
I have a scenario wherein I need to validate some html content placed inside a RadEditor Content Area on a SharePoint Portal Page (Content attached with this email). The content intentionally does not contain  a DocType Declaration.

Issue:
For this I have opted to use W3C validation and called it through javascript as mentioned below:

    var encodedContent = getRadWindow().ClientParameters;                                                                      // This gets the HTML content inside the RadEditor Content Area
    xmlHttp = CreateXMLHttpRequest();                                                                                                                   // Create XMLHttpObject for calling the webservice
    var params = "fragment=" + encodedContent ;                                                                                              // Output the result in HTML format
    xmlHttp.open("POST", "http://validator.w3.org/check", false);
    xmlHttp.setRequestHeader("Content-length", params.length)
    xmlHttp.send(params);
    document.getElementById('mainContentDiv').innerHTML = xmlHttp.responseText;                   // Display the result on the screen.

The resulting screen shows 2 Errors and 2 Warnings (highlighted in Red):
[cid:image002.jpg@01CC47DC.07E66A60]

But when the same content is validated on the W3C website as Direct Input,  1 Error and 4 Warnings are shown (highlighted in brown):
[cid:image006.jpg@01CC47DC.07E66A60]

Rest all the filter criteria remains the same viz. Encoding: UTF-8 and DocType: HTML 4.0.1 Transitional

Please let me know if this is an expected behaviour or a bug. Also please let me know what workaround should be followed to eradicate this issue.

Thanks & Regards,
Chandan Kumar Parmar
Avanade Technology Group
Accenture | Delivery Centres for Technology in India
AIM: aaryan20032003
Mobile: +91 97300 123 25
www.accenture.com<http://www.accenture.com/> | www.avanade.com<http://www.avanade.com/>

________________________________
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.

Received on Saturday, 23 July 2011 15:05:44 UTC