|
From: | Per Bothner |
Subject: | Re: [Qexo-general] Compiling XQuery to bytecode: How can I do this in Java (no files) |
Date: | Mon, 03 Feb 2003 16:19:50 -0800 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212 |
Phil Shaw wrote:
Concerning the "-C <filename>" option:I'd like to use that capability strictly in Java.I.e. invoke Qexo to generate bytecode for an XQuery expression, and get the resulting bytearray,without using a file. I got as far as the "CompileFile" class, and it looks as though that's pretty much hard-wiredto deal only with files, not with String input and byteArray results.
Use xquery.parseFile(port, immediate, messages) to get a Compilation. ('immediate' can be true or false, depending on what makes most sense for you. I don't off-hand remember exactly what it does.) Then with the Compilation you can (for example) pass it to the static ModuleExp.evalToClass to get a Class, or modify evalToClass as you need. -- --Per Bothner address@hidden http://www.bothner.com/per/
[Prev in Thread] | Current Thread | [Next in Thread] |