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 syntax and XML Schemas for OWL 1.0 sublanguages: OWL Lite, OWL DL, and OWL Full. This document has been written to meet the requirement that OWL 1.0 should have an XML serialization syntax (R15 in [OWL Requirement]). It is not intended to be a normative specification. Instead, it represents a suggestion of one possible XML presentation syntax for OWL.
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 document has been produced as part of the W3C Semantic Web Activity (Activity Statement) following the procedures set out for the W3C Process. The goals of the Web Ontology working group are discussed in the Web Ontology Working Group charter.
There are no patent disclosures related to this work at the time of this writing.
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. 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 specifies XML presentation syntax for OWL, which is defined as a dialect similar to OWL Abstract Syntax [OWL Semantics]. 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 the three sublanguages. Each of the sublanguages is an extension of its simpler predecessor, and the following relations hold but the inverses do not.
The root element of OWL documents for the XML presentation syntax must be Ontology element (2.1), and an OWL document further consists of optional header elements (2.2) as well as any number of classes (2.3), properties (2.4), and individuals (2.5).
<?xml version="1.0"?> <!DOCTYPE Ontology [ <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > ]> <owls:Ontology owls:name="http://www.example.org/wine" xmlns:owls="http://www.w3.org/2003/OWL-XMLSchema"> <!-- Contains optional header elements as well as any number of classes, properties, and individuals. --> </owls:Ontology>
Attribute values are frequently used for referring to identifiers in OWL. Since attribute values are not namespace sensitive, they may be written down in their fully expanded form (e.g., http://www.example.org/owl/wine#merlot). Alternatively, XML entities can be used as abbreviations. In the XML presentation syntax, XML Schema datatypes (2.6) are referred to by owls:datatype attributes, and an XML entity &xsd; can be used for readability.
A number of namespace prefixes are used in this document 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] |
This document provides a set of XML Schema modules for the XML presentation syntax. 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 in Appendix A.
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]
All the elements and their attributes and element contents in the XML syntax are listed in this section. In order to indicate partial availability for OWL sublanguages, subscript enclosed within parentheses [e.g., (L) and (D,F)] may be appended to either element names, attribute names, or labels for element contents (i.e., Content:). For example, EnumeratedClass(D,F) means that EnumeratedClass element is only available for OWL DL and OWL Full. Note that all the elements, attributes, and element contents without subscript in parentheses means that those constructs are available for all the three OWL sublanguages.
Examples and their brief explanations of OWL statements in this section are derived from the Reference document [OWL Reference], and more examples in Appendix B are created on the basis of the Guide document [OWL Guide]. In addition, element index (3.1) gives an alphabetical list of elements in the XML presentation syntax, and cross reference (3.2) shows the correspondence between constructs in RDF/XML syntax and elements of XML presentation syntax. In Appendix C, an XSLT stylesheet is given for the transformation from the XML presentation syntax toward RDF/XML syntax of OWL.
<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[axiom] | SameIndividual | DifferentIndividuals)* </Ontology>
Attribute: | name - refers to the current document |
Note: | This is the root element of OWL documents in the XML presentation syntax, while rdf:RDF is used as the document root for OWL in RDF/XML. |
See also: | owl:Ontology used as a construct for the header component in [OWL Reference] |
The root element Ontology may optionally contain, in any order, any number of header elements for versioning import and/or annotation statements. In the presentation syntax, there is no header element in contrast to the RDF/XML syntax in which owl:Ontology is provided as a construct for the header component.
A sample ontology header could look like this (see also 3 in [OWL Reference]):
<owls:VersionInfo>2003/02/24 22:37:39</owls:VersionInfo> <owls:Annotation> <owls:Documentation>An example OWL ontology</owls:Documentation> </owls:Annotation> <owls:PriorVersion owls:ontology="http://www.example.org/wine-112102.owl" /> <owls:Imports owls:ontology="http://www.example.org/food.owl"/> <owls:Annotation> <owls:Label>Wine Ontology</owls:Label> </owls:Annotation>
<VersionInfo> Content: (#CDATA) </VersionInfo>
Parents: | Ontology |
Note: | This element contains a string giving information about this version such as RCS/CVS keywords. |
See also: | owl:versionInfo in [OWL Reference] |
<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. |
See also: | owl:priorVersion in [OWL Reference] |
<BackwardCompatibleWith ontology = xsd:anyURI {required} > Content: (##empty) </BackwardCompatibleWith>
Attribute: | ontology - a reference to a backward compatible 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, and further indicates that it is backward compatible with it. |
See also: | owl:backwardCompatibleWith in [OWL Reference] |
<IncompatibleWith ontology = xsd:anyURI {required} > Content: (##empty) </IncompatibleWith>
Attribute: | ontology - a reference to an incompatible ontology |
Parents: | Ontology |
Note: | This element 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. |
See also: | owl:incompatibleWith in [OWL Reference] |
<Imports ontology = xsd:anyURI {required} > Content: (##empty) </Imports>
Attribute: | ontology - a reference to another ontology |
Parents: | Ontology |
Note: | This element refers to another OWL ontology containing definitions, whose meaning is considered to be part of the meaning of the importing ontology. |
See also: | owl:imports in [OWL Reference] |
<Annotation> Content: (Label | Documentation | xsd:any )* </Annotation>
Parents: | Ontology, Class[axiom], EnumeratedClass(D,F), DatatypeProperty, ObjectProperty, Individual[axiom] |
Note: | This element is provided as a place holder for various ways of annotations such as Label and Documentation. In particular, this element can take a wildcard element (xsd:any), which can be in any namespace other than the target namespace 'owls' for the XML presentation syntax Schema (http://www.w3.org/2003/OWL-XMLSchema), since namespace attribute value of the xsd:any element is specified as ##other in the Schema declaration. In addition, according to the declaration processContents="lax" in the xsd:any, the wildcard element allows an XML Schema processor to validate elements for which it can find namespace declarations and raise errors if they are invalid. However, the processor will not report errors on the elements for which it does not find declarations. |
<Label xml:lang = xsd: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. In RDF/XML syntax, this element is mapped to rdfs:label in [RDF Schema]. |
<Documentation xml:lang = xsd: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. In RDF/XML syntax, this element is mapped to rdfs:comment in [RDF Schema]. |
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". "Axiom" is a formal term, and may be called "definition" informally.
<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 partial. The default value is false. 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. |
See also: | owl:Class in [OWL Reference] |
A class description is the term used in [OWL Reference] [OWL Semantics], and used as a basic building block of class axioms (or called class definitions informally).
Content: (Class[ID] | DataRestriction | ObjectRestriction | UnionOf(D,F) | IntersectionOf(D,F) | ComplementOf(D,F) | OneOf[object](D,F))
Parents: | Class[axiom],
EquivalentClasses,
DisjointClasses(D,F), sub(D,F), super(D,F), UnionOf(D,F), IntersectionOf(D,F), ComplementOf(D,F), domain(D,F), ObjectProperty/range(D,F), ObjectRestriction/allValuesFrom(D,F), ObjectRestriction/someValuesFrom(D,F), type |
Note: | In the XML presentation syntax, a class description is represented as a model group definition of XML Schema [XMLSchema-1], which can be used as a reusable fragment of a content model. This model group allows to not only describe a class through a name (i.e., a class identifier), but also define an anonymous class by means of property restriction, union, intersection, complement, and enumeration. |
See also: | 4.1 in [OWL Reference] |
<Class name = xsd:anyURI {required} > Content: (##empty) </Class>
Attribute: | name - a reference to a class name |
Parents: | description, EquivalentClasses(L), domain(L), ObjectProperty/range(L) |
Note: | This element 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).
<owls:Class owls:name="Student" owls:complete="false"> <owls:Annotation> <owls:Label xml:lang="NL">student</owls:Label> <owls:Label xml:lang="IT">studente</owls:Label> <owls:Label xml:lang="ES">estudiante</owls:Label> <owls:Documentation>Undergraduates students</owls:Documentation> </owls:Annotation> <owls:Class owls:name="Person" /> <owls:DataRestriction owls:property="studentID" owls:cardinality="1"> <owls:allValuesFrom owls:datatype="&xsd;integer" /> </owls:DataRestriction> <owls:DataRestriction owls:property="grade" owls:cardinality="1"> <owls:allValuesFrom> <owls:OneOf> <owls:DataValue owls:datatype="&xsd;integer">1</owls:DataValue> <owls:DataValue owls:datatype="&xsd;integer">2</owls:DataValue> <owls:DataValue owls:datatype="&xsd;integer">3</owls:DataValue> <owls:DataValue owls:datatype="&xsd;integer">4</owls:DataValue> </owls:OneOf> </owls:allValuesFrom> </owls:DataRestriction> <owls:ObjectRestriction owls:property="schoolYear" owls:cardinality="1"> <owls:allValuesFrom> <owls:OneOf> <owls:Individual owls:name="Freshman" /> <owls:Individual owls:name="Sophomore" /> <owls:Individual owls:name="Junior" /> <owls:Individual owls:name="Senior" /> </owls:OneOf> </owls:allValuesFrom> </owls:ObjectRestriction> <owls:ObjectRestriction owls:property="advisor" owls:minCardinality="1"> <owls:allValuesFrom owls:class="Person" /> <owls:someValuesFrom> <owls:Class owls:name="Professor" /> <owls:Class owls:name="AssociateProfessor" /> </owls:someValuesFrom> </owls:ObjectRestriction> </owls:Class>
<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 | someValuesFrom | 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 declares restrictions on DatatypeProperty (properties for which the range value is a data literal). |
See also: | owl:Restriction, owl:minCardinality, owl:maxCardinality, owl:cardinality, owl:allValuesFrom, owl:someValuesFrom, and owl:hasValue in [OWL Reference] |
<allValuesFrom datatype = xsd:anyURI > Content(D,F): ( OneOf[data]? ) </allValuesFrom>
Attribute: | datatype - a reference to a datatype |
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. |
See also: | owl:allValuesFrom in [OWL Reference] |
<someValuesFrom datatype = xsd:anyURI > Content(D,F): ( OneOf[data]? ) </someValuesFrom>
Attribute: | datatype - a reference to a datatype |
Parents: | DataRestriction |
Note: | This element specifies a class of all individuals for which at least one value of the property concerned is a data value in the data range. |
See also: | owl:someValuesFrom in [OWL Reference] |
<value> Content: ( xsd:anySimpleType ) </value>
Parents: | DataRestriction |
Note: | This element specifies a type of data value for which the property concerned has at least one value. |
See also: | owl:hasValue in [OWL Reference] |
<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 | someValuesFrom | 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 declares restrictions on ObjectProperty (properties for which the range value is an individual). |
See also: | owl:Restriction, owl:minCardinality, owl:maxCardinality, owl:cardinality, owl:allValuesFrom, owl:someValuesFrom, and owl:hasValue in [OWL Reference] |
<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. |
See also: | owl:allValuesFrom in [OWL Reference] |
The example below describes a class of all individuals for which the "hasParent" property only has range values of class "Human" (see also owl:allValuesFrom in [OWL Reference]).
<owls:Class owls:name="Child1" owls:complete="false"> <owls:ObjectRestriction owls:property="#hasParent"> <owls:allValuesFrom owls:class="#Human" /> </owls:ObjectRestriction> </owls:Class>
<someValuesFrom class = xsd:anyURI > Content: ( description(D,F)* ) </someValuesFrom>
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. |
See also: | owl:someValuesFrom in [OWL Reference] |
The following example defines a class of individuals which have at least one parent who is a physician (see also owl:someValuesFrom in [OWL Reference]):
<owls:Class owls:name="Child2" owls:complete="false"> <owls:ObjectRestriction owls:property="#hasParent"> <owls:someValuesFrom owls:class="#Physician" /> </owls:ObjectRestriction> </owls:Class>
<value name = xsd:anyURI {required} > Content: ( ##empty ) </value>
Attribute: | name - a reference to a class name |
Parents: | ObjectRestriction |
Note: | This element specifies a class of all individuals for which the property concerned has at least one value. |
See also: | owl:hasValue in [OWL Reference] |
The following example describes the class of individuals who have the individual referred to as "Clinton" as their parent (see also owl:hasValue in [OWL Reference]):
<owls:Class owls:name="Child3" owls:complete="false"> <owls:ObjectRestriction owls:property="#hasParent"> <owls:value owls:name="#Clinton" /> </owls:ObjectRestriction> </owls:Class>
<OneOf> Content: ( Individual[ID]* ) </OneOf>
Parents: | description |
Note: | This element contains the exactly enumerated individuals. On the other hand, enumeration of data values is done by OneOf[data]. |
See also: | owl:oneOf in [OWL Reference], and EnumeratedClass in this document |
For example, the following OneOf statement defines a class of all continents (see also Enumeration in [OWL Reference]):
<owls:Class owls:name="AllContinents" owls:complete="true"> <owls:OneOf> <owls:Individual owls:name="#Eurasia" /> <owls:Individual owls:name="#Africa" /> <owls:Individual owls:name="#NorthAmerica" /> <owls:Individual owls:name="#SouthAmerica" /> <owls:Individual owls:name="#Australia" /> <owls:Individual owls:name="#Antarctica" /> </owls:OneOf> </owls:Class>
A statement of the form <owls:Individual owls:name="..."/> refers to some individual (remember: all individuals are by definition instances of owls:Individual).
In the section on datatypes we will see another use of the OneOf element, namely to define an enumeration of data values.
<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 element contains the exactly enumerated individuals. |
See also: | owl:oneOf in [OWL Reference], and OneOf[object] in this document |
EnumeratedClass can also be used for the OneOf enumeration, and the enumeration of all continents can be described as follows (see also Enumeration in [OWL Reference]):
<owls:EnumeratedClass owls:name="AllContinents"> <owls:Individual owls:name="#Eurasia" /> <owls:Individual owls:name="#Africa" /> <owls:Individual owls:name="#NorthAmerica" /> <owls:Individual owls:name="#SouthAmerica" /> <owls:Individual owls:name="#Australia" /> <owls:Individual owls:name="#Antarctica" /> </owls:EnumeratedClass>
<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. |
See also: | owl:intersectionOf in [OWL Reference] |
In the example below, the range of the intersection statement is a list of two class descriptions, namely two enumerations, both describing a class with two individuals. The resulting intersection is a class with one individual, namely "Tosca" since this is the only individual that is common to both enumerations (see also owl:intersectionOf in [OWL Reference]).
<owls:Class owls:name="IntersectionOf-eg" owls:complete="true"> <owls:IntersectionOf> <owls:OneOf> <owls:Individual owls:name="#Tosca" /> <owls:Individual owls:name="#Salome" /> </owls:OneOf> <owls:OneOf> <owls:Individual owls:name="#Turandot" /> <owls:Individual owls:name="#Tosca" /> </owls:OneOf> </owls:IntersectionOf> </owls:Class>
<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. |
See also: | owl:unionOf in [OWL Reference] |
The example below describes a class for which the class extension contains three individuals, namely "Tosca", "Salome", and "Turandot" assuming they are all different (see also owl:unionOf in [OWL Reference]).
<owls:Class owls:name="UnionOf-eg" owls:complete="true"> <owls:UnionOf> <owls:OneOf> <owls:Individual owls:name="#Tosca" /> <owls:Individual owls:name="#Salome" /> </owls:OneOf> <owls:OneOf> <owls:Individual owls:name="#Turandot" /> <owls:Individual owls:name="#Tosca" /> </owls:OneOf> </owls:UnionOf> </owls:Class>
<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. |
See also: | owl:complementOf in [OWL Reference] |
As an example of the use of complement, the expression "neither meat nor fish" could be written as (see also owl:complementOf in [OWL Reference]):
<owls:Class owls:name="ComplementOf-eg" owls:complete="true"> <owls:ComplementOf> <owls:UnionOf> <owls:Class owls:name="#Meat" /> <owls:Class owls:name="#Fish" /> </owls:UnionOf> </owls:ComplementOf> </owls: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. |
See also: | owl:subClassOf in [OWL Reference] |
For example, the following class axiom declares a subclass relation between two classes that are described through their names ("Opera" and "MusicalWork"). Subclass relations provide necessary conditions for belonging to a class. In this case, to be an opera the individual also needs to be a musical work (see also rdfs:subClassOf in [OWL Reference]).
<owls:Class owls:name="Opera" owls:complete="false"> <owls:Class owls:name="#MusicalWork" /> </owls:Class>
For any class there may be any number of subClassOf axioms. For example, it is possible to add the following axiom about the Opera class.
<owls:SubClassOf> <owls:sub> <owls:Class owls:name="Opera" /> </owls:sub> <owls:super> <owls:ObjectRestriction owls:property="#hasLibrettist" owls:minCardinality="1" /> </owls:super> </owls:SubClassOf>
This class axiom contains a property restriction. The example states that Opera is a subclass of an anonymous OWL class that has as its class extension the set of all individuals for which the property hasLibrettist has at least one value. Thus, operas should have at least one librettist.
<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). |
See also: | owl:equivalentClass in [OWL Reference] |
In its simplest form, an EquivalentClass axiom states the equivalence (in terms of their class extension) of two named classes. For example:
<owls:EquivalentClasses> <owls:Class owls:name="US_President" /> <owls:Class owls:name="PrincipalResidentOfWhiteHouse" /> </owls:EquivalentClasses>
<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. |
See also: | owl:disjointWith in [OWL Reference] |
Declaring two classes to be disjoint is a partial definition: it imposes a necessary but not sufficient condition on the class. A popular example of class disjointness is given below:
<owls:DisjointClasses> <owls:Class owls:name="#Man" /> <owls:Class owls:name="#Woman" /> </owls:DisjointClasses>
The following example shows a common use of class disjointness in subclass hierarchies. The next example indicates that MusicDrama is either an opera, an Operetta, or a Musical (i.e., the subclass partitioning is complete).
<owls:Class owls:name="MusicDrama" owls:complete="true"> <owls:UnionOf> <owls:Class owls:name="#Opera" /> <owls:Class owls:name="#Operetta" /> <owls:Class owls:name="#Musical" /> </owls:UnionOf> </owls:Class>
In the examples below, individuals belonging to one subclass such as Opera cannot belong to another subclass such as Musical (disjoint or non-overlapping subclasses).
<owls:Class owls:name="#Opera" owls:complete="false"> <owls:Class owls:name="#MusicDrama" /> </owls:Class> <owls:Class owls:name="#Operetta" owls:complete="false"> <owls:Class owls:name="#MusicDrama" /> </owls:Class> <owls:Class owls:name="#Musical" owls:complete="false"> <owls:Class owls:name="#MusicDrama" /> </owls:Class> <owls:DisjointClasses> <owls:Class owls:name="#Opera" /> <owls:Class owls:name="#Operetta" /> <owls:Class owls:name="#Musical" /> </owls:DisjointClasses>
In the above examples, DisjointWith elements were used together with UnionOf, in order to define a set of mutually disjoint and complete subclasses of a superclass (see also owl:disjointWith in [OWL Reference]).
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: ((superProperty | 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. |
See also: | owl:DatatypeProperty owl:FunctionalProperty, owl:InverseFunctionalProperty, and owl:DeprecatedProperty in [OWL Reference] |
<owls:DatatypeProperty owls:name="age"> <owls:domain owls:class="Person" /> <owls:range owls:datatype="&xsd;integer" /> </owls:DatatypeProperty>
See also the other examples of datatype property: timeStamp in 2.6 and tennisGameScore in 2.6.2.
<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: ((superProperty | 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). |
See also: | owl:ObjectProperty, owl:inverseOf, owl:TransitiveProperty, owl:SymmetricProperty, owl:FunctionalProperty, owl:InverseFunctionalProperty, and owl:DeprecatedProperty in [OWL Reference] |
A property axiom defines characteristics of a properties. In its simplest form, a property axiom just defines the existence of a property. For example:
<owls:ObjectProperty owls:name="hasParent" />
This defines a property with the restriction that the range values should be individuals (i.e., ObjectProperty).
<superProperty name = xsd:anyURI {required} > Content: (##empty) </superProperty>
Attribute: | name - a reference to a super property name |
Parents: | DatatypeProperty, ObjectProperty |
Note: | This element can be used for both datatype properties and object properties. |
The next example states that all instances (pairs) contained in the property extension of the property hasMother are also members of the property extension of the property hasParent.
<owls:ObjectProperty owls:name="hasMother"> <owls:superProperty owls:name="#hasParent" /> </owls: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. |
See also: | rdfs:domain in [OWL Reference] |
For example, it is possible to state that the domain of the property hasBankAccount can be either a Person or a Corporation in the following manner:
<owls:ObjectProperty owls:name="hasBankAccount"> <owls:domain> <owls:UnionOf> <owls:Class owls:name="#Person" /> <owls:Class owls:name="#Corporation" /> </owls:UnionOf> </owls:domain> </owls:ObjectProperty>
<range datatype = xsd:anyURI > Content(D,F): ( OneOf[data]? ) </range>
Attribute: | datatype - a reference to a datatype |
Parents: | DatatypeProperty |
Note: | This element asserts that the range values of this property must belong to data values in the specified data range. |
See also: | rdfs:range in [OWL Reference] |
<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. |
See also: | rdfs:range in [OWL Reference] |
<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. |
See also: | owl:subPropertyOf in [OWL Reference] |
<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. |
See also: | owl:equivalentProperty in [OWL Reference] |
<DatatypeProperty name = xsd:anyURI {required} > Content: (##empty) </DatatypeProperty>
Attribute: | name - a reference to a datatype property |
Parents: | SubPropertyOf, EquivalentProperties |
Note: | This element 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 element 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 name = xsd:anyURI > Content: (Annotation*, (type | DataPropertyValue | ObjectPropertyValue)* ) </Individual>
Attribute: | name - a reference to a name of this individual |
Parents: | Ontology |
Note: | This element indicates class membership and statements about relevant properties. |
See also: | owl:Thing in [OWL Reference] |
As an example, consider the following set of statements about an instance of the class Opera (see also 6.1 in [OWL Reference]):
<owls:Individual owls:name="Tosca"> <owls:type owls:name="Opera" /> <owls:ObjectPropertyValue owls:property="hasComposer"> <owls:Individual owls:name="#Giacomo_Puccini" /> </owls:ObjectPropertyValue> <owls:ObjectPropertyValue owls:property="hasLibrettist"> <owls:Individual owls:name="#Victorien_Sardou" /> </owls:ObjectPropertyValue> <owls:ObjectPropertyValue owls:property="hasLibrettist"> <owls:Individual owls:name="#Luigi_Illica" /> </owls:ObjectPropertyValue> <owls:DataPropertyValue owls:property="premiereDate"> <owls:DataValue owls:datatype="&xsd;date">1900-01-14</owls:DataValue> </owls:DataPropertyValue> <owls:ObjectPropertyValue owls:property="premierePlace"> <owls:Individual owls:name="#Roma" /> </owls:ObjectPropertyValue> <owls:DataPropertyValue owls:property="numberOfActs"> <owls:DataValue owls:datatype="&xsd;positiveInteger">3</owls:DataValue> </owls:DataPropertyValue> </owls:Individual>
<type name = xsd:anyURI > Content: ( description* ) </type>
Attribute: | name - a reference to this type |
Parents: | Individual[axiom] |
Note: | This element specifies type information of a parent individual. |
<DataPropertyValue property = xsd:anyURI {required} > Content: ( DataValue* ) </DataPropertyValue>
Attribute: | property - a reference to a data valued property |
Parents: | Individual[axiom] |
Note: | This element specifies a data property value to be associated with a parent individual. |
<ObjectPropertyValue property = xsd:anyURI {required} > Content: ( Individual[axiom]* ) </ObjectPropertyValue>
Attribute: | property - a reference to an individual valued property |
Parents: | Individual[axiom] |
Note: | This element specifies an individual property value to be associated with a parent individual. |
Individual axioms need not necessarily be about named individuals: they can also refer to anonymous individuals. As an example, consider the example below. The example defines some facts about an anonymous instance of the class Measurement, a quantitative observation for which facts such as the observed subject, the observed phenomenon, the observed value, and the observation time are listed (see also 6.1 in [OWL Reference]):
<owls:Individual> <owls:type owls:name="Measurement" /> <owls:ObjectPropertyValue owls:property="observedSubject"> <owls:Individual owls:name="#JaneDoe" /> </owls:ObjectPropertyValue> <owls:ObjectPropertyValue owls:property="observedPhenomenon"> <owls:Individual owls:name="#Weight" /> </owls:ObjectPropertyValue> <owls:ObjectPropertyValue owls:property="observedValue"> <owls:Individual> <owls:type owls:name="Quantity" /> <owls:DataPropertyValue owls:property="quantityValue"> <owls:DataValue owls:datatype="&xsd;float">59.5</owls:DataValue> </owls:DataPropertyValue> <owls:ObjectPropertyValue owls:property="quantityUnit"> <owls:Individual owls:name="#Kilogram" /> </owls:ObjectPropertyValue> </owls:Individual> </owls:ObjectPropertyValue> <owls:DataPropertyValue owls:property="timeStamp"> <owls:DataValue owls:datatype="&xsd;dateTime">2003-01-24T09:00:08+01:00</owls:DataValue> </owls:DataPropertyValue> </owls:Individual>
Many languages have a so-called "unique names" assumption: different names refer to different things in the world. On the web, such an assumption is not possible. For example, the same person could be referred to in many different ways (i.e. with different URI references). For this reason OWL does not make this assumption. Unless an explicit statement is being made that two URI references refer to the same or to different individuals, OWL tools should in principle assume either situation is possible.
Two elements SameIndividual and DifferentIndividuals are provided for making statements about the identity of individuals.
<SameIndividual> Content: ( Individual[ID]* ) </SameIndividual>
Parents: | Ontology |
Note: | This element indicates that two or more URI references actually refer to the same thing: the individuals have the same "identity". |
See also: | owl:sameAs and owl:sameIndividualAs in [OWL Reference] |
<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[object](D,F) |
Note: | This element is used for solely referring to an individual ID, and does not actually define any individual, unlike an individual axiom. |
For example, we could state that the following two URI references actually refer to the same person (see also 6.2 in [OWL Reference]):
<owls:SameIndividual> <owls:Individual owls:name="#William_Jefferson_Clinton" owls:type="Human" /> <owls:Individual owls:name="#BillClinton" /> </owls:SameIndividual>
In OWL Full, where class can be treated as instances of (meta)classes, we can use the SameIndividual element to define class equality, thus indicating that two concepts have the same intensional meaning. An example (see also 6.2 in [OWL Reference]):
<owls:Individual owls:name="FootballTeam"> <owls:type owls:name="&owls;Class" /> </owls:Individual> <owls:SameIndividual> <owls:Individual owls:name="FootballTeam" /> <owls:Individual owls:name="http://sports.org/US#SoccerTeam" /> </owls:SameIndividual>
Note that the first Individual element in the above example is an individual axiom, while the other Individual elements contained in SameIndividual are individual IDs.
<DifferentIndividuals> Content: ( Individual[ID]* ) </DifferentIndividuals>
Parents: | Ontology |
Note: | This element indicates that two or more URI references refer to different individuals. |
See also: | owl:differntFrom and owl:AllDifferent in [OWL Reference] |
The following example states that there are three operas, which are all different individuals (see also 6.2 in [OWL Reference]).
<owls:Individual owls:name="Don_Giovanni"> <owls:type owls:name="Opera" /> </owls:Individual> <owls:Individual owls:name="Nozze_di_Figaro"> <owls:type owls:name="Opera" /> </owls:Individual> <owls:Individual owls:name="Cosi_fan_tutte"> <owls:type owls:name="Opera" /> </owls:Individual> <owls:DifferentIndividuals> <owls:Individual owls:name="#Don_Giovanni" /> <owls:Individual owls:name="#Nozze_di_Figaro" /> <owls:Individual owls:name="#Cosi_fan_tutte" /> </owls:DifferentIndividuals>
OWL uses the facilities of XML Schema Datatypes [XMLSchema-2], and the following built-in XML Schema datatypes can be used.
The specific considerations with the other built-in XML Schema datatypes are explained in the Abstract Syntax document [OWL Semantics].
A datatype can be specified as a value of datatype attribute, which is decleared in allValuesFrom and someValuesFrom elements (for DataRestriction) as well as range element (for DatatypeProperty). A value of the datatype attribute should be a canonical URI reference to an XML Schema datatype: "http://www.w3.org/2001/XMLSchema#name", where name is a local name of a built-in XML Schema datatype. For example (see also 7.1 in [OWL Reference]):
<owls:DatatypeProperty owls:name="#timeStamp">
<owls:domain owls:class="#Measurement" />
<owls:range owls:datatype="http://www.w3.org/2001/XMLSchema#dateTime" />
</owls:DatatypeProperty>
Data values can be either plain (no datatype) or typed. In DataValue element, typed value may be specified by using datatype attribute.
<DataValue datatype = xsd:anyURI > Content: (#CDATA) </DataValue>
Attribute: | datatype - a reference to a datatype |
Parents: | DataPropertyValue, OneOf[data](D,F) |
For example, a type of time stamp property value can be specified with the dateTime datatype defined as an XML Schema datatype, by using the datatype attribute (see also 7.1 in [OWL Reference]).
<owls:Individual>
<owls:type owls:name="Measurement" />
<owls:DataPropertyValue owls:property="timeStamp">
<owls:DataValue
owls:datatype="&xsd;dateTime">2003-01-24T09:00:08+01:00</owls:DataValue>
</owls:DataPropertyValue>
</owls:Individual>
A range of data values can be defined as an enumerated datatype.
<OneOf> Content: ( DataValue* ) </OneOf>
Parents: | DataRestriction/allValuesFrom(D,F), DataRestriction/someValuesFrom(D,F), DatatypeProperty/range(D,F) |
Note: | This element defines an enumeration of data values. On the other hand, enumeration of individuals is done by OneOf[obj]. |
See also: | Enumerated datatype in [OWL Reference] |
For example, the range of tennisGameScore property to be the list of integer values {0, 15, 30, 40} can be specifies as below (see also 7.2 in [OWL Reference]):
<owls:DatatypeProperty owls:name="tennisGameScore"> <owls:range> <owls:OneOf> <owls:DataValue owls:datatype="&xsd;integer">0</owls:DataValue> <owls:DataValue owls:datatype="&xsd;integer">15</owls:DataValue> <owls:DataValue owls:datatype="&xsd;integer">30</owls:DataValue> <owls:DataValue owls:datatype="&xsd;integer">40</owls:DataValue> </owls:OneOf> </owls:range> </owls:DatatypeProperty>
The table below shows the term correspondence between RDF/XML and the XML presentation syntax. In the column of presentation syntax, the terms begin with '@' indicate attributes belong to an element concatenated before the attribute with a '/' delimiter.
Note: Appendix A of the OWL Reference [OWL Reference] provides a systematic set of links for each language construct in the Reference document and corresponding sections in the Guide [OWL Guide] as well as the Semantics [OWL Semantics] documents.