The "xml:" Namespace

This Version: November 2, 2005


The namespace whose name is is bound by definition to the prefix xml: according to Namespaces in XML, W3C Recommendation 14 Jan 1999 (and by Namespaces in XML 1.1). Note that unlike all other XML namespaces, both the name and the prefix are specified; i.e., if you want XML 1.0 processors to recognize this namespace, you must use the reserved prefix xml:.

xml:lang and xml:space

As of the last update of this document, the XML 1.0 (Third Edition) Specification (and also the XML 1.1 Specification) defines two attribute names in this namespace:

Designed for identifying the human language used in the scope of the element to which it's attached.
Designed to express whether or not the document's creator wishes white space to be considered as significant in the scope of the element to which it's attached.


The XML Base specification describes a facility, similar to that of HTML BASE, for defining base URIs for parts of XML documents. It defines a single attribute, xml:base, and describes in detail the procedure for its use in processing relative URI refeferences.


The xml:id specification defines a single attribute, xml:id, known to be of type ID independently of any DTD or schema.

Namespace change policy

The XML Core Working Group reserves the right to bring additional names from this namespace into active use by providing definitions for them in new specifications or subsequent editions of existing specifications. The Working Group may also make modifications to the definitions of the names already in use, although such changes will not normally change the well-formedness or validity of existing documents or significantly change their meaning.

All changes to the use of this namespace will be achieved by the publication of documents governed by the W3C Process.

Related Resources

Section 2.10 of the XML 1.0 specification describes the syntax and semantics of the xml:space attribute.

Section 2.12 of the XML 1.0 specification describes the syntax and semantics of the xml:lang attribute.

An XML Schema fragment is available which constrains the syntax of xml:lang, xml:space, xml:base and xml:id in the schema language defined by the XML Schema Recommendation, Second Edition, of 28 October 2004.

(An XML Schema fragment for the CR version of XML Schema is still available as well.)

The value of the xml:lang attribute must be as specified by BCP 47, or be empty.

The W3C XML Base specification for the xml:base attribute.

The W3C xml:id specification for the xml:id attribute.