What is a namespace ... really?
Ron Daniel
RDaniel at DATAFUSION.net
Fri Jan 15 20:45:42 GMT 1999
Roger Costello wrote:
> James Tauber wrote:
>
> >>(2) A namespace is a URI to a DTD.
> >
> >No. It doesn't have to be at all (although it *could* be and a URI
> for a
> DTD
> >is as good a URI as any and better than most)
>
> What good is a namespace if it *doesn't* reference a DTD?
>
[Ron Daniel] The advantage is namespace scoping, along the
lines of Java packages. But let me give an XML-based example.
Assume you have gotten 2 XML documents, from different sources,
and they both contain the element <title>. How do you know if
they mean the same thing? One might be a book title, the other
might be a job title. (Or a royal title or a legal title to
property or a championship title or ...). But, if one says
<dc:title> and another says <aba:title> (and you look up the
URIs and see they are different - one for the Dublin Core group
and the other from the American Bar Association), then you can
tell that they are not the same use of <title> and you should
treat them differently.
Namespaces allow us to prevent name collisions. This is very good.
Now, the next thing to do is have the namespace URI point to
something like a DTD, and there are lots of us who want to do
such things. But that is outside the narrow bounds of the
current spec. While I wish the spec had gone on to deal with
parts of that topic, I also have to say that unique names are
nothing to sneeze at, and are a valuable step forward.
Regards,
Ron Daniel Jr.
DATAFUSION, Inc.
139 Townsend Street, Ste. 100
San Francisco, CA 94107
415.222.0100 fax 415.222.0150
rdaniel at datafusion.net
http://www.datafusion.net
>
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list