This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Since this function is declared as returning a string, function argument conversion, static type analysis spots that the declared return type (string) of the function does not match the actual type returned (NOTATION). It therefore raises XPTY0004. I think the intention of the test was to spot casting of the <tag>xs:integer</tag> to xs:NOTATION, and thus suggest removing "as xs:string". declare function local:clarkname($q as xs:NOTATION) as xs:string { $q }; local:clarkname(<tag>xs:integer</tag>)
This bug issue has been taken over by the fix made from issue #19479 *** This bug has been marked as a duplicate of bug 19479 ***
Confirmed fixed. Thanks.