Bug #4225
Updated by Michael Kay almost 5 years ago
The static type inferred for the result of the `xml-to-json()` function is `item()?` `item()` rather than `xs:string()?`. This Firstly this is wrong because it doesn't allow for the possibility of an empty sequence. Secondly it is unnecessarily imprecise, which means that optimizations on the enclosing expression don't kick in.