[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Qexo-general] Syntax questions
From: |
Eric Safern |
Subject: |
RE: [Qexo-general] Syntax questions |
Date: |
Tue, 24 Dec 2002 21:36:24 -0800 |
Thanks so much for responding while on vacation!
That function works great! However, I'm having
trouble with the parser - the following code fragment:
$ cat GetFortune.xql
define function Rand ($mn, $mx) { 2
}
define function render_page($ck) {
let
$newline := "
",
$header1 := unescaped-data("<?xml version='1.0' ?>"),
$header2 := unescaped-data("<?xml-stylesheet type='text/x
sl' href='GetFortune.xsl'?>")
return
{$header1, $newline, $header2, $ck, $newline}
}
<snip>
produces the following message:
$ java -cp
/usr/share/kaffe/servlet.jar:/home/esafern/work/kawa/kawa/kawa-1.6.99.jar
kawa.repl --xquery ./GetFortune.xql
./GetFortune.xql:13:3: missing PrimaryExpr
./GetFortune.xql:13:3: missing '}'
./GetFortune.xql:13:47: missing ')' - saw @:46
./GetFortune.xql:14:2: missing PrimaryExpr
./GetFortune.xql:14:2: missing ')' - saw @:1
gnu.mapping.UnboundSymbol: Unbound symbol render_page
at gnu.expr.Interpreter.getDefaultSymbolValue(Interpreter.j
ava:609)
at gnu.expr.Interpreter.getSymbolValue(Interpreter.java:616
)
at atInteractiveLevel.apply(Unknown Source)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:23
9)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:188)
at kawa.Shell.run(Shell.java:232)
at kawa.standard.load.loadSource(load.java:134)
at kawa.standard.load.apply(load.java:239)
at kawa.Shell.runFile(Shell.java:295)
at kawa.repl.main(repl.java:603)
$
I can suppress this message by placing a tag before the expression:
return
<html>
{$header1, $newline, $header2, $ck, $newline}
</html>
but this breaks the page - the browser no longer recognizes the output
as xml.
Any thoughts?
Also, have you seen my two earlier questions? For some reason, my posts
aren't appearing in the threaded view of the mailing list archives
http://mail.gnu.org/pipermail/qexo-general/2002-December/thread.html,
but they *are* in the raw text view
http://mail.gnu.org/pipermail/qexo-general/2002-December.txt.
Thanks,
Eric Safern
-----Original Message-----
From: Per Bothner [mailto:address@hidden
Sent: Tuesday, December 24, 2002 8:25 PM
To: Eric Safern
Cc: address@hidden
Subject: Re: [Qexo-general] Syntax questions
Eric Safern wrote:
> That works well with the example I posted. Unfortunately, as I should
> have said in my post, the actual tag is more complex - it has the question
> mark character which seems to break the parser:
That's not a tag, it's a processing-instruction, which is not
implemented.
However, you can try the unescaped-data special function:
unescaped-data("<?xml-stylesheet type='text/xsl'?>")
--
--Per Bothner
address@hidden http://www.bothner.com/per/
- [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 <=
- Re: [Qexo-general] Syntax questions, Per Bothner, 2002/12/25
- [Qexo-general] Parsing command line arguments, Eric Safern, 2002/12/25