ietf-822
[Top] [All Lists]

richtext <nl> model considered harmful

1992-02-04 06:50:04
Somebody wrote, in a message I never saw:
|
|   contexts -- but may be the death knell for our claim that richtext is
|   SGML compatible.

Markku Savela <savela(_at_)tel(_dot_)vtt(_dot_)fi> writes:
|   
|   Not necessarily. I am no SGML expert, but I do think you can
|   define an empty line (or LF code) to represent paragraph end in
|   SGML (is this something called short tags ...?). It can also
|   implicitly start the next paragraph. [Maybe this doesn't result
|   N-1 paragraph ends from N new lines, but N / 2 instead. But, it's
|   readable... ]

    Very close; they're called "short references".  Short tags are
tags which imply their generic identifier, as in <italic>foo</>, and
even <italic/foo/.  Maybe richtext could be a little less typing if it
would use such things?

    Anyway, yes, SGML does support short references, and one of the
more frequently used ones is the empty line (known to SGML as
"&#RS;&#RE;", and lest that frighten anyone, it means "Record Start,
Record End", or an empty record, similar in concept to a line).  This
is usually mapped to the paragraph start-tag.  (If one has defined a
markup language with SGML such that a paragraph don't occur within
another paragraph, there's no need for a matching </paragraph>.  This
means that an empty line in a paragraph will both terminate it and
start the next.)

    Likewise, "--" is a defined short reference, and can be used for
<signature>.  Using short references, I have parsed a complete RFC-822
header set with SGML, and regularly do so to scan messages with an
SGML searching tool.

    It's possible to redefine the set of short strings to be
understood as short references, so there is ample flexibility.  In
many cases, it's possible to have small documents (memos, for
instance) without any visible markup at all, using short references.

    Of course, people signing their messages with what appear to be an
end-tag will always cause problems for the unwary.

Cheers,
</Erik>
--
Erik Naggum       |  +47-295-0313     |  ISO 8879 SGML     |  Memento,
Naggum Software   |                   |  DIS 10744 HyTime  |  terrigena.
Boks 1570, Vika   | <erik(_at_)naggum(_dot_)no>  |  JTC 1/SC 18/WG 8  |  
Memento,
0118 OSLO, NORWAY | <enag(_at_)ifi(_dot_)uio(_dot_)no> |  SGML UG SIGhyper  |  
vita brevis.