W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > August 2007

Re: RDFa serializer?

From: Keith Alexander <k.j.w.alexander@gmail.com>
Date: Sat, 25 Aug 2007 15:21:11 +0100
To: "Dan Brickley" <danbri@danbri.org>, RDFa <public-rdf-in-xhtml-tf@w3.org>
Message-ID: <op.txmctllh63ayaz@keith-alexanders-computer.local>


>   <rdf:Property rdf:about="http://xmlns.com/foaf/0.1/openid"  
> vs:term_status="unstable" rdfs:label="openid" rdfs:comment="An OpenID
> for an Agent.">
>      <rdf:type  
> rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
>      <rdfs:subPropertyOf  
> rdf:resource="http://xmlns.com/foaf/0.1/isPrimaryTopicOf"/>
>      <rdf:type  
> rdf:resource="http://www.w3.org/2002/07/owl#InverseFunctionalProperty"/>
>      <rdfs:domain rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
>      <rdfs:range rdf:resource="http://xmlns.com/foaf/0.1/Document"/>
>      <rdfs:isDefinedBy rdf:resource="http://xmlns.com/foaf/0.1/"/>
> </rdf:Property>
>
>
> How should this look "ideally" in RDFa, to make nice HTML? How close  
> could an automatic serializer get to that?

Hi Dan,

This is sort of close to something I've been doing lately, which is  
building an interface to a store of RDF schemas. I use a definition list  
(<dl>) to display the properties of each resource.

As it happens, I stuck a bit of eRDF in the markup - which would, I think,  
be fairly similar to an RDFa representation of the same thing.

Here's a page showing a description of the foaf:openid property.

http://schemacache.test.talis.com/Res/?uri=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2Fopenid

So for a  generic html rendering of a graph, I personally use a <dl> to  
represent the resource (well, I actually use a parent div of the <dl> so I  
can include, eg: an <h1 property="rdfs:label">)
(this would be <dl about="http://xmlns.com/foaf/0.1/openid">) and then for  
each property, I use a <dt> to display the rdfs:label of that property,  
and a <dd> to display the value of the object.
In RDFa this might be something like <dt>Term Status</dt><dd  
property="term:status_testing">testing</dd>
Or if the value is the uri of another resource, something like:

<dd><a rel="rdfs:isDefinedBy" href="http://xmlns.com/foaf/0.1/"><span  
property="dc:title">Friend of a Friend (FOAF) vocabulary</span></a></dd>


(this is assuming that the namespaces are defined further up in the  
document)

This is my general approach at least (always glad to hear suggestions for  
improvements though).

Your

Keith

ps: Hope I've got the RDFa right! I'm not as intimately familiar with the  
syntax as others on this list.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Received on Saturday, 25 August 2007 14:21:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:15:09 GMT