Re: Roadmap to CSS validator release - your participation welcome

Le 27 nov. 2006 à 16:03, Karl Dubost a écrit :
> Le 24 nov. 2006 à 16:45, olivier Thereaux a écrit :
>> * Styling
>>
>> - need to review styling of results. It's very ugly at the moment.
>> http://qa-dev.w3.org:8001/css-validator/validator?uri=http%3A%2F% 
>> 2Fwww.w3.org%2F
>> http://qa-dev.w3.org:8001/css-validator/validator?uri=http%3A%2F% 
>> 2Fwww.flickr.com
>
> 1. Markup for warning lines
>
>    <li class="warning">
>       <span class="line">linenumber</span>
>       <span class="message">message<span>
>    </li>

ok I started to look a bit at the code. Not too difficult.

I have modified CssStyleRule.java line 87 to 100.
Not committed yet. Tell me if I should.

     public void toHTML(PrintWriter out) {
	if(properties != null) {
	    out.print("<li><span class='selector'>");
	    if (selectors != null) {
		out.print(selectors);
		out.print("</span> {<span class='vRule'>\n");
	    }

	    for (int i = 0; i < properties.size() ; i++) {
		CssProperty property = (CssProperty)properties.elementAt(i);
		out.print("<span class='Property'>");
		out.print(Util.escapeHTML(property.getPropertyName()));
		out.print(" : <span class='vPropertyValue'>");
		out.print(Util.escapeHTML(property.toString()));
		out.print("</span>");
		if (property.getImportant()) {
		    out.print(" !important");
		}
		out.print(";</span>\n");
	    }
	    out.print("</span>}</li>\n\n");
	}
     }


Though I have an issue I wanted to get rid of ul at the level of  
vAtRule. The problem is that this piece of code is in the HTML  
template and not in the java code. :) There's an in-between thing  
going on here :)

<ul class='vAtRule'>



dev.w3.org/2002/css-validator/org/w3c/css/css [14:34:14]% grep vAtRule *

html.properties.en:<ul class='vAtRule'> \n\
html.properties.es:<ul class='vAtRule'> \n\
html.properties.fr:<ul class='vAtRule'> \n\
html.properties.it:<ul class='vAtRule'> \n\
html.properties.pl-PL:<ul class='vAtRule'> \n\
xhtml.properties.en:<ul class='vAtRule'> \n\
xhtml.properties.es:<ul class='vAtRule'> \n\
xhtml.properties.fr:<ul class='vAtRule'> \
xhtml.properties.it:<ul class='vAtRule'> \n\
xhtml.properties.pl-PL:<ul class='vAtRule'> \n\


So there are three choices, I think from easiest to more difficult to do

1. put <ul class='vAtRule'> in the Java code
2. put all HTML markup in the templates and only there
3. have 3 files
	- HTML templates
	- translated messages
	- java code with variables
	

btw, it seems there is a difference in xhtml.properties.fr

Do we have a testing instance of the CSS validator somewhere so when  
we modify we can test? Though I guess I could install it on my  
laptop. :)


-- 
Karl Dubost - http://www.w3.org/People/karl/
W3C Conformance Manager, QA Activity Lead
   QA Weblog - http://www.w3.org/QA/
      *** Be Strict To Be Cool ***

Received on Wednesday, 6 December 2006 05:49:57 UTC