XPTY0004: Cannot compare xs:string to empty()
Replies (1)
Please register to reply
Added by Anonymous about 19 years ago
Legacy ID: #3434128 Legacy Poster: marcvc (marcvc)
Michael, consider the following query. declare function local:foo($v1 as xs:string?, $v2 as empty-sequence()) { $v1 = $v2 }; local:foo('abc',()) I know, this is not the typical query a user would write. Actually, we ran into this problem through some machine generated query by our product. Saxon 8.6 reports incorrectly the following error(same behaviour with previous versions) at compilation time: XPTY0004: Cannot compare xs:string to empty() As editorial remark, some parts of the code seem still to use 'empty()' iso empty-sequence(). Thanks, Marc
Legacy ID: #3434702 Legacy Poster: Michael Kay (mhkay)
Thanks for reporting this: code is now fixed, and I've logged the bug in the bug register. Michael Kay
Please register to reply