new XML presentation syntax Schema

Here is a slightly changed XML presentation Schema.  I think that this is
now complete and correct.

peter


<!--		XML Schema for OWL
                Peter F. Patel-Schneider, Bell Labs Research
                19 December 2002

This is an XML schema for an XML syntax for OWL.  I have included some
comments in-line, to show what is going on.

This XML Schema defines an XML dialect similar to the OWL abstract syntax.
For arcane technical reasons it is somewhat more general in a few places,
allowing zero or more descriptions where a single description is allowed in
the OWL abstract syntax.  Each of these places can be translated to the OWL
abstract syntax by wrapping the descriptions in an intersectionOf.
-->

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns"
    xmlns:owl="http://www-db.research.bell-labs.com/user/pfps/owl/schema-2.xsd"
    targetNamespace="http://www-db.research.bell-labs.com/user/pfps/owl/schema-2.xsd"
    elementFormDefault="qualified"
    attributeFormDefault="qualified"
>

<!-- A OWL document contains an ontology, 
     which has includes, axioms, and facts. -->

<xsd:element name="Ontology" type="owl:OntologyType" />

<xsd:complexType name="OntologyType">
   <xsd:sequence minOccurs="0" maxOccurs="unbounded">
    <xsd:choice>

     <xsd:element name="Imports" type="owl:IncludeType" />
     <xsd:element name="Annotation" type="owl:AnnotationType" />

     <xsd:element name="Class" type="owl:ClassAxiomType" />
     <xsd:element name="EnumeratedClass" type="owl:EnumerationType" />
     <xsd:element name="DisjointClasses" type="owl:DescriptionsTypeNE" />
     <xsd:element name="EquivalentClasses" type="owl:DescriptionsTypeNE" />
     <xsd:element name="SubClassOf" type="owl:SubClassOfType" />

     <xsd:element name="DatatypeProperty" type="owl:DataPropertyAxiomType" />
     <xsd:element name="ObjectProperty" type="owl:ObjectPropertyAxiomType" />
     <!-- The conditions on relationships between properties are 
	  context-sensitive so this lets any property in -->
     <xsd:element name="EquivalentProperties" type="owl:PropertiesTypeNE" />
     <xsd:element name="SubPropertyOf" type="owl:SubPropertyOfType" />
 
     <xsd:element name="Individual" type="owl:IndividualType" />
     <xsd:element name="SameIndividual" type="owl:IndividualsTypeNE" />
     <xsd:element name="DifferentIndividuals" type="owl:IndividualsTypeNE" />
 
    </xsd:choice>
   </xsd:sequence>
   <xsd:attribute name="name" type="owl:OntologyName" />
</xsd:complexType>

<!-- Imports points to another ontology -->

<xsd:complexType name="IncludeType">
 <xsd:attribute name="ontology" type="xsd:anyURI" use="required"/>
</xsd:complexType>

<!-- Annotations allow arbitrary uninterpreted information to be added to
     ontologies -->

<xsd:complexType name="AnnotationType">
 <xsd:attribute name="subject" type="xsd:anyURI" use="required"/>
 <xsd:attribute name="object" type="xsd:anyURI" use="required"/>
</xsd:complexType>

<!-- The body of a class axiom is a potentially empty sequence of
     descriptions.  Attributes provide the name of the class and the
     modality for the class. --> 

<xsd:complexType name="ClassAxiomType">
  <xsd:sequence minOccurs="0" maxOccurs="unbounded">
   <xsd:group ref="owl:description" />
  </xsd:sequence>
  <xsd:attribute name="name" type="owl:ClassName" use="required" />
  <xsd:attribute name="complete" type="xsd:boolean" use="required" />
</xsd:complexType>

<!-- An enumeration is just a sequence of individuals,
     suitably encapsulated. -->

<xsd:complexType name="EnumerationType">
  <xsd:group ref="owl:individuals" />
  <xsd:attribute name="name" type="owl:ClassName" use="required" />
</xsd:complexType>

<!-- Disjoint and Equivalent for classes take a non-empty group of
     descriptions. -->

<xsd:complexType name="DescriptionsTypeNE"> 
  <xsd:sequence minOccurs="1" maxOccurs="unbounded">
   <xsd:group ref="owl:description" />
  </xsd:sequence>
</xsd:complexType>

<!-- A subclassOf statement is just two descriptions, sub and super. -->

<xsd:complexType name="SubClassOfType">
  <xsd:all>
   <xsd:element name="sub" type="owl:DescriptionType"
                minOccurs="1" maxOccurs="1" />
   <xsd:element name="super" type="owl:DescriptionType"
                minOccurs="1" maxOccurs="1" />
  </xsd:all>
</xsd:complexType>


<!-- Property axioms contain supers, domains, and ranges, along
     with characteristics of the property. -->

<xsd:complexType name="DataPropertyAxiomType">
  <xsd:sequence minOccurs="0" maxOccurs="unbounded">
   <xsd:choice>
    <xsd:element name="super"  type="owl:DataPropertyIDType" />
    <xsd:element name="domain" type="owl:DescriptionsType" />
    <xsd:element name="range"  type="owl:DataRangeType" />
   </xsd:choice>
  </xsd:sequence>
  <xsd:attribute name="name" type="owl:DataPropertyName" use="required" />
  <xsd:attribute name="functional" type="xsd:boolean" default="false" />
</xsd:complexType>

<xsd:complexType name="ObjectPropertyAxiomType">
  <xsd:sequence minOccurs="0" maxOccurs="unbounded">
   <xsd:choice>
    <xsd:element name="super"  type="owl:IndividualPropertyIDType" />
    <xsd:element name="domain" type="owl:DescriptionsType" />
    <xsd:element name="range"  type="owl:DescriptionsType" />
   </xsd:choice>
  </xsd:sequence>
  <xsd:attribute name="name" type="owl:IndividualPropertyName" use="required" />
  <xsd:attribute name="inverseOf" type="owl:IndividualPropertyName" />
  <xsd:attribute name="symmetric"         type="xsd:boolean" default="false" />
  <xsd:attribute name="functional"        type="xsd:boolean" default="false" />
  <xsd:attribute name="inverseFunctional" type="xsd:boolean" default="false" />
  <xsd:attribute name="transitive"        type="xsd:boolean" default="false" />
</xsd:complexType>

<!-- Datatypes and sets of values can show up in data property ranges. -->

<xsd:complexType name="DataRangeType">
  <xsd:sequence>
   <xsd:element name="OneOf" type="owl:DataValuesType"
                minOccurs="0" maxOccurs="1" />
  </xsd:sequence>
  <xsd:attribute name="datatype" type="owl:DatatypeName" />
</xsd:complexType>

<!-- EquivalentProperties takes several propertyIDs, 
     all of the same variety (not expressed here) . -->

<xsd:complexType name="PropertiesTypeNE">    
  <xsd:sequence>
   <xsd:element name="property" type="owl:PropertyIDType"
                minOccurs="1" maxOccurs="unbounded" />
  </xsd:sequence>
</xsd:complexType>

<!-- A subproperty statement is just two propertyIDs, sub and super, with
     the following restrictions (not expressed here)
     if sub is a data property then super must be a data property
     if sub is a simple property then super must be an individual property.
     There are other restrictions having to do with transitivity and
     cardinalites. 
-->

<xsd:complexType name="SubPropertyOfType">
  <xsd:attribute name="sub" type="owl:PropertyName" use="required" />
  <xsd:attribute name="super" type="owl:PropertyName" use="required" />
</xsd:complexType>


<!-- Descriptions are either named classes, property restrictions,
     oneOfs, or boolean combinations of descriptions. -->

<xsd:group name="description">   
  <xsd:choice>
   <xsd:element name="Class" type="owl:ClassIDType"
                minOccurs="1" maxOccurs="1" />
   <xsd:element name="DataRestriction" type="owl:DataRestrictionType"
                minOccurs="1" maxOccurs="1" />
   <xsd:element name="IndividualRestriction" type="owl:IndividualRestrictionType"
                minOccurs="1" maxOccurs="1" />
   <xsd:element name="UnionOf" type="owl:DescriptionsType"
                minOccurs="1" maxOccurs="1" />
   <xsd:element name="IntersectionOf" type="owl:DescriptionsType"
                minOccurs="1" maxOccurs="1" />
   <xsd:element name="ComplementOf" type="owl:DescriptionType"
                minOccurs="1" maxOccurs="1" />
   <xsd:element name="OneOf" type="owl:IndividualsType"
                minOccurs="1" maxOccurs="1" />
  </xsd:choice>
</xsd:group>

<xsd:complexType name="DescriptionType"> 
  <xsd:group ref="owl:description" />
</xsd:complexType>

<xsd:complexType name="DescriptionsType"> 
  <xsd:sequence minOccurs="0" maxOccurs="unbounded">
   <xsd:group ref="owl:description" />
  </xsd:sequence>
  <xsd:attribute name="class" type="owl:ClassName" />
</xsd:complexType>

<!-- All types of restrictions have the property name as an attribute, an
     optional cardinality, zero or more ranges, zero or more required
     restrictions, and zero or more value restrictions. 
     There is a side condition that restrictions on transitive properties
     and their sub-properties cannot have cardinality constraints.
-->  

<xsd:complexType name="DataRestrictionType"> 
  <xsd:sequence minOccurs="0" maxOccurs="unbounded">
  <xsd:choice>
   <xsd:element name="allValuesFrom" type="owl:DataRangeType" />
   <xsd:element name="someValueFrom" type="owl:DataRangeType" />
   <xsd:element name="value"         type="xsd:anySimpleType" />
  </xsd:choice>
  </xsd:sequence>
  <xsd:attribute name="property" type="owl:DataPropertyName" use="required" />
  <xsd:attribute name="minCardinality"  type="xsd:nonNegativeInteger" />
  <xsd:attribute name="maxCardinality"  type="xsd:nonNegativeInteger" />
  <xsd:attribute name="cardinality"	type="xsd:nonNegativeInteger" />
</xsd:complexType>

<xsd:complexType name="IndividualRestrictionType">  
  <xsd:sequence minOccurs="0" maxOccurs="unbounded">
   <xsd:choice>
    <xsd:element name="allValuesFrom" type="owl:DescriptionsType" />
    <xsd:element name="someValueFrom" type="owl:DescriptionsType" />
    <xsd:element name="value"         type="owl:IndividualIDType" />
   </xsd:choice>
  </xsd:sequence>
  <xsd:attribute name="property" type="owl:IndividualPropertyName" 
	use="required" />
  <xsd:attribute name="minCardinality"  type="xsd:nonNegativeInteger" />
  <xsd:attribute name="maxCardinality"  type="xsd:nonNegativeInteger" />
  <xsd:attribute name="cardinality"	type="xsd:nonNegativeInteger" />
</xsd:complexType>

<!-- Facts about individuals have several types and property
     information, including nested facts.  -->

<xsd:complexType name="IndividualType">        
  <xsd:sequence minOccurs="0" maxOccurs="unbounded">
   <xsd:choice>
    <xsd:element name="type" type="owl:ClassIDType" />
    <xsd:element name="ObjectPropertyValue" 
                 type="owl:IndividualPropertyValueType" />
    <xsd:element name="DataPropertyValue" 
                 type="owl:DataPropertyValueType" />
   </xsd:choice>
  </xsd:sequence>
  <xsd:attribute name="name" type="owl:IndividualName" />
</xsd:complexType>

<xsd:complexType name="IndividualPropertyValueType"> 
  <xsd:group ref="owl:individuals" />
  <xsd:attribute name="property" type="owl:IndividualPropertyName"
                 use="required" />
</xsd:complexType>

<xsd:complexType name="DataPropertyValueType"> 
  <xsd:group ref="owl:datavalues" />
  <xsd:attribute name="property" type="owl:DataPropertyName"
                 use="required" />
</xsd:complexType>

<xsd:group name="individuals">
  <xsd:sequence>
   <xsd:element name="Individual" type="owl:IndividualType"
                minOccurs="0" maxOccurs="unbounded" />
  </xsd:sequence>
</xsd:group>

<xsd:complexType name="IndividualsType">   
  <xsd:group ref="owl:individuals" />
</xsd:complexType>

<xsd:complexType name="IndividualsTypeNE">   
  <xsd:sequence>
   <xsd:element name="Individual" type="owl:IndividualType"
                minOccurs="1" maxOccurs="unbounded" />
  </xsd:sequence>
</xsd:complexType>

<xsd:group name="datavalues">
  <xsd:sequence>
   <xsd:element name="DataValue" type="xsd:anySimpleType"
                minOccurs="0" maxOccurs="unbounded" />
  </xsd:sequence>
</xsd:group>

<xsd:complexType name="DataValuesType">   
  <xsd:group ref="owl:datavalues" />
</xsd:complexType>



<!-- Finally, some utility types for the various kinds of names. -->

 <xsd:complexType name="ClassIDType">
   <xsd:attribute name="name" type="owl:ClassName" use="required"/>
 </xsd:complexType>

 <xsd:complexType name="DatatypeIDType">
  <xsd:attribute name="name" type="owl:DatatypeName" use="required" />
 </xsd:complexType>

 <xsd:complexType name="PropertyIDType">
   <xsd:attribute name="name" type="owl:PropertyName" use="required"/>
 </xsd:complexType>

 <xsd:complexType name="DataPropertyIDType">
   <xsd:attribute name="name" type="owl:DataPropertyName" use="required"/>
 </xsd:complexType>

 <xsd:complexType name="IndividualPropertyIDType">
   <xsd:attribute name="name" type="owl:IndividualPropertyName" use="required"/>
 </xsd:complexType>

 <xsd:complexType name="IndividualIDType">
   <xsd:attribute name="name" type="owl:IndividualName" use="required"/>
 </xsd:complexType>

 <xsd:simpleType name="OntologyName">
  <xsd:restriction base="xsd:anyURI" />
 </xsd:simpleType>

 <xsd:simpleType name="ClassName">
  <xsd:restriction base="xsd:anyURI" />
 </xsd:simpleType>

 <xsd:simpleType name="DatatypeName">
  <xsd:restriction base="xsd:anyURI" />
 </xsd:simpleType>

 <xsd:simpleType name="PropertyName">
  <xsd:restriction base="xsd:anyURI" />
 </xsd:simpleType>

 <xsd:simpleType name="DataPropertyName">
  <xsd:restriction base="xsd:anyURI" />
 </xsd:simpleType>

 <xsd:simpleType name="IndividualPropertyName">
  <xsd:restriction base="xsd:anyURI" />
 </xsd:simpleType>

 <xsd:simpleType name="IndividualName">
  <xsd:restriction base="xsd:anyURI" />
 </xsd:simpleType>

</xsd:schema>

Received on Thursday, 19 December 2002 13:31:11 UTC