|
|
|
|
Namespaces disambiguate elements sharing the same name by assigning elements and attributes to unique URIs. Typically, each XML vocabulary will have its own separate, unique URI. Usually, a vocabulary will have a single URI, but some have more than one. For example, XSL uses different namespaces for XSL Transformations (XSLT) and XSL Formatting Objects (XSL-FO). Because URIs usually contain characters that are invalid in XML names, we create short prefixes to represent each URI. We prefix an element name with its associated prefix. For example:
The name before the colon is the prefix. The prefix identifies the namespace to which the element or attribute belongs. Everything after the colon is known as the local part. This identifies the particular element or attribute within the namespace. The complete name, including the colon, is called the qualified name, QName, or raw name. |
| The page was last updated February 19, 2008 |