What is XML markup for?

15. Namespace declarations

An XML document may include elements declared in different name spaces.

<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:math="http://www.mathml.org"> <p>...<math:expr>...</math:expr>...</p>...</TEI>
  • a namespace declaration associates a namespace prefix with an external URI-like identifier
  • the default namespace may be declared using a xmlns
  • other name spaces must all use a specially declared prefix
  • All TEI documents are declared within the TEI namespace
  • The xml namespace is available in all XML documents; TEI uses it for global attributes @xml:id and @xml:lang

Up: Contents Previous: 14. The XML declaration Next: 16. The Doctype Declaration