W3C home > Mailing lists > Public > www-validator-css@w3.org > June 2008

Re: restful api wish

From: olivier Thereaux <ot@w3.org>
Date: Wed, 25 Jun 2008 10:04:06 -0400
Cc: "Yves Lafon" <ylafon@w3.org>, www-validator-css@w3.org
Message-Id: <A93D1027-7B69-4AD5-9F0C-C09157311CF5@w3.org>
To: Kai Hendry <hendry@iki.fi>

Hi Kai,

On 25-Jun-08, at 9:21 AM, Kai Hendry wrote:
> An example how I would like to see the CSS validator api to work:
>
> x61:/tmp% cat style.css
> body { colour: green; }
>
> curl -s -F css=@style.css http://jigsaw.w3.org/css-validator
>
> And then your service would return in a line based text format:
>
> style.css:1:8:Property colour doesn't exist :  green
>
> So vim could parse this errorformat easily as
> filename:lineno:colno:error message

You can do something very close to that already. Not much to do with  
RESTfulness, but the CSS validator does have a plain text output and a  
way to pass files, without passing a URI.

Use the text= parameter for your data, use output=text, and make sure  
to use the POST method. I'm sure curl can do this.

http://jigsaw.w3.org/css-validator/manual.html#requestformat

regards,
olivier
Received on Wednesday, 25 June 2008 14:32:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:20 GMT