On my webserver that handles embedded REBOL (I'm not sure if this is the
same as your .RSP idea), it is as simple as this:

    <HTML><HEAD><TITLE>Example</TITLE></HEAD>

    <H1>Bo's embedded REBOL example</H1>

    <P>The time is <REBOL>output now</REBOL>

    <P>This webserver is running on REBOL/<REBOL>
        output [system/product system/version]
    </REBOL>

    </HTML>

I've done much more complex things with it in the past like building HTML 
tables on the fly from dynamic data, etc.  I like to keep it clean looking.

Just a thought!

-Bo

On 3-Nov-2000/8:56:18-7:00, [EMAIL PROTECTED] wrote:
>Rebol Server Pages could be implemented like this:
>
>*.RSP is the file name extension. RSP: Rebol Server Pages.
>
>The embedded Rebol script in the .RSP would look like this:
>
><html>
><head><title><%: Title: "Rebol Server Pages test" %></title>
><body>
><h1><%: Title %></h1>
>The date and time at the server is: <%: now %>. <br>
>There should be four "Hello"'s following this:
><% for i 4 1 -1 [
>    %><h<%: i %>>Hello</h<%: i %>><%
>    ] %>
></body>
></html>
>
>"<%" opens a tag that contain Rebol script that doesn't need it's value
>embedded in the resulting HTML code.
>"<%:" opens a tag that contains Rebol script that should be converted to a
>string and embedded in the resulting HTML code.
>"%>" closes either of the above tags.
>
>The implementation of the above could occur in a object, like this:
>
>RSP: make object! [
>    prin "<html><CTRL>/<head><title>"
>    prin Title: "Rebol Server Pages test"
>    prin "</title><CTRL>/<body><CTRL>/<h1>"
>    prin Title
>    prin "</h1><CTRL>/The date and time at the server is: "
>    prin now
>    prin ">. <br><CTRL>/There should be four "Hello"'s following this:"
>    for i 4 1 -1 [
>        prin "<h"
>        prin i
>        prin ">Hello</h"
>        prin i
>        ]
>    prin "</body><CTRL>/</html>"
>    ]
>
>Hmmmm, and after painstakingly writing out all those 'prin, it might be
>easier to rewrite it into a block suitable for 'rejoin.
>
>Also the above object/block would predefine 'set, 'prin, 'print and maybe
>'system to mean other things.
>
>Opinions?
>
>Andrew Martin
>Rebol Server Pages Guru...
>ICQ: 26227169
>http://members.nbci.com/AndrewMartin/
>-><-
>
>
>-- 
>To unsubscribe from this list, please send an email to
>[EMAIL PROTECTED] with "unsubscribe" in the 
>subject, without the quotes.
>
-- 
                           Bohdan "Bo" Lechnowsky
                           REBOL  Adventure Guide
           REBOL Technologies 707-467-8000 (http://www.rebol.com)
       The Official Source for REBOL Books (http://www.REBOLpress.com)

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to