This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15690 - [XQ30] Annotations and function coercion
Summary: [XQ30] Annotations and function coercion
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.0 (show other bugs)
Version: Member-only Editors Drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-24 13:22 UTC by Tim Mills
Modified: 2012-02-14 13:43 UTC (History)
1 user (show)

See Also:


Attachments

Description Tim Mills 2012-01-24 13:22:23 UTC
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)
Comment 1 John Snelson 2012-02-14 13:31:03 UTC
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.
Comment 2 Jonathan Robie 2012-02-14 13:43:13 UTC
The Working Group has decided that the new function's signature contains all annotations of the coerced function's signature.