This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The query: trace(\"a string\", \"trace message\") eq \"a string\"" fails static typechecking, since trace returns item()*. However, this could be rectified by the addition of a Formal Semantics typechecking rule: --------------------------------------------------- statEnv |- (FN-URI,"trace")(Type1, Type2) : Type1
Make that: statEnv |- Type2 can be promoted to xs:string --------------------------------------------------- statEnv |- (FN-URI,"trace")(Type1, Type2) : Type1
An attempted fix has been committed to CVS, and should be part of XQTS_current.zip. Feel free to verify that the fix is acceptable, and if so, change status to CLOSED. If the attempted fix is not acceptable, reopen this report. If no opinion about this resolution is expressed within two weeks, it will be closed. Along with the fix for this report, was committed fixes for other reports as well. Also, a significant amount of new tests were added to cover missing areas and changes in the specifications.
We have implemented an extended static type checking rule for fn:trace. I'm sure anyone else implementing static type checking will also have to do so, as otherwise fn:trace is otherwise too painful to use in practice. I'll close the bug report anyway.