W3C home > Mailing lists > Public > www-validator@w3.org > October 2012

Recognise line returns in content to validate when executing from the command line

From: Jon Cram <jon@webignition.net>
Date: Thu, 18 Oct 2012 09:34:20 +0100
Message-ID: <507FBF0C.90900@webignition.net>
To: www-validator@w3.org
Hi All,

I'm using a local install of the W3C HTML validator and am using this to 
constantly validate a range of different HTML documents. I'm using 
Ubuntu Server 12.04.

I'm looking to increase the HTML validation throughput (currently at 
6000 HTML validations per hour) by calling the main validator script 
from the command line so as to avoid the overhead of spinning up Apache 
to handle validations.

I can successfully execute the validator from the command line as follows:
/usr/lib/cgi-bin/w3c-markup-validator/check 'fragment=<!DOCTYPE 
html><head><title></title></head></html>&output=json'

What I cannot do is pass in line returns within the content to be 
validated. I need to be able to do this so as to get back the line and 
column number of the location of errors. With content all on one line, 
the error location details aren't quite as useful.

I have tried adding \r, \n or \r\n in the fragment argument but this is 
treated by the validator as text not as a line return.

What could I try to have line returns accepted in the fragment argument?

Kind regards,
Jon Cram
Received on Thursday, 18 October 2012 08:34:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 18 October 2012 08:34:50 GMT