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

RE: simple question on namespaces.

  • From: Andrew Layman <andrewl@m...>
  • To: "'G. Ken Holman'" <gkholman@C...>, xml-dev@l...
  • Date: Wed, 27 Dec 2000 17:26:23 -0800

xml ensuring unique names
Yes.  Thanks for posting this answer.

The URI for a namespace needs only to be a unique name.  Per the namespaces
specification, it does not need to actually reference a retrievable
resource, though it may, the spec allows either.  (There is a long thread
debating whether or not this is a good design, which I will not rehash here.
I only report what the design is.)

By choosing a URI based on a URL scheme, first and second-tier domain names,
the authority to create and define a specific URI is as strong and durable
as the rights that go with the domain names.

-----Original Message-----
From: G. Ken Holman [mailto:gkholman@C...]
Sent: Friday, February 09, 2001 4:54 PM
To: xml-dev@l...
Subject: Re: simple question on namespaces.


At 00/12/27 16:16 -0800, Paul Tchistopolskii wrote:
>Why namespace looks exactly like URL when it is in fact  not ?

A URL is expressed using a URI and a URI is used to ensure namespaces are 
unique.  The URI used in a namespace isn't required to represent a URL.

>Just to confuse people, right ?

That question does not deserve comment.

>I think that
>
>xmlns:xsl="www.w3.org/1999/XSL/Transform"
>
>Is better design than
>
>xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
>...
> > Why something which is not a URL and was not
> > supposed to be a URL ( right? )  looks like URL ?

Because the protocol indication at the beginning of the URL governs the 
format of the rest of the string.  If it wasn't there, then there wouldn't 
be any formal rules for the format of the string.

By saying the string is a URI, the rules governing URI strings direct the 
creation of unambiguous URI string values between users of namespaces.  If 
it were a free-for-all on the string then two people could end up with the 
same string values and introduce ambiguity.  If it were assumed to be a web 
address (as you are proposing) then that prevents people who don't own 
domains to write valid strings that are theirs.  There are other protocols 
encompassed by URI strings allowing people who may have ownership of other 
unique values to validly use other protocol indicators to govern the syntax 
of the strings they are using to be unique.

One could even validly use mailto:myname@m... as a unique URI 
string, thus not requiring them to have their own web site or ISBN 
publisher's prefix or whatever ... this URI is sufficient.

Why invent a new way in the Internet world for ensuring unique values in as 
many possible domains in a coherent scheme?  There is already one to use, 
it is best to use it than have something either ambiguous or competing that 
has the same benefits.

I hope this helps.

....................... Ken

--
G. Ken Holman                    mailto:gkholman@C...
Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/x/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999   (Fax:-0995)
Web site: XSL/XML/DSSSL/SGML services, training, libraries, products.
Book: Practical Transformation Using XSLT and XPath ISBN1-894049-05-5
Article:          What is XSLT? http://www.xml.com/pub/2000/08/holman
Next public instructor-led training:           2001-01-27,2001-02-21,
-             2001-02-27/03-01,2001-03-05/07,2001-04-06/07,2001-05-01

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.