Annotation of OpenXM/src/kan96xx/Doc/xml.sm1, Revision 1.2
1.2 ! takayama 1: %% $OpenXM: OpenXM/src/kan96xx/Doc/xml.sm1,v 1.1 1999/11/03 09:24:33 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 ( ; )
25: ( java OMproxy )
26: ( -data ) data ( -control ) control
27: $)$
28: %% ( >& /dev/null ) %% Syntax error: Bad fd
29: ( & )
30: ] cat /com set
31: (Executing the command ) messagen com message
32: com system
33: (sleep 5) system
34: [(oxCreateClient) (localhost) data control] extension
35: /@@@.xml set
36: (The server is binded to the variable @@@.xml) message
37: @@@.xml /arg1 set
38: ] pop
39: popVariables
40: arg1
41: } def
42:
43: /xml {
44: /arg1 set
45: [/in-cmo2xml /ob] pushVariables
46: [
47: /ob arg1 def
48: @@@.xml ob oxpushcmo
49: @@@.xml (CMO2OMXML) oxexec
50: @@@.xml oxpopcmo /arg1 set
51: ] pop
52: popVariables
53: arg1
54: } def
55: [(xml)
56: [(object xml xml-string)
57: (Example: )
58: ( xmlconnect )
59: $ (12345).. xml :: $
60: $ ( (x-1)^2 ). xml :: $
1.2 ! takayama 61: ]] putUsages
! 62:
! 63: /xml_to_cmo {
! 64: /arg1 set
! 65: [/in-xml_to_cmo /ob] pushVariables
! 66: [
! 67: /ob arg1 def
! 68: @@@.xml ob oxpushcmo
! 69: @@@.xml (OMXML2CMO) oxexec
! 70: @@@.xml oxpopcmo /arg1 set
! 71: ] pop
! 72: popVariables
! 73: arg1
! 74: } def
! 75: [(xml_to_cmo)
! 76: [(xml-string xml_to_cmo cmo)
! 77: (Example: )
! 78: ( xmlconnect )
! 79: $ (<OMOBJ><OMI>5</OMI></OMOBJ>) xml_to_cmo :: $
! 80: $ ( (x-1)^2 ). xml /aa set $
! 81: $ aa xml_to_cmo :: $
1.1 takayama 82: ]] putUsages
83:
84:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>