This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
What becomees of annotations when function coercion takes place? For example, what is the result of the following query? declare %local:annotation function local:starts-with-E(%a) { starts-with($a, "E") }; declare function local:is-annotated($f as function(xs:string) as xs:boolean) as xs:boolean { $f instance of %local:annotation function(*) }; local:is-annotated(local:starts-with#1)
I believe that the spec currently says that the function returned by function coercion takes it's signature from the expected SequenceType. Since annotations are part of that signature, I think that means that currently the spec says all original annotations are dropped. So I think the spec is currently clear, but wrong. I also think there's a problem here because we don't describe what to do if the expected SequenceType has annotation assertions.
The Working Group has decided that the new function's signature contains all annotations of the coerced function's signature.