ietf-822
[Top] [All Lists]

Re: Comments on MIME/SGML

1994-03-09 09:04:27

In message 
<9403091410(_dot_)AA02575(_at_)cln49ib(_dot_)der(_dot_)edf(_dot_)fr>, 
Christophe ESPERT writes:
Ed, Dan,
I just wanted to add a few comments on the SGML part.
[...]
It is false to say you cannot split the prolog and the instance across 
several entities (note that I did not write SGML entities).  For example
you can have a Document Type Definition split across different files.
Here is an example:
      <!DOCTYPE foo [
      <!ENTITY % part1 SYSTEM "part1.dtd" >
      <!ENTITY % part2 SYSTEM "part2.dtd" >
      <!ENTITY % part3 SYSTEM "part3.dtd" >
      %part1;
      %part2;
      %part3;
      ]>
Here the declaration subset contains three external parameter entity
declarations and then these parameter entities are referenced so that
they are actually expanded to make up the DTD.

This is a different issue. Yes, different parts of the prologue and
different parts of the instance can reside in various entities, but
there is always a single entity -- the SGML document entity -- that
contains the prologue and the instance either directly or through
references to other entities. Hence the example you gave is
not an SGML document entity -- there's no instance.

In conclusion I would say that what you need in order to build your
MIME data stream is to be able to get the entity structure of an
SGML document.

I agree... is there something about the examples I have given that's
inconsistent with this idea?

 You need to implement the algorithm described in the
SDIF standard and in order to implement it you need an SGML parser
that will give you the entity structure.

I dunno about all that: I wrote a 50-line perl script that does the
job pretty well. Granted -- to invoke the perl script, you have to
tell it the names of the files that make up the entities of the
document. And if you wanted to discover the names of those files in an
automated fashion (something like makedepend), I guess you'd need and
SGML parser.

 Such a parser exists and
it is in the public domain (or soon will be).  It is called ObjectSGML
and is associated with its entity manager POEM.  ObjectSGML is a C++
class library with an API that allows you to access all the information
contained in an SGML document.  If you want more information please let
me know.

Gimme Gimme Gimme!!! I hereby volunteer to beta-test the thingy.

Dan

<Prev in Thread] Current Thread [Next in Thread>