\hypertarget{simpleType}{}\subsection{simple\-Type}\label{simpleType}
New simple types can be derived by restriction. OWL can define new sub-classes of datatypes but is not able to define constraints on the new value space other than by enumeration. Simple types are therefore declared in OWL, but not defined to the same extent as in XML schema.



\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/" >
        
        <xs:simpleType name="mySimpleType">
                <xs:restriction base="xs:string" />
        </xs:simpleType>

        <xs:element name="foo" type="mySimpleType" />

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

\begin{DocInclude}\begin{verbatim}# Base: http://example.org/simpleType1.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:foo
      a       owl:DatatypeProperty , rdf:Property ;
      rdfs:range ns1:mySimpleType .

ns1:mySimpleType
      a       owl:Class ;
      rdfs:subClassOf xs_:string .
\end{verbatim}
\end{DocInclude}


\hyperlink{classcom_1_1hp_1_1gloze_1_1_gloze}{Gloze} avoids using simple types in typed literals by instead using the datatype it is derived from. In the XML instance and below the lifted value 'bar' has type xs:string rather than the user-defined simple type 'my\-Simple\-Type'.



\begin{DocInclude}\begin{verbatim}<?xml version="1.0" encoding="UTF-8"?>
<foo xmlns="http://example.org/">bar</foo>
\end{verbatim}
\end{DocInclude}
 

\begin{DocInclude}\begin{verbatim}# Base: http://example.org/simpleType1.xml
@prefix ns1:     <http://example.org/> .
@prefix xs:      <http://www.w3.org/2001/XMLSchema> .
@prefix ns2:     <http://example.org/def/> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xs_:     <http://www.w3.org/2001/XMLSchema#> .
@prefix :        <#> .

<>    ns1:foo "bar"^^xs_:string .
\end{verbatim}
\end{DocInclude}
\hypertarget{simpletype_simpleTypeChildren}{}\subsubsection{Child components}\label{simpletype_simpleTypeChildren}
\begin{itemize}
\item \hyperlink{restriction}{restriction}\item \hyperlink{list}{list}\item \hyperlink{union}{union} \end{itemize}
