[UPDATE] standard-message-function-library.r
[1/2] from: rchristiansen::pop::isdfa::sei-it::com at: 5-Jan-2001 18:51
The XML-based Standard Message dialect page has been updated here...
http://www.dangeroustechnology.com/
The Standard Message Function Library file has been renamed and can be
viewed here...
http://www.dangeroustechnology.com/standard-message-function-library.txt
The routines and subroutines I outlined for the system have been updated
with finished subroutines marked in red here...
http://www.dangeroustechnology.com/#one2
Here is a quick overview of usage for the Standard Message Function Library
in its current state:
USAGE:
Messages can be translated from the REBOL object! datatype to the XML-
based Standard Message (and vice-versa) using a translator.
To translate from object! to XML:
translate-message/markup-data rebol-object
To translate from XML to object!:
translate-message/read-markup %filename
Messages can be translated from cgi input, an e-mail message or a
newsgroup message to the REBOL object! datatype using a translator. The
data must first be retrieved using REBOL's built-in Internet protocols, which
places the data into a cgi object! or e-mail object!
To translate from cgi input to the standard message object!:
decode-to-object/from-cgi cgi-object
To translate from e-mail or newsgroup messages
to the standard message object!:
decode-to-object/from-email email-object
XML files are named based on the time they are generated.
To generate a file name based on time:
time-in-digits now
Messages are created using CGI on a web server.
To decode CGI input from the web server:
cgi-input: retrieve-user-data
Write the XML-formatted standard message data with
a file name determined by messageID and to a directory
determined by messageType.
write-xml-message xml-message-string
Messages are requested using CGI on a web server.
Read a directory of file names corresponding to
a directory of XML-formatted standard messages
with the directory determined by messageType.
read-message-directory message-request-data
Read a specific XML-formatted standard message
with the directory determined by messageType
and the file name determined by messageID.
read-message message-request-data
Read a directory of XML-formatted standard messages
with the directory determined by messageType.
read-directory-messages message-directory message-request-data
Messages are displayed as text/html output to a browser.
Markup a standard message using standardized
cascading style sheets tags as the display markup.
display-markup/css xml-message-string
Markup a standard message using a set of HTML tags
as defined in an external object! as the display markup.
display-markup/html xml-message-string html-tags
[2/2] from: rchristiansen:pop:isdfa:sei-it at: 9-Jan-2001 17:25
The Standard Message Function Library took a great leap forward
today, moving from version 0.1.2 to version 0.2.1. Besides a few bug
fixes, the library now includes the 'create-message and 'get-
messages-for-display functions (see usage for these functions below.)
As always, I appreciate any and all input on this effort.
-Ryan
You can read about the Standard Message Function Library here:
http://www.dangeroustechnology.com
A new usage section for the library has been added here:
http://www.dangeroustechnology.com/#one3
And the code for the library is here:
http://www.dangeroustechnology.com/standard-message-function-library.txt
Here is a synopsis of today's changes:
0.2.1 [9-Jan-2001 "Corrected target 'word in 'write-xml-message.
Added 'create-message object! functions. Corrected 'display-markup
to output string! datatype instead of block! datatype. Negated use of
'message-request-data target variable in 'read-directory-messages.
Added 'get-messages-for-display object! functions." "Ryan"]
And, finally, here are the ussage instructions for the newly created
functions 'create-messsage and 'get-messages-for-display. These are
higher-level functions, depending on other library functions for
execution:
CREATING (AND SAVING) MESSAGES
Using decoded CGI data, writes XML standard message file to
directory determined by messageType.
create-message/from-cgi cgi-input
Using an e-mail message in the form of a REBOL e-mail object!,
writes XML standard message file to 'email' directory.
create-message/from-email email-message
RETRIEVING MESSAGES MARKED-UP FOR DISPLAY
Using decoded CGI data, create a block! of messages marked up for
display using standardized cascading style sheets tags as the
display markup.
get-messages-for-display/all-messages-in-directory/css-output cgi-input
Using decoded CGI data, create a block! of messages marked up for
display using a set of HTML tags as defined in an external object! as
the display markup.
get-messages-for-display/all-messages-in-directory/html-output cgi-input
Using decoded CGI data, mark up a specific message for display
using standardized cascading style sheets tags as the display
markup.
get-messages-for-display/specific-message/css-output cgi-input
Using decoded CGI data, mark up a specific message for display
using a set of HTML tags as defined in an external object! as the
display markup.
get-messages-for-display/specific-message/html-output cgi-input