Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

xs:int vs. xs:integer

15060Feb 23 2009 — edited Feb 26 2009
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?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2009
Added on Feb 23 2009
3 comments
690 views