ietf-822
[Top] [All Lists]

Re: MIME to Draft Standard

1993-01-21 10:12:15
At present richtext lets you define your own commands, which will be
treated as no-ops on a viewer that doesn't support them...but they
have to have matching end-tags, and this is sometimes inappropriate.
So I'd like a richtext parser to be able to determine from syntax,
that no end-tag is expected for a particular command.

Yep.  Wrote a book about this once :-).  The SGML notion amounts to 
"unrecognized tag" causing a fatal error, so the @#$%^& spec didn't
allow for this case or any other sensible extensibility model.

You've either got to move outside SGML or develop a lexical convention
about either all generic identifiers, or just ones not defined in the
spec, that do (or don't) take end-tags "look" special.  We used SGML for
a moderately complex, by highly structured, data interchange definition
in which the first several layers of tags all require end-tags and are
specifically defined.  Things are extensible below that level, with the
rules that:

 o  Any tag whose generic identifier is of the form xyz, e.g., <xyz> does
not require or permit an end-tag.  Its content is terminated by the very
next tag (either start- or end-).
 o  Any tag whose generic identifier is of the form abc/ (e.g., <abc/>
requires an end-tag.  The "/" was chosen because a user study concluded
that the relationship of <abc/>   ... </abc/> was pretty easy to
remember.

Although we would have done so if we were dealing with text, we didn't
bother with the &-based special symbol reference constructions.  We do
have provision for ISO 8859-n text and ISO 2022 escapes (deprecated but
permitted) but the arrangements used, while SMGL-consistent, are
inappropriate for richtext or anything similar to it.
Other sets of rules are, of course, possible.

The parsing engine for this doesn't require C, much less a general-
purpose SGML engine.   It can be written in BASIC.  One was (not by me)
:-)

    --john

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