Headers to Get Doctype, Warnings

View: New views
3 Messages — Rating Filter:   Alert me  

Headers to Get Doctype, Warnings

by Chris. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Any chance doctype and warning count could be added to the headers of the html (and soap) outputs?

I'd love to see a:

    HEAD 'http://validator.localhost/check?uri=http%3A%2F%2Fwww.w3.org'
   
    200 OK
    [...]
    Content-Language: en
    Content-Type: text/html; charset=utf-8
    X-W3C-Validator-Errors: 0
    X-W3C-Validator-Warnings: 0
    X-W3C-Validator-Recursion: 1
    X-W3C-Validator-Status: Valid
    X-W3C-Validator-Doctype: XHTML 1.0 Strict

That way I could pull an HTML report and, from the headers, determine:
    "Your document failed validation with 3 errors and 1 warning - unknown doctype" or
    "Your document passed validation as xhtml 1.0 strict"

Re: Headers to Get Doctype, Warnings

by Karim A. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


G-R-E-A-T Idea!

I always dreamed about this "bless" !
The charge is light, the answer is here!

Karim
--
http://akoncept.com
Innovate Humanum Est

On 10/11/07, Chris. <chris.forummail@...> wrote:

>
>
> Any chance doctype and warning count could be added to the headers of the
> html (and soap) outputs?
>
> I'd love to see a:
>
>     HEAD 'http://validator.localhost/check?uri=http%3A%2F%2Fwww.w3.org'
>
>     200 OK
>     [...]
>     Content-Language: en
>     Content-Type: text/html; charset=utf-8
>     X-W3C-Validator-Errors: 0
>     X-W3C-Validator-Warnings: 0
>     X-W3C-Validator-Recursion: 1
>     X-W3C-Validator-Status: Valid
>     X-W3C-Validator-Doctype: XHTML 1.0 Strict
>
> That way I could pull an HTML report and, from the headers, determine:
>     "Your document failed validation with 3 errors and 1 warning - unknown
> doctype" or
>     "Your document passed validation as xhtml 1.0 strict"
>
> --
> View this message in context: http://www.nabble.com/Headers-to-Get-Doctype%2C-Warnings-tf4605226.html#a13149749
> Sent from the w3.org - www-validator mailing list archive at Nabble.com.
>
>
>


Re: Headers to Get Doctype, Warnings

by olivier Thereaux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello,

On Oct 11, 2007, at 14:35 , Chris. wrote:
> Any chance doctype and warning count could be added to the headers  
> of the
> html (and soap) outputs?


I thought I'd answered this, looks like I didn't. My apologies.

Warning number will definitely be in 0.8.3, to be release very soon  
(this week, I think, if all goes well). For detected doctype and  
charset, it would be nice too, but these are "user input" so would  
need some escaping before being put into a http header. Would love  
some help there.

--
olivier Thereaux - W3C - http://www.w3.org/People/olivier/
W3C Open Source Software: http://www.w3.org/Status