To find ProgramFactory

Francisco <jshzhang2000-/[email protected]> Mon, 19 Feb 2007 11:20:38 +0000 (GMT)
Newsgroups gmane.text.xml.o-xml
Message-ID <[email protected]>
--===============0909946646==
Content-Type: multipart/alternative; boundary="0-536549948-1171884038=:94140"
Content-Transfer-Encoding: 7bit

--0-536549948-1171884038=:94140
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Dear Martin,
=20
I couldn't find the class "ProgramFactory" as the example below. I am won=
dering what package should I "import"?
=20
I even tried to look at the objectbox, but couldn't find it. Could you pl=
ease kindly let me know where I can find it? Your great help is highly ap=
preciated.
  =20
Looking forward to your reply.
=20
=20
Kind regards,
Francisco
=20
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
import org.oXML.type.*;
import org.oXML.engine.*;
...
String systemId =3D "your-file.oml";
Name functionName =3D new Name("your-function");
Type[] signature =3D new Type[]{}; // default sig, ie your-function()
Node[] args =3D new Node[]{}; // empty args
...
ProgramFactory pfactory =3D new ProgramFactory();
pfactory.loadDefaultExtensions();
InterpretedProgram program =3D pfactory.getProgram(systemId);
pfactory.compile(program);
Function func =3D program.getResolver().getFunction(functionName, =20
signature);
RuntimeContext env =3D new RuntimeContext(program);
Node result =3D func.invoke(args, env);
String stringResult =3D result.stringValue();
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D


 	=09
---------------------------------
 Copy addresses and emails from any email account to Yahoo! Mail - quick,=
 easy and free. Do it now...
--0-536549948-1171884038=:94140
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<div>Dear Martin,<BR>&nbsp;<BR>I couldn't find the class "ProgramFactory"=
 as&nbsp;the example below. I am wondering what package&nbsp;should I "im=
port"?<BR>&nbsp;<BR>I even tried to look at the objectbox, but couldn't f=
ind it. Could you please kindly let me know where I can find it? Your gre=
at help is highly appreciated.</div>  <div>&nbsp;<BR>Looking forward to y=
our reply.<BR>&nbsp;<BR>&nbsp;<BR>Kind regards,<BR>Francisco<BR>&nbsp;<BR=
>&nbsp;<BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D<BR>import org.oXML.type.*;<BR>import org.oXML.engine.*=
;<BR>...<BR>String systemId =3D "your-file.oml";<BR>Name functionName =3D=
 new Name("your-function");<BR>Type[] signature =3D new Type[]{}; // defa=
ult sig, ie your-function()<BR>Node[] args =3D new Node[]{}; // empty arg=
s<BR>...<BR>ProgramFactory pfactory =3D new ProgramFactory();<BR>pfactory=
.loadDefaultExtensions();<BR>InterpretedProgram program =3D pfactory.getP=
rogram(systemId);<BR>pfactory.compile(program);<BR>Function func =3D
 program.getResolver().getFunction(functionName,&nbsp; <BR>signature);<BR=
>RuntimeContext env =3D new RuntimeContext(program);<BR>Node result =3D f=
unc.invoke(args, env);<BR>String stringResult =3D result.stringValue();<B=
R>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR></div><p>&#32;
		<hr size=3D1>=20
Copy addresses and emails from any email account to Yahoo! Mail - quick, =
easy and free. <a href=3D"http://us.rd.yahoo.com/mail/uk/taglines/yahoo_c=
o_uk/trueswitch/*http://uk.docs.yahoo.com/trueswitch2.html">Do it now...<=
/a>
--0-536549948-1171884038=:94140--

--===============0909946646==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
o-xml mailing list
o-xml-zRfLyl9bSvv/[email protected]
http://lists.pingdynasty.com/mailman/listinfo/o-xml

--===============0909946646==--