declare function tns:getDt($inp as xs:string) as element(ns1:Sschema)*{
let $primary := fn-bea:get-property('PRIMARY','1')
let $sec := fn-bea:get-property('SECONDARY','2')
if ($primary = "1") then (
for $response in tns:getData1()
return
$response
) else (
for $response in tns2:getData1()
return
$response
)
}
I want to call functions in different namespaces based on a weblogic admin property. A couple of questions:
- How can i dynamically chose the namespace to use based on weblogic admin property?
- In the above code, the Oracle workshop complains about the if/else. Can the if/else be only inside the FLWOR?
Regarding your second question: yes, you need to add a “return” before the “if” expression to make your query syntactically valid.
Regarding your first question, I’m not really sure what’s your intention?..