From: DRMACRO@RALVM13.VNET.IBM.COM ("Dr. "Eliot Kimber" Macro")
Newsgroups: comp.text.sgml
Subject: Overlapping Data and SGML Encoding
Date: 23 Jul 92 17:38:46 GMT

Steve DeRose's point is well taken.  In fact, I ran into almost
exactly the problem he presents.  I put together a little
IBM SGML Translator application that translates markup specific
to the poetry of Yeats into BookMaster so I could print it or
build an online book (I'm a big Yeats fan and happened to have
access to raw Yeats online).  In the course of working out the
DTD, I realized that I wanted to mark lines and verses but
also quoted speeches, which can cross both boundaries.  I avoided
the problem by deciding not to identify quotations.

Steve's post focused me on the real issue of this discussion, which
I think is "would it make sense to modify SGML to enable the
identification of overlapping structures in some rational way?"
I would add, can we do this without abandoning totally the
concept of containment, which is very useful 99% of the time.

Before I go on, let me enumerate what I see as the chief
advantages of SGML as a technology base:

1. Declarative identification of data elements enables re-use
   and interchange of data by making the data source independent of
   the processors that may do useful things with it.

2. The standardized parsing defined by ISO 8879 enables
   reliable interchange at the application level because
   a given document will be parsed in the same way by all
   conforming parsers.

3. The DTD specifically enables interchange across applications
   when semantics are not important (e.g., context-sensitive
   SGML editors or search-and-retrieval engines that just need
   to know what's data and what's not).

4. Strictly-defined containment (hierarchy) enables interesting
   and often quite powerful processing of documents, as well as
   enabling precise structuring of data *that can be structured
   hierarchically*.

Points 1 through 3 continue to hold even if 4 is eliminated.
Point 4 can be ignored by designing content models and elements
that are not containing (i.e., EMPTY).  For example, the
revision marking elements in the SGML Starter Set language (that comes
with the IBM SGML Translator) are not containing and thus
can cross containment boundaries.  Under the current definition
of SGML, applications must define and validate the structural
rules for such elements, which I will call
"asynchronous containers", which must be paired, as opposed
to elements like references which are not paired, but are not
containing.

The question as I see it then is "can the SGML content model
language be extended to express explicitly asynchronous
containment such that the parser can validate it?"  In other
words, is there some way to define a content model such
that you can define either strict containment or asynchronous
containment?

At this point, my brain starts to hurt, so I will leave it
to people who understand parsing and formal languages much
better than I to say yes or no.  I think that if the answer
is yes and the result is practical to implement, that it could
be very useful.



Eliot Kimber                      Internet:  drmacro@ralvm13.vnet.ibm.com
Dept E14/B500                     IBMMAIL:   USIB2DK9@IBMMAIL
Network Programs Information Development     Phone: 1-919-543-7091
IBM Corporation
Research Triangle Park, NC 27709