[comp.text.sgml] multiple name spaces?

psrc@cbnewsl.att.com (Paul S. R. Chisholm) (02/01/91)

"Object-oriented SGML" sounds as if it comes out from a marketeer who
knows all the hot buzz words but doesn't know what they mean . . . but
I'm serious.  I have an idea, and would like to know if SGML has
anything like it (probably not).

In the software development world, those of us who brought lots of
third party libraries into our development environment discovered
something called "name space pollution."  What do you do if you have
two great libraries, and they both have external functions named
insertList?  Some programming languages (notably the Modula family and
Ada) provided "modules", where you could limit the scope of a name.
C++ picked this up, and extended it.  A C++ class can "inherit" from
another class, so everything in one class is can also be used (or
redefined) in another.

The other thing C++ provides is a way of specifying what name space you
want to use.  I might have an external function insertList, and an
insertList function in my SkipList class.  Depending on context, I'll
get one or the other if I invoke insertList().  However, regardless of
context, if I call ::insertList(), I'll get the global version, and
SkipList::insertList() will pick up the function from the class.

I suppose it's clear where I'm going.  I'd like to be able to combine
DTDs; say, have a Footnote DTD that defines a certain set of elements,
and a Bibliography DTD that defines others.  It should be okay if both
define an element called <note>; I'd just use a <Footnote::note> or
<Bibliography::note> mark.

I don't know SGML, but I know what I like.-)  Does something like this
exist?  Should it?  Or are DTDs complicated enough that they need to be
integrated carefully and painstakingly in advance, instead of at
formatting time?

Paul S. R. Chisholm, AT&T Bell Laboratories
att!mtunq!psrc, psrc@mtunq.att.com, AT&T Mail !psrchisholm
I'm not speaking for the company, I'm just speaking my mind.