!!! Creating an Ontology

An ontology is created in a similar way as a d3web knowledge base using the ''knowledgebase'' markup.

{{{
%%knowledgebase

%
}}}

A more detailed description of this markup can be found on the page [Doc KnowledgeFormalization].

!! Creating Ontology Entities within the Local Namespace

Ontologies in KnowWE are based on the RDF standard ([http://www.w3.org/TR/REC-rdf-syntax/]). In RDF every resource is identified by a full qualified URI name.
For brevity, KnowWE uses shortened identifier such as ''rdf'' for ''http://www.w3.org/1999/02/22-rdf-syntax-ns#''.
The resource ''http://www.w3.org/1999/02/22-rdf-syntax-ns#type'' therefore is called ''rdf:type'' in KnowWE.
Ontology entities newly created within the wiki are created under the so-called local namespace, that is the URL referring to the wiki installation URL.
The abbreviation of the local namespace always is ''lns'', i.e. the abbreviated identifier of the local concept Person is ''lns:Person''.
When using ontology entities from the local namespace the namespace prefix can entirely be omitted.
The following markups can be used to create ontology entities (under local namespace if the namespace prefix is omitted):

* [Class| Doc Class]
* [Individual| Doc Individual]
* [ObjectProperty| Doc ObjectProperty]
* [Relation| Doc Relation]
* [Turtle| Doc Turtle]

{{{
%%class Person

%%Individual Ms. MoneyPenny

%%relation "Ms. MoneyPenny" rdf:type Person
 }}}

%%knowledgebase

%

%%class Person

%%Individual Ms. MoneyPenny

%%relation "lns:Ms. MoneyPenny" rdf:type lns:Person



Beside the local namespace, also other namespaces may freely be defined using the [Namespace| Doc Namespace] markup.
For sparql queries in the [SPARQL|Doc SPARQL] markup, always a namespace needs to be defined (including ''lns:'' for the local namespace) for triple patterns of a query.