/*Start of RxHtml() Function----------------------------Version-01.00-*/ /*:RxHtml Function: Generates HTML to display tables and lists, whose */ /* contents are passed into RxHtml are passed in via stem variables. */ /* Syntax: */ /* HEAD - define the HEAD section of a web page. The output will be */ /* issued as SAY commands (the default), but can be directed */ /* to the stack of saved in a stem variable): */ /* rc=RxHtml('Head',"Title('Text of page title') Output('stem.')") */ /* STACK */ /* SAY */ /* BODY - define the BODY section of a web page. Note that the */ /* following colors are supported: AQUA BLUE BLACK FUSHSIA */ /* GRAY GREEN LIME MAROON NAVY OLIVE PURPLE RED SILVER TEAL */ /* WHITE YELLOW: */ /* rc=RxHtml('Body','BackColor(color) TextColor(color)', */ /* 'LinkColor(color) VisitedLinkColor(color)', */ /* 'ActiveLinkColor(color) Output(dest)') */ /* */ /* LIST - define a LIST at the current portion of the web page. Note */ /* that STEM is required, and Bullet and Numbered are mutually */ /* exclusive: */ /* rc=RxHtml('List','STEM(input.stemVarName.) Output(dest)', */ /* 'BULLET(Disk | Circle | Square)', */ /* 'NUMBERED(A | 1 | a | i | I)') */ /* Lettered--^ ^ ^ */ /* Numbered------+ +------Roman Numerals */ /* */ /* TABLE - define a table at the current portion of the web page; */ /* data for the columns is provided by stem variables. */ /* rc=RxHtml('Table','Output(dest)', Output destination */ /* 'COLCOLOR(color)', Default text color */ /* 'BACKCOLOR(color)', Background color */ /* 'COLALIGN(LEFT|CENTER|RIGHT)', Default column */ /* Frame controls exterior grid lines... alignment */ /* 'FRAME(TOP|BOTTOM|LEFT|RIGHT|ALL|TOP,BOTTOM|LEFT,RIGHT)',*/ /* 'RULES(NONE|ROWS|COLS|ALL)', Interior grid lines*/ /* 'TBLWIDTH(nn%|nnn)', Table width % or pixels */ /* The following TABLE parms are for individual columns, col1-col12 */ /* 'COL1STEM(stem.)', Input stem variable for col1 */ /* 'COL1COLOR(color)', Text color for col1 */ /* 'HEAD1(Heading text)', optional Heading for col1*/ /* 'FOOT1(Footer text)', optional footer for col1 */ /* 'COL1ALIGN(LEFT|CENTER|RIGHT)', text alignment */ /* */ /* FOOT - Close off the bottom of the web page. */ /* */ /*Example: */ /* dwarf.1='Grumpy'; dwarf.2='Sleepy'; dwarf.3='Dopey'; dwarf.4='Doc';*/ /* dwarf.5='Happy'; dwarf.6='Bashful'; dwarf.7='Sneezy'; dwarf.0=7 */ /* rc=RxHtml('Head',"Title('Some Famous Dwarves') Output('web.')") */ /* rc=RxHtml('Body','BackColor(Blue) TextColor(Yellow) output(web.)') */ /* rc=RxHtml('List','Numbered(1) STEM(dwarf.) output(web.)') */ /* rc=RxHtml('Table','Output(web.) BACKCOLOR(Yellow) Colcolor(Blue)', */ /* 'COLALIGN(CENTER) Head1(Name) Col1Stem(dwarf.)' */ /* rc=RxHtml('Foot','output(web.)') */ /*--------------------------------------------------------------------*/ RxHtml: /* No expose here because caller passes stem vars by name. */ _htmerr = _HTMParse(ARG(1),ARG(2)) /* Parse incoming parameters */ IF _htmerr <> '' THEN RETURN _htmerr /* Return w/ error if parse fail*/ RETURN RxHtml1(ARG(1)) RxHtml1: PROCEDURE EXPOSE gbl. _htmp. _htm. (_htm.0expose) SELECT WHEN TRANSLATE(ARG(1)) = 'BODY' THEN DO _htmo = '
' rc=_htmo(_htmo) END WHEN TRANSLATE(ARG(1)) = 'FOOT' THEN DO rc=_htmo('') rc=_htmo('