[REBOL] Rebol Server Pages
From: al::bri::xtra::co::nz at: 3-Nov-2000 23:35
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:
<head><title><%: Title: "Rebol Server Pages test" %></title>
<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 %>><%
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 Title: "Rebol Server Pages test"
prin "</h1>^/The date and time at the server is: "
prin ">. <br>^/There should be four "Hello"'s following this:"
for i 4 1 -1 [
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.
Rebol Server Pages Guru...