In the example below, the complex type 'Bar' restricts 'Foo' by reducing the number of occurrences of element 'foo' from unbounded to 1; by narrowing the type from xs:anySimpleType to xs:string; and by disallowing mixed content.
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.org/" xmlns="http://example.org/" elementFormDefault="qualified"> <xs:complexType name="Bar" mixed="true"> <xs:sequence maxOccurs="unbounded"> <xs:element name="foobar" type="xs:anySimpleType" /> </xs:sequence> </xs:complexType> <xs:complexType name="Foo"> <xs:complexContent> <xs:restriction base="Bar"> <xs:sequence> <xs:element name="foobar" type="xs:string" /> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:schema>
Gloze assumes correctness of the schema and asserts the subclass relationship without further checks.
# Base: http://example.org/restriction.owl @prefix ns1: <http://example.org/> . @prefix xs: <http://www.w3.org/2001/XMLSchema> . @prefix ns2: <http://example.org/def/> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix daml: <http://www.daml.org/2001/03/daml+oil#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix xs_: <http://www.w3.org/2001/XMLSchema#> . @prefix : <#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . <> a owl:Ontology . ns1:foobar a owl:DatatypeProperty , rdf:Property . ns1:Bar a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:allValuesFrom rdfs:Literal ; owl:onProperty ns1:foobar ] ; rdfs:subClassOf [ a owl:Restriction ; owl:minCardinality "1"^^xs_:int ; owl:onProperty ns1:foobar ] . ns1:Foo a owl:Class ; rdfs:subClassOf ns1:Bar ; rdfs:subClassOf [ a owl:Restriction ; owl:allValuesFrom xs_:string ; owl:onProperty ns1:foobar ] ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xs_:int ; owl:onProperty ns1:foobar ] .