[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML Namespaces
- From: "Thomas B. Passin" <firstname.lastname@example.org>
- To: xml-dev <email@example.com>
- Date: Sat, 21 Jul 2001 11:38:43 -0400
> Q-1 Suppose i have the follwoing XML with namespaces
> <!ELEMENT foo:A (foo:B)>
> <!ATTLIST foo:A
> xmlns:foo CDATA #FIXED "http://www.foo.org/">
> <!ELEMENT foo:B (#PCDATA)>
> <foo:A xmlns:foo="http://www.foo.org/">
> should the URL http://www.foo.org/ used as XML Namespaces actually
> physically exist or i am giving any assumed URL at my own??
> If it phisically exist then from where do i get it?Do i have to pay and
> it..is there any service that provides it.
The only requirements are that the string for the namespace be 1) unique and
2) a URI.
As for 1), most programs aren't going to be able to check for uniqueness -
it's really impossible, unless you use some registered base, as in a
registered URN or URL. On the other hand, the chance of some other program
having been programmed to use the same namespace as yours but with a
different vocabulary is probably low.
That's why many people use a URL - they have already registered the domain,
so presumably no one else will be using it. There is no other significance
to the exact URL, or even whether the namespace is even in the form of a
URL. If you want to use
"funnyscheme:no-one-else-would-ever-use-this/so-this-is-unique", you can.
If you want to generate GUIDs and say
"guid:5D4737E0-FD5D-11D2-ACB6-0080C877D9B9", you can and it would be unique.
But usually people want to use human-readable strings.
The namespace string does not have to point to anything, and the Namespace
Recommendation does not require it to. There is no "official" standard for
what a namespace URL should point to if it does point to anything. But
there is an excellent unofficial recommendation, Resource Directory
Description Language (RDDL) (www.rddl.org), that gives you a way to tell a
processor about resources that could be used in processing a document. Of
course, your processor has to know about rddl to use it, and few do so far.