Bugs item #2020631, was opened at 2008-07-17 16:00
Message generated for change (Comment added) made by tsheyar
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2020631&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: PF general
Group: Pathfinder 0.24
Status: Open
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Andreas Meinl (andreasmeinl)
>Assigned to: Jens Teubner (teubner)
Summary: Parse error with pf:collection

Initial Comment:
Hi there,

this XQuery works fine for example in eXist and Sedna:

<average> {
fn:round(fn:avg(
fn:collection("samples")/example/@sum
)) } </average>


I expect the adapted XQuery to show the same result in MonetDB/XQuery:

<average> {
fn:round(fn:avg(
pf:collection("samples")/child::document-node()/example/@sum
)) } </average>


But unfortunately I get this error message:

MAPI  = [EMAIL PROTECTED]:50000
QUERY = <average> {
ERROR = !parse error: syntax error, unexpected /, expecting QName on line 4, 
column 9 (next token is `/')
        !parse error: XQuery parsing failed


Modified in the following way this XQuery works as well in MonetDB/XQuery:

let $avg := pf:collection("samples")/child::document-node()/example/@sum
return <average> {
fn:round(fn:avg(
$avg
)) } </average>


So why is pf:collection just working outside the "<average>" element, but not 
inside?

I filled in this bug report as a result of this thread:
http://sourceforge.net/mailarchive/forum.php?thread_name=FA0CC246-7F48-43A5-A8DC-89760281FEB8%40andreasmeinl.de&forum_name=monetdb-users

Regards,

Andreas Meinl



----------------------------------------------------------------------

>Comment By: Jan Rittinger (tsheyar)
Date: 2008-07-17 18:39

Message:
Logged In: YES 
user_id=993208
Originator: NO

I checked in a fix in the scanner. The state pushing and popping was out
of sync.

As this was my first time touching the scanner -- Jens could you please
double-check whether I broke something.

@Andreas: I would use node() instead of document-node() -- this already
works and requires no kind test at all.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2020631&group_id=56967

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to