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


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 UTC

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