none of the conditions is satisfied;empty sequence returned
Posted: Mon Dec 01, 2008 2:43 pm
Hi
declare function getAggregation($agg as xs:string) as xs:string {
if($agg = 'AS') then
"as"
else if($agg = 'Destination-Prefix') then
"destination-prefix"
else if($agg = 'Prefix') then
"prefix"
else if($agg = 'Protocol-Port') then
"protocol-port"
else if($agg = 'Source-Prefix') then
"source-prefix"
else ()
};
While transforming above function using Oxygen9.3 I am getting following error:
Description: Conditional expession: If none of the conditions is satisfied, an empty sequence will be returned, but this is not allowed as the result of function getAggregation()
The above function can be transformed successfully when I replace xs:string with xs:string* but there are many such functions in my project which is very tedious task to perform this change.
Where as I can successfully transform the same function in Oxygen7.2 .
My question is why this is happening in Oxygen9.3 not in 7.2 . Pls give solution to get this transformed successfully in Oxygen9.3 instead 7.2
Regards,
Ravikumar
declare function getAggregation($agg as xs:string) as xs:string {
if($agg = 'AS') then
"as"
else if($agg = 'Destination-Prefix') then
"destination-prefix"
else if($agg = 'Prefix') then
"prefix"
else if($agg = 'Protocol-Port') then
"protocol-port"
else if($agg = 'Source-Prefix') then
"source-prefix"
else ()
};
While transforming above function using Oxygen9.3 I am getting following error:
Description: Conditional expession: If none of the conditions is satisfied, an empty sequence will be returned, but this is not allowed as the result of function getAggregation()
The above function can be transformed successfully when I replace xs:string with xs:string* but there are many such functions in my project which is very tedious task to perform this change.
Where as I can successfully transform the same function in Oxygen7.2 .
My question is why this is happening in Oxygen9.3 not in 7.2 . Pls give solution to get this transformed successfully in Oxygen9.3 instead 7.2
Regards,
Ravikumar