\hypertarget{redefine}{}\subsection{redefine}\label{redefine}
This component is similar to include but also allows types and groups to be completely redefined. There is no comparable feature in OWL, so we simply include the new definitions as they appear in the redefinition. Because we can't selectively import things that are not redefined, anything unaffected by the redefinition is defined directly within the redefining ontology, rather than being imported. In effect, the redefinitions shadow only the affected schema components.



\begin{DocInclude}\begin{verbatim}<?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:redefine schemaLocation="redefined.xsd">
                <xs:simpleType name="Foo">
                        <xs:restriction base="xs:string"/>
                </xs:simpleType>
        </xs:redefine>
        
        <xs:element name="foo" type="Bar" />
        
</xs:schema>
\end{verbatim}
\end{DocInclude}


This schema includes a type 'Foo' that is redefined, becoming a string; and a type 'Bar' that is unchanged.



\begin{DocInclude}\begin{verbatim}<?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:simpleType name="Foo">
                <xs:restriction base="xs:anySimpleType" />
        </xs:simpleType>

        <xs:complexType name="Bar">
                <xs:simpleContent>
                        <xs:restriction base="Foo" />
                </xs:simpleContent>
        </xs:complexType>

</xs:schema>
\end{verbatim}
\end{DocInclude}
 

\begin{DocInclude}\begin{verbatim}# Base: http://example.org/redefine.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#> .

ns1:foo
      a       owl:ObjectProperty ;
      rdfs:range ns1:Bar .

<>    a       owl:Ontology .

ns1:Foo
      a       owl:Class ;
      rdfs:subClassOf xs_:string .

ns1:Bar
      a       owl:Class .
\end{verbatim}
\end{DocInclude}
\hypertarget{redefine_redefineChildren}{}\subsubsection{Child components}\label{redefine_redefineChildren}
\begin{itemize}
\item \hyperlink{simpletype}{simple\-Type}\item \hyperlink{complextype}{complex\-Type}\item \hyperlink{group}{group}\item \hyperlink{attributegroup}{attribute\-Group} \end{itemize}
