Ed, Dan,
I just wanted to add a few comments on the SGML part.
The term "notation type" is indeed not defined. You have found data
content notation which is usually called "notation" in the SGML world.
A data content notation always has an external identifier associated
with it (4.213).
The term "data entity" is defined in the standard in 4.75.1.
4.75.1 data entity: An entity that was declared to be data and
therefore is not parsed when referenced.
NOTE: There are three kinds: character data entity, specific
character data entity and non-SGML data entity.
The data content notation for an external data entity is specified in
the entity declaration as you mentioned.
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.
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. 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. 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.
What do you think?
Regards,
Chris
Christophe Espert
========================================================================
Electricite De France | Tel: 33.1.47.65.43.21 ext. 6635
Direction Etudes et Recherches | Fax: 33.1.47.65.50.07
1, Avenue du General de Gaulle | E-mail:
espert(_at_)cln46fw(_dot_)der(_dot_)edf(_dot_)fr
92141 Clamart CEDEX - FRANCE
ISO 8879:1986 - SGML | ISO/IEC 10744:1992 - HyTime | ISO/DIS 10179 DSSSL
========================================================================