[Bug 17474] [XQ30] Annotation Assertions

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17474

--- Comment #1 from Jonathan Robie <jonathan.robie@gmail.com> 2012-07-24 14:06:21 UTC ---
Proposed rewrite:

A FunctionTest is used to match a function by its type signature and
predicates specified in *function assertions.

[191] FunctionTest ::= FunctionAssertion* (AnyFunctionTest | TypedFunctionTest) 
[*] FunctionAssertion ::= Annotation

[Definition: A function assertion is a predicate that restricts the
set of functions matched by a FunctionTest. It uses the same syntax as
an annotation.]  &language; does not currently define any function
assertions, but future versions may. Other specifications in the
XQuery family may also use function assertions in the future.

Implementations are free to define their own function assertions,
whose behavior is completely implementation-defined. Implementations
may also provide a way for users to create their own function
assertions.

Note: 

      Although function assertions use the same syntax as annotations,
      they are not directly related to annotations. If an
      implementation defines the annotation *blue* and uses it in
      function declarations, there is no guarantee that it will also
      define a function assertion *blue*, or that a function assertion
      named *blue* matches a function declared with the annotation
      *blue*. Of course, an implementation that does so may be more
      intuitive to users.

Implementations must not define function assertions in the following
reserved namespaces; it is an error for users to create annotation
assertions in the following reserved namespaces [err:XQST0045]:

 http://www.w3.org/XML/1998/namespace
 http://www.w3.org/2001/XMLSchema
 http://www.w3.org/2001/XMLSchema-instance
 http://www.w3.org/2005/xpath-functions
 http://www.w3.org/2005/xpath-functions/math
 http://www.w3.org/2011/xquery-options

Here are some examples of function tests:

* function(*) matches any functionDM30.

* %assertion function(*) matches any functionDM30 if the
  implementation-defined function assertion %assertion is satisfied.

* function(int, int) as int matches any function with the function
  signature function(int, int) as int

* %assertion function(int, int) as int matches any function with the
  function signature function(int, int) as int if the
  implementation-defined function assertion %assertion is satisfied.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 24 July 2012 14:06:27 UTC