Copyright © 2006-2007 by the Authors. This document is available under the W3C Document License. See the W3C Intellectual Rights Notice and Legal Disclaimers for additional information.
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 specifies an XML exchange syntax for OWL 1.1.
This is an editor's draft, for comment by the OWL community.
This document is an evolution of the OWL 1.1 Web Ontology Language: XML Syntax document that forms part of the OWL 1.1 Web Ontology Language W3C Member Submission. Comments are welcome. Please send feedback to public-owl-dev@w3.org, which has a public archive. Bug reports can be directed there. Please check the issues list first.
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 here. 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.
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 asymmetric. 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>