[rdfweb-dev] RE: FOAF-interest usage

Ian Davis iand at internetalchemy.org
Sun Mar 14 08:16:35 UTC 2004


Hi Ben,

On Saturday, March 13, 2004, 11:27:42 PM, Ben Nolan wrote:

> Ok - further research seems to indicate

> <foaf:interest>
> <dc:title>Cars</>
> <dc:description>I like exotic cars</>
> <rdf:resource>http://www.ferrarichat.com</>
> <dc:subject>ferrari, lamborghini</> 
> </>

> Looks about right? I'm going to add interest indexing to the scutter at
> SharedID.com - for the purpose of creating ad-hoc groups. 

It's not right I'm afraid. rdf:resource is a special term that must
appear as an attribute. It's RDF's way of make links between
different resources.

<foaf:interest rdf:resource="http://www.ferrarichat.com" />

You can add the other properties as attributes as well:

<foaf:interest rdf:resource="http://www.ferrarichat.com"
dc:title="Cars" dc:description="I like exotic cars" />

However, since you said you didn't want to use attributes, there's
another way. The first example above is the same as writing:

<foaf:interest>
  <rdf:Description rdf:about="http://www.ferrarichat.com">

  </rdf:Description>
</foaf:interest>

You can now put your other terms in the rdf:Description as elements:

<foaf:interest>
  <rdf:Description rdf:about="http://www.ferrarichat.com">
    <dc:title>Cars</dc:title>
    <dc:description>I like exotic cars</dc:description>
    <dc:subject>ferrari, lamborghini</dc:subject>
  </rdf:Description>
</foaf:interest>

HTH

Ian

-- 
http://internetalchemy.org | http://purl.org/NET/iand 




More information about the foaf-dev mailing list