Skip to content
Property · FOAF

foaf:name and rdfs:label: how the FOAF name property works

Published Formatory editorial team
http://xmlns.com/foaf/0.1/name

A name for some thing.

foaf:name is about as simple as an RDF property gets: a name for some thing. It takes a literal, it can apply to anything, and it is everywhere in linked data. Its interest lies in its relationship to rdfs:label, and in what it does and does not settle about how names are recorded.

A sub-property of rdfs:label

The FOAF specification declares foaf:name as a sub-property of rdfs:label. The consequence is practical. Generic RDF browsers and many triple-store interfaces look for rdfs:label when they display a resource. With sub-property inference switched on, a resource that only has foaf:name still gets a readable caption.

The two are not interchangeable, though. rdfs:label is the generic human-readable label for any resource, including classes, properties and concepts. foaf:name says something more specific: this string is what the thing is called. Short as it is, the difference shows up in queries that need to find people by name and should not match every labeled class or concept. A SKOS concept uses skos:prefLabel and skos:altLabel for its terms, and those too are sub-properties of rdfs:label, so all three families display in the same generic slot while keeping their own meaning.

Property Typical subject Meaning
rdfs:label any resource a human-readable label
foaf:name a person, organization, project what the thing is called
skos:prefLabel a concept the preferred term in a vocabulary

Names and their parts

FOAF also offers foaf:givenName and foaf:familyName (older data uses foaf:firstName and foaf:surname). These help with sorting and with matching against authority files. They should sit alongside foaf:name, not replace it.

The reason is cultural variation. In Hungarian, Japanese and Chinese usage the family name usually comes first. Some people have a single name. Others carry patronymics, multiple family names, or particles like “van” or “de” whose sorting rules differ by country. Building a display name by concatenating parts produces errors that foaf:name avoids by storing the name as written. It also respects how a person presents themselves, which a formula cannot know.

For an informal handle or username, foaf:nick is the right property, and it keeps nicknames out of the formal name field.

Name forms in cataloging contexts

Library practice inverts personal names (“Lee, Ana”) for headings, as the dc:creator page describes. FOAF data generally uses the natural display order. When a collection publishes both, the inverted heading can go into a separate property (an authority link, or skos:prefLabel on an authority concept), leaving foaf:name in reading order. Mixing the two forms in one field makes deduplication harder.

Organizations raise a different question: the name at what date? An institution renamed in 1998 has two names, and a record for a report from 1985 may need the earlier one. FOAF does not model name history. Some projects attach dated names via a separate vocabulary; others accept the current name in foaf:name and keep earlier forms in an alternative label.

Mistakes worth avoiding

Leaving language tags off multilingual names is the first. A data set with “City Library” and “Bibliothèque municipale” as two untagged values gives a consuming application no way to choose. Putting a title or honorific into the name (“Dr. Ana Lee”) is the second, since FOAF has foaf:title for honorifics such as Dr, Ms or Prof. The third is copying an email address into foaf:name when nothing else was available. Here an empty field is better: a name that is not a name will be displayed everywhere the label is shown.

Example in RDF

@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<https://example.org/id/person/0412> a foaf:Person ;
    foaf:name "Ana Lee" ;
    foaf:givenName "Ana" ;
    foaf:familyName "Lee" ;
    foaf:nick "alee" .

<https://example.org/id/org/city-library> a foaf:Organization ;
    foaf:name "City Library"@en , "Bibliothèque municipale"@fr .

Questions about foaf:name

What is foaf:name?

It is the FOAF property for giving a name to something. Its domain is owl:Thing, so people, organizations, projects and objects can all have a foaf:name. The value is a plain literal such as 'Ana Lee'.

How is foaf:name related to rdfs:label?

foaf:name is declared a sub-property of rdfs:label. Any foaf:name is therefore also an rdfs:label, and tools that display labels can show it. The reverse is not true: a generic label such as a class description is not a name.

Should I use foaf:name or foaf:givenName and foaf:familyName?

Both, if the parts are known. foaf:name holds the full name as it should be displayed. The split properties help sorting and matching, but naming conventions vary between cultures, so the full form should never be reconstructed from the parts alone.

Can foaf:name carry a language tag?

Yes. An organization known by different names in different languages can have several foaf:name values, each tagged with its language. That lets interfaces show the name in the reader's language.

Can foaf:name be used for things that are not people?

Yes. The property has no domain restriction beyond owl:Thing. It is common on organizations, groups, projects and documents, and many data sets use it on any resource that needs a human-readable name.

More from FOAF

All 6 in this group