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

Re: Report page in validation service is not well-formed XML when the validation was successful

From: olivier Thereaux <ot@w3.org>
Date: Thu, 29 May 2008 13:03:49 -0400
Cc: Yves Lafon <ylafon@w3.org>, W3C CSS Validator ML <www-validator-css@w3.org>
Message-Id: <1AC6D695-4988-4CFE-9127-587BF94640BC@w3.org>
To: "Svensson, Lars" <l.svensson@d-nb.de>

Hi Lars,

On 28-May-08, at 7:25 AM, Svensson, Lars wrote:
> The validation results page in the css-validator returns not well- 
> formed XML when the validation was successful. When the validation  
> wasn't successful, the returned document is well-formed. First I  
> tried this with file upload and then with validation per URL, always  
> with the same result.
> Interestingly enough, the page validates in the HTML validator, but  
> it's obvious that the XML is invalid. The problem is in line 35,  
> where there is a closing </a> tag within the <p> element but no  
> opening <a>.

This was fixed a few weeks ago in the development version of the  
validator.
http://dev.w3.org/cvsweb/2002/css-validator/org/w3c/css/css/xhtml.properties.diff?r1=1.16&r2=1.17&f=h

Yves, let's put this into production independently of (and before) the  
grammar changes?


> The background is that I wanted to build a validation script, upload  
> the file(s) per URL and then check for the existence of a <div  
> id="errors">. To do this, I parse the result page with an XML parser  
> (it's supposed to be XHTML) and check for the div using an Xpath.

If you're going to parse validation results as XML, I would strongly  
recommend, instead of screen-scraping the HTML output, to use:
http://jigsaw.w3.org/css-validator/api.html

regards,
-- 
olivier
Received on Thursday, 29 May 2008 17:04:24 GMT

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