\hypertarget{anyAttribute}{}\subsection{any\-Attribute}\label{anyAttribute}
Sometimes it is useful to create a slot that would match a range of attributes. One use of this is to allow predefined xml attributes on an element, such as xml:lang; xml:id; xml:space without having to include the XML schema. XML schema is not savvy to these new features, so they must be explicitly added to the schema.

\begin{Desc}
\item[See also:]\href{http://www.w3.org/XML/1998/namespace}{\tt http://www.w3.org/XML/1998/namespace}\end{Desc}
The example below includes two marked-up 'parts'. We use xml:id to add an identifier to 'foo', and xml:lang to define the language in which 'bar' is expressed.



\begin{DocInclude}\begin{verbatim}<report xmlns="http://example.org/">
  <part xml:id="foo">foo</part>
  <part xml:lang="en">bar</part>
</report>
\end{verbatim}
\end{DocInclude}


The schema for the XML namespace, and hence the xml:id attribute, is not imported, so the interpretation of any\-Attribute is non-strict.



\begin{DocInclude}\begin{verbatim}<xs:schema targetNamespace="http://example.org/"
        xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

        <xs:element name="report">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element name="part" maxOccurs="unbounded">
                                        <xs:complexType>
                                                <xs:simpleContent>
                                                        <xs:extension base="xs:string">
                                                        <xs:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" 
                                                         processContents="lax" />                                                               
                                                        </xs:extension>
                                                </xs:simpleContent>
                                        </xs:complexType>
                                </xs:element>
                        </xs:sequence>
                </xs:complexType>
        </xs:element>

</xs:schema>

\end{verbatim}
\end{DocInclude}


Note that even without the XML namespace schema to hand, \hyperlink{classcom_1_1hp_1_1gloze_1_1_gloze}{Gloze} treats xml:id and xml:lang correctly.



\begin{DocInclude}\begin{verbatim}# Base: http://example.org/anyAttribute.xml
@prefix ns1:     <http://example.org/def/> .
@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 :        <#> .

:foo  rdf:value "foo"^^xs_:string .

<>    ns2:report
              [ ns2:part :foo ;
                ns2:part
                        [ rdf:value "bar"@en
                        ]
              ] .
\end{verbatim}
\end{DocInclude}
 