Lists Home |
Date Index |
- From: Dean Roddey <email@example.com>
- To: <firstname.lastname@example.org>
- Date: Mon, 10 Aug 1998 15:00:18 -0400
>I do not believe the new namespace proposal with local scoping makes it any
>harder to do than the old PI based namespace proposal. It may make it
>harder to think about it. The fact that the namespace prefix may actually
>be declared physically in the document after the DOCTYPE doesn't matter. At
>the time when the instance is to be compared to see if it matches the
>declaration in the DTD, the prefix to URI mapping is available. Can you do
>this without modifying your validation code? Certainly not.
>However, the approach I've outlined above still has a severe problem, which
>I don't think is so easily solved. In order to do this form of validaton,
>what gets put in the DTD is the prefix, and not the URI. That is a fatal
>flaw, because it makes it impossible to re-use a DTD for more than one
>document unless all documents that use that DTD use the same prefix for the
>same URI. That elevates the prefix to the same status as the URI --
>something one must take care to keep globally unique. The prefix is not
>syntactically suited to this task."
I keep coming back to namespaces in the context of the programming languages
that have used them, and think that these experiences should apply to XML's use
to some degree or another. Maybe their uses in XML will be radically different
becaues of the different uses of the two, but overall, past experience should
be some guide.
The C++ scenario is much like that of XML. The prefixes themselves must be
unique within any conglomeration of code from multiple sources. Has this been a
severe restriction in the C++ world? I don't think it has really, but some
might argue that its because XML will much more often be used to slap together
bits and pieces than a C++ application would. Mostly, the namespaces used are
those of well known companies or standards organizations, right? We all know
their prefixes and how to stay away from them. Any locally used namespaces are
ours to pick, but if a clash occurs we have to deal with it manually.
So, I guess the question is, how similar to C++ do people see XML's use being?
Will their primarily be large, well defined namespaces that make up the bulk of
the reusable goodies out there? Or, will it be the opposite? To the folks who
say that it will be the opposite, I'd reply that we software coders keep saying
the same thing too, but I'm not sure its happened yet :-)
The other possible model, is that of Java. Java's model is basically like the
"Use the whole URI" method, which is obviously yucky give the syntax of URIs.
But in terms of bulk and usage, that's pretty much what Java has done. You have
to use fully qualified name of a class to indicate a particular class. The
obvious advantage that Java has in this respect is that they forsaw and built
this in, so the names are a relatively reasonable hierarchical system that can
fit over the whole universe. Perhaps this would not be a bad idea for XML as
well, instead of allowing any random URL. The ability to package XML fragments
as 'classes' and being able to say foons="com/ibm/xml/Businesswidgets" to get
access to any of the Businesswidgets provided by IBM, would be a nice way to
go. And, if there are disambiguations to do, the developer of the source
document handles it, just as they do in Java by using the fully qualified name.
That's just the way that the cookie crumbles, and we shouldn't expect any more
magical way to deal with it?
So, anyway, overall I'm just asking "How real are the problems being discussed
in the domains where namespaces have been in real use" and "How relevant are
those previous experiences vis a vis how similarly we feel XML's use will be to
that of traditional programming languages" and "If they are relevant, and some
previous experience matches expected XML usage closely, why not apply that
previous experience now while we have the chance even if its a somewhat radical
Ok, so blast away :-)
IBM Center for Java Technology - Silicon Valley
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)