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 6560 - parenthesized-expr-03.xq issue
Summary: parenthesized-expr-03.xq issue
Status: CLOSED INVALID
Alias: None
Product: XQuery Update Facility Test Suite
Classification: Unclassified
Component: XQuery Update Facility Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-11 17:55 UTC by zhen hua liu
Modified: 2009-02-12 22:38 UTC (History)
0 users

See Also:


Attachments

Description zhen hua liu 2009-02-11 17:55:10 UTC
>cat ./Queries/XQuery/ParenthesizedExpressions/parenthesized-expr-03.xq
(: Name: parenthesized-expr-03 :)
(: Description: Parenthesized vacuous expression. :)

(: insert-start :)
declare variable $input-context external;
(: insert-end :)

for $var in 
   (
   for $var in $input-context/works[1]/employee[1]/hours[1]
   return ()
   )
return 
  $var


Using vacuous expression definition of XQUF AS IS, we can only infer that
the inner FLWOR
clause is vacuous expression because () is used as return value. 
Implementation may or may not be able to infer the
outer FLWOR clause is vacuous expression depending on how sophisticated the
static analysis is. If we use the vacuous expression defintion of XQUF AS IS,
then we can not infer that the outer FLWOR clause is vacuous expression. 

However, I think the intent of this test case is really:


   (
   for $var in $input-context/works[1]/employee[1]/hours[1]
   return ()
   )
Comment 1 Andrew Eisenberg 2009-02-12 21:28:05 UTC
I agree that the outer for clause is not seen by XQUF as vacuous, but I believe that this is not relevant.

This is the third in a sequence of test cases:

parenthesized-expr-01 - the inner for returns $var, the inner for is a simple expression, and the query does not raise a static error.

parenthesized-expr-02 - the inner for return clause contains a delete, the inner for is an updating expression, and the query raises a static error.

parenthesized-expr-03 - the inner for returns (), the inner for is a vacuous expression, and the query does not raise a static error.


If you agree with this resolution, then please close this bug report.
Comment 2 zhen hua liu 2009-02-12 22:38:52 UTC
ok, close this bug