Personal Information in eRDF
From GetSemantic
Contents |
[edit] Add the eRDF profile to the opening head tag
<head profile="http://purl.org/NET/erdf/profile">
[edit] Declare the Vocabularies used
<link rel="schema.foaf" href="http://xmlns.com/foaf/0.1/"/>
[edit] Write eRDF
<div id="me" class="-foaf-Person">
<!-- In eRDF, if you are talking about something other than the current document, give it an @id -->
<!-- You can also say what sort of a Thing it is by choosing a Class from a vocabulary
(in this case, the Person class from the FOAF vocabulary) and writing it
in the @class, as above: -schema-Class -->
<!-- You can put anything you want here without affecting the semantics -->
<span class="foaf-name">
<!-- the text here is your name -->
</span>
<!-- the @class values here do not have a '-' prefix.
This shows that they are /property/ names rather than /Class/ names -->
<span class="foaf-mbox">
<!-- the text here is your e-mail address -->
</span>
<span class="foaf-mbox_sha1sum"
title="<!-- because there is a @title on this element,
the text /here/ is a sha1sum encryption of your e-mail address -->">
<!-- here you can put a spambot-safe description of your e-mail address,
like: me {at} example {dot} com .
This is an alternative to the previous foaf-mbox example -->
</span>
<span class="foaf-nick"><!-- the text here is one of your online nick names --></span>
<span class="foaf-nick"><!-- the text here is another of your online nick names. Repeat as necessary. --></span>
<span class="foaf-phone"><!-- you get the idea, this is your phone number--></span>
<img src="pic.jpg" class="foaf-depiction" alt="A picture of me"/>
<!-- On elements with a @src, the @src contains the property value -->
<a href="http://example.com/" rel="foaf-homepage">
<!-- the @rel refers to the @href value. a @class would refer to the @title,
or if there is no @title, to all the text content of this element --> </a>
</div>
[edit] Some Notes on Vocabularies
There are many more classes and properties available in the FOAF vocabulary.
You can mix in classes and properties from other vocabularies as much as you like you like - or even invent your own! RDF allows anyone to say anything about anything. Just make sure you declare which vocabularies you're using in the head of the document.
SchemaWeb is a good place to look for vocabularies.

