[Top][All Lists]
[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
- [Qexo-general] Invoking a Java Method, Eric Safern, 2002/12/23
- [Qexo-general] Servlets from the cgi-bin wrapper - some suggested fixes and a question, Eric Safern, 2002/12/23
- [Qexo-general] Syntax questions, Eric Safern, 2002/12/24
- Re: [Qexo-general] Syntax questions, Marco Vezzoli, 2002/12/24
- RE: [Qexo-general] Syntax questions, Eric Safern, 2002/12/24
- Re: [Qexo-general] Syntax questions, Per Bothner, 2002/12/24
- RE: [Qexo-general] Syntax questions, Eric Safern, 2002/12/25
- Re: [Qexo-general] Syntax questions, Per Bothner, 2002/12/25
- [Qexo-general] Parsing command line arguments,
Eric Safern <=