Namespace versus Namespace Name versus Namespace URI

Namespace versus Namespace Name versus Namespace URI

An XML namespace is a collection of names. For example, all the element names defined in XHTML ( html , head , title , body , p , div , table , h1 , and so on) form the XHTML namespace. The SVG namespace is the collection of element names used in SVG ( svg , rect , polygon , polyline , and so on). Only the local parts of prefixed names belong to the namespace. The prefix and the prefixed names are not parts of the namespace.

Each such namespace is identified by a URI reference called the namespace name . For example the namespace name for XHTML is http://www.w3.org/1999/xhtml. The namespace name for SVG is http://www.w3.org/2000/svg. The namespace name identifies the namespace, but it is not the namespace.

The namespace name is supposed to be a URI reference, but it's not technically an error if it's not one. For instance, a namespace name may contain characters such as { or the Greek letter l that are illegal in URIs. How ever, since in practice almost all actual namespace names are legal URI references, namespace names are often carelessly called namespace URIs . Actually, they are namespace URI references, but most developers don't bother to make this distinction.



Effective XML. 50 Specific Ways to Improve Your XML
Effective XML: 50 Specific Ways to Improve Your XML
ISBN: 0321150406
EAN: 2147483647
Year: 2002
Pages: 144

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net