I think I found the answer: the signature is to be used when you declare a function, but not when you use it. 
Should have thought of that. 


I'm puzzled by the following:

 Priscilla Walmsley's books has the following code snippet to illustrate function signatures:

upper-case( as xs:string?) as xs:string


Using this bit code produces this error message when the xquery is executed via oXygen and Saxon PE 9.2.0.6

fSystemID: /Users/martin/Documents/xquery/panini.xq
Engine name: Saxon-PE XQuery 9.2.0.6
Severity: fatal
Description: XQuery syntax error in #upper-case(@arg as xs:string#:     expected ")", found "as"
Start location: 1:0

If I remover the two 'as' expressions and execute  

upper-case(@arg)


in a query where $arg has been defined or by itself in the expression

upper-case("left")

I get the expected result. This is all the more confusing because the pop-up help gives me exactly the syntax 

($arg as xs:string) as xs:string

that the parser subsequently complains about. What am I doing wrong here?