proposal to have sequential / grouped messages in soap output

Hello,

This is a follow up to a number of past discussions about the SOAP  
output of the markup validator. One from April this year, where Henri  
brought in some constructive criticism of the output (namely, that it  
didn't allow streamed output - I agreed then and still agree this is  
an issue), and some questions by Chris this week about the grouping.



1) grouped and sequential output

since 0.8.0, the markup validator, in its HTML output, allows two  
ways of displaying its error messages:
- list messages as they happen
- list all messages of a same type together (e.g all missing "alt"  
attributes together, with a list of the locations)

The soap output, however, does not have such a mechanism yet. it only  
does (because of its ancestry in the CSS validator's API):
- list all errors, then all warnings
(see http://validator.w3.org/docs/api.html )


I propose to add a sequential mode to the soap output, that would have

<m:markupvalidationresponse ...>
...
...
<m:messages>
   <m:error>
	(usual children of an error element)
   </m:error>
   <m:error> ...</m:error>
   <m:warning>...</m:warning>
</m:messages>
<m:errorcount>2</m:errorcount>
<m:warningcount>1</m:warningcount>
<m:validity>false</m:validity>
...
</m:markupvalidationresponse>

Having sequential output would also allow us to add <m:info>  
elements, since info messages generally refer to the previous error  
and don't make sense out of a linear context.


2) what is the default

Now... this is the tricky part. In the user interface we have a  
group= parameter.
* if group=0 the sequential mode is in effect
* if group=1 the grouped mode is in effect
* in the html output, if the group parameter is not given the default  
is sequential mode
* in the soap output the current "default" and only mode is grouped.

This leaves us with two possibilities.
- change the default for the soap output to use sequential mode
   this would be more consistent, but would break existing  
implementations
- keep a different default for the two outputs
   this is confusing, but backward-compatible

I would (reluctantly) lean towards the second option.


I would like to hear opinions on the proposed soap sequential output,  
and on the question of defaults.

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

Received on Wednesday, 17 October 2007 01:28:06 UTC