This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2415 - FunctionProlog negative tests.
Summary: FunctionProlog negative tests.
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.7.0
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Martin Probst
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-25 13:10 UTC by Martin Probst
Modified: 2005-10-28 10:01 UTC (History)
0 users

See Also:


Attachments

Description Martin Probst 2005-10-25 13:10:40 UTC
(Forgive me if this is a duplicate again, but I can't manage to create any
useful results with the search function of this)

The tests function-declaration-021 and function-declaration-023 are supposed to
provide negative tests for namespace issues with user defined functions.
However, I can't find anything wrong with the tests:

21:

declare function local:foo ($n as xs:integer) as xs:string
{
   $n
};
local:foo(4)

23:

declare function foo ($n as xs:integer)
{
   $n
};
foo(4)

Am I missing something?
Comment 1 Ravindranath (Ravi) Chennoju 2005-10-27 21:41:05 UTC
For test function-declaration-021 error XPTY0004 is appropriate, as the 
function is supposed to return xs:string but returns a xs:integer

For test function-declaration-023, the function foo is not in local namespace 
and needs to be in a specific namespace. So the error.
Comment 2 Ravindranath (Ravi) Chennoju 2005-10-27 21:42:11 UTC
Please close the bug, if you agree with my comments.
Comment 3 Martin Probst 2005-10-28 09:50:40 UTC
Thanks for your explanation, you are of course right. I missed the "as
xs:string" part. 

The second is also correct, although I think this part of the spec might be
controversial. Why provide a "default function namespace" that is not supposed
to be overridden by users, and then "punish" users for placing something inside?
I find that quite unintuitive, but the test is definetly correct agains the
current spec.
Comment 4 Martin Probst 2005-10-28 10:01:25 UTC
Closing.