Re: New draft: css3-selectors

Jeffrey Yasskin (mailto:jyasskin@hotmail.com) wrote:
>I agree that CSS having its own selection language completely separate
>from XPath and XQuery is not a great idea. However, I don't think that
>intruducing regular expressions will help. Regular expressions will limit
>the development of CSS stylesheets to developers familiar with or willing
>to learn regular expressions.

I fully agree.  I didn't intend to propose a string regexp language; I
simply chose that in my examples to avoid having to introduce a hierarchical
regexp language.  That's why in
http://lists.w3.org/Archives/Public/www-style/2001Feb/0000.html I wrote:
>>Please don't look at the specifics of the examples given here.  I simply
>>took the JavaScript regexp language and extended it with an exclamation
>>point to match the current element, and with tag brackets to match
>>elements.
>>This does not do justice to the hierarchical nature of XML elements.

Actually, I think that my second example would already be a lot more
acceptable to you, as it basically copies the structure of the XML it is
talking about.  But yes, incorporating an appropriate existing language
would of course be ideal.

My main objection is that the current standardisation efforts seem to have a
knee-jerk reaction to wishes: adding lexical items.  That makes the language
huge, obscure, and weak.  (Weak in the sense that the language will only be
able to do what the designers had in mind - If I want every fifth list
element to be red, I am out of luck, that kind of thing.)
With the addition of a bit of grammar, a much smaller addition to the
language could enrich in much more, and in a more systematic way.

For basically the same objection to another aspect of the language, see
http://lists.w3.org/Archives/Public/www-style/2001Jan/0073.html.

J. A. Durieux
mailto:BDurieux@baan.com
http://www.biep.org

Received on Tuesday, 6 February 2001 07:34:46 UTC