[imps] Validation result format for review

Henri Sivonen hsivonen at iki.fi
Tue Sep 11 12:12:33 PDT 2007

On Sep 11, 2007, at 21:22, ryan wrote:

> On Sep 11, 2007, at 7:04 AM, Henri Sivonen wrote:
>> I'd like to enable the use of Validator.nu as a RESTful Web service.
>> To this end, I have designed a Validator.nu-native XML response  
>> format:
>> http://wiki.whatwg.org/wiki/Validator.nu_XML_Output
>> I'd appreciate comments on the format--especially from people who can
>> foresee wanting to write clients.
> I notice that you're reusing vocabulary from HTML, why not just use  

I already offer class-annotated HTML and XHTML output (append  
&out=xhtml to the URI to get XHTML).

Recently, I added both POSTing content and plain text output (append  
&out=text to the URI) intended to be dumpable to terminal and then  
human readable. So far, I've observed that in a Web service context,  
people (n=2) prefer scraping plain text over scraping HTML or XHTML.  
This suggests to me that (X)HTML is too crufty for the purpose. (Am I  
right? Lachy? Philip?)

However, the plain text format isn't really designed for safe  
scraping. I am assuming that minimally crufty custom XML format and a  
custom JSON format would be best fits for the Web service scenario as  
they'd be more reliable than scraping the text output ad hoc and less  
crufty than (X)HTML.

Moreover, as a (perhaps silly) design principle, I have decided that  
the XML format should expose all features to the point that one could  
theoretically re-create the HTML front-end with the XML service. The  
ability to support the planned-but-unimplemented elaboration feature  
in XML is there mostly for completeness as it will be easy to throw  
in there once the feature exists for (X)HTML. I'm not planning on  
exposing the HTML elaboration in JSON. And based on IRC comments  
today, I may abandon this principle as far as the parse tree goes.

Henri Sivonen
hsivonen at iki.fi

More information about the Implementors mailing list