Bugs item #2842896, was opened at 2009-08-23 09:22
Message generated for change (Comment added) made by al-indigo
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2842896&group_id=129076

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: Query Execution
Group: Sedna (current)
>Status: Closed
>Resolution: Fixed
Priority: 3
Private: No
Submitted By: Justin Johansson (justinjohansson)
Assigned to: Alexander Kalinin (allexk)
Summary: Error line numbers not reported correctly

Initial Comment:
Hi Sedna Team,

23 Aug 2009

Sedna Governor Version 3.2.60
Copyright (C) 2004-2009 ISP RAS and others. All rights reserved.
See file COPYRIGHT provided with the distribution.

Bug description:

When there is an XQuery declaration, blank lines and or/comment lines
(a total of N lines) preceding the query body and there is a syntax or
static analysis error in the query body, the Semantic Analyser reports
the incorrect line number for the error.  It appears that the reported
line number of the error is N less than it should be.

This bug makes it difficult to find errors in one's XQuery source code.

Two modules provided here, a.xqlib and b.xqlib, contain exactly the same
error but at a different line number dues to different number of header
lines before the query body.  When LOAD OR REPLACE MODULE with these
the error indicated at line 5, position 5 which is incorrect.  The
correct location of the error in these files is at (13:5) and (20:5)
respectively.  (Reproduce by running attached shell script, fault.sh)

Also note that Sedna does not report the file name of the offending
module so this makes locating the error more difficult as well.

SEDNA Message: ERROR XPST0081
It is a static error if a QName used in a query contains a namespace prefix 
that cannot be expanded into a namespace URI by using the statically known 
namespaces.
Details: at (5:5), prefix 'math' has not been defined
         
SEDNA Message: ERROR XPST0081
It is a static error if a QName used in a query contains a namespace prefix 
that cannot be expanded into a namespace URI by using the statically known 
namespaces.
Details: at (5:5), prefix 'math' has not been defined
         

Bug resolution:

Sedna should indicate the BOTH file name AND correct line number of
any reported errors.


Attached:

a.xqlib, b.xqlib, fault.xq, fault.sh


Regards

Justin Johansson


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

>Comment By: al-indigo  (al-indigo)
Date: 2011-08-01 15:06

Message:
It's fixed in the latest developement release. I've reprodused your steps
and the output seems to be correct for this case. As you can see:

SEDNA Message: ERROR XPST0081
It is a static error if a QName used in a query contains a namespace
prefix that cannot be expanded into a namespace URI by using the statically
known namespaces.
Details: at (13:5), prefix 'math' has not been defined
         

SEDNA Message: ERROR XPST0081
It is a static error if a QName used in a query contains a namespace
prefix that cannot be expanded into a namespace URI by using the statically
known namespaces.
Details: at (20:5), prefix 'math' has not been defined


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2842896&group_id=129076

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Reply via email to