Semantic MediaWiki 1.2

From semantic-mediawiki.org
Jump to: navigation, search
Semantic MediaWiki 1.2
Previous version: SMW 1.1.2
Next version: SMW 1.2.1
Latest version: SMW 1.7.0

Version 1.2 of Semantic MediaWiki introduced a number of new features to SMW. This page explains the major enhancements and modifications compared to SMW 1.1.

Contents

[edit] Upgrading existing installations

SMW has changed its way of storing data, and every existing site must refresh its internal store when migrating a wiki. If you merely follow the basic installation instructions, the wiki will not yet have its existing semantic data available yet. SMW 1.2 also no longer is compatible to beta versions of SMW by default, and so the Relation namespace vanishs and <ask> queries are not fully functional any more. Support for those obsolete features can be switched on with a configuration option. Some further minor configuration options have changed in the new version.

Details are explained in Help:Installation 1.2.

[edit] New features

[edit] New SMW storage backend

SMW 1.2 introduces a new internal organisation for its data. This requires the above upgrades, but it also has many advantages:

 {{#ask: [[Category:Country]] [[located in ::Europe]] OR 
         [[Category:City]] [[located in ::Europe]] 
   | sort=population | order= descending
 }}

[edit] vCard export for query results

SMW 1.2 lets you download the result of inline queries in the vcard format that enables many address book tools to import contacts from the wiki. This is achieved by the query format "vcard". Printout statements are used to add data to the vCard, e.g.

 {{#ask: [[Category:Person]]
   | ?firstname
   | ?lastname
   | ?url = homepage   
   | format=vcard
 }}

creates a link to a list of vCards that contain first and last name, as well as the homepage for each page in the Category:Person. Like in the case of RSS and iCalendar format, it is important which label a property printout has (e.g. "homepage" above is recognised by vCard, while "url" would not). The available fields are: name (displayed full name), prefix (something like "Dr."), suffix (something like "Jun."), firstname, extraname (middle name), lastname, birthday (a date), homepage, note (any other text), email, workphone, cellphone, homephone, organization. Most fields including the phone numbers have no special format and will take whatever you give them.

Lists of vCards work very well on most address book tools with the notable exception of MS Outlook. Outlook users can only import the first contact in each vCard file, and must therefore import contacts individually from many links, or consider moving to another tool for personal information management, such as Thunderbird. Outlook also is reported to fail at character decoding in some cases, e.g. if names use non-latin letters.

[edit] Improved semantic query syntax and processing

The inline query input now accepts a couple of simplifications that make queries more easy to read and write:

{{#ask: [[located in.population::>100,000]]}}

for things located in a place with more than 100,000 inhabitants would formerly be written with a nested query as follows:

{{#ask: [[located in:: <q>[[population::>100,000]]</q>]] }}

The old syntax is still supported, but the new one is clearly simpler.

{{#show: Berlin | ?population}}

to display the population of Berlin; result 3,391,409. The function otherwise works like an inline query, and all parameters available for inline queries can also be used on #show if desired. The above function can also be written as an #ask query as follows:

{{#ask: [[Berlin]] | ?population = }}

(the '=' sign disables displaying a header for "population"); result: 3,391,409

[edit] Support for custom sortkeys

There are many occassions when pages are ordered alphabetically. In SMW 1.2 it is possible to define a label that should be used instead of a page's name for this purpose. This is already well-known for MediaWiki, where especially categories have their own sortkeys (for example, the category of all popes should not have all its elements in "P" even though all articles start with "Pope"). To set a page's sortkey in SMW 1.2, the following syntax is used anywhere on a page:

{{DEFAULTSORTKEY: custom key}}

This syntax also is used in MediaWiki to define the default sortkey for categories of that page.

[edit] Stored queries on Concept: pages

SMW 1.2 can store queries on pages of the wiki. A new namespace "Concept:" is provided for that purpose. Every concept can be regarded as a "dynamic category", i.e. a collection of pages that is not defined manually but derived from the contents of the wiki using some query. See Help:Concepts for details.

[edit] Automated updates

When a (semantic) template or a property definition in SMW are changed, this change might affect other pages as well. SMW 1.2 now automatically triggers these required updates and thus ensures that the wiki will again be up-to-date after some time, even if the affected pages are not edited again. The updates are not done immediately but queued internally and executed in small pieces, this ensures that the initial change does not take too long or create too much server load in one step.

[edit] Other features

[edit] From the RELEASE-NOTES


Semantic MediaWiki 1.2 en

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox