[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 08:11:46 -0800 |
Marco,
Thanks very much for the reply!
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:
$ cat x.xql
let
$newline := "
",
$header1 := <?xml-stylesheet type='text/xsl'href='GetFort
une.xsl'?>
return
<html>
{$header1} {$newline}
</html>
$ java -cp
/usr/share/kaffe/servlet.jar:/home/esafern/work/kawa/kawa/kawa-1.6.99.jar
kawa.repl --xquery ./x.xql
./x.xql:4:16: invalid character '?'
./x.xql:4:16: missing NameSpec
./x.xql:4:30: missing 'return' clause
./x.xql:4:30: missing ')' - saw xml-stylesheet @:29
./x.xql:4:50: missing ')' - saw href @:49
./x.xql:4:51: missing PrimaryExpr
./x.xql:4:68: invalid character '?'
./x.xql:4:68: missing ')' - saw @:67
./x.xql:4:69: missing PrimaryExpr
./x.xql:8:3: missing PrimaryExpr
./x.xql:8:3: missing ')' - saw @:2
./x.xql:8:12: missing ')' - saw @:11
./x.xql:8:14: missing PrimaryExpr
./x.xql:8:14: missing ')' - saw @:13
./x.xql:8:23: missing ')' - saw @:22
./x.xql:9:8: saw end tag '</html>' not in an element constructor
./x.xql:10:1: missing PrimaryExpr
$
-----Original Message-----
From: address@hidden [mailto:address@hidden
Behalf Of Marco Vezzoli
Sent: Tuesday, December 24, 2002 2:06 AM
To: address@hidden
Cc: address@hidden
Subject: Re: [Qexo-general] Syntax questions
try without quoting the tag; please note that what you are trying to do
is equivalent to this simpler constant xquery expression:
<html>
<xml-stylesheet type='text/xsl' href='GetFortune.xsl'/>
</html>
or
let
$a := <xml-stylesheet type='text/xsl'href='GetFortune.xsl'/>
return
<html>
{$a}
</html>
address@hidden wrote:
>
> Hi,
>
> Having some difficulties.
>
> The following code:
>
> $ cat x.xql
> let
> $newline := "
> ",
> $header1 := "<xml-stylesheet type='text/xsl' href='GetFor
> tune.xsl'>"
>
> return
> {$header1} {$newline}
> $
>
> fails to compile:
> $ java -cp
> /usr/share/kaffe/servlet.jar:/home/esafern/work/kawa/kawa/kawa-1.6.99.jar
> kawa.repl --xquery ./x.xql
> ./x.xql:7:4: missing PrimaryExpr
> ./x.xql:7:4: missing ')' - saw @:3
> ./x.xql:7:5: missing ')' - saw @:4
> ./x.xql:7:13: missing ')' - saw @:12
> ./x.xql:7:15: missing PrimaryExpr
> ./x.xql:7:15: missing ')' - saw @:14
> ./x.xql:7:24: missing ')' - saw @:23
> $
>
> Any idea what's wrong with that syntax?
>
> When I change the code by adding some useless tags, it compiles:
> $ cat x.xql
> let
> $newline := "
> ",
> $header1 := "<xml-stylesheet type='text/xsl' href='GetFo
> rtune.xsl'>"
>
> return
> <html>
> {$header1} {$newline}
> </html>
> $ java -cp
> /usr/share/kaffe/servlet.jar:/home/esafern/work/kawa/kawa/kawa-1.6.99.jar
> kawa.repl --xquery ./x.xql
> <html>
> <xml-stylesheet type='text/xsl' href='GetFortune.xsl'
> >
>
> </html>address@hidden html]$
>
> But it puts the angle brackets out as < and >. How do I generate
the
> tag
> straight? I tried putting it there in plain text, but the parser didn't
> like the ? symbols.
>
> Any suggestions will be greatly appreciated.
>
> Thanks,
>
> Eric Safern
>
> _______________________________________________
> Qexo-general mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/qexo-general
--
Marco Vezzoli tel. +39 039 603 6852
STMicroelectronics fax. +39 039 603 5055
- [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 <=
- 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, 2002/12/25