XML namespace: Difference between revisions

Content deleted Content added
Tags: Reverted Mobile edit Mobile web edit
m Reverted edits by 88.241.72.180 (talk) (HG) (3.4.12)
Line 4:
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 named '''id'''. References to the '''id''' element would therefore be ambiguous; placing them in different namespaces would remove the ambiguity.
 
== enginncanerNamespace names ==
 
A ''namespace name'' is a [[uniform resource identifier]] (URI). Typically, the URI chosen for the namespace of a given XML vocabulary describes a resource under the control of the author or organization defining the vocabulary, such as a [[uniform resource locator|URL]] for the author's Web server. However, the namespace specification does not require nor suggest that the namespace URI be used to retrieve information; it is simply treated by an XML parser as a string. For example, the document at http://www.w3.org/1999/xhtml itself does not contain any code. It simply describes the [[XHTML]] namespace to human readers. Using a URI (such as <nowiki>"http://www.w3.org/1999/xhtml"</nowiki>) to identify a namespace, rather than a simple string (such as "xhtml"), reduces the probability of different namespaces using duplicate identifiers.