Copyright © 2003 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
This document describes an XML presentation sytax and XML Schemas for OWL 1.0 sublanguages: OWL Lite, OWL DL, and OWL Full.
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/.
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.
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.
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] |
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]
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.
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.
<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. |
The root element Ontology may optionally contain, in any order, any number of header elements for versioning import and/or annotation statements.
<VersionInfo> Content: (#CDATA) </VersionInfo>
Parents: | Ontology |
Note: | This element contains a string giving information about this version such as RCS/CVS keywords. |
<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. |
<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. |
<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. |
<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. |
<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. |
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. |
Attribute: | xml:lang - specifies the language used in the content |
Parents: | Annotation |
Note: | This element provides a human-readable description of an annotated element. |
<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 |
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".
<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. |
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. |
<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 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).
<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 ... |
<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. |
<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. |
<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). |
<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 ... |
<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. |
<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. |
<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>
<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. |
<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. |
<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. |
<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. |
<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. |
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. |
<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). |
<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. |
OWL distinguishes between two types of properties: DatatypeProperty and ObjectProperty.
<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. |
<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). |
<super name = xsd:anyURI {required} > Content: (##empty) </super>
Attribute: | name - a reference to a super property name |
Parents: | DatatypeProperty, ObjectProperty |
<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. |
<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. |
<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. |
<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. |
<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. |
<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. |
<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. |
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.
A range of data values can be defined as an enumerated datatype.
<OneOf> Content: ( DataValue* ) </OneOf>
Parents: | allValuesFrom(D,F), someValueFrom(D,F), DatatypeProperty/range(D,F) |
Note: | This elment defines an enumeration of data values. |
<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. |
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 |