This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
7.2.13 The fn:subsequence function "If the type of the input expression has zero or more items, then fn:subsequence, when selecting the first item, has zero-or-one of the prime type of the input type." It seems to me you could conclude the same thing regardless of which item was being selected. That is, replace rules 3 and 4 with statEnv |- Expr1 : Type1 quantifier(Type1) in { * } statEnv |- Expr2 : xs:double ----------------------------------------------------------- statEnv |- fn:subsequence(Expr1, Expr2, 1) : prime(Type1) ? Also, how about: statEnv |- Expr1 : Type1 quantifier(Type1) in { 1, + } statEnv |- Expr2 : xs:double not(Expr2 = 1) ----------------------------------------------------------- statEnv |- fn:subsequence(Expr1, Expr2, 1) : prime(Type1) ?
This is a duplicate of comment 1728. Please check the response in bug 1728. If you agree this resolution, please close. Otherwise, please feel free to reopen the bug. *** This bug has been marked as a duplicate of 1728 ***
My first suggestion is indeed a duplicate of Bug 1728. But my second suggestion isn't.
Sorry, it seems we missed that. However it also seems that the rationale is the same for the second suggestion. The only reason for the specific typing rules is to provide better static typing for Expr[Numeric] and Expr[last()]. For the general case, people believe we are better off for now with a general rule, which cover all cases. Hence the reason for not trying to generalize more than necessary the specific rules. - Jerome
The XML Query and XSLT working group have decided to close bug 1766 with no change to spec, with the same rationale as 1728. - Jerome