Re: XPath as CSS-selectors?

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