[Bug 4841] [FS] Use of fn:subsequence in relation to normalization rules for filter expressions in FS

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4841





------- Comment #12 from oliver@cbcl.co.uk  2007-10-30 11:56 -------
The changes proposed fail to provide a catch all case, and so the type is not
defined for an argument with quantifier ? for example.

The typing rules could be made simpler (without changing the result) by just
applying the following rules:

statEnv |-  QName of func expands to (FN-URI,"item-at")
statEnv |-  Expr : Type  quantifier(Type) in { 1, + }
--------------------------------------------------------
statEnv |-  QName(Expr, 1) : prime(Type)

statEnv |-  QName of func expands to (FN-URI,"item-at")
statEnv |-  Expr : Type
--------------------------------------------------------
statEnv |-  QName(Expr1, Expr2) : prime(Type) ?


Additionally, the static typing could be improved with the following rule:
statEnv |-  QName of func expands to (FN-URI,"item-at")
statEnv |-  Expr : Type  quantifier(Type) in { 1, + }
--------------------------------------------------------
statEnv |-  QName(Expr1, $last) : prime(Type)

Received on Tuesday, 30 October 2007 11:56:39 UTC