An error has occurred

An error has been generated by the application.

exerr:ERROR XPTY0004: The actual cardinality for parameter 1 does not match the cardinality declared in the function's signature: normalize-space($arg as xs:string?) xs:string. Expected cardinality: zero or one, got 2. [at line 162, column 121, source: /db/apps/mrp/modules/app.xql]
In function:
	app:nameOfIndexEntry(node(), map(*)) [-1:-1:/db/apps/mrp/modules/app.xql]
	templates:process-output(element(), map(*), item()*, element()) [211:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:call-by-introspection(element(), map(*), map(*), function(*)) [189:28:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:call(item(), element(), map(*)) [137:36:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [428:17:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process-output(element(), map(*), item()*) [230:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process-output(element(), map(*), item()*, element()) [211:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:call-by-introspection(element(), map(*), map(*), function(*)) [189:28:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:call(item(), element(), map(*)) [145:37:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [428:17:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process-output(element(), map(*), item()*) [230:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process-output(element(), map(*), item()*, element()) [211:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:call-by-introspection(element(), map(*), map(*), function(*)) [189:28:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:call(item(), element(), map(*)) [137:36:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [133:51:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [90:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:apply(node()+, function(*), map(*)?, map(*)?) [45:5:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]