Copyright © 2000-2007 Dan
Brickley and Libby Miller
This work is licensed under a Creative Commons
Attribution License. This copyright applies to the FOAF
Vocabulary Specification and accompanying documentation in RDF.
Regarding underlying technology, FOAF uses W3C's RDF technology, an
open Web standard that can be freely used by anyone.
This specification describes the FOAF language, defined as a dictionary of named properties and classes using W3C's RDF technology.
FOAF has been evolving gradually since its creation in mid-2000. There is now a stable core of classes and properties that will not be changed, beyond modest adjustments to their documentation to track implementation feedback and emerging best practices. New terms may be added at any time (as with a natural-language dictionary), and consequently this specification is an evolving work. The FOAF RDF namespace, by contrast, is fixed and it's identifier is not expected to change. Furthermore, efforts are underway to ensure the long-term preservation of the FOAF namespace, its xmlns.com domain name and associated documentation.
This document is created by combining the RDFS/OWL machine-readable FOAF ontology with a set of per-term documents. Future versions may incorporate multilingual translations of the term definitions. The RDF version of the specification is also embedded in the HTML of this document, or available directly from the namespace URI by content negotiation.
The FOAF specification is produced as part of the FOAF project, to provide authoritative documentation of the contents, status and purpose of the RDF/XML vocabulary and document formats known informally as 'FOAF'.
The authors welcome comments on this document, preferably via the public FOAF developers list foaf-dev@lists.foaf-project.org; public archives are available. A historical backlog of known technical issues is acknowledged, and available for discussion in the FOAF wiki. Proposals for resolving these issues are welcomed, either on foaf-dev or via the wiki. Further work is also needed on the explanatory text in this specification and on the FOAF website; progress towards this will be measured in the version number of future revisions to the FOAF specification.
This revision of the specification includes a first draft description of the new foaf:openid property. The prose description of this property is likely to evolve, but the basic mechanism seems robust. To accompany this support for OpenID in the FOAF specification, the FOAF wiki has also been updated to support usage of OpenID by members of the developer community. This revision of the spec also involves a change in the DTD declared at the top of the document. This is a foundation for using inline RDFa markup in future versions. The current version however does not yet validate according to this document format; it contains RDF/XML markup describing FOAF in machine-readable form. We welcome feedback on whether to retain this markup at the expense of DTD-based validation.
As usual, see the changes section for details of the changes in this version of the specification.
An a-z index of FOAF terms, by class (categories or types) and by property.
Classes: | Agent | Document | Group | Image | OnlineAccount | OnlineChatAccount | OnlineEcommerceAccount | OnlineGamingAccount | Organization | Person | PersonalProfileDocument | Project |
Properties: | accountName | accountServiceHomepage | aimChatID | based_near | birthday | currentProject | depiction | depicts | dnaChecksum | family_name | firstName | fundedBy | geekcode | gender | givenname | holdsAccount | homepage | icqChatID | img | interest | isPrimaryTopicOf | jabberID | knows | logo | made | maker | mbox | mbox_sha1sum | member | membershipClass | msnChatID | myersBriggs | name | nick | openid | page | pastProject | phone | plan | primaryTopic | publications | schoolHomepage | sha1 | surname | theme | thumbnail | tipjar | title | topic | topic_interest | weblog | workInfoHomepage | workplaceHomepage | yahooChatID |
FOAF terms, grouped in broad categories.
Here is a very basic document describing a person:
<foaf:Person rdf:about="#me" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <foaf:name>Dan Brickley</foaf:name> <foaf:mbox_sha1sum>241021fb0e6289f92815fc210f9e9137262c252e</foaf:mbox_sha1sum> <foaf:homepage rdf:resource="http://danbri.org/" /> <foaf:img rdf:resource="/images/me.jpg" /> </foaf:Person>
This brief example introduces the basics of FOAF. It basically says, "there is a foaf:Person with a foaf:name property of 'Dan Brickley' and a foaf:mbox_sha1sum property of 241021fb0e6289f92815fc210f9e9137262c252e; this person stands in a foaf:homepage relationship to a thing called http://danbri.org/ and a foaf:img relationship to a thing referenced by a relative URI of /images/me.jpg
To a computer, the Web is a flat, boring world, devoid of meaning. This is a pity, as in fact documents on the Web describe real objects and imaginary concepts, and give particular relationships between them. For example, a document might describe a person. The title document to a house describes a house and also the ownership relation with a person. Adding semantics to the Web involves two things: allowing documents which have information in machine-readable forms, and allowing links to be created with relationship values. Only when we have this extra level of semantics will we be able to use computer power to help us exploit the information to a greater extent than our own reading. - Tim Berners-Lee "W3 future directions" keynote, 1st World Wide Web Conference Geneva, May 1994
FOAF, like the Web itself, is a linked information system. It is built using decentralised Semantic Web technology, and has been designed to allow for integration of data across a variety of applications, Web sites and services, and software systems. To achieve this, FOAF takes a liberal approach to data exchange. It does not require you to say anything at all about yourself or others, nor does it place any limits on the things you can say or the variety of Semantic Web vocabularies you may use in doing so. This current specification provides a basic "dictionary" of terms for talking about people and the things they make and do.
FOAF was designed to be used alongside other such dictionaries ("schemas" or "ontologies"), and to beusable with the wide variety of generic tools and services that have been created for the Semantic Web. For example, the W3C work on SPARQL provides us with a rich query language for consulting databases of FOAF data, while the SKOS initiative explores in more detail than FOAF the problem of describing topics, categories, "folksonomies" and subject hierarchies. Meanwhile, other W3C groups are working on improved mechanisms for encoding all kinds of RDF data (including but not limited to FOAF) within Web pages: see the work of the GRDDL and RDFa efforts for more detail. The Semantic Web provides us with an architecture for collaboration, allowing complex technical challenges to be shared by a loosely-coordinated community of developers.
The FOAF project is based around the use of machine readable Web homepages for people, groups, companies and other kinds of thing. To achieve this we use the "FOAF vocabulary" to provide a collection of basic terms that can be used in these Web pages. At the heart of the FOAF project is a set of definitions designed to serve as a dictionary of terms that can be used to express claims about the world. The initial focus of FOAF has been on the description of people, since people are the things that link together most of the other kinds of things we describe in the Web: they make documents, attend meetings, are depicted in photos, and so on.
The FOAF Vocabulary definitions presented here are written using a computer language (RDF/OWL) that makes it easy for software to process some basic facts about the terms in the FOAF vocabulary, and consequently about the things described in FOAF documents. A FOAF document, unlike a traditional Web page, can be combined with other FOAF documents to create a unified database of information. FOAF is a Linked Data system, in that it based around the idea of linking together a Web of decentralised descriptions.
The basic idea is pretty simple. If people publish information in the FOAF document format, machines will be able to make use of that information. If those files contain "see also" references to other such documents in the Web, we will have a machine-friendly version of today's hypertext Web. Computer programs will be able to scutter around a Web of documents designed for machines rather than humans, storing the information they find, keeping a list of "see also" pointers to other documents, checking digital signatures (for the security minded) and building Web pages and question-answering services based on the harvested documents.
So, what is the 'FOAF document format'? FOAF files are just
text documents (well, Unicode documents). They are written in XML
syntax, and adopt the conventions of the Resource Description
Framework (RDF). In addition, the FOAF vocabulary defines some
useful constructs that can appear in FOAF files, alongside other
RDF vocabularies defined elsewhere. For example, FOAF defines
categories ('classes') such as foaf:Person,
foaf:Document, foaf:Image, alongside
some handy properties of those things, such as
foaf:name, foaf:mbox (ie. an internet
mailbox), foaf:homepage etc., as well as some useful
kinds of relationship that hold between members of these
categories. For example, one interesting relationship type is
foaf:depiction. This relates something (eg. a
foaf:Person) to a foaf:Image. The FOAF
demos that feature photos and listings of 'who is in which
picture' are based on software tools that parse RDF documents and
make use of these properties.
The specific contents of the FOAF vocabulary are detailed in this FOAF namespace document. In addition to the FOAF vocabulary, one of the most interesting features of a FOAF file is that it can contain "see Also" pointers to other FOAF files. This provides a basis for automatic harvesting tools to traverse a Web of interlinked files, and learn about new people, documents, services, data...
The remainder of this specification describes how to publish and interpret descriptions such as these on the Web, using RDF/XML for syntax (file format) and terms from FOAF. It introduces a number of categories (RDF classes such as 'Person') and properties (relationship and attribute types such as 'mbox' or 'workplaceHomepage'). Each term definition is provided in both human and machine-readable form, hyperlinked for quick reference.
For a good general introduction to FOAF, see Edd Dumbill's article, XML Watch: Finding friends with XML and RDF (June 2002, IBM developerWorks). Information about the use of FOAF with image metadata is also available.
The co-depiction experiment shows a fun use of the vocabulary. Jim Ley's SVG image annotation tool show the use of FOAF with detailed image metadata, and provide tools for labelling image regions within a Web browser. To create a FOAF document, you can use Leigh Dodd's FOAF-a-matic javascript tool. To query a FOAF dataset via IRC, you can use Edd Dumbill's FOAFbot tool, an IRC 'community support agent'. For more information on FOAF and related projects, see the FOAF project home page.
FOAF is a collaborative effort amongst Semantic Web developers on the FOAF (foaf-dev@lists.foaf-project.org) mailing list. The name 'FOAF' is derived from traditional internet usage, an acronym for 'Friend of a Friend'.
The name was chosen to reflect our concern with social networks and the Web, urban myths, trust and connections. Other uses of the name continue, notably in the documentation and investigation of Urban Legends (eg. see the alt.folklore.urban archive or snopes.com), and other FOAF stories. Our use of the name 'FOAF' for a Web vocabulary and document format is intended to complement, rather than replace, these prior uses. FOAF documents describe the characteristics and relationships amongst friends of friends, and their friends, and the stories they tell.
It is important to understand that the FOAF vocabulary as specified in this document is not a standard in the sense of ISO Standardisation, or that associated with W3C Process.
FOAF depends heavily on W3C's standards work, specifically on XML, XML Namespaces, RDF, and OWL. All FOAF documents must be well-formed RDF/XML documents. The FOAF vocabulary, by contrast, is managed more in the style of an Open Source or Free Software project than as an industry standardarisation effort (eg. see Jabber JEPs).
This specification contributes a vocabulary, "FOAF", to the Semantic Web, specifying it using W3C's Resource Description Framework (RDF). As such, FOAF adopts by reference both a syntax (using XML) a data model (RDF graphs) and a mathematically grounded definition for the rules that underpin the FOAF design.
This specification serves as the FOAF "namespace document". As such it describes the FOAF vocabulary and the terms (RDF classes and properties) that constitute it, so that Semantic Web applications can use those terms in a variety of RDF-compatible document formats and applications.
This document presents FOAF as a Semantic Web vocabulary or Ontology. The FOAF vocabulary is pretty simple, pragmatic and designed to allow simultaneous deployment and extension. FOAF is intended for widescale use, but its authors make no commitments regarding its suitability for any particular purpose.
The FOAF vocabulary is identified by the namespace URI
'http://xmlns.com/foaf/0.1/'. Revisions and
extensions of FOAF are conducted through edits to this document,
which by convention is accessible in the Web via the namespace URI.
For practical and deployment reasons, note that we do not
update the namespace URI as the vocabulary matures.
The core of FOAF now is considered stable, and the version number of this specification reflects this stability. However, it long ago became impractical to update the namespace URI without causing huge disruption to both producers and consumers of FOAF data. We are therefore left with the digits "0.1" in our URI. This stands as a warning to all those who might embed metadata in their vocabulary identifiers.
The evolution of FOAF is best considered in terms of the stability of individual vocabulary terms, rather than the specification as a whole. As terms stabilise in usage and documentation, they progress through the categories 'unstable', 'testing' and 'stable'.
The properties and types defined here provide some basic useful concepts for use in FOAF descriptions. Other vocabulary (eg. the Dublin Core metadata elements for simple bibliographic description), RSS 1.0 etc can also be mixed in with FOAF terms, as can local extensions. FOAF is designed to be extended. The FoafVocab page in the FOAF wiki lists a number of extension vocabularies that are particularly applicable to use with FOAF.
If you publish a FOAF self-description (eg. using foaf-a-matic)
you can make it easier for tools to find your FOAF by putting
markup in the head of your HTML homepage. It doesn't
really matter what filename you choose for your FOAF document,
although foaf.rdf is a common choice. The linking
markup is as follows:
<link rel="meta" type="application/rdf+xml" title="FOAF"
href="http://example.com/~you/foaf.rdf"/>
...although of course change the URL to point to your own FOAF document. See also: more on FOAF autodiscovery and services that make use of it.
Why does FOAF use RDF?
FOAF is an application of the Resource Description Framework (RDF) because the subject area we're describing -- people -- has so many competing requirements that a standalone format could not do them all justice. By using RDF, FOAF gains a powerful extensibility mechanism, allowing FOAF-based descriptions can be mixed with claims made in any other RDF vocabulary
People are the things that link together most of the other kinds of things we describe in the Web: they make documents, attend meetings, are depicted in photos, and so on. Consequently, there are many many things that we might want to say about people, not to mention these related objects (ie. documents, photos, meetings etc).
FOAF as a vocabulary cannot incorporate everything we might want to talk about that is related to people, or it would be as large as a full dictionary. Instead of covering all topics within FOAF itself, we buy into a larger framework - RDF - that allows us to take advantage of work elsewhere on more specific description vocabularies (eg. for geographical / mapping data).
RDF provides FOAF with a way to mix together different descriptive vocabularies in a consistent way. Vocabularies can be created by different communites and groups as appropriate and mixed together as required, without needing any centralised agreement on how terms from different vocabularies can be written down in XML.
This mixing happens in two ways: firstly, RDF provides an
underlying model of (typed) objects and their attributes or
relationships. foaf:Person is an example of a type
of object (a "class"), while foaf:knows and
foaf:name are examples of a relationship and an
attribute of an foaf:Person; in RDF we call these
"properties". Any vocabulary described in RDF shares
this basic model, which is discernable in the syntax for RDF, and
which removes one level of confusion in understanding a
given vocabulary, making it simpler to comprehend and therefore
reuse a vocabulary that you have not written yourself. This is
the minimal self-documentation that RDF gives you.
Secondly, there are mechanisms for saying which RDF properties
are connected to which classes, and how different classes are
related to each other, using RDF Syntax and OWL. These can be
quite general (all RDF properties by default come from an
rdf:Resource for example) or very specific and
precise (for example by using OWL constructs, as in the
foaf:Group example below. This is another form of
self-documentation, which allows you to connect different
vocabularies together as you please. An example of this is given
below where the foaf:based_near property has a
domain and range (types of class at each end of the property)
from a different namespace altogether.
In summary then, RDF is self-documenting in ways which enable the creation and combination of vocabularies in a devolved manner. This is particularly important for a vocabulary which describes people, since people connect to many other domains of interest, which it would be impossible (as well as suboptimal) for a single group to describe adequately in non-geological time.
RDF is usually written using XML syntax, but behaves in rather different ways to 'vanilla' XML: the same RDF can be written in many different ways in XML. This means that SAX and DOM XML parsers are not adequate to deal with RDF/XML. If you want to process the data, you will need to use one of the many RDF toolkits available, such as Jena (Java) or Redland (C). RDF Interest Group members can help with issues which may arise; there is also the rdfweb-dev@yapours.rdfweb.org mailing list which is the main list for FOAF, and two active and friendly IRC channels: #rdfig and #foaf on freenode.
FOAF introduces the following classes and properties. View this document's source markup to see the RDF/XML version.
%s %s