I am trying to evaluate a XPathExpression with XQSharp and get the Error:"Type check error. The empty sequence cannot be cast to type 'xs:integer'."
AltovaXMLSpy evaluates it correct as "true".
oXmlDoc.CreateNavigator().XPathEvaluate("root/foo/bar cast as xs:integer lt count(root/blah/blub)", oNamespaseManager).ToString()
This XML looks like this:
<root xmlns:xs="http://www.w3.org/2001/XMLSchema">
<foo>
<bar>0</bar>
</foo>
<blah>
<blub/>
</blah>
</root>
What am I missing?