\hypertarget{attributeNotation}{}\subsection{Example: xs:NOTATION}\label{attributeNotation}
This example demonstrates the use of notations. These are essentially QNames which must be expanded to give them global scope. The only restriction is that any notation should be predefined in the schema. The example includes a base64Binary embedded image which is notated as belonging to a particular predefined mime type.



\begin{DocInclude}\begin{verbatim}<?xml version="1.0"?>
<!-- example adapted from http://www.w3.org/TR/2004/WD-xml-media-types-20041102/ -->
<notation xmlns="http://www.iana.org/assignments/media-types/image/" 
        mimeType="png">/aWKKapGGyQ=</notation>
\end{verbatim}
\end{DocInclude}


The xml schema defines the mime options is as follows. The only mime type options available are 'jpeg', 'gif' and 'png'.



\begin{DocInclude}\begin{verbatim}<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
        targetNamespace="http://www.iana.org/assignments/media-types/image/" 
        xmlns="http://www.iana.org/assignments/media-types/image/">
                
        <xs:notation name="jpeg" public="image/jpeg"/>
        <xs:notation name="gif" public="image/gif" />
        <xs:notation name="png" public="image/png" />
        
        <xs:element name="notation">
                <xs:complexType>
                        <xs:complexContent>
                                <xs:extension base="xs:base64Binary">
                                        <xs:attribute name="mimeType">
                                                <xs:simpleType >
                                                        <xs:restriction base="xs:NOTATION">
                                                                <xs:enumeration value="jpeg"/>
                                                                <xs:enumeration value="gif"/>
                                                                <xs:enumeration value="png"/>
                                                        </xs:restriction>
                                                </xs:simpleType>
                                        </xs:attribute>
                                </xs:extension>
                        </xs:complexContent>
                </xs:complexType>
        </xs:element>

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


In the resulting RDF mapping, the xs:NOTATION datatype does not appear, but the expanded QName names the global mime type resource.



\begin{DocInclude}\begin{verbatim}# Base: http://example.org/attributeNotation.xml
@prefix ns1:     <http://www.iana.org/assignments/media-types/image/> .
@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:notation
              [ rdf:value "/aWKKapGGyQ="^^xs_:base64Binary ;
                ns2:mimeType ns1:png
              ] .
\end{verbatim}
\end{DocInclude}
\hypertarget{attributenotation_attributeChildren}{}\subsubsection{Child components}\label{attributenotation_attributeChildren}
\begin{itemize}
\item \hyperlink{annotation}{annotation}\item \hyperlink{simpletype}{simple\-Type}\end{itemize}


\begin{itemize}
\item \hyperlink{simplecontent}{simple\-Content} \end{itemize}
