a correction, function signature is

local:get-rdf-builder($prefix-map as map:map?, $graph as sem:iri?) as 
function(item(), item(), item()) as sem:triple

Regards,
Devesh

________________________________
From: [email protected] 
<[email protected]> on behalf of Tyagi, Devesh 
<[email protected]>
Sent: Wednesday, August 12, 2015 12:45 PM
To: [email protected]
Subject: [MarkLogic Dev General] Confusing behavior of '?' cardinality in 
arguments


Hi,


While using following function

sem:rdf-builder(
   [$prefixes<http://docs.marklogic.com/7.0/sem:rdf-builder#prefixes> as 
map:map?],
   [$graph<http://docs.marklogic.com/7.0/sem:rdf-builder#graph> as sem:iri?]
) as function(item(),item(),item()) as sem:triple

we can invoke it as follows

sem:rdf-builder().

But when I am creating my own function as follows

local:get-rdf-builder($prefix-map as map:map*, $graph as sem:iri*) as 
function(item(), item(), item()) as sem:triple

and invoked it as

local:get-rdf-builder()

It raises the following exception

get-rdf-builder() -- Too few args, expected 2 but got 0

Works fine for local:get-rdf-builder((),()).

I am executing this in Marklogic QConsole.

Any help would be appreciated.

Regards,

Devesh


"This e-mail and any attachments transmitted with it are for the sole use of 
the intended recipient(s) and may contain confidential , proprietary or 
privileged information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this e-mail or any action taken in reliance on this e-mail is 
strictly prohibited and may be unlawful."
"This e-mail and any attachments transmitted with it are for the sole use of 
the intended recipient(s) and may contain confidential , proprietary or 
privileged information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this e-mail or any action taken in reliance on this e-mail is 
strictly prohibited and may be unlawful."
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to