Namespaces and Attributes Attributes and elements are treated differently by XML Namespaces because attri- butes have a natural namespace (their owner element) and dont need extra protection. It makes no sense to put attributes in the same namespace as their owner element instead of simply leaving them in no namespace at all. Attributes are like local variables in a procedure that dont need fully qualified names to pre- vent name conflicts. In XSLT, the attributes of XSLT elements (such as match or select) remain local: <xsl:template match=/> It does make sense to put attributes in a namespace of their own that is dif- ferent from the containing elements namespace, especially if the attributes come from an XML language of wide application. Later in this chapter, you will see examples of XLink attributes that are used to describe links within XML data. Their (reserved) names are quite common: type, title, href, and so on. To pro- tect them from conflict with unrelated attributes of the same name, they are placed into a namespace and are always used with a prefix. (It can be any prefix, but traditionally xlink: is used.)  For examples, see the XLink section that is com- ing up shortly. Attributes that are placed in a separate namespace become, in effect, global attributes that can be added to any element in any document to provide specific functionality. Two important groups of global attributes are those with the fixed xml: prefix and XLink attributes that usually are mapped to the xlink: prefix. We introduce them in the remainder of this section. Attributes with the xml:  Prefix The xml: prefix is reserved by W3C and cannot be used by anybody else. It is declared in the XML Namespaces recommendation and bound to Several attributes always appear with the xml: prefix and have a fixed meaning. We mention two: xml:lang and xml:base. The xml:lang attribute can be added to any element to specify the language of that elements content. The value of the attribute is either a two-letter language code as defined in ISO 639, Codes for the Representation of Names of Languages, or a language identifier registered with IANA (Internet Assigned Numbers Authority), or user defined. The two-letter codes cover the most famil- iar languages, and some of them can be extended to indicate a regional variant: fr-ca, fr-be, and fr-ch stand for the French dialects of Canada, Belgium, and Switzerland, respectively. IANA-registered names start with i-: i-navajo. User- defined names start with x-: x-esperanto. For an in-depth treatment of 59 Well-Formed Documents and Namespaces