Subject: OCP message rendering

From: Alex Rousskov <[email-masked]>
Date: Tue, 7 Oct 2003 18:41:19 -0600 (MDT)

I got tired from counting characters and trying to preserve correct
spacing when typing OCP examples. Since OCP message format is strict
and well documented for machine use, I think it is wrong for us,
humans, to suffer from machine-level optimizations when typesetting OCP
examples irrelevant to those optimizations.

Therefore, if there are no violent objections, the following
informative section will appear in the next OCP draft release:

   3.2 Message Rendering

   OCP message samples in this specification and its application
   bindings are not typeset to depict syntactical details of OCP
   message format. Specifically, strict spacing requirements are not
   followed and string length is not shown in quoted strings. Thus, no
   rendering of an OCP message can be used to infer message format.
   The message format definition above is the only normative source
   for all implementations. In the following example, the first line
   contains more syntactical details, while the second line shows
   typical rendering of the same message in this specification.

             i-can {"28:http://iana.org/opes/ocp/TLS"};CRLF
             i-can {"http://iana.org/opes/ocp/TLS"};

                                Figure 4

   OCP debugging and traffic visualization tools are encouraged to use
   the same simplifications when rendering OCP messages for human use.

   Rationale: OCP message syntax is optimized for the common case,
   which is machine use. It is awkward for humans to type valid OCP
   strings (because humans do not like to count characters). Spacing
   requirements make it awkward to type large OCP messages, and use of
   CRLF sequence makes it impossible to render valid OCP messages in
   printable subset of ASCII code. This specification text is also
   optimized for the common case, which is human use.  Message
   examples are meant to illustrate important logical concepts for the
   implementor. The above BNF and message formatting rules are deemed
   sufficient to implement correct message parsers and generators.
   Those readers that do not like our rendering simplifications are
   encouraged to treat OCP messages as "binary structures" for which
   there is no good text mapping.

Thank you,

Alex.

---

From: "Martin Stecher" <[email-masked]>
Date: Thu, 9 Oct 2003 09:55:06 +0200

> I got tired from counting characters...

I now moved this work to a spreadsheet ;-)
When typing manual examples, I type the string into cell A1 of my spreadsheet and then copy the quoted value with correct size from another cell that has this formula:  =""""&LEN(A1)&":"&A1&""""

Regards
Martin