Struggling with "XHTML and RDF"

I've recently been playing with pumping RDF/XML through XSLT for 
rendering - the end result being XHTML styled with CSS. The instance 
data is coming from a HTML form, so it's structure is known in advance, 
which make life somewhat easier! (examples here [1]). The XSLT and CSS 
is done in the client browser.

The pre-rendering format was XHTML, and so far I've been using fairly 
arbitrary mapping from RDF entities to CSS <div id="...">. But it 
occurred to me to try using the syntax Mark describes in "XHTML and RDF" 
[2]. Unfortunately I didn't really get past square one, for a couple of 
reasons.

First of all, take this example:

[[[
...if a search server knows how to establish from a user that they are 
actually searching for http://people.com/TonyBlair, then we could mark 
up our document as follows:

Tomorrow the <span resource="p:TonyBlair">Prime Minister</span>
is expected to fly to ...
]]]

What are the RDF statements there? Ok, I can see this might be saying:

p:TonyBlair rdf:type rdf:Resource

but where does the "Prime Minister" bit come in?

I don't know whether it's me having a blindspot on this, but I couldn't 
see the triples clearly in any of the examples in the latter part of 
Mark's doc (though I could make sense of the <meta> material).

A second problem for me is that I want to be able to selectively apply 
styling based on the statements (mostly literal-valued properties). 
Though the use of <span resource="..."> and <span property="..."> seems 
like nice naming, as far as I can tell it's not accessible to CSS. (I 
must also confess I'm a little puzzled about where these attributes came 
from - will they be in the XHTML 2.0 namespace?).

Of course there's absolutely no need for the RDF info to be included in 
styling of  the document, but it does feed two birds with one bean - 
often the data will require styling according to the semantics. It may 
be possible to systematically override/piggyback the CSS - <span 
class="foaf:Person>, <div id="http://example.org"> and so on.

So I suppose I'm asking for someone to tell me if I'm losing my marbles 
or not for the former (any chance of n3 alongside the examples in the 
text?) and consideration of the latter.

Cheers,
Danny.

[1] http://purl.org/stuff/pets
[2] http://www.w3.org/MarkUp/2004/02/xhtml-rdf.html

-- 
----
Raw
http://dannyayers.com

Received on Thursday, 29 April 2004 16:26:27 UTC