Re: XPath & CSS, again

Anne van Kesteren wrote:
> Robin Berjon wrote:
>>>> As said in the archived posts: it is no problem for todays user-agents
>>>> to use XPath
>>>
>>> I think it would be a problem. As it goes against all CSS parsing rules.
>>
>> Not if you put it in a string.
> 
> I'm not sure I understand.

Simply that Pascal's proposal isn't necessarily against CSS parsing 
rules. The way he expressed it is, but it's quite possible to make it 
compatible by putting the XPath expression inside a string, eg:

:xpath("//foo:bar") {
   display: beautifully;
}

> Selecting previous-siblings, parent/ancestor 
> elements, et cetera. CSS is designed around a model that XPath is not 
> compatible with.

Not so. The way in which XSLT uses XPath for its patterns is compatible 
with CSS processing. Some things you could express with XPath would not 
resolve to stylable nodes but that's fine, you simply would no-op them.

I'm not saying I support the proposal, just that it's not technically 
impossible.

-- 
Robin Berjon
   Research Scientist
   Expway, http://expway.com/

Received on Friday, 8 April 2005 10:29:01 UTC