W3C home > Mailing lists > Public > public-rdfa@w3.org > March 2009

Re: RDFa and CSS

From: Martin McEvoy <martin@weborganics.co.uk>
Date: Wed, 11 Mar 2009 00:50:03 +0000
Message-ID: <49B70ABB.2040009@weborganics.co.uk>
To: Toby A Inkster <tai@g5n.co.uk>
CC: publicayers@verizon.net, public-rdfa@w3.org
Toby A Inkster wrote:
> One slight annoyance I've had using CSS selectors with RDFa is that 
> you can only select based on CURIE-prefixes rather than full URIs. For 
> example, it would be nice to be able to use 
> p[typeof="http://example.com/Person"] rather than 
> p[typeof="ex:Person"] as the "ex" prefix is unreliable.

You CAN use css like that in, Firefox,  Opera, Safari  and Chrome (the 
standards compliance ones I guess)  you just cant in *Internet 
Explorer*, I tested this rough example:

<html>
<head>
    <title>Untitled Document</title>
<style type="text/css">
    div[typeof~="http://example.com/Person"] { color : red }
</style>
</head>
<body>
    <div typeof="http://example.com/Person">Person</div>
</body>
</html>

url: http://weborganics.co.uk/test/rdfa+css.html

Best wishes

-- 
Martin McEvoy

http://weborganics.co.uk/

"You may find it hard to swallow the notion that anything as large and apparently inanimate as the Earth is alive."
Dr. James Lovelock, The Ages of Gaia
Received on Wednesday, 11 March 2009 00:50:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 11 March 2009 00:50:52 GMT