W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > May 1997

Re: Thoughts on namespaces

From: Steven J. DeRose <sjd@eps.inso.com>
Date: Fri, 23 May 1997 10:13:31 -0400
Message-Id: <2.2.32.19970523141331.00a70584@pop>
To: w3c-sgml-wg@w3.org
At 04:30 PM 05/22/97 GMT, Christopher R. Maden wrote:
>First, I believe the primary goal of namespaces is to allow borrowing
>of established semantics - I want to use TEI's <xref>, HTML's <a>, and
>the FAQ DTD's <q> and <a>.  That means two things must be
>accomplished:
>
>(1) subclassing of GIs to prevent clashes, as in HTML's <a> and the
>    FAQ <a> above; and

I wouldn't call this subclassing, but it certainly does seem useful.

>Thoughts?  Counterproposals?
>
I'm struck by how close to CONCUR this all falls: What we're talking about
is a single document that has (at least parts of) several DTDs in use. It is
clearly more work to support that if you must truly combine the DTDs (move
some/all dcls from one into the other, perhaps with renaming), than if you
can just use them both (which CONCUR does). 

Basically, all you do with CONCUR is put the DTD-name in () at the start of
the tag (one DTD is effectively the default, so you can omit it):

   <P>The light bulb had something to do with <(TEI)NAME>Edison</(TEI)NAME>

Not too tough, and not really much different from the "::" proposal
(certainly no harder to implement as far as the syntax of tags goes):

   <P>The light bulb had something to do with <TEI::NAME>Edison</TEI::NAME>

You merely have delimiters on both ends, instead of just after. Note that
there is some subtlety to the "::" proposal because the parser doesn't know
whether "TEI" is a GI or a DTD name qualifier until after it's past and the
parser has identified the "::". Not a big deal or insoluble, but it may
slightly constrain implementation options for parsers (haven't thought that
aspect through in detail yet).

I think I'd favor CONCUR for this particular kind of use, since it is
already defined, SGML compatible, and a pretty good fit. It also allow you
to add the "borrowed" tags without so much as touching the local ones (whose
DTD, presumably, would be considered the base/default). Also, the complex
bits of CONCUR are less troublesome in the limited usage we'd be making of
it. The issues we'd have to resolve with CONCUR include:

a) It only handles one level of naming beyond the GI, not multiple levels;
this may be sufficient for the particular case we're talking about. 

b) Each DTD must cover the entire document, which we definitely don't want.

c) There is no mechanism to constrain relationships between the DTDs (like,
that their elements can't cross in non-hierarchical ways, a constraint I
should think we want very much for this particular application). Of course,
we could state this as a majorly simplifying constraint on XML's use of CONCUR.

B and C are not intrinsic to the notion of CONCUR, and I think they could be
removed with minimal syntactic disturbance; but they are there and could not
be removed merely by XML convention. The multi-level may not be necessary
for the particular case under discussion (as Andrew has also suggested):
borrowing tags from multiple DTDs; although multi-level borrowing is
certainly possible, it is not central to the degree that multi-level
subclassing or multi-level containment are.


Steven J. DeRose, Ph.D., Chief Scientist
Inso Electronic Publishing Solutions
   (formerly EBT)
Received on Friday, 23 May 1997 10:17:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:26 UTC