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 3600 - K-InternalVariablesWith-17 and K-InternalVariablesWith-18 don't use erroneous part
Summary: K-InternalVariablesWith-17 and K-InternalVariablesWith-18 don't use erroneous...
Status: RESOLVED INVALID
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.9.4
Hardware: Macintosh All
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-15 15:37 UTC by Martin Probst
Modified: 2006-08-17 16:58 UTC (History)
0 users

See Also:


Attachments

Description Martin Probst 2006-08-15 15:37:43 UTC
The queries K-InternalVariablesWith-17 and K-InternalVariablesWith-18 expect an error because of a recursive reference to a variable/function. However both queries don't actually use any of the offending code, the main query simply contains a "1", so it's possible to optimise the whole functions/variables thing away.

Implementations are free not to evaluate stuff they don't need to evaluate the query (this is why X-Hive doesn't give an error), even if this means they swallow an error. I think the queries should be re-formulated to actually use the function or the variable.
Comment 1 Frans Englich 2006-08-15 19:35:40 UTC
A fix is attempted in CVS, feel free to change status to CLOSED if it is satisfactory.

XQTS_current.zip is updated. At this point I do not know whether this fix will make it into XQTS 1.0.

One test was changed to allow both both output and error, while the other was changed to use the variable.

Thanks for the report.


Frans
Comment 2 Martin Probst 2006-08-16 12:42:41 UTC
Thanks, that fixed it.
Comment 3 Michael Kay 2006-08-17 09:37:05 UTC
Surely a circular reference to a variable or a function is a static error, and implementations are required to report all static errors in a query whether the code is executed or not? I think the tests were correct as written.
Comment 4 Frans Englich 2006-08-17 11:35:32 UTC
Yes, I believe you are correct, Mike. Martin's second paragraph on that implementations are free to evaluate without errors if they can, clearly applies to only dynamic errors:

<quote>
2.3.3 Handling Dynamic Errors
Except as noted in this document, if any operand of an expression raises a dynamic error, the expression also raises a dynamic error. If an expression can validly return a value or raise a dynamic error, the implementation may choose to return the value or raise the dynamic error. [...]
</quote>

However, I understand one can have an interest in detecting this dynamically, since it requires static analysis.

I will undo my changes and close as INVALID.


Frans
Comment 5 Martin Probst 2006-08-17 12:13:15 UTC
That's correct, I didn't see that.
Comment 6 Frans Englich 2006-08-17 16:58:12 UTC
This original state should be back in the latest XQTS_current.zip.