qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qexo-general] Parsing command line arguments


From: Eric Safern
Subject: [Qexo-general] Parsing command line arguments
Date: Tue, 24 Dec 2002 23:03:50 -0800

Hi,

I need to pass parameters to my program.  A little searching of the
kawa site turned up a variable called $command-line-arguments.

I tried it in a small xql program, and it works fine in interpreted mode.

However, I'm not sure how to parse it.

So, my first question is, has anyone written xql code to parse
attribute/value
pairs from the command-line-arguments variable?  It contains some sort
of 'vector' representation of the arguments:

$ java -cp
/usr/share/kaffe/servlet.jar:/home/esafern/work/kawa/kawa/kawa-1.6.99.jar
kawa.repl --xquery ./GetFortune.xql -first=1 -second=2
<#vector>-first=1-second=2</#vector>
$

Secondly, the same code that works in interpreted mode, dies when compiled
into a
servlet:

gnu.mapping.UnboundSymbol: Unbound symbol command-line-arguments
        at gnu.expr.Interpreter.getDefaultSymbolValue(Interpreter.java:609)
        at gnu.expr.Interpreter.getSymbolValue(Interpreter.java:616)
        at GetFortune.render_page$T(./GetFortune.xql:13)

Any thoughts?


                                Thanks,

                                Eric Safern





reply via email to

[Prev in Thread] Current Thread [Next in Thread]