\hypertarget{attributeGroup}{}\subsection{attribute\-Group}\label{attributeGroup}
Attribute groups allow the schema designer to collect together common groups of attributes. The example below is based on the XML Linking standard {\em XLink\/} which defines groups of attributes that define a number of link properties including xlink:href and xlink:type that we will see here.



\begin{DocInclude}\begin{verbatim}<?xml version="1.0" encoding="UTF-8"?>
<link xmlns="http://example.org/" xmlns:xlink="http://www.w3.org/1999/xlink" 
        xlink:href="foo.xml" />

\end{verbatim}
\end{DocInclude}


The xlink:href attribute is of type xs:any\-URI, and this is resolved against the document base to provide an absolute URI that retains its meaning in RDF. However, it remains a literal of type xs:any\-URI.



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

<>    ns2:link
              [ xlink_:href "http://example.org/foo.xml"^^xs_:anyURI ;
                xlink_:type "simple"^^xs_:string
              ] .
\end{verbatim}
\end{DocInclude}


For brevity only the attribute\-Group reference is included here. The simple\-Link attribute group also defines a {\em fixed\/} xlink:type attribute that has an implied value of 'simple' which is added to the RDF model even though it is not explicit in the XML.



\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:xlink="http://www.w3.org/1999/xlink">
        <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd" />

        <xs:element name="link">
                <xs:complexType>
                        <xs:attributeGroup ref="xlink:simpleLink"/>
                </xs:complexType>
        </xs:element>

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


\begin{Desc}
\item[See also:]\href{http://www.w3.org/1999/xlink}{\tt http://www.w3.org/1999/xlink}\end{Desc}
\hypertarget{list_annotationChildren}{}\subsubsection{Child components}\label{list_annotationChildren}
\begin{itemize}
\item \hyperlink{attribute}{attribute}\item \hyperlink{attributegroup}{attribute\-Group}\item \hyperlink{anyattribute}{any\-Attribute} \end{itemize}
