[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Namespaces defined
> A namespace is an ASCII text file No, there need be no physical expression of what consititutes a namespace. You could for example use the namespace http://purchasingcenter.com as the namespace for any elements that you have ever or will ever dream up. There does not have to be anything at that address that lists the names, there doesn't have to be anything at the address at all. The point is if that you have an element x then chances are that someone else has same, but if you have an element x in namespace http://purchasingcenter.com then it won't clash with anyone else, and it's up to you to make sure you don't clash with yourself. So a namespace parser never actually uses the URI to fetch anything it is just a unique identifier. All the prefix rubbish is just a hack to get round the fact that <{http://purchasingcenter.com,x}> isn't a legal XML name and it is anyway a pain to type every time. So the real `abstract' name of your element is the pair {http://purchasingcenter.com,x} but when you come to use it in a document you use an (arbitrary) prefix to stand in for the URL <p:x xmlns:p="http://purchasingcenter.com"/> or <q:x xmlns:q="http://purchasingcenter.com"/> or indeed <x xmlns="http://purchasingcenter.com"/> all mean the same thing, which is the element x from the namespace http://purchasingcenter.com There is (currently at least) no notion of validating that the specified namespace is supposed to contain an element called x. You may want to specify that the document validates against a schema or dtd, but that is a slightly different thing. David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|