Guest TJaze Report post Posted August 11, 2009 I have just started learning about schemas, and though I'm familiar with namespaces (being a programmer), I'm still a little unclear on how they are used in XML & schemas.Are these just a named reference used to identify a namespace, or do the URL addresses (often used in identifying namespaces), actually contain information that is referenced by the XML or schema file? Quote Share this post Link to post Share on other sites
Ingolme 973 Report post Posted August 23, 2009 The URI of a namespace doesn't provide any information, it is just used as an identifier.The namespace just allows two elements of the same name, with different meanings, to be in the same document. Quote Share this post Link to post Share on other sites
boen_robot 105 Report post Posted August 23, 2009 (edited) ... or as you said it yourself, it's just a named reference used to identify a namespaceKeep in mind that unlike languages like PHP, C and C#, namespaces in XML are not inhereted. Each URI is treated literaly, without any processing, and is therefore considered as the full namespace. That is, in<a xmlns="http://example.com"><b/><c xmlns="/ns"/></a> The <a/> and <b/> elements are in the "http://example.com" namespace, and the <c/> element is in the "/ns" namespace (NOT in the http://example.com/ns" namespace). In fact, to avoid such kind of confusion, recent editions of the XML namespaces specification deprecated relative URIs, and implementations are therefore encouraged to give warnings if you use such URIs. Edited August 23, 2009 by boen_robot Quote Share this post Link to post Share on other sites