|Found errors or typos? Just edit the page or leave a message on the talk page.|
The English language documentation is canonical and most up to date.
Help:Import vocabulary (Vocabulary definition)
Wiki-users with the appropriate administrative rights (requires write access to the MediaWiki namespace) can add new elements by simply editing a specific page for each vocabulary the match the "magic" name. This help page explains how vocabulary definitions are created.
http://xmlns.com/foaf/0.1/|[http://www.foaf-project.org/ Friend Of A Friend] name|Type:Text homepage|Type:URI Person|Category knows|Type:Page ...
The first line tells the wiki that
- the abbreviation "foaf:" refers to "http://xmlns.com/foaf/0.1/" and that
- "Friend Of A Friend" should be given as an additional human-readable label for elements of this vocabulary (e.g. in the factbox).
After this, there is a line that declares each vocabulary element that can be reused within the wiki. For instance, "name" (referring to "foaf:name") can only be a property of datatype "Text"Holds text of arbitrary length. The text after the "|" declares the (unique) context in which some element can be used. Elements that can be imported as properties are declared by specifying their type with Type:some datatype, elements that can be imported as categories are declared by specifying the "Category" namespace identifier. (Note that in Semantic MediaWiki 1.0Released on 31 December 2007 and compatible with MW 1.9.x - 1.12.x. the type and namespace depends on your language setting!). Moreover, one can also declare other elements by writing anything else than the above; however, we strongly recommend you use one meaningful string; we suggest "Main", although you can use such elements in namespace other than "Property" and "Category" as well.
Imported vocabularies expect a type definition (except Categories those are mapped as
rdf:type) which means a definition (in MediaWiki:Smw_import_yyy) is required a type to describe a qualified imported vocabulary.
Invalid type declaration
If for some reason a type declaration is invalid or incomplete then special page "ExportRDF" will produce an invalid XML (see SMW issue ).1 and it is recommended to run maintenance script "rebuildData.php"Allows to rebuild all the semantic data for a selected data backend/store or to make a null edit on a specific property to correct possible incorrect assignments.
- Semantic MediaWiki: GitHub issue gh:smw:1488