This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Test fn-put-011 claims to be testing that put() isn't effective until after the end of the query. It does this by reading the document at the relevant URI and hoping for a failure. But it's likely that there will be a document at that location left over from previous runs, and reading it will succeed. I would suggest rewriting this test as: let $var := $input-context/works[1]/employee[1] let $file := concat("temp/", current-dateTime()) return ( fn:put(document { <test/> }, $file), insert node fn:doc($file)/* as last into $var ) (It's not nice to write to random file locations; but if the system under test is working to spec, the file should never get written, because the error in fn:doc() will prevent the PUL being actioned.)
The XML Query WG discussed this at on Feb. 24 and decided to not to make this change. I'll add a reminder to the test suite documentation to delete any files written to the putOutput and putOutput2 source files.