Skip to Main Content

DevOps, CI/CD and Automation

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!

Xquery - External variables not working

794954Dec 17 2010 — edited Jan 5 2011
Hi,

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)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 2 2011
Added on Dec 17 2010
7 comments
1,380 views