Anamespace groups elements together by partitioning elements and their attributes into logical areas and providing a way to identify the elements and attributes uniquely. Namespaces are also used to reference a particular DTD or XML Schema. Namespaces were defined after XML 1.0 was formally presented to the public. After the release of XML 1.0, the W3C set out to resolve a few problems, one of which is related to naming conflicts. To understand the significance of this problem, first think about the future of the Web. |
Shortly after the W3C introduced XML 1.0, an entire family of languages such as Mathematical Markup Language (MathML), Synchronized Multimedia Integration Language (SMIL), Scalable Vector Graphics (SVG), XLink, XForms, and the Extensible Hypertext Markup Language (XHTML) started appearing. Instead of relying on one language to bear the burden of communicating on the Web, the idea was to present many languages that could work together. If functions were modularized, each language could do what it does best; however the problem arises when a developer needs to use multiple vocabularies within the same application. For example, one might need to use a combination of languages such as SVG, SMIL, XHTML, and XForms for an interactive Web site. When mixing vocabularies, you have to have a way to distinguish between element types. Take the following example: |
<html> |
<head> |
<title>Book List</title> |
</head> |