[
Lists Home |
Date Index |
Thread Index
]
- From: Andrew Layman <andrewl@microsoft.com>
- To: xml-dev@lists.xml.org
- Date: Thu, 28 Dec 2000 16:39:10 -0800
I know that many books offer interpretations of what the namespaces
specification says. That is why I recommend reading the actual
specification. For better or for worse, what the W3C members approved was
the wording in the specification, not something else.
Regarding your clarified questions about tools A and B, indeed it is
possible to write a tool that assumes that every namespace URI actually
points to a document, perhaps even a document of a specific type as in your
example. If intended for general use, and not qualified in some way, this
would be a faulty assumption by the toolmaker and would run into immediate
interoperability problems. The spec does not say that every namespace URI
must reference a resource, much less one of any specific type.
That said, the specification also does not prohibit there being a resource
retrievable using the namespace URI. The spec only says that (a) the
namespace and the resource are distinct concepts, and the necessary function
discussed by the spec is identification of the namespace; and (b) namespace
URIs bear no necessary and definite relation to specific resources. They
may or may not.
But don't take my word for it. Read the spec. :-)
-----Original Message-----
From: Paul Tchistopolskii [mailto:paul@qub.com]
Sent: Thursday, December 28, 2000 4:12 PM
To: xml-dev@lists.xml.org
Subject: Re: simple question on namespaces. Last one.
From: Andrew Layman <andrewl@microsoft.com>
> 1. a. The URI of a namespace is not a mere string. Per the namespaces
> in XML specification, it is a URI.
A. ... every W3C namespace is not just URI, but it is URL ...
Is it on purpose ? OK, let's keep that http: , but use
http://w3c.org:something:here
Why W3C makes all their namespaces URLs but not URIs ? -
that was my question.
B. Why it should be URI ? What is the rationale for this self-limitation ?
> 2. a. Retrieval of a document or other resource based on the URI
> of the namespace is not "abuse" of the specification. The specification
> states "It is not a goal that it be directly usable for retrieval of a
> schema (if any exists)." Had it been the intention of the specification's
> authors to prohibit retrieval of a resource, the wording would have said
> that, instead. As it is, the specification is simply neutral on the
matter
> of whether retrieval is possible or not, desirable or not.
It is the problem that it is neutral. This mean that tool X that will start
fetching
schema ( or *god-knows-what* ) will be conformant to this specification.
What is 'neutral', by the way ? I have a feeling that all the books /
materials
on XML I've seen are not *that* neutral.
########################
Current tutorials on XML are explicitly saying things like :
Michael Kay: ( page 733 )
Namespace URIs are unusual in that there is no actual resource
that can be obtained using the URI; the URI is simply a unique
identifier. In practice, any string can be used as a namespace URI
though "http://" URLs are often used to give some prospect of
uniueness.
http://tech.irt.org/articles/js193/index.htm
"The namespace is identified by a URI, either a Uniform Resource Locator
(URL), or a
Uniform Resource Number (URN), but it does not matter what (if anything) it
points to.
URIs are used simply because they are globally unique across the Internet,
and thus help
produce identifiers that are universally unique. "
http://msdn.microsoft.com/xml/tutorial/use_namespaces.asp
What is an XML namespace?
An XML namespace is a collection of names that can be used as element or
attribute names
in an XML document. The namespace qualifies element names uniquely on the
Web in order to
avoid conflicts between elements with the same name. The namespace is
identified by some
URI (Universal Resource Identifier), either an URL (Uniform Resource
Locator), or an URN
(Uniform Resource Number), but it doesn't matter what, if anything, it
points to. URIs are
used simply because they are globally unique across the Internet.
##########################
I think almost every explanation of namespaces will tell that
"there is no actual resource that can be obtained using the URI"
This is because every novice when he looks at any W3C namespace
asks himself : "what is this URL about?"
People are confused with this practice of W3C and those who are writing
about namespaces are trying to tell people that : "namespaces are
using URLs just for uniqueness - there is nothing associated with
those URLs"
And now you are saying that "spec is neutral". Poor XML evangelists,
they'l have to rewrite all they books, after tool X will start abusing
"neutral specifcation".
I agree that 'abusing' could be considered a bad word, because
it is impossible to abuse the "neutral specification".
> 3. I do not understand what you are saying in this point.
> 3. I'm XML developer. I have to design some schema
> and I also want my documents to be processed by tool X.
> Of course - I'll use URLs for my namespaces , so that tool
> X can work with my 'namespaces'. Why should I take
> something *other* than URL ? URL is fine with
> W3C paper. URL is fine with 'tool X'. - very good.
What is not clear ?
- There is some popular tool X which is attaching the new semantics
to the namespace name, ( == tool X is using namespace names
as URL for fetching god-knows-what )
- I am a developer who is thinking about the name for *my*
namespace. I know that tool X has a feature (1).
I'l of course make my new namespace a URL ( not URI ).
Just in case.
What is not clear ?
> 4. I do not understand what you are saying in this point.
>
> I do not understand the somewhat conspiracy-theory like discussions of
"tool
> X."
I suggest you'l make an experiment.
Assume that you wrote some tool ( let's call it A if you don't like 'X' )
which is
working in assumption that every namespace declaration in any XML document
is a URL pointing to some Schema file.
Assume that I wrote some other tool ( let's call it B ) which is
working in assumption that every namespace declaration in any XML document
is a URL pointing to some RDF file.
Try to use both A and B. See that it is not possible.
OK, so the solution to this problem is W3C stepping out and saying
that : "Those URIs are URLs and they should point to: ..." ?
> One last point: During the namespaces specification design and also during
> the design of schemas, it was lengthily debated whether a namespace and a
> schema are coextensive, that is, whether there is only one schema
associated
> with a namespace and visa versa. In both cases, the conclusion after much
> consideration was that namespaces and schemas are distinct.
Very good. So W3C will *not* step out and will *not* say that. Right?
Good for tool X. It will become a de-facto standard.
What is 'conspiracy' ?
Anyone can make this 'what if' experiment and see what will happen after
some popular tool will start fetching document by 'namespace' URL.
*no* matter what will be that document - it will become a de-facto standard.
Rgds.Paul.
|