Loading TOC...

MarkLogic 10 Product Documentation
sc:function-parameter-type

sc:function-parameter-type(
   [$arg as function(*)],
   [$param as xs:integer?]
) as schema-type()?

Summary

Returns the declared parameter type of a specific parameter of the function item as a schema component.

Parameters
arg The function item whose return type is to be returned. The default function item is used if no parameter is provided.
param The number of the parameter, 1 for the first, 2 for the second, and so on. If the param is out of range, the empty sequence is returned. The default is 1.

Example

  let $f := function-lookup(xs:QName("sc:function-parameter-type"),2)
  return (
    for $a in 1 to function-arity($f)
    return (concat("arg",$a,"=",sc:function-parameter-type($f,$a)))
  )
  =>
arg1=#xdmp:function
arg2=#xs:anyAtomicType

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.