[BACK]Return to xml.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Doc

Annotation of OpenXM/src/kan96xx/Doc/xml.sm1, Revision 1.3

1.3     ! takayama    1: %% $OpenXM: OpenXM/src/kan96xx/Doc/xml.sm1,v 1.2 1999/11/08 11:12:06 takayama Exp $
1.1       takayama    2: %% xml.sm1  XML support for sm1.
                      3: %% This package requires ox.sm1
                      4: [(parse) (ox.sm1) pushfile] extension
                      5: %%%%% These should be under /usr/local/OpenXM or OpenXM_HOME
                      6: /oxpath.java-support (lib/java-support) def
                      7:
                      8: [(getenv) (OpenXM_HOME)] extension
                      9: tag 0 eq {
                     10:   /oxpath.java-support [(/usr/local/OpenXM/) oxpath.java-support] cat def
                     11: } {
                     12:   /oxpath.java-support [ [(getenv) (OpenXM_HOME)] extension (/) oxpath.java-support] cat def
                     13: } ifelse
                     14:
                     15: /xmlconnect {
                     16:  [/in-xmlconnect  /data /control /com] pushVariables
                     17:  [
                     18:   /data [(oxGenPass)] extension def
                     19:   /control [(oxGenPass)] extension def
                     20:   [data control] message
                     21:   [(tdiv_qr) data .. (2000)..] mpzext 1 get (integer) dc 1025 add /data set
                     22:   [(tdiv_qr) control .. (2000)..] mpzext 1 get (integer) dc 1025 add /control set
                     23:
                     24:  [$($ ( cd ) oxpath.java-support ( ; )
1.3     ! takayama   25: %% (/bin/csh -c ")
1.1       takayama   26:   ( java OMproxy )
                     27:   ( -data ) data ( -control ) control
1.3     ! takayama   28: %%  ( >& /dev/null )   %%  Syntax error: Bad fd
        !            29:     ( > /dev/null )
        !            30: %% (")
1.1       takayama   31:   $)$
                     32:   ( & )
                     33:  ] cat /com set
                     34:   (Executing the command ) messagen com message
                     35:   com system
                     36:   (sleep 5) system
                     37:   [(oxCreateClient) (localhost) data control] extension
                     38:   /@@@.xml set
                     39:  (The server is binded to the variable @@@.xml) message
                     40:   @@@.xml /arg1 set
                     41:  ] pop
                     42:  popVariables
                     43:  arg1
                     44: } def
                     45:
                     46: /xml {
                     47:   /arg1 set
                     48:   [/in-cmo2xml /ob] pushVariables
                     49:   [
                     50:      /ob arg1 def
                     51:      @@@.xml ob oxpushcmo
                     52:      @@@.xml (CMO2OMXML) oxexec
                     53:      @@@.xml oxpopcmo /arg1 set
                     54:   ] pop
                     55:   popVariables
                     56:   arg1
                     57: } def
                     58: [(xml)
                     59: [(object xml xml-string)
                     60:  (Example:   )
                     61:  (   xmlconnect )
                     62:  $   (12345).. xml :: $
                     63:  $   ( (x-1)^2 ). xml :: $
1.2       takayama   64: ]] putUsages
                     65:
                     66: /xml_to_cmo {
                     67:   /arg1 set
                     68:   [/in-xml_to_cmo /ob] pushVariables
                     69:   [
                     70:      /ob arg1 def
                     71:      @@@.xml ob oxpushcmo
                     72:      @@@.xml (OMXML2CMO) oxexec
                     73:      @@@.xml oxpopcmo /arg1 set
                     74:   ] pop
                     75:   popVariables
                     76:   arg1
                     77: } def
                     78: [(xml_to_cmo)
                     79: [(xml-string xml_to_cmo cmo)
                     80:  (Example:   )
                     81:  (   xmlconnect )
                     82:  $   (<OMOBJ><OMI>5</OMI></OMOBJ>) xml_to_cmo :: $
                     83:  $   ( (x-1)^2 ). xml /aa set $
                     84:  $   aa xml_to_cmo :: $
1.1       takayama   85: ]] putUsages
                     86:
1.3     ! takayama   87:
        !            88: /t_aux {
        !            89:   /arg1 set
        !            90:   [/in-t_aux /ob /r /r2] pushVariables
        !            91:   [
        !            92:      /ob arg1 def
        !            93:      (_______________________________________) message
        !            94:      (tag = ) messagen ob tag messagen (, ) messagen
        !            95:      (Sending object :) messagen ob message
        !            96:      ob xml /r set
        !            97:      (XML expression is:) messagen r message
        !            98:      r xml_to_cmo /r2 set
        !            99:      (XML to CMO :) messagen r2 message
        !           100:      (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) message
        !           101:   ] pop
        !           102:   popVariables
        !           103: } def
        !           104:
        !           105: %% Just type in OMproxy-testsuits1
        !           106: /OMproxy-testsuits1 {
        !           107:   xmlconnect
        !           108:
        !           109:   @@@.xml oxmathcap
        !           110:   (Mathcap is ) messagen @@@.xml message
        !           111:
        !           112:   null t_aux
        !           113:   123  t_aux
        !           114: %  (Hello World) t_aux  %% error in XML to CMO.
        !           115: %  [1 2 3] t_aux  %% not supported.
        !           116:   (123123).. t_aux
        !           117: %  (-12).. (12345).. div t_aux  %% not supported in sm1.
        !           118: %  (x^2-1). t_aux %% not supported.  CMO_DMS_GENERIC??
        !           119:
        !           120:   (End) message
        !           121: } def
1.1       takayama  122:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>