W3C W3C Member Submission

OWL 1.1 Web Ontology Language
XML Syntax

W3C Member Submission 19 December 2006

This version:
http://www.w3.org/submissions/2006/SUBM-owl11-xml_syntax-20061219/
Latest version:
http://www.w3.org/submissions/owl11-xml_syntax/
Authors:
Bernardo Cuenca Grau, The University of Manchester
Boris Motik, The University of Manchester
Peter Patel-Schneider, Bell Labs Research
Contributors:
Sean Bechhofer, The University of Manchester
Ian Horrocks, The University of Manchester
Bijan Parsia, The University of Manchester

Abstract

OWL 1.1 extends the W3C OWL Web Ontology Language with a small but useful set of features that have been requested by users, for which effective reasoning algorithms are now available, and that OWL tool developers are willing to support. The new features include extra syntactic sugar, additional property and qualified cardinality constructors, extended datatype support, simple metamodelling, and extended annotations. This document presents an XML syntax for OWL 1.1.

Status of this document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications can be found in the W3C technical reports index at http://www.w3.org/TR/.

By publishing this document, W3C acknowledges that the Submitting Members have made a formal Submission request to W3C for discussion. Publication of this document by W3C indicates no endorsement of its content by W3C, nor that W3C has, is, or will be allocating any resources to the issues addressed by it. This document is not the product of a chartered W3C group, but is published as potential input to the W3C Process. A W3C Team Comment has been published in conjunction with this Member Submission. Publication of acknowledged Member Submissions at the W3C site is one of the benefits of W3C Membership. Please consult the requirements associated with Member Submissions of section 3.3 of the W3C Patent Policy. Please consult the complete list of acknowledged W3C Member Submissions.

Please send feedback to public-owl-dev@w3.org, which has a public archive.


Table of Contents


1 Overview

The Web Ontology Language (OWL) 1.1 specification [OWL 1.1 Specification] defines a functional style syntax whose intention is to be readable by humans. However, it is widely recognized that a syntax is needed that can be easily implemented. This document presents such a syntax that is based on XML.

It is expected that this syntax will be used in the Description Logics Implementors Group (DIG) 2.0 [DIG 2.0] release of the interface to DL reasoners. By relying on this common syntax, OWL is completely aligned with DIG, thus reducing implementation effort and preventing potential discrepancies.

The syntax is defined in the XML Schema language [XML Schema] and can be downloaded from schema/owl1.1.xsd. It has been obtained by a straightforward translation of the structural specification from [DIG 2.0] in the following way:

All URIs in an ontology are assuming to be relative to the xml:base of the ontology document. During parsing, all URIs should be resolved as specified in the XML Base specification [XML Base].

The root element of any OWL 1.1 ontology file written in this syntax should be owl11xml:Ontology. However, other specifications are free to reuse other elements from the schema. For example, the DIG 2.0 specification [DIG 2.0] can reuse the elements and element groups corresponding to axioms, descriptions, and entities.

The XML schema presented in this document covers the entire OWL 1.1 language. In [OWL 1.1 Tractable Fragments] several tractable fragments of OWL 1.1 have been defined. There are no separate schemata for these fragments; ontologies that can be expressed by the fragment languages should be written using the most general schema. Validating whether an ontology belongs to a particular fragment is not intended to be performed using XML schema mechanisms; this is to be done using other means whose specification is beyond the scope of this document.

2 Examples

This section presents the XML syntax for OWL 1.1 by means of several examples.

The root element of each OWL 1.1 ontology file encoded using XML syntax must be owl11xml:Ontology. This element may contain a number of annotations followed by a sequence of axioms. Each ontology must be assigned a unique URI. Also, it is a good practice to include an xml:base specification to enable correct URI resolution.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="owl1.1.xsd" type="xsd"?>
<owl11xml:Ontology xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.w3.org/2006/12/owl11-xml/owl1.1.xsd"
  xmlns:owl11xml="http://www.w3.org/2006/12/owl11-xml#"
  xml:base="http://my.domain.com/myOntology"
  owl11xml:ontologyURI="http://my.domain.com/myOntology">
  <owl11xml:Imports>http://my.domain.com/someOtherOntology</owl11xml:Imports>

  <!-- The ontology axioms go here -->
</owl11xml:Ontology>

It is good practice to declare all elements in an ontology so that an ontology can be checked for structural consistency. This helps preventing errors caused to typos. We next show how to declare several different entities:

Example:

  <owl11xml:Declaration>
    <owl11xml:OWLClass owl11xml:URI="#animal"/>
  </owl11xml:Declaration>
  <owl11xml:Declaration>
    <owl11xml:ObjectProperty owl11xml:URI="#eats"/>
  </owl11xml:Declaration>

Here are a couple of basic axioms about properties.

Example:

  <owl11xml:EquivalentObjectProperties>
    <owl11xml:ObjectProperty owl11xml:URI="#eats"/>
    <owl11xml:InverseObjectProperty>
      <owl11xml:ObjectProperty owl11xml:URI="#eaten_by"/>
    </owl11xml:InverseObjectProperty>
  </owl11xml:EquivalentObjectProperties>
  <owl11xml:SubObjectPropertyOf>
    <owl11xml:ObjectProperty owl11xml:URI="#has_father"/>
    <owl11xml:ObjectProperty owl11xml:URI="#has_parent"/>
  </owl11xml:SubObjectPropertyOf>
  <owl11xml:ObjectPropertyDomain>
    <owl11xml:ObjectProperty owl11xml:URI="#eats"/>
    <owl11xml:OWLClass owl11xml:URI="#animal"/>
  </owl11xml:ObjectPropertyDomain>

Object property inclusion axioms of OWL 1.1 allow the construction of quite complex axioms regarding object properties. For example, it is possible to state that, if somebody owns an object, then they also own all parts of the object.

Example:

  <owl11xml:SubObjectPropertyOf>
    <owl11xml:SubObjectPropertyChain>
      <owl11xml:ObjectProperty owl11xml:URI="#owns"/>
      <owl11xml:ObjectProperty owl11xml:URI="#has_part"/>
    </owl11xml:SubObjectPropertyChain>
    <owl11xml:ObjectProperty owl11xml:URI="#owns"/>
  </owl11xml:SubObjectPropertyOf>

Properties can be made disjoint, and one can assert properties to be reflexive, irreflexive, symmetric, or antisymmetric. For example, the mother_of property should be irreflexive, because nobody can be their own mother.

Example:

  <owl11xml:DisjointObjectProperties>
    <owl11xml:ObjectProperty owl11xml:URI="#mother_of"/>
    <owl11xml:ObjectProperty owl11xml:URI="#sister_of"/>
  </owl11xml:DisjointObjectProperties>
  <owl11xml:IrreflexiveObjectProperty>
    <owl11xml:ObjectProperty owl11xml:URI="#mother_of"/>
  </owl11xml:IrreflexiveObjectProperty>

OWL 1.1 provides a rich set of primitives for writing classes and axioms about them.

Example:

  <owl11xml:SubClassOf>
    <owl11xml:OWLClass owl11xml:URI="#bicycle"/>
    <owl11xml:OWLClass owl11xml:URI="#vehicle"/>
  </owl11xml:SubClassOf>
  <owl11xml:EquivalentClasses>
    <owl11xml:OWLClass owl11xml:URI="#bus_driver"/>
    <owl11xml:ObjectIntersectionOf>
      <owl11xml:OWLClass owl11xml:URI="#person"/>
      <owl11xml:ObjectSomeValuesFrom>
        <owl11xml:ObjectProperty owl11xml:URI="#drives"/>
        <owl11xml:OWLClass owl11xml:URI="#bus"/>
      </owl11xml:ObjectSomeValuesFrom>
    </owl11xml:ObjectIntersectionOf>
  </owl11xml:EquivalentClasses>
  <owl11xml:SubClassOf>
    <owl11xml:OWLClass owl11xml:URI="#white_van_man"/>
    <owl11xml:ObjectAllValuesFrom>
      <owl11xml:ObjectProperty owl11xml:URI="#reads"/>
      <owl11xml:OWLClass owl11xml:URI="#tabloid"/>
    </owl11xml:ObjectAllValuesFrom>
  </owl11xml:SubClassOf>

Qualified cardinality restrictions can be used to assert that a dog lover is a person who owns al least three dogs.

Example:

  <owl11xml:EquivalentClasses>
    <owl11xml:OWLClass owl11xml:URI="#dog_lover"/>
    <owl11xml:ObjectIntersectionOf>
      <owl11xml:OWLClass owl11xml:URI="#person"/>
      <owl11xml:ObjectMinCardinality owl11xml:cardinality="3">
        <owl11xml:ObjectProperty owl11xml:URI="#has_pet"/>
        <owl11xml:OWLClass owl11xml:URI="#dog"/>
      </owl11xml:ObjectMinCardinality>
    </owl11xml:ObjectIntersectionOf>
  </owl11xml:EquivalentClasses>

OWL 1.1 provides axioms that state positive and negative facts about individuals.

Example:

  <owl11xml:ClassAssertion>
    <owl11xml:OWLClass owl11xml:URI="#newespaper"/>
    <owl11xml:Individual owl11xml:URI="#Daily_Mirror"/>
  </owl11xml:ClassAssertion>
  <owl11xml:ClassAssertion>
    <owl11xml:OWLClass owl11xml:URI="#Fred"/>
    <owl11xml:Individual owl11xml:URI="#person"/>
  </owl11xml:ClassAssertion>
  <owl11xml:ObjectPropertyAssertion>
    <owl11xml:ObjectProperty owl11xml:URI="#has_pet"/>
    <owl11xml:Individual owl11xml:URI="#Fred"/>
    <owl11xml:Individual owl11xml:URI="#Tibbs"/>
  </owl11xml:ObjectPropertyAssertion>
  <owl11xml:NegativeObjectPropertyAssertion>
    <owl11xml:ObjectProperty owl11xml:URI="#brother_of"/>
    <owl11xml:Individual owl11xml:URI="#Fred"/>
    <owl11xml:Individual owl11xml:URI="#Alice"/>
  </owl11xml:NegativeObjectPropertyAssertion>

References

[OWL 1.1 Specification]
OWL 1.1 Web Ontology Language: Structural Specification and Functional-Style Syntax. Peter F. Patel-Schneider, Ian Horrocks, and Boris Motik, eds., 2006.
[OWL 1.1 Tractable Fragments]
OWL 1.1 Web Ontology Language: Tractable Fragments. Bernardo Cuenca Grau, ed., 2006.
[XML Base]
XML Base. Jonathan Marsh, ed. W3C Recommendation 27 June 2001.
[XML Schema]
XML Schema Part 1: Structures Second Edition. Henry S. Thompson, David Beech, Murray Maloney, Noah Mendelsohn, eds. W3C Recommendation 28 October 2004.
[DIG 2.0]
DIG 2.0: The DIG Description Logic Interface: Document Index. Sean Bechhofer, ed., DIG Working Group Note, September 2006.