Bugs item #2020631, was opened at 2008-07-17 16:00
Message generated for change (Comment added) made by stmane
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 "stable"
>Status: Closed
Resolution: Fixed
Priority: 8
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 = mone...@localhost: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: Stefan Manegold (stmane)
Date: 2009-02-17 00:56
Message:
added test in
pathfinder/tests/BugTracker/Tests/Parse_error_with_pf:collection.SF-2020631.*
appears to work fine.
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2009-02-16 16:48
Message:
re-opened to remind us that we should consider adding a test
----------------------------------------------------------------------
Comment By: Jens Teubner (teubner)
Date: 2008-08-27 03:29
Message:
Logged In: YES
user_id=731390
Originator: NO
There still seems to be a problem with this. Consider, e.g.,
let $x as document(element())* := foo() return 42
which our parser reports as syntactically incorrect.
Don't have a fix, yet...
----------------------------------------------------------------------
Comment By: Lefteris Sidirourgos (lsidir)
Date: 2008-08-12 16:09
Message:
Logged In: YES
user_id=1856546
Originator: NO
What is the status of this fix? Can we close the bug report?
----------------------------------------------------------------------
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
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs