On 20/01/2013 21:47, Michael Sokolov wrote:
I'm not sure what the following expression ought to return:

declare namespace local="http://localhost/";;
declare function local:minus($x){ -($x treat as xs:untypedAtomic?) };
local:minus(local:minus(1))

At first I naively *thought* it would return 1

Saxon 9.4.0.3 returns the empty sequence

I haven't tried 9.4.0.3, but 9.4.0.6 says:

Error on line 3 of test.xq:
XPDY0050: Required item type of value in 'treat as' expression is xs:untypedAtomic
Query processing failed: Run-time errors were reported

Michael Kay
Saxonica
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to