CSS validator's soap output should give uri context for each message

Hi Yves, all.

While coding in new functionalities into the perl lib that accesses the 
CSS validator's SOAP output, I noticed that the uri context is 
apparently only given at the start of the <m:warninglist> or 
<m:errorlist>. I suggest it should be given for each message (error, 
warning), even if it makes the output more verbose.

Rationale: when validating a document linking to different stylesheets, 
the errors and warnings may come from several sources. Knowing exactly 
which errors come from which document/location is therefore very 
important.

so instead of :

<m:warninglist>
   <m:uri>http://www.example.org/style.css</m:uri>
     <m:warning>
       <m:line>24</m:line>
       <m:level>1</m:level>
       <m:message>You have no background-color with your 
color</m:message>
       <m:context>A:link</m:context>
     </m:warning>
     <m:warning>
       <m:line>30</m:line>
       <m:level>1</m:level>
       <m:message>You have no background-color with your 
color</m:message>
       <m:context>A:visited</m:context>
     </m:warning>
</m:warninglist>

I suggest

<m:warninglist>
     <m:warning>
       <m:uri>http://www.example.org/style.css</m:uri>
       <m:line>24</m:line>
       <m:level>1</m:level>
       <m:message>You have no background-color with your 
color</m:message>
       <m:context>A:link</m:context>
     </m:warning>
     <m:warning>
       <m:uri>http://www.example.org/style.css</m:uri>
       <m:line>30</m:line>
       <m:level>1</m:level>
       <m:message>You have no background-color with your 
color</m:message>
       <m:context>A:visited</m:context>
     </m:warning>
</m:warninglist>

If you think this makes sense, here's a patch (attached) which I will 
commit unless you think it's a bad idea.

Thank you.
-- 
olivier

Received on Monday, 31 October 2005 07:53:27 UTC