You are not logged in Log in Join
You are here: Home » Members » jim » StructuredTextWiki » StructuredTextQuotedLine

Log in
Name

Password

 
 

History for StructuredTextQuotedLine

??changed:
-
Structured Text processing of quoted lines

  (and fancier email message stuff)

  I think STX has a big future in the web-based messaging department. After all, its syntax was created to mimic that of common and intuitive markers already used by the plain-text-only newsgroup community, right?

  So, how might we deal with an email message? Here's a short brainstorm. Comments and suggestions would be greatly apprectiated. Let's say you have a message thus::

        Date: Wed, 13 Jun 2001 11:42:28 -0400
        From: Mike Lamb <[email protected]>
        To: [email protected]
        Cc:
        Bcc:
        Subject: Re: Baz Quux Quux
        Message-ID: <[email protected]>
        Reply-To: [email protected]
        X-Mailer: Mozilla 4.61 [en] (Win98; U)
        X-Accept-Language: en
        Precedence: bulk

        On Wed, 13 Jun 2001 at 10:00am, David wrote:
        > On Tue, 12 Jun 2001, Clyde wrote:
        > > On Mon, 11 Jun 2001, Barry wrote:
        > > > On Sun, 10 Jun 2001, Alice wrote:
        > > > > I seriously doubt that. That's the most 
        > > > > absurd thing I've ever heard! How do you
        > > > > expect us to believe something like that?
        > > >
        > > > What makes you say that, Alice?
        > >
        > > Barry, I think Alice's point is valid.
        > >
        > 
        > You three don't know what you're talking about.
        
        So what do *you* think, David?

        'Later
        -Mike

  Wouldn't it be cool to have STX render it something like this:
  <blockquote>

  <b>Mike Lamb</b>, <b>"Re: Baz Quux Quux"</b> <i>Wed, June 13 @ 11:42am</i>
  <table width=100%><tr><td bgcolor="#cccccc" width=1>&nbsp;</td><td>

  <b><font color="000099">David</font></b> <i>Wed, June 13 @ 10:00am</i>
  <table><tr><td bgcolor="ccccff" width=1>&nbsp;</td><td>

  <b><font color="990000">Clyde</font></b> <i>Wed, June 12</i>
  <table><tr><td bgcolor="ffcccc" width=1>&nbsp;</td><td>

  <b><font color="009900">Barry</font></b> <i>Wed, June 11</i>
  <table><tr><td bgcolor="ccffcc" width=1>&nbsp;</td><td>

  <b><font color="990099">Alice</font></b> <i>Wed, June 10</i>
  <table><tr><td bgcolor="ffccff" width=1>&nbsp;</td><td>

  I seriously doubt that. That's the most absurd thing I've ever heard! How do you expect us to believe something like that?
  </td></tr></table>

  What makes you say that, Alice?
  </td></tr></table>

  Barry, I think Alice's point is valid.
  </td></tr></table>

  You three don't know what you're talking about.
  </td></tr></table>

  So what do *you* think, Daivd?

  'Later
  -Mike
  </td></tr></table>
  </blockquote>

  Have a look at the source. The linedrawing bit isn't really very complex. You just strip off one level of indent markers, STX process the paragraph that remains, and wrap it in a quick table with a colored td on the left. Easy.

  Of course, there's a lot more that can be added to this. It should optimally be able to do something fancy with the headers so that the information they contain is still accessable. I was thinking, toss that info into a DHTML layer that becomes visiable as you mouseover a specific part of the rendered text. Or something like that. Add your ideas!

  I figure that if the DC guys a clever enough to build a system that processes ascii-drawn boxes into HTML tables, *this* should be *cake*. -"datagrok":/Members/datagrok



<hr solid id=comments_below>


datagrok (Nov 2, 2001 11:12 am; Comment #1)  --
 Even though I said that the table code was simple, using CSS to accomplish this cleans things up a *lot*.  However, you end up looking ugly in non-css-supporting browsers. Your call, I suppose.
 
 Try this example. View source to see how much cleaner the code is:

 <blockquote>
 <style>
         DIV   { border-left: .4em solid black; 
                 margin-left: .2em; padding-left: .2em; }
         DIV.a { border-left-color: #FCC; }
         SPAN.a b {          color: #900; }
         DIV.b { border-left-color: #CFC; }
         SPAN.b b {          color: #090; }
         DIV.c { border-left-color: #CCF; }
         SPAN.c b {          color: #009; }
         DIV.d { border-left-color: #FCF; }
         SPAN.d b {          color: #909; }
         DIV.quote   { border-left: .4em solid black;
                 margin-left: .2em; padding-left: .2em; }
 </style>
 <span class="a"><b>Test</b> date</span>
 <div class="a">
 <span class="b"><b>Test</b> date</span>
 <div class="b">
 <span class="c"><b>Test</b> date</span>
 <div class="c">
 <span class="d"><b>Test</b> date</span>
 <div class="d">
 test
 </div>
 abcd
 </div>
 </div>
 one two three
 </div>
 </blockquote>