W3C home > Mailing lists > Public > www-style@w3.org > April 2005

XPath & CSS, again

From: Pascal Schmitt <pascal@cebra.nu>
Date: Thu, 07 Apr 2005 19:59:37 +0000
Message-Id: <200504072159.29457.pascal@cebra.nu>
To: www-style@w3.org





Hello!

The Question was mentioned here, I saw it in the archive, but I want to
ask it again in a modified form:

What about using XPath with CSS?
It could be integrated easily, using the XPointer-Fragment:

#xpointer(//element[child/@attr = 'foo']) {
   color: red;
}


Or for content, with a new xpath-Pseudomethod:

p::after {
   content: xpath(img[0]/@alt);
}
table::after {
   content: "Total " xpath(count(tbody/tr)) " lines";
}


As said in the archived posts: it is no problem for todays user-agents
to use XPath, they often build a DOM-Tree anyway´┐Ż

--
Pascal Schmitt
Received on Thursday, 7 April 2005 21:30:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:36 GMT