proposed changes to the CSS Validator architecture (as suggested by CSS WG)

Dear all,

People familiar with the CSS validator will know that it generally  
follows a per-profile behavior. That is, it will check stylesheets  
against the syntax, properties and values of a given CSS profile (e.g  
CSS1, CSS2, CSS2.1, etc), and will use a default profile (by default,  
CSS 2.1 at the tim of this mail) if no profile is given.

This has, for some time, been a point of contention, because while it  
matches some interpretations of the CSS specifications, it does not  
match the vision which the W3C CSS working group (in charge of  
defining and evolving CSS) has for CSS.

After a number of recent discussions, and thanks to the presence of a  
great couple of intern developers this summer, it should be possible  
to implement the following changes, suggested by the CSS working group.

Both of these points may be controversial, so I'll try to summarize  
them as objectively as possible.


1) There is only one CSS syntax.

Those familiar with the syntax defined in the various CSS  
specifications will know that there are some (small, but significant)  
differences between their tokenization and syntaxes. In the  
recommendation of the CSS working group, the syntax used when  
treating CSS should be one and only, and (at this point), this should  
be the syntax defined in the CSS 2.1 specification.

The CSS validator currently has different tokenization and syntax  
checking for its different profile, and on behalf of the WG, Bert  
recommended that this should be simplified to only use the latest  
syntax.

*** personal suggestion ***

If the syntax defined in CSS1 is to be obsoleted, but the rest of the  
CSS1 profile should remain in effect, I suggest following the part of  
the W3C process that allows "rescinding" of an existing RECommendation:

http://www.w3.org/2005/10/Process-20051014/tr.html#rec-rescind

At times, W3C MAY rescind an entire Recommendation, for instance when
W3C learns of significant errors in the Recommendation, when the
Recommendation becomes *outdated*, or if W3C discovers burdensome
patent claims that affect implementers
(emphasis mine)

This would, I believe, clarify the situation and avoid a case whereby  
someone using the syntax defined in a W3C recommendation (CSS1) would  
be told that the syntax used is incorrect. Such a case is IMHO not  
acceptable, and the CSS1 spec should be amended properly to avoid it.

*** end personal suggestion ***



2) CSS is the sum of its profile

What happens if one uses, in a CSS style sheet, a property that is in  
CSS2 but not in CSS2.1 not CSS3, a property that is in CSS3 but not  
CSS2 or CSS2.1? Currently, the CSS validator, checking against one  
profile or another, will always throw an error, claiming that the  
property X is not in the Y profile.

The CSS working group sees CSS as the sum of all CSS specifications  
that have reached the maturity of "candidate recommendation" or  
further, and thus disagrees that the usage of properties from mixed  
profiles is a problem. Quoting the CSS WG blog: by default the CSS  
validator should “include all CSS features that have so far made it  
to Candidate Recommendation stage.” --- http://www.w3.org/blog/CSS/ 
2007/08/28/css_validator_ui

*** personal suggestion ***

In my opinion, this situation is confused and confusing because of  
the lack of an umbrella specification defining what CSS is, and what  
is a conformant CSS stylesheet. If CSS has no version and is the sum  
of all its specs, this should be defined somewhere. Without such a  
document, the mere existence of the CSS validator becomes an exercise  
in exegesis, and I don't think it's a good thing.

I have argued for this a number of times, but I may not have made the  
request publicly yet. If so, here is my formal, public request to the  
CSS working group: please produce a document (ideally a REC, and it  
doesn't have to be complicated) defining once and for all what a CSS  
style sheet is, and what a *conformant* CSS style sheet is. Thanks in  
advance.

*** end personal suggestion ***



Course of action for the weeks to come:

* Julien, our developer, is working on implementing the changes (at  
least number 2), and while it is tricky, we have found an algorithm  
that mimics the requested behavior, while remaining relatively  
performant, and not requiring a complete rewrite of the tool:
  - the validator will keep the option of validating against a single  
profile, and for that, the behavior should remain the same. Time  
permitting, the validator could note, whenever stumbling on an  
unknown property, whether the property is available in another known  
profile of CSS.

  - by default, if no specific profile is given, the validator will  
check against CSS2.1 as a basis. Upon finding a property (or value)  
not in accordance with CSS2.1, it will look in other profiles, and if  
the property or value is OK in e.g CSS3, then the error would be  
dropped. If the property or value is erroneous in every profile  
known, an error would be produced.

* The CSS working group is meeting next week, and Bert, on its  
behalf, committed to producing, by the end of next week, a public  
document explaining the vision of the group for CSS, and providing  
guidance for (as a start) the behavior of checkers such as the W3C  
CSS validator.


I hope this is an accurate summary of the discussions and decisions,  
with apologies if I omitted or misrepresented anything.

As usual, feedback, ideas, suggestions and more than anything help  
(any java wiz with free time and good spirit out there?) most welcome.

Regards,
olivier
-- 
olivier Thereaux - W3C - http://www.w3.org/People/olivier/
W3C Open Source Software: http://www.w3.org/Status

Received on Wednesday, 5 September 2007 11:09:44 UTC