| Xml Namespace |
Article Index for Xml |
Website Links For Xml |
Information AboutXml Namespace |
| CATEGORIES ABOUT XML NAMESPACE | |
| xml | |
| world wide web | |
|
All element names within a namespace must be unique. A simple example would be to consider an XML instance that contained references to a customer and an ordered product. Both the customer element and the product element could have a child element "ID_number". References to the element ID_number would therefore be ambiguous unless the two identically named but semantically different elements were brought under namespaces that would differentiate them. NAMESPACE DECLARATION A namespace is declared using the reserved XML attribute xmlns, the value of which must be a URI (Uniform Resource Identifier) reference.For example:
Note, however, that the URI is not actually read as an online address; it is simply treated by an XML parser as a string. For example, http://www.w3.org/1999/xhtml itself does not contain any code, it simply describes the Xhtml namespace to human readers. Using a URL (such as The declaration can also include a short prefix with which elements and attributes can be identified, e.g.:
An XML namespace does not require that its vocabulary be defined, though it is fairly common practice to place either a Document Type Definition (DTD) or an XML Schema defining the precise data structure at the location of the namespace's URI. EXTERNAL LINKS |
|
|