OSB 10.1.3 / XQuery
I have for about a week now had the following headache - why does the following code return a type error:
xquery version "1.0" encoding "UTF-8";
(:: pragma type="xs:anyType" ::)
declare namespace xf = "http://tempuri.org/genetec/transform/test/";
declare function xf:test($int1 as xs:integer)
as element(*) {
<output>{$int1}</output>
};
declare variable $int1 as xs:integer external;
xf:test($int1)
The above code returns a "{err}XP0006: "text '834'": bad value for type {http://www.w3.org/2001/XMLSchema}integer
Which makes no sense (the value given in the test console being 834).
If I instead of xs:integer use xs:int things work! And I'm really baffled for an answer to why that is? What is the difference between xs:integer and xs:int?