ietf-822
[Top] [All Lists]

Re: Comments on MIME/SGML

1994-03-10 01:21:53
Dan,
I agree with you that the example I gave is not an SGML document entity.
But I wrote before that the Document Type Definition may be split across
several entities.  Let's add the document instance set to the example:
        <!DOCTYPE foo [
        <!ENTITY % part1 SYSTEM "part1.dtd" >
        <!ENTITY % part2 SYSTEM "part2.dtd" >
        <!ENTITY % part3 SYSTEM "part3.dtd" >
        %part1;
        %part2;
        %part3;
        ]>
        <foo><!-- Let's say the instance set is made of a few characters
        to make it simple. -->Blablabla</foo>
This example was very simple.  As you may know the HyTime standard has been
defined to be an "extension" of SGML.  HyTime addresses issues about
multi- and hypermedia documents.  As you can imagine these documents could
be extremely complex.  For instance in HyTime you can link two elements
belonging to different SGML documents.  In order to do that in a coherent
way, you have to consider the main document as the hub document and declare
the other documents that make up the hyperdocument as external entities.
I am sorry if it is not clear enough but what I want to point out is the
fact that the entity structure might be very intricate due to nesting,
Let's take a look at an example:
        <!DOCTYPE foo SYSTEM "foo.dtd" [
        <!ENTITY doc1 PUBLIC "-//Owner//DOCUMENT another doc//EN">
        <!ENTITY % special PUBLIC "-//Owner//ENTITIES Special char//EN">
        %special;
        ]>
        <foo>.........<!-- I am lazy :-) -->
        <zorn file=doc1>Locate a given element in doc1 (I do not want
        to expose HyTime mechanics which consists mainly of SGML
        attributes that carry some semantics)</>
        </foo>

The doc1 external entity is an SGML document entity, let's say:
        <!DOCTYPE bingo PUBLIC "-//Owner//DTD Bingo//EN" [
        <!ENTITY % ISOlat1 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN">
        %ISOlat1;
        ]>
        <bingo>..........<blop>Here is the element I wanted to locate!</>
        </bingo>

The special external parameter entity could also contain nested external
parameter entity declarations and references...

I don't think that the examples you have given are inconsistent with the idea.
I certainly think you have very clear ideas about what happens.
Your script must be very interesting.  But because of the nesting of entities
you must be recursive when you scan the files that make up the entities.
Indeed what you want to send is a complete and consistent SGML document.
Yes I agree with you that in the end an SGML parser should be used.
But your current solution is a good first step.

I am sorry but I cannot give you the ObjectSGML parser :-(  It will be
released apparently in May or June of this year in the public domain.
ObjectSGML and POEM (Portable Object-oriented Entity Manager) are part
of project YAO announced by Dr Charles Goldfarb at SGML'93 in Boston
last December.  ObjectSGML is based on YASP 1.34 (Yet Another SGML
Parser) which is one of the fastest and probably the most compliant
SGML parser today.  YASP was developed by Pierre Richard when he was
working for IBM France.  ObjectSGML will improve the conformance level
because it will implement Link Process Definitions, something NO parser
may claim to do correctly.  ObjectSGML supports variant concrete syntaxes
and any character sets.  The API should consist of SGML events sent by
the parser to the application.  The application will pick the events
from an event list and will do whatever it wants with the information.
This is what an SGML parser ought to be.  I think there has been a
confusion for a long time because people thought of a parser as a
validator.  A validator is an application of a parser which is able
to tell you whether or not the document being parsed is correct or not.
I forgot to say that ObjectSGML has extremely powerful error recovery
facilities.
That's all for now.
Best 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
========================================================================



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