Re: [css-validator] counting listed warnings

Hi,

The new version is in CVS.

Jean-Gui

Jean-Guilhem Rouel a écrit :
> 
> Hi Olivier,
> 
> I have coded that. It's not exactly what I said in my previous mail 
> because it was quite complicated (it would have needed to modify all the 
> classes producing warnings). Instead, I have added a piece of code in 
> the method addWarning of the class Warnings: if the level of the warning 
> to add does not correspond to the requested level, it is not added.
> An example of how to use it is available in 
> org/w3c/css/css/xhtml.properties.fr:
> [[
> no-error-or-warning: <div><h2>Aucune erreur ou avertissement (<!-- 
> #ignored-warnings-count --> ignorés)</h2></div>
> [...]
> <!-- #warnings-count --> Avertissements (<!-- #ignored-warnings-count 
> --> ignoré(s))
> ]]
> 
> I've partially modified the templates for other languages, but I prefer 
> native speakers to do that ;)
> 
> What should I do with that? I don't think I have write access on 
> dev.w3.org. I can give you a patch or you can give me access to the 
> repository, as you wish :).
> 
> Jean-Gui
> 
> olivier Thereaux a écrit :
>>
>>
>> On Dec 15, 2006, at 00:57 , Jean-Guilhem Rouel wrote:
>>
>>> Hi,
>>>
>>> Another suggestion would be to produce a warning only if its level 
>>> corresponds to what the user asked. That would avoid the computation 
>>> of a lot of warnings and a simple warnings.size() (or something like 
>>> that) would be enough to get the number of warnings.
>>
>> Sounds like a good idea.
>>
>> Minor problem: there would be no way to tell the user "there were 
>> other warnings, not shown here." with a link to the validation with 
>> all warnings. I suppose the Warnings class could keep a count of 
>> ignored warnings, too.
>>
>> Your proposed solution would fix the problem at hand, and also 
>> http://www.w3.org/Bugs/Public/show_bug.cgi?id=4081
>>
>> Would you have a free hour to hack it up? :)
>>
>> (no, it's not *so* urgent, but we're releasing on monday, and having 
>> this would be very cool.)
>> --olivier
> 

-- 
Jean-Guilhem Rouel                    http://www.w3.org/People/Jean-Gui
W3C Webmaster   MIT/CSAIL             http://www.w3.org/
Voice: +1.617.258.8143                Fax: +1.617.258.5999

Received on Saturday, 16 December 2006 20:29:33 UTC