Help:Import vocabulary (Example of importing FOAF vocabulary)

User manualSemantic WebImporting vocabularyHelp:Import vocabulary (Example of importing FOAF vocabulary)
Example of a FOAF import and its bindings to properties declared in Semantic MediaWiki

The help page on importing vocabulary explained the general concept and this page gives the example of importing the FOAF vocabulary.

An example of this functionality is the use of the FOAF vocabulary. Although the associated terms work like any other annotation in the wiki, the RDF that is exported will directly use the elements of the FOAF specification, thus allowing users to edit FOAF files through the wiki.

After an administrator makes the external vocabulary available, any user can state that a term in the wiki matches an imported element by adding the following text to its article:

[[imported from::foaf:knows]]

The special property imported from tells Semantic MediaWiki that the wiki's property really refers to the property from the FOAF vocabulary.

The wiki article does not have to be named "Property:foaf:knows", the user could choose any name to represent the property within the wiki. ( uses "foaf:knows" here since the community in this wiki is expected to have some technical background; In another wiki, one might prefer a less technical name.)

In order to interpret the above "imported from" statement, the wiki needs to understand the meaning of "foaf:knows" as a shorthand for "". This is the case for "foaf:knows" since the wiki administrator has made this property available for this purpose. The section on importing further vocabularies describes how you can find out which elements are available, how new elements can be added, and what the idea behind this "control mechanism" is.