<?xml version="1.0" encoding="UTF-8"?> <lang xmlns="http://example.org/" xml:lang="en">language</lang>
This conforms to the following schema. Note that xml:lang is defined in a standard schema obtainable from http://www.w3.org/XML/1998/namespace. The attribute group 'specialAttrs' includes xml:base, xml:lang and xml:space.
<?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>
The resulting RDF below includes the literal 'language' in the english language.
# 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 ] .