~~NOCACHE~~
====== PlWiki 1.0 - Plugin API ======
[[.:plwiki1ex|Examples available here]]
**IMPORTANT:**
This code should be placed on every page using PlWiki plugin:
~~NOCACHE~~
===== Prolog Code in Loki =====
The simplest use case. Without cache. Only process knowledge between "pl" tags.
woman(kate).
man(john).
__Result__:\\
woman(kate).
man(john).
More interesting use case: adding knowledge to the page:
man(jack).
man(jim).
man(jack).
man(jim).
Now when we have prolog code associated with DokuWiki page, we can "query" selected scope or Wiki page. Scope accepts POSIX Regular Expressions.
%
% Prolog code may be placed here but it is not necessairly.
%
__Result__:\\
%
% Prolog code may be placed here but it is not necessarily.
%
===== Prolog interface =====
Loki plugin also contains loki.pl prolog script, which allows to query knowledge gathered in Loki from Prolog.
We can list all predicates in selected scope:
__Result__:\\
We can also list informations about selected predicate.
__Result__:\\
===== Categories, Relations, Attributes =====
[[http://semantic-mediawiki.org/wiki/Semantic_MediaWiki|Semantic MediaWiki]] syntax is also supported, there are some methods of semantic annotation:
* categories - a simple form of annotation that allows users to classify pages. To state that article (Wiki page) belongs to the category "category1" we have to write [[category:category1]]
* relations - there is a possibility to describe relationships between two Wiki pages. For example there is a relation "capital_of" between "cities:warsaw" and "coutries:poland". To express this we have to just edit the page "countries:warsaw" and add [[capital of::countries:poland]]
* attributes - allows to specify relationships of Wiki pages to things that are not Wiki pages. For example, one can state that Wiki page "namespace:page" was created at April 22 2009 by writing [[created:=April 22 2009]]
* In addition to this users can search for articles using a simple query language that was developed based on the known syntax of the Wiki. For example: {{#ask: [[category:cities]] [[capital_of::countries:poland]]}}