[xquery-talk] XQuery error codes and rewriting

David Carlisle davidc at nag.co.uk
Thu Feb 2 12:46:31 PST 2006


    For a variety of reasons, including optimization, implementations
    are free to rewrite expressions into equivalent expressions. Other
    than the raising or not raising of errors, the result of evaluating
    an equivalent expression must be the same as the result of
    evaluating the original expression. 

Currently xq2xsl (acts as if it) rewrites every expression
to an
where the semantics of the pragma are to evaluate E but on error raise
xq2xsl-specific error codes (which are in some cases XSLT error codes,
and in some cases other codes where the converter has decided to call
error() explictly).

This means that currently I pass most of the XQuery Test suite but with
the documented proviso that for tests that expect runtime errors I count
any runtime error as a pass, I don't compare codes. If I tested codes
I'd fail more tests (and I'd need to modify my test harness somehow so
it actually trapped the codes in a usable way).

I was planning to try to write some code that wrapped the XSL call, and
mapped XSL codes to Xquery ones, but this is a bit painful (and more
importantly boring), and I wonder if it is necessary. Does the quoted
passage mean that I am already conformant (and the test suite needs to
be more lenient)?


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

More information about the talk mailing list