A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

Validator.nu Web Service Interface

From WHATWG Wiki
Revision as of 17:28, 27 November 2007 by Hsivonen (talk | contribs) (Compression)
Jump to navigation Jump to search

Validator.nu can be called as a Web service. Input and output modes can be chosen completely orthogonally. Responses can be optionally compressed.

Input Modes

For most Web service use cases, you should probably POST the document as the HTTP entity body.


Not Implemented

  • Document in a data: URI as a GET parameter.
  • application/x-www-form-urlencoded

Output Modes

When using Validator.nu as a Web service back end, the XML and JSON output formats are recommended for forward compatibility. The available JSON tooling probably makes consuming JSON easier. The XML format contains XHTML elaborations that are not available in JSON. Both formats are streaming, but streaming XML parsers are more readily available. XML cannot represent some input strings faithfully.


  • HTML with microformat-style class annotations (default output; should not be assumed to be forward-compatibly stable).
  • XHTML with microformat-style class annotations (append &out=xhtml to URL; should not be assumed to be forward-compatibly stable).
  • XML (append &out=xml to URL).
  • JSON (append &out=json to URL).
  • Human-readably plain text (append &out=text to URL; should not be assumed to be forward-compatibly stable for machine parsing).

Not Implemented

  • GNU error format (needs a better spec)
  • Relaxed-compatible (lacks a spec)
  • Unicorn-compatible (hoping that Unicorn changes instead)
  • W3C Validator-compatible SOAP (legacy)
  • EARL (not implemented; domain modeling mismatch)