none of the conditions is satisfied;empty sequence returned
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 8
- Joined: Fri Nov 28, 2008 12:50 pm
none of the conditions is satisfied;empty sequence returned
Post by s_ravi1973 »
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
-
- Posts: 9
- Joined: Tue Jan 13, 2009 3:08 pm
- Location: Madison WI
- Contact:
Re: none of the conditions is satisfied;empty sequence returned
Post by strivinglife »
Since this was your only post, albeit 6 times
, I'm not sure you're checking on this, but ...
From what I can tell (and I may be wrong), the issue lies with not passing an empty string in your final else.
...
else()
""
};
Again, from what I can tell, an empty sequence is not a string, and therefore not valid for the return.
(I'll stop looking at the 'unanswered posts' now ...)
~James

From what I can tell (and I may be wrong), the issue lies with not passing an empty string in your final else.
...
else()
""
};
Again, from what I can tell, an empty sequence is not a string, and therefore not valid for the return.
(I'll stop looking at the 'unanswered posts' now ...)
~James
-
- Posts: 8
- Joined: Fri Nov 28, 2008 12:50 pm
Re: none of the conditions is satisfied;empty sequence returned
Post by s_ravi1973 »
If this is wrong then why I can transform it successfully in 7.0 ver
-
- Posts: 8
- Joined: Fri Nov 28, 2008 12:50 pm
Re: none of the conditions is satisfied;empty sequence returned
Post by s_ravi1973 »
s_ravi1973 wrote:If this is wrong then why I can transform it successfully in 7.2 ver
-
- Posts: 9
- Joined: Tue Jan 13, 2009 3:08 pm
- Location: Madison WI
- Contact:
Re: none of the conditions is satisfied;empty sequence returned
Post by strivinglife »
Did you try adding an empty string for that last else? Looking at this again with fresh eyes, that makes sense.
As for it working before, just because it worked in a previous version of an application, doesn't mean that it should have worked. (IE 6 being a great example.
)
As for it working before, just because it worked in a previous version of an application, doesn't mean that it should have worked. (IE 6 being a great example.

Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service