Module WmlWrite_Mixin.pkg

     1//****************************************************************************//
     2//                                                                            //
     3// $File name  : WmlWrite_mixin.PKG                                           //
     4// $File title : Wml Write  Messages                                          //
     5// $Author     : John Tuohy                                                   //
     6//                                                                            //
     7// Confidential Trade Secret.                                                 //
     8// Copyright 2000 Data Access Corporation, Miami FL, USA                      //
     9// All Rights reserved                                                        //
    10// DataFlex is a registered trademark of Data Access Corporation.             //
    11// $Rev History                                                               //
    12//                                                                            //
    13//                                                                            //
    14//   10/2/00 jjt - created                                                    //
    15//                                                                            //
    16//****************************************************************************//
    17
    18// create standard wml write commands.
    19//
    20// Current messages
    21//
    22//  WriteWmlBreak String WrStr                    writes line with a     <br />
    23//  WriteWmlTableBegin String sParams             starts a table         <table>
    24//  WriteWmlTableEnd                              end a table            </table>
    25//  WriteWmlRowBegin                              start a row            <tr>
    26//  WriteWmlRowEnd                                end a row              </tr>
    27//  WriteWmlDataBegin                             start a cell           <td>
    28//  WriteWmlDataEnd                               end a cell             </td>
    29//  WriteWmlImg sAlt sSrc sExtra                  write an image tag     </img.../>
    30//
    31use VDFBase.pkg
    32
    33{ ClassLibrary=Common }
    34Class WmlWrite_mixin is a Mixin
    35
    36    Procedure WriteWml String sWml
    37        Send WriteHtml sWml
    38    End_Procedure
    39
    40    Procedure WriteWmlBreak String sWml
    41        if (Num_Arguments>0) Send WriteWml (sWml + "
"
) 42 else Send WriteWml "
"
43 End_Procedure 44 45 Procedure WriteWmlTableBegin String sParams string sPer 46 String sWml 47 Move (' * sParams * '>') to sWml 48 Send WriteWml sWml 49 End_Procedure 50 51 Procedure WriteWmlTableEnd 52 Send WriteWml '' 53 End_Procedure 54 55 Procedure WriteWmlRowBegin 56 Send WriteWml '' 57 End_Procedure 58 59 Procedure WriteWmlRowEnd 60 Send WriteWml '' 61 End_Procedure 62 63 Procedure WriteWmlCell string sData 64 Send WriteWml ('' * sData * '') 65 End_Procedure 66 67 Procedure WriteWmlDataBegin 68 Send WriteWml '' 69 End_Procedure 70 71 Procedure WriteWmlDataEnd 72 Send WriteWml '' 73 End_Procedure 74 75 Procedure WriteWmlImg String sAlt String sSrc String sExtra 76 string sWml 77 Case Begin 78 Case (Num_arguments>2) 79 Move ('alt="' - sAlt - '" src="' - sSrc - '"' * sExtra) to sWml 80 case break 81 Case (Num_arguments=2) 82 Move ('alt="' - sAlt - '" src="' - sSrc - '"') to sWml 83 case break 84 Case else // assumes 1 arg, else a RT error 85 Move sAlt to sWml // assumes a fully defined string 86 Case End 87 Send WriteWml (" * sWml * "/>") 88 End_Procedure 89 90end_class 91