W3C home > Mailing lists > Public > www-style@w3.org > June 2003

Re: XPath as CSS-selectors?

From: Robin Berjon <robin.berjon@expway.fr>
Date: Fri, 20 Jun 2003 10:38:54 +0200
Message-ID: <3EF2C81E.1040507@expway.fr>
To: Asbjørn Ulsberg <asbjorn.ulsberg@nrk.no>
Cc: www-style@w3.org

Asbjørn Ulsberg wrote:
> Robin Berjon wrote:
>>Or you could have XPath functions.
> What kind of functions are you thinking about? The existing XPath
> functions like string() and such, or functions in CSS to embed
> XPath, like the "select()" i use as an example?

XPath functions. Nothing keeps one from adding some. css:first-line(/foo//bar).

>>But why bother?
> Because I think XPath has better syntax and is better fitted for
> the pure task of selecting nodes than the existing CSS selectors.
> But this is not to be misunderstood with that I don't like the
> CSS selectors, because I do. Really. I just don't think they're
> optimal for the task.

That judgement seems very subjective to me :)

>>XHTML and SVG however, are much more likely to require
>>frequent reevaluation.
> And what selector language would be preferred in conjunction with
> SVG, for instance?

Depends on the situation but that's precisely the question that brought me into 
this debate (which I've otherwise tired of ages ago). I would like to take the 
time to work through a one to one comparison between CSS and XPath. Hopefully 
this week-end if I get the time.

Robin Berjon <robin.berjon@expway.fr>
Research Engineer, Expway        http://expway.fr/
7FC0 6F5F D864 EFB8 08CE  8E74 58E6 D5DB 4889 2488
Received on Friday, 20 June 2003 04:39:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:07 UTC