W3C

OWL Guide

This version:
11 Jul 2002
Previous version:
None
Authors:
Michael K. Smith, Electronic Data Systems, michael.smith@eds.com
Deborah McGuinness, Stanford University, dlm@ksl.stanford.edu
Lynn Andrea Stein, Olin University, lynn.stein@olin.edu
Raphael Volz, Forschungszentrum Informatik (FZI), volz@fzi.de
Christopher Welty, IBM Corporation, welty@us.ibm.com
Acknowledgement:
This document represents the work of many people, in particular the members of the W3C Web Ontology Working Group and the original authors of the DAML+OIL Walkthru.

Abstract

The OWL Web Ontology Language is being designed by the W3C Web Ontology Working Group in order to provide a language that can be used for applications that need to understand the logical content of information instead of struggling to deduce the meaning of some human-readable version of that information. The OWL language can be used to define term vocabularies and properties of entities and relations between entities in these vocabularies.

This document provides a guide to the use of the OWL language to

  1. formalize a domain by defining classes and properties of those classes,
  2. apply the formalization to assert properties of instances of these classes and,
  3. reason about these concepts to the degree permitted by the formal semantics of the OWL language.
This guide presents an incremental definition of a set of classes beginning with the fundamentals and proceding to more complex language components.


OWL Guide

Contents


Introduction

Include goals here. Agent based reasoning, retrieval, ....

First there was RDF, Dublin Core. Then various attempts to go further. See references. DAML+OIL [ref] was selected as our starting point.

Relation to RDF. Aliasing of RDF tags.

A more complete description of OWL is provided in the requirements, summary, reference, and semantics documents referenced in this document.

Capability

Briefly, what you can do. More powerful than RDF, not as powerful as first order predicate calculus. OWL is based on description logics [@@ ref]. Formal basis [@@ Formal Model].

Structure of Document

Ontology structure, basic classes and properties, complex classe and properties, appendices(???), references.

The Structure of Ontologies

In this document we present examples using the OWL XML syntax [OWL XML Syntax], assuming this will be familiar to the largest audience. The standard for interchange of OWL knowledge bases between tools depends on RDF triples [RDF]. The XML and RDF formats are part of the standard. Other notations have been formulated, in particular a UML version [UML Syntax].

Distributed ontologies [forward reference???]

Namespaces

The standard introducton of namespaces begins with an RDF [@@ OWL?] start tag containing several namespace declarations:

<rdf:RDF
  xml:base  ="http://www.w3c.org/2003/??/owl-guide"
  xmlns:oex ="http://www.w3c.org/2003/??/owl-guide#"
  xmlns:owl="http://www.w3c.org/2003/??/owl#"
  xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:xsd ="http://www.w3.org/2000/10/XMLSchema#"
  xmlns:oxd ="http://www.w3c.org/2003/??/owl-guide-dt#"/>

So in this document, the rdf: prefix should be understood as referring to things drawn from the namespace called http://www.w3.org/1999/02/22-rdf-syntax-ns#. This is a conventional RDF declaration appearing verbatim at the beginning of almost every rdf document.xmlns:rdf

The second and third declarations make similar statements about the RDF Schema and XML Schema datatype namespaces.

The fourth declaration says that in this document, elements prefixed with owl: should be understood as referring to things drawn from the namespace called http://www.w3c.org/2003/??/owl# . This is a conventional OWL declaration, required to introduce the owl vocabulary.

The fifth declaration says that in this document, elements prefixed with oex: should be understood as referring to things drawn from the namespace called http://www.w3c.org/2003/??/owl-guide#, i.e., the location of this document itself.

The sixth declaration says that in this document, elements prefixed with exd: should be understood as referring to things drawn from the namespace called http://www.w3c.org/2003/??/owl-guide-dt#, which is a sibling document to this document itself, containing XML Schema datatype definitions used in this document. This OWL documents has a separate document containing XML Schema datatype definitions.

The final declaration states that unprefixed elements and empty URI references refer to http://www.w3c.org/2003/??/owl-guide , i.e., a document specified by this URI.

If you look at the bottom of this document, you'll see the matching closing tag, </rdf:RDF>.

Ontology headers

The first thing we do inside this document is to assert that it is an ontology.

<owl:Ontology rdf:about="">

This assertion is formulaic; the about attribute will typically be empty, indicating that the subject of this assertion is this document, if no xml:base declaration was previously made. Otherwise the subject of this assertion is the value specified by the xml:base property.Same-document reference

Having established the fact that we are defining an ontology and providing the necessary namespace mapping, a set of additional tags are conventionally provied to handle such critical housekeepping tasks as version control.
 ...
  <comment>An example OWL ontology</comment>
  <versionInfo>$Id: OwlGuide.html,v 1.0 2002/07/17 16:12:00 mksmith $</versionInfo>
  <imports resource="http://www.w3.org/@@/OwlGuide.xml"/>
 ...
<comment> provides the obvious needed capability to annotate an ontology.

<versionInfo> is a standard tag intended to provide a consistent hook for version control systems working with ontologies.

<imports> provides an include-style mechanism. Importing another ontology brings in the entire set of definitions. Namespace issues? . Note that OWL provides a number of mechanisms to tie both the current ontology and imported ontologies together (see also ontology mapping.

The Basics

Simple Classes, Individuals, Datatypes

Most uses of an ontology depend ultimately upon the ability to reason about individuals (objects?). In order to do this in a useful fashion we need to have a mechanism to describe the classes (types?)that individuals belong to and the properties that they inherit by virtue of class membership. We can always assert specific properties about individuals, but the power of ontologies comes from class-based reasoning.

Defining simple hierarchical named classes (class, subClassOf)

Now, we begin our ontology definitions. In order to describe objects, it is useful to define some basic types. This is done by giving a name for a class, which is the subset of the universe which contains all objects of that type.

  <Class ID="WINE-REGION">
  <Class ID="FRENCH-REGION">
    <subClassOf resource="#WINE-REGION"/>
  </Class>
  <Class ID="WINERY">

  <Class ID="CONSUMABLE-THING"/>

  <Class ID="POTABLE-LIQUID">
    <subClassOf resource="#CONSUMABLE-THING"/>
    ...
  </Class>

  <Class ID="WINE">
    <subClassOf resource="#POTABLE-LIQUID"/>
    ...
    <subClassOf>
      <Restriction>
        <onProperty resource="#REGION"/> <allValuesFrom resource="#WINE-REGION"/>
      </Restriction>
    </subClassOf>
  </Class>

Defining individuals (individual)

We can also define individual objects in a class, e.g.,

  <Description ID="ALSACE">
    <type resource="#FRENCH-REGION"/>
  </Description>

Datatypes (user-defined XML Schema datatypes)

It is also possible to use user-defined datatypes in OWL. Suppose we wanted to distinguish between different classes of people by their ages. We would create several XML Schema datatype definitions in a separate file, such as http://www.w3c.org/2002/10/OwlGuide-dt, which contains

<!-- $Revision: 1.2 $ of $Date: 2001/03/18 22:44:50 $. -->

<xsd:schema xmlns:xsd ="http://www.w3.org/2000/10/XMLSchema#">

<xsd:simpleType name="over12">
  <!-- over12 is an XMLS datatype based on decimal -->
  <!-- with the added restriction that values must be >= 13 -->
  <xsd:restriction base="xsd:decimal">
  <xsd:minInclusive value="13"/>
  </xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="over17">
  <!-- over17 is an XMLS datatype based on positiveIntege -->
  <!-- with the added restriction that values must be >= 18 -->
  <xsd:restriction base="xsd:positiveInteger">
  <xsd:minInclusive value="18"/>
  </xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="over59">
  <!-- over59 is an XMLS datatype based on positiveIntege -->
  <!-- with the added restriction that values must be >= 59 -->
  <xsd:restriction base="xsd:positiveInteger">
  <xsd:minInclusive value="60"/>
  </xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="clothingsize">
  <!-- clothingsize is an XMLS union datatype -->
  <!-- values of clothingsize may be either integers or strings -->
  <xsd:union>
     <xsd:simpleType>
       <xsd:restriction base='integer'/>
     </xsd:simpleType>
     <xsd:simpleType>
       <xsd:restriction base='string'/>
     </xsd:simpleType>
  </xsd:union>
</xsd:simpleType>

<xsd:simpleType name="XSDEnumerationHeight">
  <!-- This is an XMLS datatype valid values for which are the strings -->
  <!-- "short", "medium" and "tall". -->
  <xsd:restriction base="string">
    <xsd:enumeration value="short"/>
    <xsd:enumeration value="medium"/>
    <xsd:enumeration value="tall"/>
  </xsd:restriction>
</xsd:simpleType>

</xsd:schema>

Then we could reference elements of this file in OWL restrictions, as in

<owl:Class rdf:ID="Adult">
  <owl:intersectionOf rdf:parseType="owl:collection">
    <owl:Class rdf:about="#Person"/>
    <owl:Restriction>
      <owl:onProperty rdf:resource="#age"/>
      <owl:hasClass rdf:resource="http://www.w3c.org/2002/10/OwlGuide-dt#over17"/>
    </owl:Restriction>
  </owl:intersectionOf>
</owl:Class>

<owl:Class rdf:ID="Senior">
  <owl:intersectionOf rdf:parseType="owl:collection">
    <owl:Class rdf:about="#Person"/>
    <owl:Restriction>
      <owl:onProperty rdf:resource="#age"/>
      <owl:hasClass rdf:resource="http://www.w3c.org/2002/10/OwlGuide-dt#over59"/>
    </owl:Restriction>
  </owl:intersectionOf>
</owl:Class>

Simple Properties

Defining properties (property, subPropertyOf, domain, range)

Next, we define a property.


  <Property ID="REGION">
    <functional />
    <range resource="#WINE-REGION"/>
    <domain resource="#WINE"/>
  </Property>

Properties of individuals

Property Characteristics and Restrictions

The next few sections describe the simple predefined property restrictions.

inverseOf, transitive, symmetric, functional

unambiguousProperty, allValuesFrom, someValueFrom

simple cardinality

Ontology mapping

sameClassAs, samePropertyAs

sameIndividualAs, differentIndividualFrom

Complex Classes and Properties

Complex Classes (axioms and constructive classes)

Class relations

Oneof (enumerated classes)

Disjoint Classes

sameClassAs, subClassOf applied to class expressions

unionOf, intersectionOf, complementOf

Complex Property axioms

Full cardinality

hasValue

Status

This section describes the status of this document at the time of its publication. Other documents may supersede this document.

This document is a working document for the use by W3C Members and other interested parties. It may be updated, replaced or made obsolete by other documents at any time.

This document has been produced as part of the W3C Semantic Web Activity, following the procedures set out for the W3C Process. The document has been compiled by the Web Ontology Working Group. The goals of the Web Ontology working group are discussed in the Web Ontology Working Group charter.

A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR/.




References

Related OWL

Requirements

[@@ ref]

Feature List

[@@ ref]

Reference

[@@ ref]

Syntax docs

[@@ ref]

Formal Model

[@@ ref]

Related Ontology Standards

DAML

[@@ ref]

Related standards

RDF

[RDF]
Resource Description Framework (RDF) Model and Syntax Specification , World Wide Web Consortium Recommendation, 1999 Lassila, Swick [eds].
RDF: Resource Description Framework at W3C. Background.

RDFS

[RDFS]
Resource Description Framework (RDF) Schema Specification 1.0, W3C Candidate Recommendation 27 March 2000.

XML

[XML 1.0]
Extensible Markup Language (XML) 1.0
XML Tutorial 1: Well-Formed XML Documents , Bonnie SooHoo Aug 4, 2000 in webreview.com.
Extensible Markup Language (XML) at W3C More background

URI

[URI]
Uniform Resource Identifiers (URI): Generic Syntax , IETF Draft Standard August 1998 (RFC 2396) T. Berners-Lee, R. Fielding, L. Masinter
A Beginner's Guide to URLs. The classic intro to URLs, by the NCSA Mosaic team. What you really need to know.
Web Naming and Addressing Overview (URIs, URLs, ...). More background at W3C.

Namespace

[XMLNS]
Namespaces in XML, W3C Recommendation Jan 1999.
XML Namespaces by Example, Tim Bray Jan. 19, 1999 in XML.com. What you really need to know.
Namespace Myths Exploded, by Ronald Bourret Mar. 8, 2000 in XML.com.
Extensible Markup Language (XML) at W3C. (More background).

XML Schema

General

Description Logics

Description Logic web page
[@@ ref]

KR/Ontology

[@@ ref]

OIL

[@@ ref]

DAML-ONT

[@@ ref]

DAML+OIL

Annotated DAML+OIL Ontology Markup , Frank van Harmelen, Peter F. Patel-Schneider and Ian Horrocks (eds), March 2001.