Tuesday, July 5, 2011

OSB import module : XQ0016: Module feature not supported (sorry)

We were trying to reuse XQuery functions in OSB, using some sort of "import" statement...


http://forums.oracle.com/forums/thread.jspa?threadID=927438



XQuery one:


xquery version "1.0" encoding "Cp1252";

declare namespace xfone = "http://tempuri.org/PierreTests2/one/";

declare function xfone:one($string1 as xs:string)
    as xs:string {
        fn:concat('hello,' ,$string1)
};

declare variable $string1 as xs:string external;

xfone:one($string1)




XQuery two:


xquery version "1.0" encoding "Cp1252";

declare namespace xftwo = "http://tempuri.org/PierreTests2/two/";
declare namespace xfone = "http://tempuri.org/PierreTests2/one/";

import module namespace utilities = "xfone" at "one.xquery";

declare function xftwo:two()
as xs:string {
    xfone:one('Pierre')
};


xftwo:two()



OSB tells me "XQ0016: Module feature not supported (sorry)"


I appreciate the "sorry" but we really need this functionality... come on, Oracle, a small effort.... code re-usability has been around some centuries now...



No comments: