Thanks Sam.
Looks like this is a common gotcha. I think we'll disable it in all our
code :)
Cheers,
-Steve
On 21/05/2010 11:22, Sam Neth wrote:
Function mapping. Here's a recent thread about this topic:
http://markmail.org/thread/n2eyj2t56fmor7to
On May 21, 2010, at 3:06 AM, Steve Mallen wrote:
Hi folks,
Does anyone know how Mark Logic deals with function signature type
checking when calling functions?
I ask because I recently went on a bit of a wild goose-chase debugging
session, the result of which was that a function we'd defined was not
being called at all (because of a mismatch in the types of the arguments
being passed). There was no type error raised by ML.
As a test case, I've createed the following XQuery, which gives an error
in Saxon:
declare function local:blah($foo as xs:string) {
concat($foo, " called")
};
local:blah( () )
Error: "An empty sequence is not allowed as the first argument of
local:blah()"
But when I run this against ML 4.1, the whole module just returns the
empty sequence (and doesn't appear to call the function at all). There
is no error raised.
Can anyone help explain this behaviour? I would have expected a type
exception to be thrown... am I missing something?
Many thanks,
-Steve
--
Senior Software Engineer, Semantico Limited
<mailto:[email protected]> <tel:+44.1273.358239>
Registered in England and Wales no. 03841410, VAT no. GB-744614334.
Registered office Lees House, 21-23 Dyke Road, Brighton BN1 3FE, UK.
Check out all our latest news and thinking on the Discovery blog
http://blogs.semantico.com/discovery-blog/
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
--
Senior Software Engineer, Semantico Limited
<mailto:[email protected]> <tel:+44.1273.358239>
Registered in England and Wales no. 03841410, VAT no. GB-744614334.
Registered office Lees House, 21-23 Dyke Road, Brighton BN1 3FE, UK.
Check out all our latest news and thinking on the Discovery blog
http://blogs.semantico.com/discovery-blog/
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general