Xquery - External variables not working
794954Dec 17 2010 — edited Jan 5 2011Hi,
I am using an Xquery which basically is used to map 2 va;lues from one xsd to another xsd, and the rest of the values it has to get dynamically. so i have declared the remaining variables as external.
i have 4 elements as external d,e,f which are in the response schema of the Xquery. But then when i try to test the xquery i am not getting an option to give d,e,f as inputs. Am i missing something. Please suggest. Below is the syntax which i have followed
declare namespace ns1 = "http://test/Message/V1";
declare namespace xs = "http://www.w3.org/2001/XMLSchema";
declare namespace xf = "http://tempuri.org/LogMsgDBAdapter/XformLoggingServiceMsg/";
declare namespace ns2 = "http://xmlns.oracle.com/pcbpel/adapter/db/top/LoggingServiceDBAdapter";
declare function xf:XformLoggingServiceMsg($InboundMsg as element(ns1:MWInboundMsg))
as element(ns2:messagetableCollection) {
<ns2:messagetableCollection>
<ns2:messagetable>
<ns2:MId>{ data($InboundMsg/MessageID) }</ns2:MId>
<ns2:DId>{ data($InboundMsg/Key) }</ns2:DId>
</ns2:messagetable>
</ns2:messagetableCollection>
};
declare variable $d as xs:int external;
declare variable $e as xs:int external;
declare variable $f as xs:string external;
declare variable $InboundMsg as element(ns1:MWInboundMsg) external;
xf:XformLoggingServiceMsg($InboundMsg)