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

proposed additions to the SOAP API of the markup validator

From: olivier Thereaux <ot@w3.org>
Date: Thu, 17 May 2007 14:57:21 +0900
Message-Id: <916D15B4-75BE-4787-82CA-2C5401E6A52C@w3.org>
To: www-validator Community <www-validator@w3.org>


Here are a couple proposed changes to the SOAP API of the Markup  

The two proposed changes are both additions, and should therefore be  

1) addition of source snippet display

The HTML output of the validator displays a fragment of the  
(offending) markup code where the error/warning/etc was found. It  
would be useful to have this information delivered through the SOAP  
output too.

Typical value of this source snippet is escaped markup, with some  
html markup (<strong>) to locate the exact location of the error. I  
assume that for this reason, it would be safe(r) to keep the value  
within a CDATA block, but that's open to discussion.


       <strong title="Position where error was detected.">&#60;</ 
strong>html&#62;&#60;head&#62;&#60;meta http-equiv=&#34;content- 
type&#34; content=&#34;text/html; charset=Shift_JI

2) addition of error message explanation

The value of the validator partly comes from the fact that almost  
each error message comes with some kind of explanation about the  
potential causes and fixes of the error.

The HTML output of the validator displays that as HTML (duh), <p>s  
and <ul>s. I expect most tools to consume this for inclusion into  
HTML documents, so I think it's safe to keep it as an HTML snippet.  
Here too, I suggest using a CDATA block, but up for discussion.


                 <m:explanation>  <![CDATA[
                       <p class="helpwanted">
title="Suggest improvements on this error message through our  
feedback channels"

     <div class="ve mid-82">
       You have used a character that is not considered a "name  
character" in an
       attribute value. Which characters are considered "name  
characters" varies
       between the different document types, but a good rule of thumb  
is that
       unless the value contains <em>only</em> lower or upper case  
letters in the
       range a-z you must put quotation marks around the value. In  
fact, unless
       you have <em>extreme</em> file size requirements it is a very  
very good
       idea to <em>always</em> put quote marks around your attribute  
values. It
       is never wrong to do so, and very often it is absolutely  


Opinions and thoughts welcome.

Received on Thursday, 17 May 2007 05:57:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:52 UTC