Hello,
we are trying to demonstrate the overapproximation on static typing of upward and horizontal axis of XQuery while using Galax. However, we are unable to see, whether the raised errors are Static or Runtime.
Considering XML document:
<root>
<first>1</first>
</second>2</second>
</root>
where children of root are defined to be xs:string in the schema.
Then, when we pose a query:
<result>{
avg((validate{doc("test.xml")})//first)
}</result>
we recieve parameter mismatch error "Parameter is not a double". According to the XQuery semantic recommendation, this is supposed to be a Static error.
Second query:
<result>{
avg((validate{doc("test.xml")})//first/following-sibling::node())
}</result>
raise a cast error: "Cannot promote string to double" – according to XQuery semantic, this should be a runtime error as static type checking is not able to evaluate the horizontal axis.
Can you please confirm, that these errors are raised in respect with the XQuery recommendation?
Regards,
Vojtech Knyttl