Purpose
Various XML mark-up languages can be combined in a single document.
- XHTML is an XML based language.
- So, XHTML can be combined with other XML based mark-up languages in a document.
For instance, a document may be composed mainly of XHTML. The document can then include a section of XForms (which is another XML based language), where a form is constructed.
- An xmlns attribute would designate the namespace for XHTML.
- An additional xmlns attribute would designate the namespace for XForms, which could then be applied to the form elements in the same document.
A browser should heed the different values of the xmlns attributes, and should interpret the mark-up language in the parts of the document accordingly.
