1 Semantic MediaWiki Basics

hw>Mlink-rodrigue
No edit summary
 
No edit summary
Tag: 2017 source edit
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Featurepage|featured=true|featuredesc=A beginner's example to start using Semantic MediaWiki for creating structured data.|featurestart=06/18/2021}}<bookshelf src="Book:Getting started with Semantic MediaWiki" />
<bookshelf src="Book:Getting started with Semantic MediaWiki" />
==Scope and terminology==
==Scope and terminology==
Semantic MediaWiki (SMW) is a MediaWiki extension that enables you to define and query data on a wiki page.
Semantic MediaWiki (SMW) is a MediaWiki extension that enables you to define and query data on a wiki page.

Latest revision as of 13:28, 14 January 2022

Scope and terminology

Semantic MediaWiki (SMW) is a MediaWiki extension that enables you to define and query data on a wiki page.

The following steps are usually taken to work with data-based content in your wiki :

  1. Define properties: Properties determine which values can be queried in the wiki.
  2. Create a template: This creates the output format of the data set on the wiki pages.
  3. Create a form: Using this form, Wiki users can comfortably enter their data.
  4. Assign a category: Each page that contains a semantic query is usually tagged with a category that was created for this purpose. This, in addition to the attributes, provides an important means of querying and filtering the pages. It also creates a form editing mode for the wiki pages that contain this category.


Define properties

To make information available as data on a wiki page, we create so-called properties. For example, if we want to semantically record customer data, we create a wiki page for each customer. We collect customer data such as location on every customer page. To do this, we create a property that records the location of the customer.

[[Has location::Regensburg]]

Afterwards I can list all customers at a certain location or all customers with their associated locations in the wiki.

Create a template

Since we often want to display several such properties and their values on one page at the same time, we format a special area that clearly shows the collected page attributes. This requires a (data) template, which can then be used on any wiki page.


Semantic template
Data template


Create a form

To support our users with data entry tasks, we create an input form. The input form is shown when users switch to the edit mode of a wiki page that has the semantic template included.

Data entry form
Data entry form


Assign a category

Wiki pages that use semantic templates are tagged with a category. This category enables the assignment of the input form to the wiki page. The category is also used to query the data collected via the template and display it anywhere in the wiki.

Example

On the following pages, we will create an example that collects and displays customer data it in the wiki.


Example: Collect customer data





To submit feedback about this documentation, visit our community forum.