[Bug 27908] K2-SeqDocFunc-12

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27908

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #5 from Michael Kay <mike@saxonica.com> ---
I think these new (but ante-dated) tests fn-doc-038 and fn-doc-039 are
incorrect: raising FODC0005 is legitimate.

Looking at the first one, given the query 

<a/>/b[doc('%gg')]

it is perfectly legitimate to rewrite this to

if (boolean(doc('%gg')) then <a/>/b else ()

There is nothing in the spec that says the predicate must only be evaluated if
the sequence is non-empty. It may not be a perfect strategy, but it's a legal
one.

In previous discussion I cited "An implementation can raise a dynamic error for
a QueryBody STATICALLY only if the query can never execute without raising that
error". But there is nothing to stop the error being raised DYNAMICALLY. We
have no way in the test suite of distinguishing whether an error is raised
statically or dynamically, so we can't really test this rule.

I therefore think that FODC0005 is a legitimate outcome.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 11 September 2015 11:43:29 UTC