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-03-15 10:52

Message:
fails with BATpropcheck error:

[ 2627137 ] PF: tests fail with BATpropcheck error
https://sourceforge.net/tracker/index.php?func=detail&aid=2627137&group_id=56967&atid=482468

(
don't know since/for how long, since they were not detected for some time;
cf.,
[ 2607229 ] testing does not report detected property errors
https://sourceforge.net/tracker/index.php?func=detail&aid=2607229&group_id=56967&atid=482468
)




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

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

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to