As far as i know, namespaces URI are not accessed, but only represents any name chosen by you in order to avoid name conflicts. So why the following W3C example stop working if I change the namespace?
http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog
Does the browser uses the URI string to compare with some other stored in it to know that it is a XML file?
Namespaces work like last names in people. You can have two people with the same first name. You need the last name to distinguish them.
You can have two XML nodes with the same local name (like <stylesheet>
), when they are in two different namespaces they are completely different nodes and anything that processes XML will recognize the difference. (*)
This is nothing special for XML, this is how namespaces work everywhere. In most programming languages you can have two different functions with the same name, when they are in different namespaces the compiler can tell them apart.
So I'm not sure why you're surprised that changing the namespace changes the meaning of the XML.
(*) XSLT processors work with <stylesheet>
(and a couple of other) elements that are in the "http://www.w3.org/1999/XSL/Transform"
namespace, specifically. Any elements with the name stylesheet
that are in a different namespace are ignored, you are free to use them for your own purposes. That's the whole point, after all.