RE: New release of CSS Validator

>>-----Mensaje original-----
>>De: public-mobileok-checker-request@w3.org [mailto:public-mobileok-
>>checker-request@w3.org] En nombre de Dominique Hazael-Massieux
>>Enviado el: jueves, 13 de marzo de 2008 18:14
>>Para: public-mobileok-checker
>>CC: Yves Lafon
>>Asunto: Re: New release of CSS Validator
>>
>>
>>Le jeudi 13 mars 2008 à 15:53 +0100, Dominique Hazael-Massieux a écrit :
>>> Le jeudi 13 mars 2008 à 14:22 +0100, Dominique Hazael-Massieux a écrit :
>>> > As a result, I have added velocity-1.5.jar to our lib directory
>>> > (accompanied with its -LICENSE file), and updated the css-
>>validator.jar
>>> > with the new release.
>>>
>>> .... which apparently makes many of our CSS-related tests fail :(
>>
>>Having looked just at the surface of it, the checker reports a "Parsing
>>error", per line 98 of
>>http://dev.w3.org/cvsweb/~checkout~/2007/mobileok-
>>ref/src/org/w3c/mwi/mobileok/basic/CSSUtils.java?rev=1.16&content-
>>type=text/plain
>>for style sheets that are so obviously valid that the problem must lie
>>elsewhere (e.g.
>>http://dev.w3.org/cvsweb/~checkout~/2007/mobileok-
>>ref/test/data/ROOT/ContentFormatSupportTest/7/stylesheet.css?rev=1.1&conte
>>nt-type=text/plain )
>>
>>I suspect that the assumption that was made in catching parsing errors
>>no longer holds true, but I haven't had time to look further into it
>>yet.
>>
>>Dom
>>

Launching the tester gives me the next warning 
org.w3c.css.util.Messages: couldn't load properties en
  java.io.FileNotFoundException: \file:\C:\Proyectos\mobileok-ref\lib\css-validator.jar!\org\w3c\css\util\Messages.properties.en (El nombre de archivo, directorio o etiqueta del volumen no es válido) for all messages files.

Digging a bit through org.w3c.css.util.Messages.java code I reached where locales are inicialized and messages files loaded. In order to load a messages file the URL pointing at it is cleaned through adjustURL method. This method doesn't consider file:/ (with only one slash '/') option so I ended with an URL as file:///file:/......

After modifying this class so adjustURL method is not used and replacing the css library and I managed to launch ContentFormatSupportTest 7 with success.

I'm not sure if this fix will work under all operating systems, FYI mine is Windows XP.

Miguel

Received on Friday, 14 March 2008 13:30:51 UTC