Dev puts validator through paces and finds oddities
The W3C has announced the launch of the Nu Markup Validation Service. It says the non-DTD-based markup validator is offered in parallel to the existing DTD-based validator. "The W3C Nu Markup Validation Service uses the same backend as the Validator.nu site, which is also the backend for the HTML5-checking feature of validator.w3.org," said a W3C statement. "The Nu Markup Validation Service is a separate, standalone validator that provides that same HTML5-checking feature while also offering a user interface that exposes additional options, such as full validation support for XHTML5 documents, and the ability to validate documents that contain features from RDFa Core 1.1 and from RDFa Lite 1.1."
Web designer and author Emily Lewis tested the new service for us, using a simple test page. Her initial impressions were mixed. "It doesn't seem to validate RDFa Lite. I can completely remove the vocab attribute and value, and my page will still pass. Similarly, I can remove the typeof attribute and value, and still pass. It does, though, catch typos. So if I just had voca, it catches that as an error. However, the original W3C validator catches this too," she said, adding as a caveat that she doesn't use RDFa or RDFa Lite in her general work, and so the demo might have some issues. "However, with microdata, it does seem to catch those required attributes. For example, if I don't include itemscope, I get an error because that attribute is required. And regarding HTML5 validation, I only used the new semantic elements on my test page and it validates those just fine. But so does the original W3C validator!"
In terms of a 'conformance checker', Lewis said she thought the new validator was as good as its predecessor, and she liked the visual display of errors and information, particularly the option to show source code with the results. "And it's cool to see that it automatically detects things like RDFa Lite and microdata on the page and, in turn, automatically includes those schemas for its validation." But she said it didn't 'validate' the way she expected for RDFa Lite and microdata: "When I first saw the news about Nu Validator, I was excited about those options. From years of writing microformats, I know how challenging it can be to remember the attributes, their values and the content/data that must be included for the microformat to be machine-readable. Tools like Optimus are invaluable for catching those instances where required attributes are missing. And that's what my expectation was for Nu Validator."
Instead, although the validator caught typos, it didn't catch required information: "For example, my test page has microdata for a person. But I can completely neglect to include the itemprop for the person's name, and I don't get a single error. In fact, I can neglect all itemprop values from the person example, and still validate with, essentially, no content/data. That doesn't make sense to me as a practitioner. Why would I have microdata for a person without the person's name?" Lewis was also unimpressed by the new options for choosing a parser or presetting schemas: "I have to admit they just confused me. What is the use case for validating a page written in HTML5, and then selecting the HTML 4 Strict parser option? It is entirely possible I'm not – or my projects aren't – the target for these options, though."