[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

re: What is a namespace ... really?

  • From: costello@m... (Roger L. Costello)
  • To: xml-dev@i... (XML Developers' List)
  • Date: Fri, 15 Jan 99 13:24:21 -0500

purpose of namespaces
I have been closely monitoring (with great interest!) all the discussion
arising from my question on what is a namespace.  It seems that people have
differing ideas on what it is. I would like to try to summarize the points
of view, and add my own two cents.

(1) A namespace is just a URI.  It references some domain.  It is simply
there to tell an application/processor what domain the associated XML
elements hail from.

(2) A namespace is a URI to a DTD.  It references a domain and also a DTD
within the domain.  In addition to telling an application/parser what
domain the associated XML elements hail from, with this namespace
declaration a validating parser could validate that portion of your XML
document against the DTD at that URI.

So, with point-of-view (2) this is a valid namespace declaration:

<BookCatalogue xmlns="file://localhost/BookCatalogue.dtd">

and this is not a valid namespace declaration:

<BookCatalogue xmlns="file://localhost/">

because there is no referenced DTD at that domain.

Is this a fair assessment of the points of view?

My two cents:

What is the purpose of namespaces?  It is my understanding that the purpose
of namespaces is twofold:

(a) Disambiguation.  e.g., if BookCatalogue is defined in another
    DTD that you are using then namespaces allow you to distinguish
    BookCatalogue in DTD A from Bookcatalogue in DTD B

(b) Reuse/validation. e.g., if you declare that BookCatalogue
    comes from a DTD in some domain then conceivably a parser
    could validate that portion of the XML document.

Who's right?  What is "truth"?  /Roger


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.