Project

Profile

Help

confusing error message

Added by Anonymous over 19 years ago

Legacy ID: #3111655 Legacy Poster: Howard Katz (howardk)

declare namespace test = "http://foo.example/"; declare function test:imafloat($num as xs:float) as xs:boolean { $num instance of xs:decimal }; test:imafloat(xs:decimal(5)) I don't understand the exception that's getting thrown on this call: "XPTY0004: Required cardinality of first argument of test:imafloat() is exactly one; supplied value has cardinality zero or one: Failed to compile query". Invoking as test:imafloat(5.0) produces the expected result: false. Howard


Replies (1)

RE: confusing error message - Added by Anonymous over 19 years ago

Legacy ID: #3112052 Legacy Poster: Michael Kay (mhkay)

This isn't just a confusing error message, it's a bug. The query should succeed (numeric promotion should kick in). I'm investigating and will lodge a bug entry when I've tracked it down. Michael Kay

    (1-1/1)

    Please register to reply