\hypertarget{lang}{}\subsection{xml:lang}\label{lang}
The appearance of an xml:lang attribute states that the element content is expressed in the given language. The same lang value can be set on an RDF literal but not an RDF datatype. Language settings take precedence over datatyping.



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


This conforms to the following schema. Note that xml:lang is defined in a standard schema obtainable from \href{http://www.w3.org/XML/1998/namespace.}{\tt http://www.w3.org/XML/1998/namespace.} The attribute group 'special\-Attrs' includes xml:base, xml:lang and xml:space.



\begin{DocInclude}\begin{verbatim}<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://example.org/" xmlns="http://example.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd" />
        <xs:element name="lang">
                <xs:complexType>
                        <xs:simpleContent>
                                <xs:extension base="xs:string">
                                        <xs:attributeGroup ref="xml:specialAttrs"/>
                                </xs:extension>
                        </xs:simpleContent>
                </xs:complexType>
        </xs:element>
</xs:schema>
\end{verbatim}
\end{DocInclude}


The resulting RDF below includes the literal 'language' in the english language.



\begin{DocInclude}\begin{verbatim}# Base: http://example.org/attributeLang.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:lang
              [ rdf:value "language"@en
              ] .
\end{verbatim}
\end{DocInclude}
 