Re: XBL is (mostly) W3C redundant, and CSS is wrong W3C layer for semantic behavior *markup*

At 11:18 AM 1/1/2003 -0600, John Lewis wrote:
>>> >>>CSS selectors allows one to select elements of markup based on
>>> >>>attributes which are not related to *semantics*.
>>> >>
>>> >>As an editor of the W3C Selectors Specification, I assure you, that is
>>> >>most definitely not the intention of CSS selectors.
>>> >
>>> > Of course it is.
>>>
>>>No, it is *not*.
>
>> Er, what is a class selector?
>
>A class selector is a type of attribute selector; it selects an
>element whose class attribute is equal to some value.


[...]


>> The class attribute has several roles in HTML:
>>  * As a style sheet selector (when an author wishes to assign style
>>    information to a set of elements).
>>  * For general purpose processing by user agents.


[...]

>You seem to think it's something else entirely; what that is I'd like
>to know.


I agree with the specification of class selector as you quoted.

Note the *KEY* point that class selector is not __semantic___ markup.
There is not a one-to-one correspondence (no inverse) between classes and
semantics.  In other words, the only layers that understand what classes
___mean___ (i.e. understand semantics of class) are below the semantic
markup layer.

The class selector is a way to markup "style sheets" and for "general
purpose processing by UA".  According to HTML 4.01 spec quoted, those are
both layers that are below (and separable, e.g. orthogonal) to semantic
markup layer.  If you make the semantic binding combined with the class
selector layer, then you have merged semantic layer with a layer that it
supposed to be orthogonal and separable from semantics.

Look at it another way.  If CSS was bound to semantics, then it could not
modify some <P> tags but not all <P> tags.  Because doing so would change
the semantics of <P>.  But since CSS doesn't deal with semantics, then it
is free to modify any collection (a class) of elements.  CSS is thus
orthogonal to semantic markup.

I understand it is a very abstract and difficult conceptual thing to wrap
one's head around.  I did not learn it overnight.  But once you learn about
the importance of analyzing orthogonalities, then you designs will be much
more correct and easy.

Orthogonality also as nice effect, encourages KISS.  e = mc ^ 2 is a nice
orthogonal way to express a lot of detail in theory of relativity.  Binding
semantics before XHTML parsing, just makes everything a lot simpler.  You
don't have to be concerned about all the requirements to make DOM
intellient about any possible custom markup elements.  Keeps CSS pure and
focused on it's primary purposes.

-Shelby Moore

Received on Wednesday, 1 January 2003 17:35:38 UTC