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

Re: proposal to have sequential / grouped messages in soap output

From: Henri Sivonen <hsivonen@iki.fi>
Date: Tue, 30 Oct 2007 16:28:13 +0200
Message-Id: <5D4DDFF4-D0AC-4CD9-94B5-7BDA90707C0A@iki.fi>
Cc: W3C Validator Community <www-validator@w3.org>, Struan Donald <struandonald@gmail.com>
To: Chris Parrish <chris.forummail@swankinnovations.com>

On Oct 30, 2007, at 08:16, Chris Parrish wrote:

> Hello, Henri.
>> In the mean time, I designed and deployed a format that  
>> specifically matches the Validator.nu internals well:
>> http://wiki.whatwg.org/wiki/Validator.nu_XML_Output
> I've read through your site but I'd *love* it if you could post an  
> example of your format.


Reindented here:

<?xml version="1.0" encoding="UTF-8"?>
<messages xmlns="http://n.validator.nu/messages/" xmlns:h="http:// 
www.w3.org/1999/xhtml" url="http://hsivonen.iki.fi/test/moz/ 
   <error last-line="6" last-column="9" first-column="4">
     <message>Required attributes missing on XHTML element <a  
xmlns="http://www.w3.org/1999/xhtml" href="http://www.whatwg.org/ 
       <dl xmlns="http://www.w3.org/1999/xhtml">
         <dt>Element-specific attributes for element <a href="http:// 
         <dd><code><a href="http://www.whatwg.org/specs/web-apps/ 
         <dd><code><a href="http://www.whatwg.org/specs/web-apps/ 
current-work/#src">src</a></code> (required)</dd>
         <dd><code><a href="http://www.whatwg.org/specs/web-apps/ 
         <dd><code><a href="http://www.whatwg.org/specs/web-apps/ 
current-work/#ismap">ismap</a></code> (but only
     if one of the ancestor elements is an <code><a href="http:// 
         <dd><code><a href="http://www.whatwg.org/specs/web-apps/ 
         <dd><code><a href="http://www.whatwg.org/specs/web-apps/ 
<error last-line="7" last-column="20" first-column="1">
    <message>Bad value <code xmlns="http://www.w3.org/1999/xhtml">en- 
UK</code> for attribute <code xmlns="http://www.w3.org/1999/ 
xhtml">xml:lang</code> on XHTML element <a xmlns="http://www.w3.org/ 
1999/xhtml" href="http://www.whatwg.org/specs/web-apps/current-work/ 
#p"><code>p</code></a>: Bad region subtag.</message>
    <extract>img/&gt;&lt;/p&gt;<m>&lt;p xml:lang='en-UK'&gt;</m>en- 
   <error last-line="8" last-column="37" first-column="29">
     <message>Required children missing from XHTML element <a  
xmlns="http://www.w3.org/1999/xhtml" href="http://www.whatwg.org/ 
       <dl xmlns="http://www.w3.org/1999/xhtml">
         <dt>Content model for element <a href="http://www.whatwg.org/ 
         <dd>In any order, exactly one <code><a href="http:// 
     element, and exactly one <a href="http://www.whatwg.org/specs/ 
web-apps/current-work/#embedded0">embedded content</a>
<error last-line="9" last-column="12" first-column="10">
    <message>Required children missing from XHTML element <a  
xmlns="http://www.w3.org/1999/xhtml" href="http://www.whatwg.org/ 
      <dl xmlns="http://www.w3.org/1999/xhtml">
        <dt>Content model for element <a href="http://www.whatwg.org/ 
        <dd>One <code><a href="http://www.whatwg.org/specs/web-apps/ 
current-work/#legend">legend</a></code> element followed by
     either one or more <a href="http://www.whatwg.org/specs/web-apps/ 
current-work/#block-level0">block-level elements</a> or <a  
level0">inline-level content</a> (but not both).</dd>
<error last-line="10" last-column="9" first-column="1">
    <message>SVG element <code xmlns="http://www.w3.org/1999/ 
xhtml">foo</code> not allowed as child of XHTML element <a  
xmlns="http://www.w3.org/1999/xhtml" href="http://www.whatwg.org/ 
specs/web-apps/current-work/#body0"><code>body</code></a> in this  
context. (Suppressing further error errors from this subtree.)</message>
<error last-line="11" last-column="5" first-column="1">
    <message>XHTML element <code xmlns="http://www.w3.org/1999/ 
xhtml">bar</code> not allowed as child of XHTML element <a  
xmlns="http://www.w3.org/1999/xhtml" href="http://www.whatwg.org/ 
specs/web-apps/current-work/#body0"><code>body</code></a> in this  
context. (Suppressing further error errors from this subtree.)</message>
<source type="application/xhtml+xml" encoding="utf-8">&lt;html  
xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/ 
&lt;title&gt;Validator.nu message demo&lt;/title&gt;
&lt;p xml:lang='en-UK'&gt;en-UK&lt;/p&gt;

> As far as I can tell, your validator's output does not have a 1- 
> to-1 correlation with the internals of the current validator, though.

It doesn't. Validator.nu can report source locations in more ways  
than the W3C Validator. However, the W3C Validator source location  
way is one of the ways that the Validator.nu XML output format  
supports. Conversely, the Validator.nu output doesn't yet have a  
capability of representing the parse tree and doesn't have a  
capability of communicating implementation-specific error numbers.  
(Validator.nu does not have a concept of error numbers.)

> And would you be suggesting that the w3c validator be converted to  
> a more streaming format (no error count summaries)?

I don't think of myself as a direct stakeholder in the output format  
of the W3C Validator. However, if there's demand for Validator.nu  
supporting the same output format as the W3C Validator, I'd much  
prefer that format to be suitable for streaming generation (not just  
"more" streaming but fully streaming). So yeah, in case I need to  
implement the format, I'd suggest it be streamably generatable.

After the W3C chartered the new HTML WG to work on HTML 5, there has  
been some interest in running an instance of the Validator.nu  
software in the w3.org space. Moreover, the Validator.nu software has  
RELAX NG and Schematron capabilities that would be useful with some  
other languages besides HTML 5 as well. (Validator.nu also has latent  
untested NVDL capabilities, since it uses a patched version of oNVDL.)

It isn't clear to me what the level of interest in running a copy in  
the w3.org space is and if the idea would be to run a standalone copy  
like the W3C copy of Feed Validator or to run it as a back end for  
Unicorn. Either way, I'd be happy to assist in making the software  
runnable in the w3.org space.

Considering Unicorn integration, I would, of course, prefer it if  
Unicorn consumed the Validator.nu native XML format directly.  
However, failing that, I'd rather implement another streamable output  
format than a non-streamable format.

> I have no say in the business decision of whether/how to break the  
> backwards-compatibility,

Me neither.

> Based on validator's internals, mine would go something like:
>   <messages count="4" prevalidationcount="1" errorcount="1"  
> warningcount="1" infocount="1">

The counts are redundant data. Moreover, putting them before the  
messages precludes streaming generation of the format.

>     <message type="prevalidation" mid="W06" feedbackuri="http:// 
> validat...">
>       <summary>Unable to Determine Parse Mode!</summary>

That suggests "prevalidation" is a subclass of error. Is it?

>       <explanation><![CDATA[...]]></explanation>

CDATA implies escaped HTML, right? I think it is XML-wise dirty and  
RSS-ish to use escaped HTML instead of inline XHTML.

>       <source line="58" col="23"><![CDATA[...]]></source>

Indicating source locations like that makes forward-compatibility  
with more sophisticated location reporting harder. For example,  
Validator.nu reports the source *range* that a tag occupies in many  

> I would still keep the <markupvalidationresponse> element  
> encapsulating the <messages>

Doesn't that just require consumers to burrow into a deeper tree?

> and would also keep the meta information like checkedby,

Surely a client knows which URI it is sending its request to?

> validity,

What should a client do if the outcome that can be computed from the  
presence of errors disagrees with the validity proclaimed by the  

> doctype

Validator.nu is opinionated software when it comes to doctypes. :-)

> PI still wish I could find a way to do away with the element I'm  
> calling <groupsummary>, though.  If there was some way developers  
> could parse the standard <summary> text and deduce their own group  
> summary text, they could then just use the message id (mid) to  
> define their groupings.

So message ids would allow the groups to be computed on the client side?

Henri Sivonen
Received on Tuesday, 30 October 2007 14:28:33 UTC

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