# Compound documents

## Mixing XML vocabularies

With the XML namespace mechanism several XML vocabularies can be used in a single document. For instance, this paragraph which is coded in XHTML is followed by a mathematical expression in MathML:

Furthermore, namespaces can be nested. The drawing below is an example of nested namespaces. It is an SVG element included in an XHTML document. It contains itself other objects belonging to different namespaces:

1. The blue (or pink?) rectangle contains some XHTML elements (a `H2` heading and a paragraph).
2. The paragraph in the rectangle contains a MathML expression.
3. Other

## Advantages

Using a single model and a single language for representing all elements within the document brings a number of advantages. It allows users to manipulate the document in an uniform way, as the representation mode is itself uniform.