W3C

Web Ontology Language (OWL)
XML Presentation Syntax

Editor's Note 20 February 2003 - no W3C status at this time

Editors:
Masahiro Hori (IBM Tokyo Research) horim@jp.ibm.com
Jérôme Euzenat (INRIA Rhône-Alpes) Jerome.Euzenat@inrialpes.fr
Peter F. Patel-Schneider (Bell Labs Research, Lucent Technologies) pfps@research.bell-labs.com

Abstract

This document describes an XML presentation sytax and XML Schemas for OWL 1.0 sublanguages: OWL Lite, OWL DL, and OWL Full.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. The latest status of this document series is maintained at the W3C.

This Note has been written to meet the requirement that OWL 1.0 must have an XML syntax [OWL Requirement]. It is not intended to be a normative specification. Instead, it represents a suggestion of one possible XML presentation syntax schema for OWL. At the time of writing, the schema described here has not benefited from implementation experience.

The authors welcome comments on this document, but does not guarantee a reply or any further action. Please send comments on this draft to public-webont-comments@w3.org; public archives are available. Comments may also be sent to the authors at the above addresses.This document may be updated or added to based on implementation experience, but no commitment is made by the W3C, or any of its members, regarding future updates.

This document is a NOTE made available by the W3C for discussion only. Publication of this Note by W3C indicates no endorsement by W3C or the W3C Team, or any W3C Members. A list of current W3C technical reports and publications, including Working Drafts and Notes, can be found at http://www.w3.org/TR/.

Acknowledgements

This document is the result of extensive discussions within the Web Ontology Working Group as a whole. The members of this working group were Jean-Fran-ois Baget, James Barnette, Sean Bechhofer, Jonathan Borden, Frederik Brysse, Stephen Buswell, Peter Crowther, Jos De Roo, David De Roure, Mike Dean, Larry Eshelman, J-r-me Euzenat, Dieter Fensel, Tim Finin, Nicholas Gibbins, Pat Hayes, Jeff Heflin, Ziv Hellman, James Hendler, Bernard Horan, Masahiro Hori, Ian Horrocks, Francesco Iannuzzelli, Mario Jeckle, Ruediger Klein, Ora Lassila, Alexander Maedche, Massimo Marchiori, Deborah McGuinness, Libby Miller, Enrico Motta, Leo Obrst, Laurent Olivry , Peter Patel-Schneider, Martin Pike, Marwan Sabbouh, Guus Schreiber, Noboru Shimizu, Michael Sintek, Michael Smith, Ned Smith, John Stanton, Lynn Andrea Stein, Herman ter Horst, Lynne R. Thompson, David Trastour, Frank van Harmelen, Raphael Volz, Evan Wallace, Christopher Welty, and John Yanosy.

Table of Contents


1 Introduction

This document specifies XML presentation syntax for OWL, which is defined as dialect similar to OWL Abstract Syntax [OWL Abstract Syntax]. The OWL 1.0 language provides three increasingly expressive sublanguages: OWL Lite, OWL DL, and OWL Full. This document provides XML Schemas for XML presentation syntax corresponding to each of the three sublanguages:

The root element of OWL documents for the XML presentation syntax must be Ontology element.

Each of the sublanguages is an extension of its simpler predecessor, and the following relations hold but the inverses do not.

A zip archive of all the Schemas for XML presentation syntax is available.

1.1 Notational Conventions

This document uses a number of namespace prefixes as listed below. Note that the choice of any namespace prefix is arbitrary, and not semantically significant.

Prefix Namespace Notes
owls "http://www.w3.org/2003/OWL-XMLSchema" The namespace of the XML presentation syntax of OWL 1.0 defined by this document
owl "http://www.w3.org/2002/07/owl" The namespace of OWL 1.0 in RDF/XML syntax
xsd "http://www.w3.org/2001/XMLSchema" The namespace of the XML Schema [XMLSchema-1]
xsi "http://www.w3.org/2001/XMLSchema-instance" The namespace of the XML Schema instance [XMLSchema-1]

1.2 How to Use an XML Schema

XML Schemas do not have to be specified in an OWL document instance itself, but it may be specified in an instance by adding schemaLocation attribute (in the XML Schema instance namespace) to the root element. For example, if an author uses the XML Schema for OWL Lite, the start tag of the Ontology element may designate the location of the XML Schema as shown below:

<owls:Ontology 
  xmlns:owls="http://www.w3.org/2003/OWL-XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.w3.org/2003/OWL-XMLSchema
                      http://example.org/owl1-lite.xsd" >

A value of the xsi:schemaLocation attribute is a pair (or pairs) of URI references consisting of a namespace name and a location of an XML Schema. Note that a pair of URI references is only a hint for XML Schema processors, which may use alternative XML Schemas indicated by other names. For the further details of schema document access, see "4.3.2 How schema definitions are located on the Web" of the XML Schema Part 1 [XMLSchema-1]

1.3 XML Schema Modules

This document provides a set of XML Schema modules for XML presentation syntax of OWL. The design goal of this modularization is to set up a core module common to all the OWL sublanguages and define additional modules to be customized for different sublanguages. Note that the modularization here is done for the adaptation to the three sublanguages, and is not designed for the arbitrary customization of OWL.

The top-level Schema document, which collects required modules together, is called a Schema driver. A driver document only includes other modules, and does not contain any markup declarations in itself. Modularization through drivers and modules is being done for the reformulation of the XHTML specification in XML Schema [XHTML m12n].

Three Schema drivers are defined for the sublanguages: OWL Lite (owl1-lite.xsd), OWL DL (owl1-dl.xsd), and OWL Full (owl1-full.xsd). These Schema drivers and modules included into the drivers are given separately in Appendix A.

2. Element Reference

2.1 The Root Element

An OWL document consists of an optional header elements and any number of classes, properties, and individuals. Note that "axiom" is a formal term, and may be called "definition" somewhat informally.

element Ontology
<Ontology
  name = xsd:anyURI 
>
  Content: (VersionInfo | PriorVersion | BackwardCompatibleWith | 
            IncompatibleWith | Imports | Annotation | 
            Class[axiom] | EnumeratedClass(D,F) | 
            SubClassOf(D,F) | EquivalentClasses | DisjointClasses(D,F) | 
            DatatypeProperty | ObjectProperty | 
            SubPropertyOf | EquivalentProperties | 
            Individual | SameIndividual | DifferentIndividuals)* 
</Ontology>
Attribute: name - refers to the current document
Note: This is the root element of OWL documents in the XML presentation syntax.

2.2 Header Elements

The root element Ontology may optionally contain, in any order, any number of header elements for versioning import and/or annotation statements.

element VersionInfo
<VersionInfo>
  Content: (#CDATA)
</VersionInfo>
Parents: Ontology
Note: This element contains a string giving information about this version such as RCS/CVS keywords.
element PriorVersion
<PriorVersion
  ontology = xsd:anyURI {required} 
>
  Content: (##empty)
</PriorVersion>
Attribute: ontology - a reference to a prior ontology
Parents: Ontology
Note: This element contains a reference to another ontology that identifies the specified ontology as a prior version of the containing ontology.
element BackwardCompatibleWith
<BackwardCompatibleWith
  ontology = xsd:anyURI {required} 
>
  Content: (##empty)
</BackwardCompatibleWith>
Attribute: ontology - a reference to a backward compatible ontology
Parents: Ontology
Note: This elment contains a reference to another ontology that identifies the specified ontology as a prior version of the containing ontology, and further indicates that it is backward compatible with it.
element IncompatibleWith
<IncompatibleWith
  ontology = xsd:anyURI {required} 
>
  Content: (##empty)
</IncompatibleWith>
Attribute: ontology - a reference to an incompatible ontology
Parents: Ontology
Note: This elment contains a reference to another ontology that indicates that the containing ontology is a later version of the referenced ontology, but is not backward compatible with it.
element Imports
<Imports
  ontology = xsd:anyURI {required} 
>
  Content: (##empty)
</Imports>
Attribute: ontology - a reference to another ontology
Parents: Ontology
Note: This elment refers to another OWL ontology containing definitions, whose meaning is considered to be part of the meaning of the importing ontology.
element Annotation
<Annotation>
  Content: (Label | Documentation | Info | xsd:any )*
</Annotation>
Parents: Ontology, Class[axiom], DatatypeProperty, ObjectProperty, Individual[axiom],
EnumeratedClass(D,F)
Note: Annotations allow arbitrary uninterpreted information to be added to ontologies.
element Label
<Label
  xml:lang = language 
>
  Content: (#CDATA)
</Label>
Attribute: xml:lang - specifies the language used in the content
Parents: Annotation
Note: This element provides a human-readable version name of an annotated element.
element Documentation
<Documentation
  xml:lang = language 
>
  Content: (#CDATA)
</Documentation>
Attribute: xml:lang - specifies the language used in the content
Parents: Annotation
Note: This element provides a human-readable description of an annotated element.
element Info
<Info
  subject = xsd:anyURI
  object = xsd:anyURI
>
  Content: (##empty)
</Info>
Attribute: subject - a reference to a subject of this annotation
object - a reference to a content of this annotation
Parents: Annotation

2.3 Classes

Classes provide an abstraction mechanism for grouping resources with similar characteristics. OWL classes are described through "class descriptions", which can be combined into "class axioms".

element Class[axiom]
<Class
  name = xsd:anyURI {required} 
  complete = xsd:boolean {required}
  deprecated = xsd:boolean 
>
  Content: (Annotation*, description*)
</Class>
Attribute: name - a reference to a name of this Class
complete - the modality is complete if true, otherwise it is partial
deprecated - this class is deprecated if true
Parents: Ontology
Note: This element contains non-empty sequence of descriptions, which are the basic building blocks of class axioms.

2.3.1 Class Descriptions

group description
  Content: (Class[ID] | DataRestriction | ObjectRestriction | UnionOf(D,F) | 
            IntersectionOf(D,F) | ComplementOf(D,F) | OneOf(D,F))
Parents: Class[axiom], EquivalentClasses, DisjointClasses(D,F),
SubClassOf/sub(D,F), SubClassOf/super(D,F), UnionOf(D,F),
IntersectionOf(D,F), ComplementOf(D,F),
domain(D,F), ObjectProperty/range(D,F),
ObjectRestriction/allValuesFrom(D,F), ObjectRestriction/someValueFrom(D,F), Individual/type
Note: The first type (Class) describes a class through a name. The other five types of class descriptions (property restriction, union, intersection, complement, and enumeration) define an anonymous class.
element Class[ID]
<Class
  name = xsd:anyURI {required} 
>
  Content: (##empty)
</Class>
Attribute: name - a reference to a class name
Parents: description, EquivalentClasses(L), domain(L), range(L)
Note: This elment describes a class through a name.
(a) Property Restriction

A property restriction defines an anonymous class, namely a class of all individuals that satisfy the restriction. The XML syntax of OWL distinguishes two types of property restrictions: DataRestriction (restriction on properties for which the range value is a data literal) and ObjectRestriction (restriction on properties for which the range value is an individual).

element DataRestriction
<DataRestriction
  property = xsd:anyURI {required} 
  minCardinality(L)   = either '0' or '1' 
  minCardinality(D,F) = xsd:nonNegativeInteger
  maxCardinality(L)   = either '0' or '1' 
  manCardinality(D,F) = xsd:nonNegativeInteger
  cardinality(L)   = either '0' or '1'  
  cardinality(D,F) = xsd:nonNegativeInteger
>
  Content: ((allValuesFrom | someValueFrom | value(D,F))*)
</DataRestriction>
Attribute: property - a reference to a property name
minCardinality - a minimum cardinality value
maxCardinality - a maximum cardinality value
cardinality - a cardinality value
Parents: description
Note: This element contains ...
element DataRestriction/allValuesFrom
<allValuesFrom
  datatype = xsd:anyURI 
>
  Content(D,F): ( OneOf? )
</allValuesFrom>
Attribute: datatype - a reference to a datatype name
Parents: DataRestriction
Note: This element specifies a class of all individuals for which all range values of the property under consideration are data values within the specified data range.
element DataRestriction/someValueFrom
<someValueFrom
  datatype = xsd:anyURI 
>
  Content(D,F): ( OneOf? )
</someValueFrom>
Attribute: datatype - a reference to a datatype name
Parents: DataRestriction
Note: This element spacifies a class of all individuals for which at least one value of the property concerned is a data value in the data range.
element DataRestriction/value(D,F)
<value>
  Content: ( xsd:anySimpleType )
</value>
Parents: DataRestriction
Note: This element spacifies a class of all individuals for which the property concerned has at least one value semantically equal to V (it may have other values as well).
element ObjectRestriction
<ObjectRestriction
  property = xsd:anyURI {required} 
  minCardinality(L)   = either '0' or '1' 
  minCardinality(D,F) = xsd:nonNegativeInteger
  maxCardinality(L)   = either '0' or '1' 
  manCardinality(D,F) = xsd:nonNegativeInteger
  cardinality(L)   = either '0' or '1'  
  cardinality(D,F) = xsd:nonNegativeInteger
>
  Content: ((allValuesFrom | someValueFrom | value(D,F))*)
</ObjectRestriction>
Attribute: property - a reference to a property name
minCardinality - a minimum cardinality value
maxCardinality - a maximum cardinality value
cardinality - a cardinality value
Parents: description
Note: This element contains ...
element ObjectRestriction/allValuesFrom
<allValuesFrom
  class = xsd:anyURI 
>
  Content: ( description(D,F)* )
</allValuesFrom>
Attribute: class - a reference to a class name
Parents: ObjectRestriction
Note: This element specifies a class of all individuals for which all range values of the property under consideration are members of the class extension of the class description.
element ObjectRestriction/someValueFrom
<someValueFrom
  class = xsd:anyURI 
>
  Content: ( description(D,F)* )
</someValueFrom>
Attribute: class - a reference to a class name
Parents: ObjectRestriction
Note: This element specifies a class of all individuals for which at least one value of the property concerned is an instance of the class description.
(b) Enumeration
element description/OneOf(D,F)
<OneOf>
  Content: ( Individual[ID]* ) 
</OneOf>
Parents: description
Note: This elment contains the exactly enumerated individuals.

For example:

<owls:Class owls:name="WineColor" owls:complete="false">
  <owls:OneOf>
    <owls:Individual owls:name="#White" /> 
    <owls:Individual owls:name="#Rose" /> 
    <owls:Individual owls:name="#Red" /> 
  </owls:OneOf>
</owls:Class>

Note that EnumeratedClass can also be used for the OneOf enumeration. See the next example below.

<owls:EnumeratedClass owls:name="WineColor2">
  <owls:Individual owls:name="#White" owls:type="WineColor" />
  <owls:Individual owls:name="#Rose"  owls:type="WineColor" />
  <owls:Individual owls:name="#Red"   owls:type="WineColor" />
</owls:EnumeratedClass>
element EnumeratedClass(D,F)
<EnumeratedClass
  name = xsd:anyURI {required} 
  deprecated = xsd:boolean 
>
  Content: (Annotation*, Individual[ID]*) 
</EnumeratedClass>
Attribute: name - a reference to a name of this class
deprecated - this class is deprecated if true
Parents: Ontology
Note: This elment contains the exactly enumerated individuals.
element Individual[ID]
<Individual
  name = xsd:anyURI {required} 
  type = xsd:anyURI 
>
  Content: (##empty)
</Individual>
Attribute: name - a reference to an individual
type - a reference to a type of an individual
Parents: SameIndividual, DifferentIndividuals, EnumeratedClass(D,F), OneOf(D,F)
Note: This elment is used for solely referring to an individual ID, and does not actually define any individual, unlike Individual construct.
(c) Boolean Combination
element IntersectionOf(D,F)
<IntersectionOf
  class = xsd:anyURI 
>
  Content: ( description* )
</IntersectionOf>
Attribute: class - a reference to a class name
Parents: description
Note: This element specifies a class for which the class extension contains precisely those individuals that are members of the class extension of all class descriptions in the range list.
element UnionOf(D,F)
<UnionOf
  class = xsd:anyURI 
>
  Content: ( description* )
</UnionOf>
Attribute: class - a reference to a class name
Parents: description
Note: This element specifies an anonymous class for which the class extension contains those individuals that occur in at least one of the class extensions of the class descriptions in the range list.
element ComplementOf(D,F)
<ComplementOf>
  Content: ( description )
</ComplementOf>
Parents: description
Note: This element specifies a class for which the class extension contains exactly those individuals that do not belong to the class extension of the range class.

2.3.2 Class Axioms

element SubClassOf(D,F)
<SubClassOf>
  Content: ( sub, super )
</SubClassOf>
Parents: Ontology
Note: This element allows one to say that the class extension of a class description is a subset of the class extension of another class description.
element SubClassOf/sub(D,F)
<sub>
  Content: ( description )
</sub>
Parents: SubClassOf
element SubClassOf/super(D,F)
<super>
  Content: ( description )
</super>
Parents: SubClassOf
element EquivalentClasses
<EquivalentClasses>
  Content(L): ( Class[ID], Class[ID]+ )
  Content(D,F): ( description, description+ )
</EquivalentClasses>
Parents: Ontology
Note: This element asserts that two or more classes have the same class extension (i.e., class extensions contain exactly the same set of individuals).
element DisjointClasses(D,F)
<DisjointClasses>
  Content: ( description, description+ )
</DisjointClasses>
Parents: Ontology
Note: This element asserts that the class extensions of the two or more class descriptions involved have no individuals in common.

2.4 Properties

OWL distinguishes between two types of properties: DatatypeProperty and ObjectProperty.

element DatatypeProperty
<DatatypeProperty
  name = xsd:anyURI {required}  
  functional = xsd:boolean 
  inverseFunctional(L,D) = xsd:boolean {fixed as 'false'}
  inverseFunctional(F) = xsd:boolean 
  deprecated = xsd:boolean 
>
  Content: ((super[prop] | domain | range)*)
</DatatypeProperty>
Attribute: name - a reference to a name of this property
functional - asserts that this property can only have one (unique) value for each instance, if true
inverseFunctional - asserts this property has a range value that uniquely determines a domain value
deprecated - this property is deprecated if true
Parents: Ontology
Note: This element contains a value range of data values, and thus link individuals to data values.
element ObjectProperty
<ObjectProperty
  name = xsd:anyURI {required}  
  inverseOf = xsd:anyURI 
  transitive = xsd:boolean 
  symmetric = xsd:boolean 
  functional = xsd:boolean 
  inverseFunctional(L) = xsd:boolean {fixed as 'false'}
  inverseFunctional(D,F) = xsd:boolean 
  deprecated = xsd:boolean 
>
  Content: ((super[prop] | domain | range)*)
</ObjectProperty>
Attribute: name - a reference to a name of this property
inverseOf - a reference to a name of an inverse relation
transitive - asserts that this property is a transitive relation, if true
symmetric - asserts that this property is a symmetric relation, if true
functional - asserts that this property can only have one (unique) value for each instance, if true
inverseFunctional - asserts this property has a range value that uniquely determines a domain value
deprecated - this property is deprecated if true
Parents: Ontology
Note: This element contains a value range of class individuals, and thus link individuals to individuals ("individual-valued property" would probably have been a bit better term).
element super[prop]
<super
  name = xsd:anyURI {required}  
>
  Content: (##empty)
</super>
Attribute: name - a reference to a super property name
Parents: DatatypeProperty, ObjectProperty
element domain
<domain
  class = xsd:anyURI 
>
  Content(L): ( Class[ID]* )
  Content(D,F): ( description* )
</domain>
Attribute: class - a reference to a class name
Parents: DatatypeProperty, ObjectProperty
Note: This element asserts that the domain values of this property must belong to the class extension of the class description.
element DatatypeProperty/range
<domain
  datatype = xsd:anyURI 
>
  Content(D,F): ( OneOf? )
</domain>
Attribute: datatype - a reference to a datatype name
Parents: DatatypeProperty
Note: This element asserts that the range values of this property must belong to data values in the specified data range.
element ObjectProperty/range
<range
  class = xsd:anyURI 
>
  Content(L): ( Class[ID]* )
  Content(D,F): ( description* )
</range>
Attribute: class - a reference to a class name
Parents: ObjectProperty
Note: This element asserts that the range values of this property must belong to the class extension of the class description in the specified data range.
element SubPropertyOf
<SubPropertyOf
  sub = xsd:anyURI {required}  
>
  Content: ( DatatypeProperty[ID] | ObjectProperty[ID] )
</SubPropertyOf>
Attribute: sub - a reference to a subproperty
Parents: Ontology
Note: This element defines that a property specified as a value of sub attribute, is a subproperty of another property specified as content.
element EquivalentProperties
<EquivalentProperties>
  Content: ( (DatatypeProperty[ID], DatatypeProperty[ID]+ ) |
             (ObjectProperty[ID], ObjectProperty[ID]+) ) 
</EquivalentProperties>
Parents: Ontology
Note: This element asserts that two or more properties have the same property extension.
element DatatypeProperty[ID]
<DatatypeProperty
  name = xsd:anyURI {required} 
>
  Content: (##empty)
</DatatypeProperty>
Attribute: name - a reference to a datatype property
Parents: SubPropertyOf, EquivalentProperties
Note: This elment is used for solely referring to a datatype property, and does not actually define any property, unlike DatatypeProperty construct.
element ObjectProperty[ID]
<ObjectProperty
  name = xsd:anyURI {required} 
>
  Content: (##empty)
</ObjectProperty>
Attribute: name - a reference to an object property
Parents: SubPropertyOf, EquivalentProperties
Note: This elment is used for solely referring to an object property, and does not actually define any property, unlike ObjectProperty construct.

2.5 Individuals

Individual axioms (also called "facts") are statements about individuals, indicating class membership and statements about relevant properties.

Individual axioms need not necessarily be about named individuals: they can also refer to anonymous individuals.

2.6 Enumerated Datatype

A range of data values can be defined as an enumerated datatype.

element datarange/OneOf(D,F)
<OneOf>
  Content: ( DataValue* ) 
</OneOf>
Parents: allValuesFrom(D,F), someValueFrom(D,F), DatatypeProperty/range(D,F)
Note: This elment defines an enumeration of data values.
element DataValue
<DataValue
  xsi:type = a type of data value (literal)
>
  Content: ( xsd:anySimpleType )
</DataValue>
Attribute: xsi:type - one of built-in non-list XML Schema datatypes
Parents: Individual/DataPropertyValue, datarange/OneOf(D,F)
Note: A type of data value (literal) may be specified by using xsi:type attribute, which is part of the XML Schema instance namespace.

2.7 Index of Elements

Element Name specified in
DataRestriction/ allValuesFrom 2.3
ObjectRestriction/ allValuesFrom 2.3
Annotation 2.2
BackwardCompatibleWith 2.2
Ontology/ Class[axiom] 2.3
Class[ID] 2.3
DataRestriction 2.3
Ontology/ DatatypeProperty 2.4
SubPropertyOf/ DatatypeProperty[ID] 2.4
description 2.3
Ontology/ DisjointClasses(D,F) 2.3
Annotation/ Documentation 2.2
domain 2.4
Ontology/ EquivalentClasses 2.3
Ontology/ EquivalentProperties 2.4
Imports 2.2
IncompatibleWith 2.2
Annotation/ Info 2.2
Annotation/ Label 2.2
Ontology/ ObjectProperty 2.4
SubPropertyOf/ ObjectProperty[ID] 2.4
ObjectRestriction 2.3
Ontology 2.1
PriorVersion 2.2
DatatypeProperty/ range 2.4
ObjectProperty/ range 2.4
DataRestriction/ someValueFrom 2.3
ObjectRestriction/ someValueFrom 2.3
SubClassOf/ sub(D,F) 2.3
Ontology/ SubClassOf(D,F) 2.3
Ontology/ SubPropertyOf 2.4
SubClassOf/ super(D,F) 2.3
super[prop] 2.4
DataRestriction/ value(D,F) 2.3
VersionInfo 2.2


next   contents