Difference between revisions of "Semantic MediaWiki"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
 
Line 1: Line 1:
 +
<hide>
 +
[[page type::article]]
 +
[[thing type::software]]
 +
[[platform::MediaWiki]]
 
[[category:software]]
 
[[category:software]]
 
[[category:MediaWiki]]
 
[[category:MediaWiki]]
 +
</hide>
 
==About==
 
==About==
[[Semantic MediaWiki]] (SMW) is an extension for [[platform::MediaWiki]] that provides [[purpose::semantic markup]] capability.
+
[[Semantic MediaWiki]] (SMW) is an extension for [[MediaWiki]] that provides [[semantic markup]] capability.
{{seed}}
 
 
===pages===
 
===pages===
As the SMW code API is not yet stable or well-documented, it appears that going directly to the database may be the best way to utilize SMW data.
+
* [[/code]]: SMW's code API
 
* [[/data]]: tables
 
* [[/data]]: tables
===parser functions===
+
* [[/markup]]
SMW also uses a few standard-form parser functions:
 
* #{{l/sub|ask}}
 
* #declare
 
* #{{l/sub|info}}
 
* #{{l/sub|set}}
 
* #{{l/sub|set_recurring_event}}
 
* #{{l/sub|show}}
 
 
 
===code===
 
Notes on code, as I figure it out:
 
* '''classes''':
 
** [https://doc.semantic-mediawiki.org/classSMW_1_1DIProperty.html SMW\DIProperty]
 
** [https://doc.semantic-mediawiki.org/classSMW_1_1DIWikiPage.html SMW\DIWikiPage]
 
** [https://doc.semantic-mediawiki.org/classSMW_1_1SemanticData.html SMW\SemanticData] - seems context-dependent, e.g. can instantiate from a Property object
 
** [https://doc.semantic-mediawiki.org/classSMW_1_1Store.html SMW\Store] - how to instantiate?
 
 
 
===Notes===
 
* For MediaWiki deployments where initial characters in article titles are ''not'' automatically capitalized (the default is to capitalize them):
 
** In #ask queries, the word "Category" is case-sensitive; <code><nowiki>[[category:...]]</nowiki></code> will not work.
 
* Special properties are also case-sensitive: e.g. <code><nowiki>[[Has type:string]]</nowiki></code> correctly references the special "Has type" property, but <code><nowiki>[[has type::string]]</nowiki></code> refers only to a non-special "has type" property.
 
 
 
==Syntax==
 
SMW introduces a new syntactical structure of the form <code><nowiki>[[property name::property value]]</nowiki></code>, which may optionally be written with a display parameter: <code><nowiki>[[property name::property value|display text]]</nowiki></code>. Both of these formats cause the current page to be assigned the value <u>property name</u> with the value <u>property value</u>. The same value can be assigned to several properties with this syntax: <code><nowiki>[[property1 name::property2 name::value for both]]</nowiki></code>.
 
 
 
To set a property without displaying anything, there are two alternative forms:
 
* <code><nowiki>[[property name::property value| ]]</nowiki></code>
 
** In this form, the space between the "|" and "]]" is required)
 
* <code><nowiki>{{#set:property name=property value}}</nowiki></code>
 
** This form allows brackets ("[" and "]") to be used in the property value; the other form does not.
 
 
 
 
==Links==
 
==Links==
 +
===Official===
 
* [[page::smw:Main Page|project home page]]
 
* [[page::smw:Main Page|project home page]]
 +
===Reference===
 +
* {{wikipedia}}

Latest revision as of 21:04, 28 July 2020

About

Semantic MediaWiki (SMW) is an extension for MediaWiki that provides semantic markup capability.

pages

Links

Official

Reference