W3C home > Mailing lists > Public > www-style@w3.org > July 2002

Re: Fw: [xsl] Converting Strict XHTML + CSS with XSLT

From: Robin Berjon <robin@knowscape.com>
Date: Thu, 11 Jul 2002 04:51:39 +0200
To: www-style@w3.org
Message-Id: <02071104513922.15602@morgaine>

On Wednesday 10 July 2002 22:20, Patrick Andries wrote:
>  From: "J.Pietschmann" <j3322ptm@yahoo.de>
> > I think selectors can be translated to XPath match patterns
> > easily. The whole process would be:
> > - XMLify CSS, including transforming CSS selectors to XPath
> > - generate a XSLT from the XCSS which will attach XCSS styles
> >    to matched elements
> > - run the "enrichment" XSLT on the XHTML
> > - run the final transformation.

Translating CSS to a derivation of XPath is indeed possible (though a touch 
harder than it seems) but you'll be missing a number of things. For instance, 
XPath has no notion of hover. For sure, you could convert that to an 
extension function such as xcss:hover() but then you'd have to find out what 
you want to do with that. It might not be very useful. And one thing such a 
representation would be useless at would be displaying pretty-printed CSS in 
XHTML using XSLT.

> > Question: Why isn't anyone working on XCSS, or am I something
> > missing?
>
>  Exactly my question.

Well, some people have expressed non-interest, but nothing is forbidding you 
from going ahead and defining CSS-X! Just some up interested parties and get 
to work ;-)

-- 
Robin Berjon <robin@knowscape.com> -- for hire: http://robin.berjon.com/
  James Joyce -- an essentially private man who wished his total
  indifference to public notice to be universally recognized.
  -- Tom Stoppard
Received on Wednesday, 10 July 2002 22:51:53 GMT

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