I could see if it were like a doctype which changes the way a page is rendered, but what is the point of
Namespaces are important for identifying which "group" a tag belongs to. Perhaps they're not so important in a lot of cases. But if the XML file has identical tag names used in different contexts they're a must use.
As an example. If you combine XHTML with a second markup language designed to define information about books then both languages would have a <title> tag. You would then need to define which namespace each title tag was in so that the program processing the code would know whether it was a web page title or a book title that a given title tag was referring to.
There are two things that are required to make a document be recognised as XHTML:
- The Content-Type HTTP header must declare a MIME type that specifies an application of XML.
- The xmlns attribute must contain the value "http://www.w3.org/1999/xhtml".
The recommended MIME type for XHTML is application/xhtml+xml, but it's also possible to use application/xml or text/xml (although the latter is not recommended).
If either of those conditions are not satisfied, the document is not XHTML.
Birnam wood is come to Dunsinane
10 years already!